diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-08-07 18:17:03 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-08-08 17:04:03 +0200 |
commit | 9104017e1bf76857d2b9686363013e1e7c49e355 (patch) | |
tree | 949e30187049ed6d177405c8261b206a9b9088e2 /sfx2 | |
parent | 5e69c5fbdb44cd782080e7f4d9ad89dc48b2d1b1 (diff) |
create comphelper:OMultiTypeInterfaceContainerHelperVar2 and use it
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>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/inc/unoctitm.hxx | 3 | ||||
-rw-r--r-- | sfx2/source/control/unoctitm.cxx | 6 |
2 files changed, 5 insertions, 4 deletions
diff --git a/sfx2/inc/unoctitm.hxx b/sfx2/inc/unoctitm.hxx index 9e6bc19da488..d68b707e369f 100644 --- a/sfx2/inc/unoctitm.hxx +++ b/sfx2/inc/unoctitm.hxx @@ -21,6 +21,7 @@ #include <memory> #include <com/sun/star/frame/XNotifyingDispatch.hpp> #include <com/sun/star/lang/XUnoTunnel.hpp> +#include <comphelper/multiinterfacecontainer2.hxx> #include <cppuhelper/implbase.hxx> #include <cppuhelper/interfacecontainer.hxx> #include <cppuhelper/weakref.hxx> @@ -38,7 +39,7 @@ class SfxBindings; class SfxDispatcher; class SfxSlot; -typedef cppu::OMultiTypeInterfaceContainerHelperVar<OUString> +typedef comphelper::OMultiTypeInterfaceContainerHelperVar2<OUString> SfxStatusDispatcher_Impl_ListenerContainer; class SfxStatusDispatcher : public cppu::WeakImplHelper<css::frame::XNotifyingDispatch> diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx index 1eb2726f212a..235812a239ea 100644 --- a/sfx2/source/control/unoctitm.cxx +++ b/sfx2/source/control/unoctitm.cxx @@ -775,10 +775,10 @@ void SfxDispatchController_Impl::addStatusListener(const css::uno::Reference< cs void SfxDispatchController_Impl::sendStatusChanged(const OUString& rURL, const css::frame::FeatureStateEvent& rEvent) { - ::cppu::OInterfaceContainerHelper* pContnr = pDispatch->GetListeners().getContainer(rURL); + ::comphelper::OInterfaceContainerHelper2* pContnr = pDispatch->GetListeners().getContainer(rURL); if (!pContnr) return; - ::cppu::OInterfaceIteratorHelper aIt(*pContnr); + ::comphelper::OInterfaceIteratorHelper2 aIt(*pContnr); while (aIt.hasMoreElements()) { try @@ -870,7 +870,7 @@ void SfxDispatchController_Impl::StateChanged( sal_uInt16 nSID, SfxItemState eSt InterceptLOKStateChangeEvent(nSID, pDispatcher->GetFrame(), aEvent, pState); } - const css::uno::Sequence<OUString> aContainedTypes = pDispatch->GetListeners().getContainedTypes(); + const std::vector<OUString> aContainedTypes = pDispatch->GetListeners().getContainedTypes(); for (const OUString& rName: aContainedTypes) { if (rName == aDispatchURL.Main || rName == aDispatchURL.Complete) |