diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2016-01-19 19:45:45 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-01-25 08:52:03 +0200 |
commit | 752cd07d085ac0aadc99bd512d49072843139032 (patch) | |
tree | 21ff2f55761b34bfdd721b5e1ed43333e8874e46 /sd | |
parent | 0e7cd653ea90da388820220bf6a3eb140b57bbd6 (diff) |
InterfaceContainer2 with vector instead of Sequence
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
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/core/stlsheet.cxx | 7 | ||||
-rw-r--r-- | sd/source/ui/slideshow/slideshowimpl.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/slideshow/slideshowimpl.hxx | 3 | ||||
-rw-r--r-- | sd/source/ui/unoidl/unocpres.hxx | 4 |
4 files changed, 9 insertions, 7 deletions
diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx index 8aac204242c3..26af96182453 100644 --- a/sd/source/core/stlsheet.cxx +++ b/sd/source/core/stlsheet.cxx @@ -24,6 +24,7 @@ #include <osl/mutex.hxx> #include <vcl/svapp.hxx> #include <cppuhelper/supportsservice.hxx> +#include <cppuhelper/interfacecontainer.hxx> #include <boost/bind.hpp> #include <editeng/outliner.hxx> @@ -58,7 +59,7 @@ using ::osl::MutexGuard; using ::osl::ClearableMutexGuard; -using ::cppu::OInterfaceContainerHelper; +using ::comphelper::OInterfaceContainerHelper2; using ::com::sun::star::table::BorderLine; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::util; @@ -345,7 +346,7 @@ bool SdStyleSheet::IsUsed() const { MutexGuard aGuard( mrBHelper.rMutex ); - OInterfaceContainerHelper * pContainer = mrBHelper.getContainer( cppu::UnoType<XModifyListener>::get() ); + cppu::OInterfaceContainerHelper * pContainer = mrBHelper.getContainer( cppu::UnoType<XModifyListener>::get() ); if( pContainer ) { Sequence< Reference< XInterface > > aModifyListeners( pContainer->getElements() ); @@ -837,7 +838,7 @@ void SdStyleSheet::notifyModifyListener() { MutexGuard aGuard( mrBHelper.rMutex ); - OInterfaceContainerHelper * pContainer = mrBHelper.getContainer( cppu::UnoType<XModifyListener>::get() ); + cppu::OInterfaceContainerHelper * pContainer = mrBHelper.getContainer( cppu::UnoType<XModifyListener>::get() ); if( pContainer ) { EventObject aEvt( static_cast< OWeakObject * >( this ) ); diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx index 8976c21bf393..e9005a71f6ac 100644 --- a/sd/source/ui/slideshow/slideshowimpl.cxx +++ b/sd/source/ui/slideshow/slideshowimpl.cxx @@ -81,7 +81,7 @@ #include <boost/bind.hpp> -using ::cppu::OInterfaceContainerHelper; +using ::comphelper::OInterfaceContainerHelper2; using ::com::sun::star::animations::XAnimationNode; using ::com::sun::star::animations::XAnimationListener; using ::com::sun::star::awt::XWindow; diff --git a/sd/source/ui/slideshow/slideshowimpl.hxx b/sd/source/ui/slideshow/slideshowimpl.hxx index 28de15aabf3e..8aa17bdcfe58 100644 --- a/sd/source/ui/slideshow/slideshowimpl.hxx +++ b/sd/source/ui/slideshow/slideshowimpl.hxx @@ -26,6 +26,7 @@ #include <cppuhelper/implbase.hxx> #include "cppuhelper/basemutex.hxx" #include "cppuhelper/propertysetmixin.hxx" +#include <comphelper/interfacecontainer2.hxx> #include <com/sun/star/awt/XActivateListener.hpp> #include <com/sun/star/presentation/XSlideShow.hpp> #include <com/sun/star/presentation/XSlideShowView.hpp> @@ -151,7 +152,7 @@ public: // css::presentation::XShapeEventListener: virtual void SAL_CALL click(const css::uno::Reference< css::drawing::XShape > & xShape, const css::awt::MouseEvent & aOriginalEvent) throw (css::uno::RuntimeException, std::exception) override; - ::cppu::OInterfaceContainerHelper maListeners; + ::comphelper::OInterfaceContainerHelper2 maListeners; rtl::Reference< SlideshowImpl > mxController; css::uno::Reference< css::presentation::XSlideShow > mxSlideShow; diff --git a/sd/source/ui/unoidl/unocpres.hxx b/sd/source/ui/unoidl/unocpres.hxx index c00e382d5f0d..94e60cbedb4d 100644 --- a/sd/source/ui/unoidl/unocpres.hxx +++ b/sd/source/ui/unoidl/unocpres.hxx @@ -24,7 +24,7 @@ #include <com/sun/star/container/XNamed.hpp> #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/lang/XUnoTunnel.hpp> -#include <cppuhelper/interfacecontainer.h> +#include <comphelper/interfacecontainer2.hxx> #include <osl/mutex.hxx> #include <cppuhelper/implbase.hxx> @@ -45,7 +45,7 @@ private: // for xComponent ::osl::Mutex aDisposeContainerMutex; - ::cppu::OInterfaceContainerHelper aDisposeListeners; + ::comphelper::OInterfaceContainerHelper2 aDisposeListeners; bool bDisposing; public: |