Commit Graph
6250 Commits
Author SHA1 Message Date
Caolán McNamara 609416ca21 inherit LinkButton and Notebook from Widget instead of Container
Change-Id: Ie3940d712e2e60a59234aff34daaf6003301fd15
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115660
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-05-15 21:43:10 +02:00
Noel Grandin 32b09faca5 Revert "simplify the vcl<->toolkit connection"
because it introduces a link-time dependency of vcl on toolkit,
and toolkit already depends on vcl

This reverts commit f7a86c5cdf.

Change-Id: Ibdd4f3e8221d70e2abd8fcbda67f85af3ac0396e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115547
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-13 14:48:24 +02:00
Noel Grandin f7a86c5cdf simplify the vcl<->toolkit connection
No need to store two different pointers and hide the
underlying class behind an UNO interface

Change-Id: I72c55e912caa9eae1cffa6c9d1b1d480e5668d40
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115496
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-12 19:57:24 +02:00
Noel Grandin 1545949690 ref-count SfxItemPool
so we can remove SfxItemPoolUser, which is a right
performance hog when we have large calc spreadsheets

Change-Id: I344002f536f6eead5cf98c6647dd1667fd9c8874
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115247
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-08 17:36:54 +02:00
Noel Grandin 7cc1d3437a loplugin:unnecessaryparen small improvement
when calling a function, and passing only one arg, but the
function has defaulted args, we were ignoring this case.

Change-Id: I86517f18e30531127664088ddc09ef96dbd8bdf5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115033
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-03 14:03:54 +02:00
Stephan Bergmann 10d29c390d throw() -> noexcept, part 2/3: Automatic loplugin:noexcept rewrite
Change-Id: I076f16d0536b534abf0ced4d76051eadb4c0e033
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114949
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-05-02 17:02:28 +02:00
Noel Grandin 04aafba860 loplugin:stringadd simplify some *StringBuffer operations
pulled from a larger patch which I created with a more permissive
variant of this plugin

Change-Id: I7abf1f3f09e84703b6e0e52fe9587dff691b2187
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114875
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-29 18:25:31 +02:00
Stephan Bergmann 3260edbeb5 loplugin:stringadd (clang-cl)
Change-Id: Id7c2db4abcf947c4efa0296df29feca2c36d3cf8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114692
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-04-27 15:45:27 +02:00
Noel Grandin c7c6f0af6c loplugin:stringadd convert chained append to +
which can use the more efficient *StringConcat

Also fix a crash in stringview plugin which
started happening while I working on this.

Change-Id: I91a5b9b7707d1594d27d80b73930f5afac8ae608
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114568
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-27 14:07:56 +02:00
Noel Grandin 7049328fb2 loplugin:stringadd replace OUStringLiteral temporaries with OUString::Concat
Change-Id: I656f06a74d9f0180ae460264563d6a935c7d2c60
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114377
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-21 13:15:32 +02:00
Noel Grandin b08a2b2994 use OUString::Concat here, not OUStringLiteral
Change-Id: Ia2172bcab60f32c9d9d4f6ca0230484343eef69b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114321
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-20 13:34:43 +02:00
Noel Grandin 4627cac8e5 loplugin:unusedfields
Change-Id: Ifb8ff48a05f37c0593bf619d7c774a26cb2655e3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113987
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-12 20:28:54 +02:00
Gabor Kelemen 2633d5f97f Recheck include/ with IWYU
See tdf#42949 for motivation

Change-Id: Ifc253bf800bb1468b5774663a93f4fb30bec81d3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113657
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-04-09 11:56:36 +02:00
Caolán McNamara 304e65f5f8 tdf#141084 don't notify that the control has changed content until focus-out
while also keeping tdf#140239 working too

Change-Id: I42833f6a4d2440781cf3f2297b78c6e313b3d239
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113467
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-04-01 22:01:03 +02:00
Henry Castro a06f8147fe lok: remove frame action listener when disposing
In order to prevent that the frame action listener
holds the object reference count when removed,
ensure they are removed when disposing the object.

Change-Id: If83574e31230d9c683adaf36af36485650fd2c50
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113389
Tested-by: Jenkins
Reviewed-by: Henry Castro <hcastro@collabora.com>
2021-04-01 14:07:10 +02:00
Henry Castro edc7b4bad6 lok: "BibFrameController_Impl" prefix m_* members
Change-Id: I2bead3015d306c678d81980ef14e7689ab4acc54
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113419
Tested-by: Jenkins
Reviewed-by: Henry Castro <hcastro@collabora.com>
2021-03-31 21:12:19 +02:00
Noel b624b13b3d loplugin:flatten
Change-Id: Ib7a895fba66f8dc9b6501e61631c02694053b7fc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113157
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-26 18:02:19 +01:00
Mike Kaganski a0656ec6fc const OUString -> const OUStringLiteral
Mostly automated rewrite

Change-Id: Ie020a083f898bc126b8fb039d4ecb2e687172da1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112965
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-03-25 10:06:26 +01:00
Vincent LE GARREC 039e90ec01 tdf#124176 Use pragma once in extensions
Change-Id: I1a5ed69da20cef4428f5f61db5fb9411cff61dc7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112048
Tested-by: Jenkins
Reviewed-by: John Turpish <jbt@gmx.us>
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2021-03-23 10:48:06 +01:00
Noel Grandin 5947744bd7 use single-use attribute for LoggerPool
instead of rtl::Instance, which means it will get
cleaned up when UNO shuts down

Change-Id: I2eaeff9666d7da490fa1c668dde14963cd513135
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112925
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-23 07:41:25 +01:00
Caolán McNamara 96903f858e cid#1474008 silence Unchecked return value from library
Change-Id: If09a4edb9826507d817f9b0bb425eed8f35bd9c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112846
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-21 20:47:34 +01:00
Caolán McNamara 32b7c32aa8 use VCLUnoHelper::GetWindow
instead of directly using VCLXWindow

Change-Id: I80c70c9773b1963ec4d58c833ff2fdba9cfc4b92
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112353
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-12 10:04:11 +01:00
Caolán McNamara 07d278c911 awt::XWindow has setVisible so don't need to fetch VCLXWindow to do that
Change-Id: Idc471c7a1dfd10821c8644a02d482cf8edc09fd7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112352
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-12 10:03:32 +01:00
Noel 1692998399 use strong_int for item ids in vcl::ToolBox
(*) fix bug in SfxToolBoxControl::StateChanged where it was using the slot id
    instead of the toolbox item id
(*) I left the logic in SbaTableQueryBrowser alone, but it looks suspicious,
    casting slot ids to toolbox ids

Change-Id: Ied229164c27fb4456b0515c6fdcbd1682766a1a9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112186
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-11 14:10:30 +01:00
Stephan Bergmann bbcf235753 loplugin:refcounting (clang-cl)
Change-Id: I91189ebd902b70e2fbe42fe8cc09b8677af1a5fb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112194
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-03-09 14:23:45 +01:00
Caolán McNamara 862fd2fa19 defer getting toplevel for color picker until we need it
Change-Id: I60f4ded47f7d80b397647ea3344e83a5dfd1b11e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112183
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-09 10:08:45 +01:00
Caolán McNamara 991ce31833 bubblewindow.hxx can be a private vcl header
Change-Id: Iaf79521e812ec32f6e0b9276ad778fe7abc836a8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111807
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-03 10:19:08 +01:00
Caolán McNamara d2cd1fad73 split and move MenuBar BubbleWindowManager to vcl
Change-Id: I1d0f4b7d56845a77e979199917c5d9c849b76c8e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111798
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-03 10:08:33 +01:00
Caolán McNamara 9bebf9c676 move BubbleWindow to vcl
Change-Id: I2481a9882dc66337b35b758fb4f73978df5af541
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111797
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-03 10:07:58 +01:00
Noel 92b96423e0 loplugin:refcounting in extensions
Change-Id: I3a03bdb53e2d75da3ca40b48ed8fd133dbf69dff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111634
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-27 11:55:08 +01:00
Xisco Fauli 8c2251481a Move code for setting unique buildable names one level up
this way, we also set the name for elements like the
listbox 'Text type'

Change-Id: Id894704f870276c20958612bee2926dae98d766d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111475
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-02-24 15:42:07 +01:00
Xisco Fauli ed796e0fcd Set unique buildable names to each widget in the form properties dialog
the dialog has many 'listbox' items and it is not possible to use
them in uitests if they have the same name

follow-up of d4ca173f2b

Change-Id: I3342c0d930f3567219008fc6048c337a8af447af
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111407
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2021-02-23 20:41:57 +01:00
Caolán McNamara 8365076e89 tdf#139070 format entry view of multilines with final formatting
so during editing of a multiline the singleline entry shows what
it will show when editing is finished, so we suppress the default
behaviour of gtk to show a newline symbol and the default
behaviour of vcl to strip newlines

Change-Id: Id7d384efc8b737c463f1bd44ca61376f342edb25
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111410
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-23 20:19:12 +01:00
Caolán McNamara b627cb4e9a weld bibliography autofilter menu
Change-Id: I3abacb0b14897f144c213496161b94d431f51b88
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111404
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-23 20:18:21 +01:00
Noel ba20fcaa25 loplugin:unusedmethods
Change-Id: Ie0534244cc7a30ad006e65baf125c59757c90d50
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111388
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-23 19:02:25 +01:00
Caolán McNamara dec32864a6 cid#1473244 silence Unchecked return value
Change-Id: If33e7cd76e361e8abfe71a88df0b3875759a059d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111303
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-22 11:51:33 +01:00
Noel 7be139f114 loplugin:refcounting in extensions
Change-Id: Ie4e4c771542ce38ce8197667f6374cc191a44ee9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111286
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-22 10:16:08 +01:00
Caolán McNamara 7752bbe121 foward declare NotebookBarAddonsItem instead of using include
Change-Id: I57e5a8f28a40994b61ab0f554401e4f70c8ffc12
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111230
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-19 18:11:36 +01:00
Caolán McNamara ce5cf53a66 weld BibGeneralPage
go the route of all-welded to replace this mix of vcl and awt
widgets

Change-Id: I242b801dc1d9993fc478bb7253480f5b6c3c0ad1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111088
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-19 10:08:42 +01:00
Stephan Bergmann 4adf4e0a55 loplugin:referencecasting (--enable-extension-update)
Change-Id: I658aa527d426c28fc19132c2583429c4b3de816a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111126
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-02-18 19:01:14 +01:00
Noel 7767ff7b52 loplugin:referencecasting in editeng..framework
Change-Id: Ia3375011ecd0a65afed0f131f477fc1542603fde
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110948
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-16 07:52:37 +01:00
Caolán McNamara 816994a175 tdf#140239 leave current cursor valid if the contents won't change
Change-Id: I854e8e94c7415d9046088e364f966390c4fb762f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110770
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-11 20:40:48 +01:00
Arnaud Versini 0cf73245e2 abpilot : remove useless type PackageAccessControl
Change-Id: Ie55d422a37de7477a7674544e5e2fc1c938a7b3b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110206
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-01 17:47:39 +01:00
Mike Kaganski 52e6dea522 Drop FAR/NEAR from 16-bit WinAPI times
Change-Id: Idf71c662138c281333a83cc76a9d75cbf086f362
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110236
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-02-01 07:47:11 +01:00
Noel 1250aecd71 loplugin:stringviewparam extend to new..
O[U]StringBuffer methods

Change-Id: I0ffbc33d54ae7c98b5652434f3370ee4f819f6f4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110090
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-29 09:25:12 +01:00
Noel 1da6908173 add string_view variants of methods to O[U]StringBuffer
and update the stringview loplugin to detect cases where we can
use these new methods.

Change-Id: I998efe02e35c8efcb3abfb4d7186165bbe6dfb2c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110046
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-28 11:11:28 +01:00
Noel Grandin 1aa31294b2 avoid some ref-counting
can just return a pointer here, instead of VclPtr.

Change-Id: I9ab8962cbbe84ed4dfcfd658a6d758112914cb89
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109923
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-25 20:21:48 +01:00
Caolán McNamara 46e525c36e tdf#139486 also listen to the Entry to determine if the SpinButton was changed
the Window::FocusOut handler the browser installs is called before the
Control::FocusOut handler, built-into vcl::Control, is called and
the Control::FocusOut handler is the one that calls the (speculative)
ValueChanged so the browser determines that the SpinButton is unchanged
at the time of focus out. If we additionally listen to Changed at the
Entry level we will correctly know that widget is modified in some way
at the Window::FocusOut time.

Change-Id: I540d917fc7375fa61662aa69397bcbaa04a91f26
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109912
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-01-25 17:20:55 +01:00
Mike Kaganski 654c527229 Use ContainerType().swap and avoid local variables
Change-Id: I773555180758a97aff37f9bc27de83c355d71521
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109761
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-01-24 08:36:24 +01:00
Noel 63a68064bb make the Color constructors explicitly specify transparency
to reduce the churn, we leave the existing constructor in place,
and add a clang plugin to detect when the value passed to the
existing constructor may contain transparency/alpha data.

i.e. we leave expressions like Color(0xffffff) alone, but
warn about any non-constant expression, and any expression
like Color(0xff000000)

Change-Id: Id2ce58e08882d9b7bd0b9f88eca97359dcdbcc8c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109362
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-16 10:07:07 +01:00