summaryrefslogtreecommitdiff
path: root/framework/inc
AgeCommit message (Collapse)Author
2022-05-08osl::Mutex->std::mutex in framework::ToolBarManagerNoel Grandin
Change-Id: I6908dc61cbd6e6e4d11c52dfface1d863cd7e5c5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133977 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-07osl::Mutex->std::mutex in framework::StatusBarManagerNoel Grandin
Change-Id: I34cdb5ce7e9e5b3c3d8f985057bb7ff09f2b7f68 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133978 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-02framework: avoid re-creating protocol handler instances all the timeMiklos Vajna
Once you install an extension that adds its own protocol handlers (e.g. <https://github.com/niocs/ProtocolHandlerExtension>), DispatchProvider re-creates this protocol handler every time the custom menu gets opened or a command gets dispatched. This allows the dispatch provider to avoid managing the lifecycle of those protocol handler instances, but in case the constructor of those handlers is expensive, this leads to performance problems. Introduce a map of handler instances in DispatchProvider to avoid unnecessary re-creation and re-initialization: these instances get the same XFrame anyway (the DispatchProvider is owned by the frame), so this is meant to be safe. No testcase for this -- the problem is only visible if you have an UNO service registered in the global UNO service registry, but by the time our cppunit tests run, that is already a fixed list, so this would be hard to test from code. Change-Id: I6d69906a795a2d5a67706002d635b6cb3091b856 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133706 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-04-17loplugin:stringviewparam convert methods using copy()Noel Grandin
which converts to std::string_view::substr() Change-Id: I3f42213b41a97e77ddcc79d84d512f49d68ca559 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132729 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-13loplugin:stringviewparam whitelist some more functionsNoel Grandin
for which we have o3tl:: equivalents Change-Id: I4670fd8b703ac47214be213f41e88d1c6ede7032 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132913 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-02loplugin:stringviewparam convert methods using indexOfNoel Grandin
.. and lastIndexOf, which convert to find and rfind Change-Id: I6c4156cf904774c0d867f85a4c2785dba7593f62 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132445 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-25Fold MenuBarManager::Destroy into its only call siteStephan Bergmann
...mainly to demonstrate that its SolarMutexGuard was redundant and that replacing it with DBG_TESTSOLARMUTEX() would be overkill Change-Id: I82f00873cd99cb5da1b644c40ba25f8c210503cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132112 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-01-17Recheck modules [e-f]* with IWYUGabor Kelemen
See tdf#42949 for motivation Change-Id: I49a3ce10dee4b03f99156f5b641f69448e1d5617 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128479 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2022-01-15include memory for std::unique_ptrCaolán McNamara
Change-Id: I15f78ecfc53e75403bb8edbcd6e5400e8ecaaa44 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128465 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-12-26use comphelper::WeakComponentImplHelper in StatusbarItemNoel Grandin
Change-Id: I2c278547d16c5ad0530188f1e465cb784d345746 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127460 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-26use comphelper::WeakComponentImplHelper in UICommandDescriptionNoel Grandin
Change-Id: I042c9761c60d3b1c39950cfede80958edf2d84c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127461 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-25use comphelper::WeakComponentImplHelper in MenuBarManagerNoel Grandin
Change-Id: I687f71c5af810618b3ab27b004bf765b53d7b8e6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127466 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-20osl::Mutex->std::mutex in Oxt_HandlerNoel Grandin
Change-Id: Iaa7120a5373c09a1515dc76e5a5ba19b16cf1554 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127102 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-20osl::Mutex->std::mutex in WakeUpThreadNoel Grandin
Change-Id: I469fa855eb373829f23232875669f607dcb0c6a6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127104 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-20osl::Mutex->std::mutex in HelpOnStartupNoel Grandin
Change-Id: I3133ab5e0f0af40c7570856c216f3921576818af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127103 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-17Fix typosAndrea Gelmini
Change-Id: I7f1636226c4fbe29d9d2ef850318a9d57f1b5450 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127009 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-12-12prefer more css::awt::XPopupMenu apiCaolán McNamara
Change-Id: Ib008281d63071ea79935af83cbe434be66155455 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126692 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-12-12prefer css::awt::XPopupMenu apiCaolán McNamara
and using GetXGraphic will return a vcl unographic::XGraphic which also supports XBitmap as well as XGraphic so we can check if the XBitmap we're passing around supports XGraphic and use that if it does and drop the imagewrapper in favor of doing that Change-Id: I3bd7963b53c3f715fca4b5cfb2ddad650ca92e1d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126691 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-12-03use OMultiTypeInterfaceContainerHelperVar3 in frameworkNoel Grandin
Change-Id: Ia2f59322511ed85492708262f90de26b33275105 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126197 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-30drop unneeded includeCaolán McNamara
Change-Id: Iea28a59086d23c4edd91d0c531bf3a1337b5da78 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126071 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-11-29use more XPopupMenu methods over PopupMenu onesCaolán McNamara
Change-Id: I54acdcb82b90d363e48543de99c75adea8fceb2a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126047 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-11-29use css::awt::XPopupMenu api instead of PopupMenuCaolán McNamara
Change-Id: Iedd1e2a7db826bdf876f4b6ed0535882b9460c12 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126037 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-11-29m_pHeightArray can be a std::vectorCaolán McNamara
Change-Id: I406aadb0a907fc2ac554c88ce8dc60c4d444a1a3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126033 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-11-29move PopupMenu::IsInExecute out of vcl/include/menu.hxxCaolán McNamara
Change-Id: I01af38dd57a645ea0afeaff033ce6d07dfe09535 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126026 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-11-26remove unused definesNoel Grandin
Change-Id: I299486e00e027299b571fdeb3846a74830511ce0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125861 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-26loplugin:stringliteraldefine in frameworkNoel Grandin
Change-Id: I8bdda62c232b8f20aa6bb1e5e7ad303d6ffa47ff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125809 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-21osl::Mutex->std::mutex in ConfigurationAccess_FactoryManagerNoel Grandin
Change-Id: I0e7a6eb4700e1108b31dfdf8681e8f4743ab7c5d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125618 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-21osl::Mutex->std::mutex in ConfigurationAccess_ControllerFactoryNoel Grandin
Change-Id: I2e526ff2dc9f02850bd9fc510c63b5d9db24af58 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125619 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-21osl::Mutex->std::mutex in framework::ConfigAccessNoel Grandin
Change-Id: I44d41db2498ea39fca309785278c1fe50d7ae8b9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125617 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-12introduce OUStringConstExprNoel Grandin
so we can declare compile-time constant arrays and structs containing OUStringLiteral Change-Id: I51fd743f2e461a36bb4a0a17c6ff107f86096895 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125045 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-10Fix typosAndrea Gelmini
Change-Id: I697591f867fee5332913ee534b9f0ba754239e58 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124943 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-10-12Fix typoAndrea Gelmini
Change-Id: I95bd5418d45ec4a0d0ff403244b7727e37b7d075 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123443 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-10-12loplugin:unusedfieldsNoel Grandin
Change-Id: I5e9bb4417cf6f8e3c1de1c8570e0635fdf6364bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123453 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-11loplugin:moveparam in frameworkNoel Grandin
Change-Id: I423fa6a4f4fea5a27ec69f65dac952eff42d3d99 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123418 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-28vcl: rename OutDevState to StackChris Sherlock
I have moved the header file to include/vcl/rendercontext as this will eventually be part of the RenderContext split from OutputDevice. State and associated enums have also been moved to the vcl namespace. I have also moved ComplexTextLayoutFlags into the vcl::text namespace. Change-Id: I0abbf560e75b45a272854b267e948c240cd69091 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121524 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-09-23Extend loplugin:stringviewparam to starts/endsWith: frameworkStephan Bergmann
Change-Id: Idc92058e7d2ff63d55e97e6b2fee83314fc0334c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122498 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-09-21Remove some "Attention" comments of little valueStephan Bergmann
...and rather add sal/config.h includes, while at it Change-Id: I0ea917b101d89f16228bea6b3102b630c8202e07 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122369 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-09-15Use <comphelper/servicehelper.hxx> implementing XUnoTunnel part 4Mike Kaganski
- Change implementations of getSomething to use getSomethingImpl Or where that's impossible, use getSomething_cast to unify this and reduce number of places where we reinterpret_cast. All static methods getting tunnel ids were renamed to getUnoTunnelId, to comply with the convention used in <comphelper/servicehelper.hxx>. TODO (in separate commits): - Revise uses of getSomething to use getFromUnoTunnel Change-Id: Ifde9e214b52e5df678de71fcc32d2199c82e85cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122100 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-09-11clang:optin.performance.PaddingNoel Grandin
Excessive padding in 'struct ValueSetItem' (8 padding bytes, where 0 is optimal). Excessive padding in 'struct framework::CommandInfo' (12 padding bytes, where 4 is optimal). Optimal fields order: aIds, nId, nImageInfo, consider reordering the fields or adding explicit padding members [optin.performance.Padding] Excessive padding in 'class drawinglayer::attribute::ImpFillGradientAttribute' (10 padding bytes, where 2 is optimal). Excessive padding in 'class drawinglayer::attribute::ImpSdrLineAttribute' (8 padding bytes, where 0 is optimal). Change-Id: I606f2bfc2c0c51b386182b900401dd15b5404451 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121938 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-12tdf#88205: Adapt uses of css::uno::Sequence to use initialize_list ctorZeynep Yavuz
Change-Id: I3c01bb8abeee949bcd1aae861aeb1b1ac516ec58 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120299 Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2021-08-08create comphelper:OMultiTypeInterfaceContainerHelperVar2 and use itNoel Grandin
based on OInterfaceContainerHelper2 which is considerably faster than the original OInterfaceContainerHelper Change-Id: Ia8cdbc5ef877a7af3d9193e1bb2faf1595c15470 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120165 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-07create comphelper::OMultiTypeInterfaceContainerHelper2 and use itNoel Grandin
based on OInterfaceContainerHelper2 which is considerably faster than the original OInterfaceContainerHelper Change-Id: I9c8b6d0e5382018824bf7188a26343703abf2d51 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120161 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-05drop unneeded forward declareCaolán McNamara
Change-Id: I858d4a43690bd37385eb6f48945c05dd9c2a6182 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120031 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-08-05Pass context and resource string down to boost::locale separatelyNoel Grandin
because this is often on a hot path, and we can avoid the splitting and joining of strings like this. Change-Id: Ia36047209368ca53431178c2e8723a18cfe8260a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119220 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-22osl::Mutex->std::mutex in StatusIndicatorFactoryNoel Grandin
Change-Id: I23c6765e5932288ce439273c600bdbf5017266ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119377 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-20framework: fix multiple-free in VclToolBarManager::Destroy()Michael Stahl
Multiple ImplToolItem with mnId 1000 are inserted in the same ToolBox and the problem is that only the first one gets its mpUserData set, because setting and getting that is based on the assumption that mnId is unique per container. So in Destroy() for every item with mnId 1000 the same AddonsParams object is deleted. The problem is that in ToolBarManager::FillToolbar() the local nItemId is copied, so its value never changes when iterating the loop because only its copy is incremented. (regression from ac1aefd5174258d9bcb41465ce566ed1a0819f3d) Change-Id: Ica47051f9447c2b9d1981f8373d754874f0f31b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119228 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-07-19merge ModuleImageManager into ImageManagerNoel Grandin
they share an underlying impl, so no need to have separate classes Change-Id: I1093f72265f67c7ccf3c2a064c86441d792512d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119156 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-07tdf#132740 improve TagWindowAsModifiedNoel Grandin
makes a small difference (*) Use strong ref instead of weak ref, because weak ref is expensive to access (*) to make that work, fix dispose() (*) cache the vcl::Window to avoid expensive VCLUnoHelper::GetWindow Change-Id: Ida7a060d729633a0feb326697509d90052bca1f8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118533 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-26loplugin:finalclasses in frameworkNoel Grandin
Change-Id: I64e7b65337d283567bb6030a626303de477346cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117891 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-17use string_view in the Translate APINoel Grandin
Change-Id: I0bb0ea9d39ed623928060ffd3f2e2bc36ba33209 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117272 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>