summaryrefslogtreecommitdiff
path: root/framework/source
AgeCommit message (Collapse)Author
2021-06-10loplugin:unnecessaryreturn AddonsOptions_ImplNoel Grandin
Change-Id: Ic2adf9467af7118e8efbbae2132912f3cc3d6943 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116988 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-08Resolves tdf#131817 - Option to globally switch toolbar locking on/offHeiko Tietze
Reverts 6993d5d0f1079fe720a7da004b70b57361c99fc6 and sets Locked in GlobalSettings to true New UNO command ToolbarLock to toggle the state added to the toolbars menu Change-Id: I246280b2b7930f2bf686e6fc26383da4799b5028 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115797 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2021-05-31no need to allocate these separatelyNoel Grandin
Change-Id: I9464fbcc1af966755cc4eb8fe0beead4638848ba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116479 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-17split OutputDevice from WindowNoel Grandin
as part of a longer-term goal of doing our widget rendering only inside a top-level render- context. I moved all of the OutputDevice-related code that existed in vcl::Window into a new subclass of OutputDevice called WindowOutputDevice. Notes for further work (*) not sure why we are getting an 1x1 surface in SvpSalGraphics::releaseCairoContext, but to fix it I clamp the size there (*) might have to dump VCLXDevice, and move it's code down into VCLXWindow and VCLXVirtualDevice (*) can we remove use of VCLXDevice in other places, in favour of just talking to the VCL code? Change-Id: I105946377f5322677d6f7d0c1c23847178a720b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113204 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-05loplugin:constmethodNoel Grandin
Change-Id: I7913fd8144d521b8293ac43036d0fad82e457cd1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115145 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-02throw() -> noexcept, part 2/3: Automatic loplugin:noexcept rewriteStephan Bergmann
Change-Id: I076f16d0536b534abf0ced4d76051eadb4c0e033 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114949 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-04-30tdf#79049 speed up OOXML workbook loadNoel Grandin
we spend a lot of time in ScAttrArray::GetLastVisibleAttr which appears to be very expensive for this worksheet. This is re-computed every time we enter SfxBaseModel::getArgs Reduce the recomputation by introducing a new method which only retrieves specific SfxBaseModel arguments. This takes the load time from 5m9 to 1m9 for me. Change-Id: I605fae0faa94760c7d6993877c9559ea5dc813cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114905 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-29loplugin:stringadd simplify some *StringBuffer operationsNoel Grandin
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-28framework: allow loading a component on the main thread, using XDesktopMiklos Vajna
This is similar to commit 2dc3a6c273cb82506842864481d78df7294debbf (framework: allow loading a component on the main thread, 2018-12-19), but that focused on the special case when loading happens via XFrame. The more frequently used XDesktop way now supports the same flag, allowing correctly loading "real" OLE objects on Windows. Change-Id: I059ea143c91894508d8264084094eefc2bff24e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114805 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-04-28use string_view in INetURLObject::encodeNoel Grandin
Change-Id: Ib686c6872388b02c8939d3b65f6bd25cda348bc8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114754 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-27loplugin:stringadd convert chained append to +Noel Grandin
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-27tdf#141164: Add an expert config for WebDAV redirection detectionMike Kaganski
Since commit 20b1e6440aacab043753e93be4499e939a80b05b, we detect redirected WebDAV paths, and substitute them with original WebDAV URLs to allow retrieving additional information like lock owner. The new officecfg::Office::Common::Load::DetectWebDAVRedirection allows to disable the detection, and opt to older way of use of Windows Redirector, taking advantage of its cookie handling until we implement own proper cookie handling. Change-Id: I1510a016f40dbe81dcba9aa4fd50eda73a6d9f22 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114686 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-04-26drop mask from BitmapExNoel Grandin
So that we have fewer cases to deal with when we transition to 32-bit bitmaps. (*) rename maMask to maAlphaMask, since now it is only being used for alpha duties. (*) drop mbAlpha and mbTransparent to simplify state management, the only thing we need to check for alpha is if maAlphaMask is non-empty. Change-Id: I06252e38e950e846a94b4c2ba8ea763be17801fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111679 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-22no need to create temporaries when appending number to O[U]StringBufferNoel Grandin
Change-Id: I36d82423b5f75010552696a66cec7e53ee265ce4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114395 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-22Call forgotten Init in toolbarmanagerSzymon Kłos
This call was missing in ac1aefd5174258d9bcb41465ce566ed1a0819f3d Extend ToolBarManager to build weld::Toolbar Change-Id: I734861616020e29b88310edf1ff5621c8cab2b8d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114472 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2021-04-19convert some #define to OUStringLiteralNoel Grandin
Change-Id: I3d2ce76d30ec4f42495d27f1913c6718d2c5078f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114293 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-15loplugin:stringliteralvar look for assignmentsNoel Grandin
to O[U]String from char array literals, we can convert the char literals to O[U]StringLiteral and avoid a runtime allocation Change-Id: I15d8dddb2cd428b90740e39f20daf98e0941aa6d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114125 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-10Fix typo in codeAndrea Gelmini
To complete commit: 7c6605bd2c1b Typos in code with variables containing "inital"->"initial" https://gerrit.libreoffice.org/c/core/+/113823 Change-Id: I5874af4c18d460b81f99ecee7034df2d2829bad1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113876 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2021-04-09Avoid user interaction when determining recent documents' MIME typesStephan Bergmann
After 6fcabbd6199869753fd6a266f23901962a77f556 "tdf#129153: Show MIME type icon in main menu File>Recent documents list", I e.g. got an "Authentication Required" dialog asking for user name and password if there was an sftp URI among my recent documents. Change-Id: Ic772c500f9dd2bc2418ea7dbea966e8478a35729 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113887 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-04-08Typos in code with variables containing "inital"->"initial"Julien Nabet
Change-Id: I48205b40b7f9a0b37da3712ae05c49ff4a618db1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113823 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-04-07rtl::Static -> function local staticNoel Grandin
Change-Id: I2071c27bdf074403ec24e67f9278ac27f9491303 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113698 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-06Following 6fcabbd6199869753fd6a266f23901962a77f556Julien Nabet
...tdf#129153: Show MIME type icon in main menu File>Recent documents list No need to call n times aIconSettings ctr + GetUseImagesInMenus() since it won't change in the loop + rename "aIsIconsAllowed" to "bIsIconsAllowed" since it's a bool Change-Id: I5729f0cdba9a0973afe4d0188f11361877300193 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113682 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-04-06translation domain of sfx for .ui in framework doesn't look rightCaolán McNamara
though there is nothing to translate. Probably should be fwk, but there are no other .uis in framework and startmodule doesn't feel right either. So just put it alongside the other svtools .uis and give it a svt translation domain and fetch it from svtools Change-Id: If6b89ae3b2ba45673f5ee5e3e9a4e1da40c80a53 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113528 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-04-06tdf#129153: Show MIME type icon in main menu File>Recent documents listBayram Çiçek
- MIME type icons added for all items of the recent documents list. - It respects the user choice about "show icons in menus" configuration. (e.g. under gtk3) Change-Id: Icd94880fcda06ab2e2d9615a03be5d3373799314 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111934 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-04-06Extend ToolBarManager to build weld::ToolbarSzymon Kłos
- used for SubToolBarController eg. framework shape toolbar popup present in the sidebar fontwork panel - add separate implementation for vcl and weld based ToolBarManager - provide basic functionality for weld based (just inserting standard items with icons and controllers) - not implemented: addons items merging etc. Change-Id: I8e460f34abd512d70e95a1d484d728b7d809ce9d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113387 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2021-04-02weld SubToolBarControllerSzymon Kłos
- promote SubToolBarController to svt::PopupWindowController - create welded popup - use weld::Toolbar as a target for ToolBarManager Change-Id: Iacd6467632ea5860fadbbcd96fbe88bb2f316da9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112276 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2021-04-01lok: remove frame action listener when disposingHenry Castro
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-03-28drop operator bool and operator! from Bitmap and BitmapExNoel
IRC chat: <quikee[m]> noelgrandin: doesn't adding operator bool to Bitmap has the same problem as Graphic and the reason why you dropped that commit 7334034ae93b49fc93b5859a3c047a319d138282 "drop Graphic::operator bool" <noelgrandin> quikee[m], hmmm, good point <noelgrandin> maybe I should just drop both operator bool and operator! in favor of IsEmpty <quikee[m]> noelgrandin: I don't remember what the problem is I just remembered we dropped it Graphic :) sure, dropping everything for IsEmpty is probably the best Change-Id: Ieae289cda64f0b8d8fdecd5ea9e6f2bb874ff4cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113163 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-26loplugin:flattenNoel
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-25const OUString -> const OUStringLiteralMike Kaganski
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-23tdf#124176 Use pragma once in f*Vincent LE GARREC
filter, forms, fpicker, framework Change-Id: I55a25ad2dc3749e63465e638e8eeea3c322eabbf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112047 Tested-by: Jenkins Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2021-03-23use single-use attribute for ContextChangeEventMultiplexerNoel Grandin
instead of rtl::Instance, which means it will get cleaned up when UNO shuts down Change-Id: I13b36f1fe570f789036ef54ecfb7d0a85ce1450c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112842 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-22use single-use attribute for GlobalAcceleratorConfigurationNoel Grandin
instead of rtl::Instance, which means it will get cleaned up when UNO shuts down Change-Id: I13161282ebefb47923a34a71fd66d64106d00c78 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112853 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-22use single-use attribute for PathSettingsNoel Grandin
instead of rtl::Instance, which means it will get cleaned up when UNO shuts down Change-Id: I90f7e0af8ce67cdcef2df7b28c7e55b1c92aad3a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112834 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-22use single-use attribute for JobExecutorNoel Grandin
instead of rtl::Instance, which means it will get cleaned up when UNO shuts down Change-Id: I33e8fa15eda12b326beaede61065a84d236b8154 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112852 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-22use single-use attribute for AutoRecoveryNoel Grandin
instead of rtl::Instance, which means it will get cleaned up when UNO shuts down Change-Id: I53c722e4126f5386b3cd43eee09ccfe4656ebd9e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112851 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-21use single-use attribute for TaskCreatorServiceNoel Grandin
instead of rtl::Instance, which means it will get cleaned up when UNO shuts down Change-Id: I0ebf3a71c93015850eb34c8cbe9395b6d36ce3c6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112832 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-21use single-use attribute for ModuleManagerNoel Grandin
instead of rtl::Instance, which means it will get cleaned up when UNO shuts down Change-Id: I80ee080d4b62065dadc9c406485a81433a38ffaa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112841 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-21use single-use attribute for SubstitutePathVariablesNoel Grandin
instead of rtl::Instance, which means it will get cleaned up when UNO shuts down Change-Id: I1b488ce343063b9f07d76d9dec2e12bd153c942a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112833 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-20use single-use attribute for StatusBarControllerFactoryNoel
instead of rtl::Instance, which means it will get cleaned up when UNO shuts down Change-Id: Ifec5f54633508aa66492599caf80ed2bf3d7cbe5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112683 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-20use single-use attribute for UICommandDescriptionNoel
instead of rtl::Instance, which means it will get cleaned up when UNO shuts down Change-Id: Ia26871e1a2cf2cc6150d681f3a40b42269fb65c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112686 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-20use single-use attribute for UICategoryDescriptionNoel
instead of rtl::Instance, which means it will get cleaned up when UNO shuts down Change-Id: Ie6c8f76b88f1e059b81b28a40343a2207531b0d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112688 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-20use single-use attribute for ToolbarControllerFactoryNoel
instead of rtl::Instance, which means it will get cleaned up when UNO shuts down Change-Id: Ie856c5954965fc640dc34d500664be924ddab69c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112684 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-19use single-use attribute for PopupMenuControllerFactoryNoel
instead of rtl::Instance, which means it will get cleaned up when UNO shuts down Change-Id: Ib7e51a5ba945ad151176d207d2d40f13d0fa6813 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112685 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-19use single-use attribute for WindowStateConfigurationNoel
instead of rtl::Instance, which means it will get cleaned up when UNO shuts down Change-Id: I2a6a3b1e989d48f4eebf19e9922df22124d25d2a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112687 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-19use single-use attribute for ModuleUIConfigurationManagerSupplierNoel
instead of rtl::Instance, which means it will get cleaned up when UNO shuts down Change-Id: I146c0da83e59557ec563ec33851d2418c15aa065 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112689 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-19use single-use attribute for UIElementFactoryManagerNoel
instead of rtl::Instance, which means it will get cleaned up when UNO shuts down Change-Id: I52193861c4b2e07c3655773c8d185b2036336da2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112682 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-19use single-use attribute for WindowContentFactoryManagerNoel
instead of rtl::Instance, which means it will get cleaned up when UNO shuts down Change-Id: I877c541c11d5c667b0d94cb3875f4263a9323dcb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112681 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-14check for quit when calling Yield in loopNoel Grandin
so we don't get stuck threads when the main application quits Change-Id: Id36e99267ceb4154873b6ef8ef494622fff6c19a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112409 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2021-03-12drop PNGReader and use only PngImageReaderLuboš Luňák
PNGReader is a home-made PNG reader that does not use libpng, so it's more code, presumably less optimized and it apparently also doesn't always map colors properly. The only two features it has that PngImageReader doesn't are explicit chunk reading (used only for reading Microsoft's GIF in PNG, I implemented that for PngImageReader in a previous commit), and it loads paletted images as BitmapEx with a palette instead of converting to direct-color 24/32bpp or 8bpp-gray. The latter is even questional if nowadays that's feature or a misfeature, as it saves memory at the expense of speed. I can implement that if somebody misses it. I had to adjust some tests: - CVE-2016-0952-1.png - invalid CRC of the PNG header, neither Gimp nor Gwenview can display that, it should fail - afl-sample-Z_NEED_DICT.png - failure while decompressing data, but the loader considers that only a partially broken image since the header is correct, so it "passes" (like in Gimp or Gwenview) - SdImportTest::testTdf134210() and testPictureWithSchemeColor::Load_Verify_Reload_Verify() need the colors tested changed, because apparently gamma correction or something is now applied correctly, and it wasn't before (again checked the loaded images with Gimp) Change-Id: Id46f8d8a01256daf48ca64264b47c4e609183837 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112042 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Luboš Luňák <l.lunak@collabora.com>