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 /extensions | |
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 'extensions')
-rw-r--r-- | extensions/source/bibliography/datman.hxx | 4 | ||||
-rw-r--r-- | extensions/source/logging/logger.cxx | 4 | ||||
-rw-r--r-- | extensions/source/propctrlr/eformshelper.cxx | 4 | ||||
-rw-r--r-- | extensions/source/propctrlr/formgeometryhandler.cxx | 2 | ||||
-rw-r--r-- | extensions/source/propctrlr/genericpropertyhandler.cxx | 4 | ||||
-rw-r--r-- | extensions/source/propctrlr/genericpropertyhandler.hxx | 2 | ||||
-rw-r--r-- | extensions/source/propctrlr/propcontroller.hxx | 4 | ||||
-rw-r--r-- | extensions/source/propctrlr/propertyhandler.cxx | 4 | ||||
-rw-r--r-- | extensions/source/propctrlr/standardcontrol.hxx | 2 |
9 files changed, 15 insertions, 15 deletions
diff --git a/extensions/source/bibliography/datman.hxx b/extensions/source/bibliography/datman.hxx index 80caa4e10463..a2968b9f5c20 100644 --- a/extensions/source/bibliography/datman.hxx +++ b/extensions/source/bibliography/datman.hxx @@ -26,7 +26,7 @@ #include <com/sun/star/sdb/XSingleSelectQueryComposer.hpp> #include <com/sun/star/form/runtime/XFormController.hpp> #include <cppuhelper/compbase.hxx> -#include <cppuhelper/interfacecontainer.h> +#include <comphelper/interfacecontainer2.hxx> #include <com/sun/star/form/XLoadable.hpp> #include <comphelper/broadcasthelper.hxx> #include <com/sun/star/frame/XDispatchProviderInterceptor.hpp> @@ -94,7 +94,7 @@ private: css::uno::Any aUID; css::uno::Reference< css::sdbc::XResultSet > xBibCursor; - ::cppu::OInterfaceContainerHelper m_aLoadListeners; + ::comphelper::OInterfaceContainerHelper2 m_aLoadListeners; VclPtr< ::bib::BibView> pBibView; VclPtr<BibToolBar> pToolbar; diff --git a/extensions/source/logging/logger.cxx b/extensions/source/logging/logger.cxx index ee3c4b8adba3..6ed845cc0aa9 100644 --- a/extensions/source/logging/logger.cxx +++ b/extensions/source/logging/logger.cxx @@ -28,7 +28,7 @@ #include <com/sun/star/logging/XLoggerPool.hpp> #include <cppuhelper/basemutex.hxx> -#include <cppuhelper/interfacecontainer.hxx> +#include <comphelper/interfacecontainer2.hxx> #include <cppuhelper/implbase.hxx> #include <cppuhelper/supportsservice.hxx> #include <cppuhelper/weakref.hxx> @@ -56,7 +56,7 @@ namespace logging public cppu::WeakImplHelper<css::logging::XLogger> { private: - cppu::OInterfaceContainerHelper m_aHandlers; + comphelper::OInterfaceContainerHelper2 m_aHandlers; oslInterlockedCount m_nEventNumber; // <attributes> diff --git a/extensions/source/propctrlr/eformshelper.cxx b/extensions/source/propctrlr/eformshelper.cxx index 53ce924cf45f..e88e939864be 100644 --- a/extensions/source/propctrlr/eformshelper.cxx +++ b/extensions/source/propctrlr/eformshelper.cxx @@ -242,7 +242,7 @@ namespace pcr { if ( !_bDoListen ) { - ::std::unique_ptr< ::cppu::OInterfaceIteratorHelper > pListenerIterator = m_aPropertyListeners.createIterator(); + ::std::unique_ptr< ::comphelper::OInterfaceIteratorHelper2 > pListenerIterator = m_aPropertyListeners.createIterator(); while ( pListenerIterator->hasMoreElements() ) { PropertyEventTranslation* pTranslator = dynamic_cast< PropertyEventTranslation* >( pListenerIterator->next() ); @@ -276,7 +276,7 @@ namespace pcr } else { - ::std::unique_ptr< ::cppu::OInterfaceIteratorHelper > pListenerIterator = m_aPropertyListeners.createIterator(); + ::std::unique_ptr< ::comphelper::OInterfaceIteratorHelper2 > pListenerIterator = m_aPropertyListeners.createIterator(); while ( pListenerIterator->hasMoreElements() ) { Reference< XPropertyChangeListener > xListener( pListenerIterator->next(), UNO_QUERY ); diff --git a/extensions/source/propctrlr/formgeometryhandler.cxx b/extensions/source/propctrlr/formgeometryhandler.cxx index 961b6bc18763..99f1e13c06f8 100644 --- a/extensions/source/propctrlr/formgeometryhandler.cxx +++ b/extensions/source/propctrlr/formgeometryhandler.cxx @@ -194,7 +194,7 @@ namespace pcr private: ::cppu::OWeakObject& m_rParent; - ::cppu::OInterfaceContainerHelper m_aPropertyChangeListeners; + ::comphelper::OInterfaceContainerHelper2 m_aPropertyChangeListeners; Reference< XShape > m_xShape; }; diff --git a/extensions/source/propctrlr/genericpropertyhandler.cxx b/extensions/source/propctrlr/genericpropertyhandler.cxx index edd4f081c81c..f08bff7cff98 100644 --- a/extensions/source/propctrlr/genericpropertyhandler.cxx +++ b/extensions/source/propctrlr/genericpropertyhandler.cxx @@ -305,8 +305,8 @@ namespace pcr throw NullPointerException(); // revoke old property change listeners - ::cppu::OInterfaceIteratorHelper iterRemove( m_aPropertyListeners ); - ::cppu::OInterfaceIteratorHelper iterReAdd( m_aPropertyListeners ); // this holds a copy of the container ... + ::comphelper::OInterfaceIteratorHelper2 iterRemove( m_aPropertyListeners ); + ::comphelper::OInterfaceIteratorHelper2 iterReAdd( m_aPropertyListeners ); // this holds a copy of the container ... while ( iterRemove.hasMoreElements() ) m_xComponent->removePropertyChangeListener( OUString(), static_cast< XPropertyChangeListener* >( iterRemove.next() ) ); diff --git a/extensions/source/propctrlr/genericpropertyhandler.hxx b/extensions/source/propctrlr/genericpropertyhandler.hxx index 58d8b63f15c8..384297a7db0e 100644 --- a/extensions/source/propctrlr/genericpropertyhandler.hxx +++ b/extensions/source/propctrlr/genericpropertyhandler.hxx @@ -72,7 +72,7 @@ namespace pcr /// cache of our supported properties PropertyMap m_aProperties; /// property change listeners - ::cppu::OInterfaceContainerHelper m_aPropertyListeners; + ::comphelper::OInterfaceContainerHelper2 m_aPropertyListeners; ::std::map< css::uno::Type, ::rtl::Reference< IPropertyEnumRepresentation >, TypeLess > m_aEnumConverters; diff --git a/extensions/source/propctrlr/propcontroller.hxx b/extensions/source/propctrlr/propcontroller.hxx index 4bf94a7ad0e6..79e8bb9bde47 100644 --- a/extensions/source/propctrlr/propcontroller.hxx +++ b/extensions/source/propctrlr/propcontroller.hxx @@ -101,8 +101,8 @@ namespace pcr css::uno::Reference< css::frame::XFrame > m_xFrame; css::uno::Reference< css::awt::XWindow > m_xView; - ::cppu::OInterfaceContainerHelper m_aDisposeListeners; - ::cppu::OInterfaceContainerHelper m_aControlObservers; + ::comphelper::OInterfaceContainerHelper2 m_aDisposeListeners; + ::comphelper::OInterfaceContainerHelper2 m_aControlObservers; // meta data about the properties VclPtr<OPropertyBrowserView> m_pView; diff --git a/extensions/source/propctrlr/propertyhandler.cxx b/extensions/source/propctrlr/propertyhandler.cxx index 7b968898c1b3..972be7e26e5b 100644 --- a/extensions/source/propctrlr/propertyhandler.cxx +++ b/extensions/source/propctrlr/propertyhandler.cxx @@ -78,8 +78,8 @@ namespace pcr return; // remove all old property change listeners - ::std::unique_ptr< ::cppu::OInterfaceIteratorHelper > removeListener = m_aPropertyListeners.createIterator(); - ::std::unique_ptr< ::cppu::OInterfaceIteratorHelper > readdListener = m_aPropertyListeners.createIterator(); // will copy the container as needed + ::std::unique_ptr< ::comphelper::OInterfaceIteratorHelper2 > removeListener = m_aPropertyListeners.createIterator(); + ::std::unique_ptr< ::comphelper::OInterfaceIteratorHelper2 > readdListener = m_aPropertyListeners.createIterator(); // will copy the container as needed while ( removeListener->hasMoreElements() ) removePropertyChangeListener( static_cast< XPropertyChangeListener* >( removeListener->next() ) ); OSL_ENSURE( m_aPropertyListeners.empty(), "PropertyHandler::inspect: derived classes are expected to forward the removePropertyChangeListener call to their base class (me)!" ); diff --git a/extensions/source/propctrlr/standardcontrol.hxx b/extensions/source/propctrlr/standardcontrol.hxx index c3c83e283b87..9988994041ae 100644 --- a/extensions/source/propctrlr/standardcontrol.hxx +++ b/extensions/source/propctrlr/standardcontrol.hxx @@ -178,7 +178,7 @@ namespace pcr class OHyperlinkControl : public OHyperlinkControl_Base { private: - ::cppu::OInterfaceContainerHelper m_aActionListeners; + ::comphelper::OInterfaceContainerHelper2 m_aActionListeners; public: OHyperlinkControl( vcl::Window* _pParent, WinBits _nWinStyle ); |