summaryrefslogtreecommitdiff
path: root/sfx2/source/notify/globalevents.cxx
AgeCommit message (Collapse)Author
2019-07-31Improved loplugin:stringconstant (now that GCC 7 supports it): sfx2Stephan Bergmann
Change-Id: Idb86a5351feaf307504d1f1f110ef8b1275bedce Reviewed-on: https://gerrit.libreoffice.org/76648 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-04-08Use osl_atomic_increment/osl_atomic_decrement to change m_refCountMike Kaganski
Change-Id: Ia24441d3671102fdeeb797547396c25ee2a6ffd3 Reviewed-on: https://gerrit.libreoffice.org/70382 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-04-07Don't use resettable/clearable guard where plain guard is enoughMike Kaganski
Also use scope where possible. This allows to limit guard scope at language level; visualises the scope clearly; and helps avoiding errors like fixed in commit 61e4437c857854b331fa01da6f39b2b3b58a800b. Change-Id: Ifeca96e2df8e8a0897770d9546b2536806275f41 Reviewed-on: https://gerrit.libreoffice.org/70376 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-03-17tdf#120703 PVS: remove redundant static castsMike Kaganski
V572 It is odd that the object which was created using 'new' operator is immediately cast to another type. Change-Id: I6d1523e71b3e06be1cf41abaabb44e49fe11cd8e Reviewed-on: https://gerrit.libreoffice.org/69369 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-12-01Simplify containers iterations in sfx2, shellArkadiy Illarionov
Use range-based loop or replace with STL functions Change-Id: I42361d6a73d201db8eb6dca09d79768e2d62051d Reviewed-on: https://gerrit.libreoffice.org/64389 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-19clang-tidy readability-container-size-emptyNoel Grandin
Change-Id: I1df70b7dff5ebb6048f7fc618789faa15ca5d422 Reviewed-on: https://gerrit.libreoffice.org/61967 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-18loplugin:unusedfields in sfx2Noel Grandin
and fix leak of HelpListener_Impl in SfxHelpWindow_Impl Change-Id: I7450be10c8deaf63b7c7f1f4359b4eaf0083bdd4 Reviewed-on: https://gerrit.libreoffice.org/54451 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-03pass area param to DBG_UNHANDLED_EXCEPTIONNoel Grandin
and update sallogareas plugin to enforce this Change-Id: Id0782c8a1f619372e10d931aec3c6a4743a4c86a Reviewed-on: https://gerrit.libreoffice.org/52249 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-11loplugin:salcall fix functionsNoel Grandin
since cdecl is the default calling convention on Windows for such functions, the annotation is redundant. Change-Id: I1a85fa27e5ac65ce0e04a19bde74c90800ffaa2d Reviewed-on: https://gerrit.libreoffice.org/46164 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-08make SfxGetpApp just get and move GetOrCreate to the peripheryCaolán McNamara
Change-Id: If3b22635e46dbccf0fad101f51bb653cbbcd3a32 Reviewed-on: https://gerrit.libreoffice.org/34957 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-02-28new loplugin unoanyNoel Grandin
Change-Id: I5d6c4a67cb2a09e7cd5bd620c6b262d188701b89 Reviewed-on: https://gerrit.libreoffice.org/34714 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-06Add missing #includesStephan Bergmann
...and remove some unncessary using directives/declarations, in preparation of removing now-unnecessary #includes from cppumaker-generated files, post e57ca02849c3d87142ff5ff9099a212e72b8139c "Remove dynamic exception specifications". Change-Id: Iaf1f268871e2ee1d1c76cf90f03557527ebc9067
2017-01-28loplugin:stringconstant check for unnecessary OUString constructor..Noel Grandin
..calls when creating exceptions Change-Id: I3bc58a5aa4dc6f0508ecb88b3a843b96b8c7ebfe Reviewed-on: https://gerrit.libreoffice.org/33617 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-26Remove dynamic exception specificationsStephan Bergmann
...(for now, from LIBO_INTERNAL_CODE only). See the mail thread starting at <https://lists.freedesktop.org/archives/libreoffice/2017-January/076665.html> "Dynamic Exception Specifications" for details. Most changes have been done automatically by the rewriting loplugin:dynexcspec (after enabling the rewriting mode, to be committed shortly). The way it only removes exception specs from declarations if it also sees a definition, it identified some dead declarations-w/o-definitions (that have been removed manually) and some cases where a definition appeared in multiple include files (which have also been cleaned up manually). There's also been cases of macro paramters (that were used to abstract over exception specs) that have become unused now (and been removed). Furthermore, some code needed to be cleaned up manually (avmedia/source/quicktime/ and connectivity/source/drivers/kab/), as I had no configurations available that would actually build that code. Missing @throws documentation has not been applied in such manual clean-up. Change-Id: I3408691256c9b0c12bc5332de976743626e13960 Reviewed-on: https://gerrit.libreoffice.org/33574 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-12-05loplugin:unnecessaryoverride (dtors) in sfx2Stephan Bergmann
Change-Id: Ic086a22bccd267824e68df6c963df8da76e6df2c
2016-09-13loplugin:override: No more need for the "MSVC dtor override" workaroundStephan Bergmann
The issue of 362d4f0cd4e50111edfae9d30c90602c37ed65a2 "Explicitly mark overriding destructors as 'virtual'" appears to no longer be a problem with MSVC 2013. (The little change in the rewriting code of compilerplugins/clang/override.cxx was necessary to prevent an endless loop when adding "override" to OOO_DLLPUBLIC_CHARTTOOLS virtual ~CloseableLifeTimeManager(); in chart2/source/inc/LifeTime.hxx, getting stuck in the leading OOO_DLLPUBLIC_CHARTTOOLS macro. Can't remember what that isAtEndOfImmediateMacroExpansion thing was originally necessary for, anyway.) Change-Id: I534c634504d7216b9bb632c2775c04eaf27e927e
2016-04-06Avoid reserved identifiersStephan Bergmann
Change-Id: I57d2efee3e89a2793d0b9620c894a14f8970f284
2016-01-25InterfaceContainer2 with vector instead of SequenceNoel Grandin
create an InterfaceContainer2 class to replace InterfaceContainer. It uses a std::vector instead of a Sequence for the mutable listener list, which provides far better performance. Switch all our internal use-sites to the new class. Change-Id: I6b56cfa511ded2395faa22e68fab3b2f16c3cb88
2015-11-15use initialiser syntax for Sequence<OUString>Noel Grandin
replaced using the script: git grep -lP 'Sequence.*OUString.*\(1\)' | xargs perl -0777 -pi -e "s/Sequence< OUString > (\w+)\(1\); .*\[0\] = (\S+);/Sequence< OUString > \1 { \2 };/g" Change-Id: I23688a91562051a8eed11fc2a85599545c285c34 Reviewed-on: https://gerrit.libreoffice.org/19967 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann
Change-Id: I7213b49b09ddcb00841aa5f63343baeab0e65fa4
2015-10-12Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY codeStephan Bergmann
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-09-03sfx2: remove duplicative ModelCollectionEnumerationMichael Stahl
Use the comphelper equivalent. Change-Id: Iba0567948aeec1299191c759da6aa89b4aa014d8
2015-09-03sfx2: tdf#88206 replace cppu::WeakImplHelper* etc.Takeshi Abe
with the variadic variants. Change-Id: Id9b4ad4d1fa700c5ea3dd7417292cf2ddb7ade50 Reviewed-on: https://gerrit.libreoffice.org/18229 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-06-02cppcheck: noExplicitConstructorCaolán McNamara
Change-Id: I8ae8623252546ca94f65fc04b331dd9cafa4fc92
2014-12-18sfx2: Use appropriate OUString functions on string constantsStephan Bergmann
Change-Id: Iea55d87a7c7b2afc408e3822121f79234481eccc
2014-11-12Fix common typos. No automatic tools. Handmade…Andrea Gelmini
Change-Id: I1ab4e23b0539f8d39974787f226e57a21f96e959 Reviewed-on: https://gerrit.libreoffice.org/12164 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-06-27remove SFX_APP() macro that was a mer wrapper for SfxGetApp()Norbert Thiebaud
Change-Id: I480a789c767dd671775c9d70d96bf71908f21f5b
2014-05-14Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part12Julien Nabet
Change-Id: I7c514b7a1d86f52d77672b826b1f08b825fd7aa7
2014-04-14typo: artifical -> artificialThomas Arnhold
2014-04-07sfx2: sal_Bool->boolNoel Grandin
Change-Id: I48ae51781f64e60deb0c03352087100729c8c3cd
2014-03-27Second batch of adding SAL_OVERRIDE to overriding function declarationsStephan Bergmann
...mostly done with a rewriting Clang plugin, with just some manual tweaking necessary to fix poor macro usage. Change-Id: Ie656f9d653fc716f72ac175925272696d509038f
2014-02-26cppuhelper: retrofit std::exception into overriding exception specsStephan Bergmann
Change-Id: I56e32131b7991ee9948ce46765632eb823d463b3
2014-02-26Remove visual noise from sfx2Alexander Wilms
Change-Id: I0f556a386ce64d154b695c2a35f808c94b9f0b7a Reviewed-on: https://gerrit.libreoffice.org/8310 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-23Remove unneccessary commentsAlexander Wilms
Change-Id: I939160ae72fecbe3d4a60ce755730bd4c38497fb Reviewed-on: https://gerrit.libreoffice.org/8182 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-13cosmeticsMatúš Kukan
Change-Id: Ice4f20db3a590568a7ae4ae59fa0c4ff13e59051
2014-01-24Introduce com.sun.star.task.theJobExecutor singleton.Matúš Kukan
To replace com.sun.star.task.JobExecutor single-instance service, incorrectly converted in 748aa84e9808ad31c6ff6b71459525c82de10e58 [including changes by Stephan Bergmann <sbergman@redhat.com>] Change-Id: I4cea2c63a20b5b22f6e1f822fb35fcc4d0397687 Reviewed-on: https://gerrit.libreoffice.org/7609 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2014-01-22Introduce static inline cppu::acquire(), and make use of that.Jan Holesovsky
This is much better approach compared to the callback function, as it allows passing arguments to the c++ constructor directly, while still allowing some additional initialization after having acquired the instance. Change-Id: I5a0f981915dd58f1522ee6054e53a3550b29d624
2014-01-21Change _get_implementation()'s not to do initialization directly.Jan Holesovsky
Many of the initalizations (in eg. framework) have to be done on an acquire()'d object, so instead of doing the initialization directly, return the initialization member function back to the createInstance() / createInstanceWithContext() / ... and perform the initialization there. As a sideeffect, I belive the calling initialize() from servicemanager is not that much a hack any more - whoever converts the implementation to be constructor-base has the choice to provide the callback, or still initialize through XInitialization, where the callback is preferred by servicemanager when it exists. Change-Id: I8a87b75c54c1441ca0f184967d31ff4902fc4081
2014-01-18Unify ctor functions for component implementations.Matúš Kukan
There is no need to use different styles for writing the same thing. It also makes it easier in future to use search & replace. But of course, there are also some more complicated functions. Change-Id: I773da20378af0e0d5a27689d3903df7063fb8ac0
2014-01-17Constructor functions for singletons still need to pass out single instancesStephan Bergmann
...as they are not only called from the service manager (which takes care of singleton constructor functions since 997d21183322a0a94b96868073808841d2773902 "Support for singleton constructor functions") but potentially also directly from cppumaker-generated code (which is the raison d'être for constructor functions, after all). However, this change: * postpones the instance's destruction to atexit, with all dreaded consequences; lets see how that pans out. * makes it questionable whether the service manager holding references of these singletons (introduced in 997d21183322a0a94b96868073808841d2773902) is necessary after all; lets revisit that in another commit. Change-Id: I0a2c902ab62045df1af382d190747e34b80236d3
2014-01-16Revert "Revert "sfx: Use constructor feature for SfxGlobalEvents_Impl.""Stephan Bergmann
This reverts commit ef37781683e28d1837cfce86de990e59d2c10c5f, now that constructor function support for singleton implementations is in place and the proper singleton theGlobalEventBroadcaster has been introduced (and drops sfx_component_getFactory completely, which had become unused except for SfxGlobalEvents_Impl in the meantime). Change-Id: I2d587989dd0a1fbea6fe75f7dc2af954ac81c4ed
2014-01-15Revert "sfx: Use constructor feature for SfxGlobalEvents_Impl."Matúš Kukan
This reverts commit 9b73d3a4cd9c1aea29b51b1b23d0a44c34f2f8a2 because it breaks unit tests. Conflicts: sfx2/source/appl/appuno.cxx Change-Id: I7b2d2dc6ff8ade2c8dd29602827313c7bb01f97d
2014-01-15sfx: Use constructor feature for SfxGlobalEvents_Impl.Matúš Kukan
Change-Id: Ie93235666e035d6a594cfbe112f7a0d935dae1c4