summaryrefslogtreecommitdiff
path: root/framework
AgeCommit message (Collapse)Author
2020-08-14loplugin:simplifybool moreNoel Grandin
look for expressions like !(a && !b) which can be expanded out Change-Id: I72515a9638762b050f9a258c08da39ebfa2ef8e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100579 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-08-14One toolbar generic controller is enoughMaxim Monastirsky
The one from framework is more feature complete, so use that one. Change-Id: I499f0ae1d20c588cfc04beebc643819559325882 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100726 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2020-08-14Replace MenuToolbarController with the usual approach for menu buttonsMaxim Monastirsky
i.e. ResourceMenuController + GenericPopupToolbarController. (Decl. of both isn't available in a header file, so they are instantiated via the service manager for now. This is a bit weird for something from the same module, but should not make any difference in practice.) Change-Id: Ia3fc7ba82b0f6e1a43aa7b5e56e2cff7e039d877 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100725 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2020-08-13loplugin:stringstatic also look for local staticsNoel Grandin
Add some API to O*StringLiteral, to make it easier to use in some places that were using O*String Change-Id: I1fb93bd47ac2065c9220d509aad3f4320326d99e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100270 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-08-12SvTreeListBox can move into toolkit headers nowCaolán McNamara
Change-Id: I6b3b6ef1530a192f4b6bf87aa9688687063683ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100591 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-08-11Simplify toolbar mode switchingMaxim Monastirsky
Change-Id: I3bd809ce3ef661f6566a73e639fbd5e4bb1b7e3f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100439 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2020-08-11Menu methods take item id not positionMaxim Monastirsky
Problem can be seen when experimental features turned off and Groupedbar Compact is active, but its menu item isn't checked. Change-Id: I0386fccd0f64cde678c78d9f15dd853a6247e3ab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100446 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2020-08-04loplugin:simplifybool a little more aggressiveNoel Grandin
with expressions like !(a && b) Change-Id: Id2acec2a8d0eaaa8e5e37dbd2cae7281be36572e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100040 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-31tdf#134887 NewToolbarController: Use different icons for extra largeMaxim Monastirsky
Change-Id: I30621ab2e98c2387f3de67b2871516e5e25da761 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99565 Tested-by: Jenkins Reviewed-by: Rizal Muttaqin <riz_17_oke@yahoo.co.id>
2020-07-30terminate XDesktop properly in unit testsNoel Grandin
So that the UNO constructor work can continue - where we need the desktop to be disposed properly so that all UNO constructors objects have their dispose() called, and they can clean up their global state. We detect this case by changing a SAL_WARN to an assert in Desktop::disposing() (*) in ~ScTabViewShell, don't call EnterHandler, because that tries to create EditEngine's and other stuff, which crashes (*) Need a fake singleton so that the servicemanager calls dispose() on the AnalysAddIn and we can clear the global variable there. Change-Id: Id13b51e17afc16fcbbc65d64281cdf847e4a58cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99640 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-29replace and drop SvtCompatibilityViewOptionsCaolán McNamara
Change-Id: Iab187468cf25b4a4afc7c79578677156ff224df9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99651 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-07-28tdf#134887 Rework last item handling in NewToolbarControllerMaxim Monastirsky
Just store the last used menu id, and consistently get all the information (command name, image id, target frame etc.) from the menu instance. Also implement the XSubToolbarController interface, so we get a chance to update the image on icon size or theme change. The initial action and icon of the button are based on the url passed by the .uno:AddDirect status update, given that there is a corresponding menu item. The only defined fallback now is to .uno:AddDirect itself for both executing and getting the icon, but this shouldn't happen normally, as I fixed all the affected cases I found so far, namely Base (including windows like table design etc.) and the Basic IDE. Actually these cases were partially broken anyway, and as a result now completely fixed: - In Base main app window, the button used to default to a new Writer document, although its tooltip advertises Ctrl+N as the kb shortcut, and pressing that shortcut actually opens the database creation wizard (as expected). - In the Basic IDE, the button was working, but not the Ctrl+N shortcut. Change-Id: I6537b3f38e7d7001ec1b39d78285445464fd8cbe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99514 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2020-07-25move getUIRootDir to AllSettingsCaolán McNamara
Change-Id: I3b7774a043a2c99531e1c76b531df4358699bba7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99440 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-07-24TODo -> TODOCaolán McNamara
Change-Id: Ie62909f7cffb8fdf178b0588e4f7dd3fc4b8ced3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99385 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-07-22merge duplicate GetFocus implementationsCaolán McNamara
Change-Id: Ifc2e3fab6dacb3b0bca74c0584c16170b8b97de4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99234 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-07-21Revert "configure: add a --with-product-flavor switch"Heiko Tietze
This reverts commit c540483134482d437ea6e02390ff429f4300cbb0. Reason for revert: https://blog.documentfoundation.org/blog/2020/07/20/update-on-marketing-and-communication-plans-for-the-libreoffice-7-x-series/ Conflicts: icon-themes/colibre/brand/shell/logo_flavor.svg Change-Id: If435d4c4c16fb1b52635fae2d966151970729daa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99053 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2020-07-21Revert "Disable flavour in title bar for Linux."Heiko Tietze
This reverts commit 6ddd8673f9985afd48b3212444a942ebe37197f6. Reason for revert: https://blog.documentfoundation.org/blog/2020/07/20/update-on-marketing-and-communication-plans-for-the-libreoffice-7-x-series/ Change-Id: I922e34a5dfe7add0a63f5b9a936a32758b6e949c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99055 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2020-07-20compact namespace declNoel Grandin
used git grep -lw namespace | xargs perl -i -p0e 's/(\w+)\s*.\{.\s*namespace\s*(\w+)/\1::\2/smg;' to do the initial replace, then compiled and fixed. Change-Id: If69904d75940c851aeffab0e78c4ba02cc968d44 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98526 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-12Removed duplicated includeAndrea Gelmini
Change-Id: I8caa3f1be66ca8cf236e9ada8487ea81f45b1377 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98470 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-07-12update pchesCaolán McNamara
Change-Id: I75602277a5a26b012a12f2c4f4b7ff5bb663b0b9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98474 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-07-10replace usage of blacklist with excludelist for IWYUThorsten Behrens
Background and motivation: https://tools.ietf.org/html/draft-knodel-terminology-02 Change-Id: I2f22d455d2a936a85750eaab1fda215ebb6d9d48 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98182 Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-07-09framework: create instances with uno constructorsNoel Grandin
See tdf#74608 for motivation Change-Id: Ia2d9447b687f0792d9d3a98d30cd2b8fe54049ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98388 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-09clean up macro usageNoel Grandin
Change-Id: I06669718f692cc5e9e209b4e490365f4f016afdb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98389 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-08framework: create instances with uno constructorsNoel Grandin
See tdf#74608 for motivation Change-Id: I6237016000dc05eacb14e59815b53cd44fbfce0c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98384 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-07framework: create instances with uno constructorsNoel Grandin
See tdf#74608 for motivation Change-Id: I8679b50395d11cb2d807d52526d803df9b0606b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98294 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-07make some symbols privateNoel Grandin
Change-Id: I224831ad18e754fd67d9b16510cd286a5397f1f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98236 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-07Removed duplicated includeAndrea Gelmini
Change-Id: I33b3a56d9727dea2cbafcfbf73f5d4c08069ba34 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98030 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-07-05adjust FormattedSpinButton to be driven by an EntryFormatterCaolán McNamara
so we can have the same backend driving the FormattedSpinButtons as a FormattedEntry Change-Id: I07a472315a04787eb5fcf992cde8f758af742156 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97860 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-07-04reduce number of framework librariesNoel Grandin
Change-Id: I18bfdba3d26593f796d8b0bda87720e31066d5e2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97968 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-04reduce number of framework librariesNoel Grandin
Change-Id: If2bf85301eb1523a636d031f6e5a9f78cb1ee06b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97871 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-02Disable flavour in title bar for Linux.Michael Meeks
Tweaks c5404831344 after discussion with Rene. Change-Id: I7820643f79e673a90055f74770bffaf8ad7a077f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97646 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-07-01configure: add a --with-product-flavor switchMiklos Vajna
Defaults to Personal to point out this is supported by volunteers. This affects the splash screen, the window title, the about dialog and the start center. Change-Id: I216a7f547618377ed268454ebfd2801c4c3901b7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97427 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-07-01Upcoming improved loplugin:staticanonymous -> redundantstatic: frameworkStephan Bergmann
Change-Id: I71eaaa7cbc1c38e541291d48eb5f05157fd4c8c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97563 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-06-29Call framework::Desktop::shutdown directlyStephan Bergmann
...instead of via the XJob hack introduced in a6862a26d6cd17f6b4e4f6577bcd778bf952e65b "tdf#134106: Get rid of XDesktopInternal again" Change-Id: Ic533e8faba1a3da65ead74d78f0ab9c4aab1ca6a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97397 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-06-29loplugin:unusedfieldsNoel Grandin
Change-Id: Ia0f517fba3a0660b64c97f426cc2cdfbbcd0ebad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97391 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-06-29loplugin:unusedmethodsNoel Grandin
Change-Id: I4cccac5b6bba55d87361b07b05220ce890e75412 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97390 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-06-26drop unnecessary includeCaolán McNamara
Change-Id: I8d0dd93a2bcf8c4ea1bf1f6a5ed7a866e181127b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97237 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-06-26weld FixedTextControlCaolán McNamara
Change-Id: I0a2983aa4d389aa0e65aa117d576295d02460b4a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97236 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-06-26tdf#134106: Get rid of XDesktopInternal againStephan Bergmann
For internal functionality that is not meant to be called by client code, I think it is appropriate to hide it either via XUnoTunnel (but which would have been a tad incovenient, as it would have meant to make framework::Desktop in framework/inc/services/desktop.hxx available to the code in desktop/source/app/app.cxx), or via reuse of some existing, sufficently fitting interface (as is done here with css.task.XJob). This nicely avoids the backwards compatibilty issue with remote Python scripts, as discussed in tdf#134106 "Binary URP bridge disposed during call to ServiceManager.createInstanceWithContext". Change-Id: Ic9db9401ddf0f6b696344dd1d5c6ad279ea5a832 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97241 Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins
2020-06-26weld FixedImageControlCaolán McNamara
Change-Id: I13f3480794232a9c203ae047a4fcad372988b8b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97235 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-06-26use underlying BitmapExCaolán McNamara
Change-Id: I1ddc5a50a54bb230af1c76a8098c68fdb0495df0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97234 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-06-26improve tab traversal in addons with native widgetsCaolán McNamara
Change-Id: I55d0390522122cc4409ea14274e756881315df0a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97219 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-06-26weld SpinfieldControlCaolán McNamara
Change-Id: I1696105ead648c86076f05f50f6286e9a3a932d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97218 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-06-24use more std::container::insert instead of std::copyNoel Grandin
which is both more compact code, and more efficient, since the insert method can do smarter resizing Change-Id: I17f226660f87cdf002edccc29b4af8fd59a25f91 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96948 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-06-11tdf#88205: Adapt uses of css::uno::Sequence to use initializer_list ctorFatih
Change-Id: I4f87f1735fbb61125f4c3bdd0239b28c6df400de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94471 Tested-by: Jenkins Reviewed-by: Fatih Budak <budakf@itu.edu.tr> Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-06-04Upcoming loplugin:elidestringvar: frameworkStephan Bergmann
Change-Id: I5a786316e9fa6dab0166c435c6a1ac9e5d8014a6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95466 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-05-31Revert "tdf#88985 block app from exiting during macro execution"Jan-Marek Glogowski
This isn't needed anymore with the fixes for tdf#127205. Reverts commit 68cf256f506d4601a2d2cf3ec2d56713afd491e6. Change-Id: I1a7944632af8330f68d451d2c293143233039b34 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88837 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2020-05-29loplugin:simplifybool in dbaccess..frameworkNoel Grandin
Change-Id: I0d73bb7d8d3fde426edc0a10c0750758b68aceb5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95099 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-25Clean up dead codeStephan Bergmann
...after d55fb1552f6ecd5c2f9e817d2b820e1a66410840 "loplugin:unusedfields in framework" had removed the sole consume of sRelPathNoLang. Change-Id: I7fb6aae42e4ea0b4fdebc993498e43066ea0c8fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94763 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-05-22move InterimItemWindow to vclCaolán McNamara
Change-Id: If0a4a14708810c44d087b51961f2ecb3fda4df23 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94649 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>