diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2021-08-07 09:24:46 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-08-07 21:34:33 +0200 |
commit | 86abf3a682b424dc0fcbccf030f5a0b9bfb81d8c (patch) | |
tree | ba40de884231f604bbd8eedb610834d92afb86ae /chart2 | |
parent | 2cd1442f83d41af1f2b663ccb8bfab6a954009f1 (diff) |
create comphelper::OMultiTypeInterfaceContainerHelper2 and use it
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>
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/inc/ChartView.hxx | 4 | ||||
-rw-r--r-- | chart2/source/controller/main/ChartController_Window.cxx | 4 | ||||
-rw-r--r-- | chart2/source/inc/LifeTime.hxx | 4 | ||||
-rw-r--r-- | chart2/source/model/main/ChartModel.cxx | 4 | ||||
-rw-r--r-- | chart2/source/model/main/ChartModel_Persistence.cxx | 8 | ||||
-rw-r--r-- | chart2/source/tools/LifeTime.cxx | 8 | ||||
-rw-r--r-- | chart2/source/view/main/ChartView.cxx | 4 |
7 files changed, 18 insertions, 18 deletions
diff --git a/chart2/inc/ChartView.hxx b/chart2/inc/ChartView.hxx index 437d49527974..2634288daed7 100644 --- a/chart2/inc/ChartView.hxx +++ b/chart2/inc/ChartView.hxx @@ -20,7 +20,7 @@ #include <chartview/ExplicitValueProvider.hxx> #include <cppuhelper/implbase.hxx> -#include <cppuhelper/interfacecontainer.h> +#include <comphelper/multicontainer2.hxx> #include <svl/lstner.hxx> #include <com/sun/star/awt/Size.hpp> @@ -229,7 +229,7 @@ private: //member std::vector< std::unique_ptr<VCoordinateSystem> > m_aVCooSysList; - ::cppu::OMultiTypeInterfaceContainerHelper + comphelper::OMultiTypeInterfaceContainerHelper2 m_aListenerContainer; bool m_bViewDirty; //states whether the view needs to be rebuild diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx index 024cbe5bf589..c7af79a03da8 100644 --- a/chart2/source/controller/main/ChartController_Window.cxx +++ b/chart2/source/controller/main/ChartController_Window.cxx @@ -1751,13 +1751,13 @@ void SAL_CALL ChartController::removeSelectionChangeListener( const uno::Referen void ChartController::impl_notifySelectionChangeListeners() { - ::cppu::OInterfaceContainerHelper* pIC = m_aLifeTimeManager.m_aListenerContainer + ::comphelper::OInterfaceContainerHelper2* pIC = m_aLifeTimeManager.m_aListenerContainer .getContainer( cppu::UnoType<view::XSelectionChangeListener>::get() ); if( pIC ) { uno::Reference< view::XSelectionSupplier > xSelectionSupplier(this); lang::EventObject aEvent( xSelectionSupplier ); - ::cppu::OInterfaceIteratorHelper aIt( *pIC ); + ::comphelper::OInterfaceIteratorHelper2 aIt( *pIC ); while( aIt.hasMoreElements() ) { static_cast< view::XSelectionChangeListener* >( aIt.next() )->selectionChanged( aEvent ); diff --git a/chart2/source/inc/LifeTime.hxx b/chart2/source/inc/LifeTime.hxx index 082300df3c80..613d92314f96 100644 --- a/chart2/source/inc/LifeTime.hxx +++ b/chart2/source/inc/LifeTime.hxx @@ -20,7 +20,7 @@ #include <osl/mutex.hxx> #include <osl/conditn.hxx> -#include <cppuhelper/interfacecontainer.h> +#include <comphelper/multicontainer2.hxx> #include "charttoolsdllapi.hxx" namespace com::sun::star::lang { class XComponent; } @@ -45,7 +45,7 @@ public: bool dispose(); public: - ::cppu::OMultiTypeInterfaceContainerHelper m_aListenerContainer; + ::comphelper::OMultiTypeInterfaceContainerHelper2 m_aListenerContainer; protected: SAL_DLLPRIVATE virtual bool impl_canStartApiCall(); diff --git a/chart2/source/model/main/ChartModel.cxx b/chart2/source/model/main/ChartModel.cxx index b36d2becb6f3..c6aea8b186d9 100644 --- a/chart2/source/model/main/ChartModel.cxx +++ b/chart2/source/model/main/ChartModel.cxx @@ -243,12 +243,12 @@ uno::Reference< frame::XController > ChartModel::impl_getCurrentController() void ChartModel::impl_notifyCloseListeners() { - ::cppu::OInterfaceContainerHelper* pIC = m_aLifeTimeManager.m_aListenerContainer + ::comphelper::OInterfaceContainerHelper2* pIC = m_aLifeTimeManager.m_aListenerContainer .getContainer( cppu::UnoType<util::XCloseListener>::get()); if( pIC ) { lang::EventObject aEvent( static_cast< lang::XComponent*>(this) ); - ::cppu::OInterfaceIteratorHelper aIt( *pIC ); + ::comphelper::OInterfaceIteratorHelper2 aIt( *pIC ); while( aIt.hasMoreElements() ) { static_cast< util::XCloseListener* >( aIt.next() )->notifyClosing( aEvent ); diff --git a/chart2/source/model/main/ChartModel_Persistence.cxx b/chart2/source/model/main/ChartModel_Persistence.cxx index b3166c32bd9b..efb4d0b44c31 100644 --- a/chart2/source/model/main/ChartModel_Persistence.cxx +++ b/chart2/source/model/main/ChartModel_Persistence.cxx @@ -646,12 +646,12 @@ void ChartModel::impl_notifyModifiedListeners() //always notify the view first! ChartViewHelper::setViewToDirtyState( this ); - ::cppu::OInterfaceContainerHelper* pIC = m_aLifeTimeManager.m_aListenerContainer + ::comphelper::OInterfaceContainerHelper2* pIC = m_aLifeTimeManager.m_aListenerContainer .getContainer( cppu::UnoType<util::XModifyListener>::get()); if( pIC ) { lang::EventObject aEvent( static_cast< lang::XComponent*>(this) ); - ::cppu::OInterfaceIteratorHelper aIt( *pIC ); + ::comphelper::OInterfaceIteratorHelper2 aIt( *pIC ); while( aIt.hasMoreElements() ) { static_cast< util::XModifyListener* >( aIt.next() )->modified( aEvent ); @@ -781,11 +781,11 @@ Reference< embed::XStorage > SAL_CALL ChartModel::getDocumentStorage() void ChartModel::impl_notifyStorageChangeListeners() { - ::cppu::OInterfaceContainerHelper* pIC = m_aLifeTimeManager.m_aListenerContainer + ::comphelper::OInterfaceContainerHelper2* pIC = m_aLifeTimeManager.m_aListenerContainer .getContainer( cppu::UnoType<document::XStorageChangeListener>::get()); if( pIC ) { - ::cppu::OInterfaceIteratorHelper aIt( *pIC ); + ::comphelper::OInterfaceIteratorHelper2 aIt( *pIC ); while( aIt.hasMoreElements() ) { static_cast< document::XStorageChangeListener* >( aIt.next() ) diff --git a/chart2/source/tools/LifeTime.cxx b/chart2/source/tools/LifeTime.cxx index c705405c8913..7a84f4f648c6 100644 --- a/chart2/source/tools/LifeTime.cxx +++ b/chart2/source/tools/LifeTime.cxx @@ -218,12 +218,12 @@ bool CloseableLifeTimeManager::g_close_startTryClose(bool bDeliverOwnership) if(xCloseable.is()) { //--call queryClosing on all registered close listeners - ::cppu::OInterfaceContainerHelper* pIC = m_aListenerContainer.getContainer( + ::comphelper::OInterfaceContainerHelper2* pIC = m_aListenerContainer.getContainer( cppu::UnoType<util::XCloseListener>::get()); if( pIC ) { lang::EventObject aEvent( xCloseable ); - ::cppu::OInterfaceIteratorHelper aIt( *pIC ); + ::comphelper::OInterfaceIteratorHelper2 aIt( *pIC ); while( aIt.hasMoreElements() ) { static_cast< util::XCloseListener* >( aIt.next() ) @@ -327,12 +327,12 @@ void CloseableLifeTimeManager::impl_doClose() if(xCloseable.is()) { //--call notifyClosing on all registered close listeners - ::cppu::OInterfaceContainerHelper* pIC = m_aListenerContainer.getContainer( + ::comphelper::OInterfaceContainerHelper2* pIC = m_aListenerContainer.getContainer( cppu::UnoType<util::XCloseListener>::get()); if( pIC ) { lang::EventObject aEvent( xCloseable ); - ::cppu::OInterfaceIteratorHelper aIt( *pIC ); + ::comphelper::OInterfaceIteratorHelper2 aIt( *pIC ); while( aIt.hasMoreElements() ) { static_cast< util::XCloseListener* >( aIt.next() )->notifyClosing( aEvent ); diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx index a5db1f26b69d..99b1ce5ee99c 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -2614,12 +2614,12 @@ void ChartView::impl_notifyModeChangeListener( const OUString& rNewMode ) { try { - ::cppu::OInterfaceContainerHelper* pIC = m_aListenerContainer + comphelper::OInterfaceContainerHelper2* pIC = m_aListenerContainer .getContainer( cppu::UnoType<util::XModeChangeListener>::get()); if( pIC ) { util::ModeChangeEvent aEvent( static_cast< uno::XWeak* >( this ), rNewMode ); - ::cppu::OInterfaceIteratorHelper aIt( *pIC ); + comphelper::OInterfaceIteratorHelper2 aIt( *pIC ); while( aIt.hasMoreElements() ) { static_cast< util::XModeChangeListener* >( aIt.next() )->modeChanged( aEvent ); |