diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2021-11-26 19:26:14 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-11-27 19:52:47 +0100 |
commit | d510a9783d59acdc94b06257a0f0b5f03a10dab4 (patch) | |
tree | 076c6d8fc3d88475fb1bcbc63daf94fa8bcfd57a | |
parent | f5e9012dcf2ad14a82a879beed645f83439d08bf (diff) |
use more OInterfaceContainerHelper3 in sc
Change-Id: I27df936f95ac7727b58ad196201df6d56bceeca9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125943
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | sc/inc/docuno.hxx | 4 | ||||
-rw-r--r-- | sc/inc/fielduno.hxx | 7 | ||||
-rw-r--r-- | sc/source/ui/unoobj/celllistsource.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/unoobj/celllistsource.hxx | 4 | ||||
-rw-r--r-- | sc/source/ui/unoobj/cellvaluebinding.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/unoobj/cellvaluebinding.hxx | 4 | ||||
-rw-r--r-- | sc/source/ui/unoobj/docuno.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/unoobj/fielduno.cxx | 4 |
8 files changed, 17 insertions, 18 deletions
diff --git a/sc/inc/docuno.hxx b/sc/inc/docuno.hxx index dd3f10e285e9..420975ace5d7 100644 --- a/sc/inc/docuno.hxx +++ b/sc/inc/docuno.hxx @@ -51,7 +51,7 @@ #include <com/sun/star/util/XChangesNotifier.hpp> #include <com/sun/star/uno/XAggregation.hpp> #include <cppuhelper/implbase.hxx> -#include <comphelper/interfacecontainer2.hxx> +#include <comphelper/interfacecontainer3.hxx> #include <svl/itemprop.hxx> #include <vcl/ITiledRenderable.hxx> @@ -108,7 +108,7 @@ private: css::uno::Reference<css::uno::XInterface> xChartDataProv; css::uno::Reference<css::uno::XInterface> xObjProvider; - ::comphelper::OInterfaceContainerHelper2 maChangesListeners; + ::comphelper::OInterfaceContainerHelper3<css::util::XChangesListener> maChangesListeners; bool FillRenderMarkData( const css::uno::Any& aSelection, const css::uno::Sequence< css::beans::PropertyValue >& rOptions, diff --git a/sc/inc/fielduno.hxx b/sc/inc/fielduno.hxx index 4394d5931581..2702455ccb62 100644 --- a/sc/inc/fielduno.hxx +++ b/sc/inc/fielduno.hxx @@ -33,6 +33,7 @@ #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/util/XRefreshable.hpp> #include <com/sun/star/util/DateTime.hpp> +#include <comphelper/interfacecontainer3.hxx> #include <comphelper/servicehelper.hxx> #include <cppuhelper/component.hxx> #include <cppuhelper/implbase.hxx> @@ -41,8 +42,6 @@ #include <memory> -namespace comphelper { class OInterfaceContainerHelper2; } - class ScEditSource; class SvxFieldItem; class SvxFieldData; @@ -64,7 +63,7 @@ private: ScAddress aCellPos; std::unique_ptr<ScEditSource> mpEditSource; /// List of refresh listeners. - std::unique_ptr<comphelper::OInterfaceContainerHelper2> mpRefreshListeners; + std::unique_ptr<comphelper::OInterfaceContainerHelper3<css::util::XRefreshListener>> mpRefreshListeners; /// mutex to lock the InterfaceContainerHelper osl::Mutex aMutex; @@ -118,7 +117,7 @@ private: std::unique_ptr<ScEditSource> mpEditSource; /// List of refresh listeners. - std::unique_ptr<comphelper::OInterfaceContainerHelper2> mpRefreshListeners; + std::unique_ptr<comphelper::OInterfaceContainerHelper3<css::util::XRefreshListener>> mpRefreshListeners; /// mutex to lock the InterfaceContainerHelper osl::Mutex aMutex; diff --git a/sc/source/ui/unoobj/celllistsource.cxx b/sc/source/ui/unoobj/celllistsource.cxx index 39e17f79ca55..37704a503fa2 100644 --- a/sc/source/ui/unoobj/celllistsource.cxx +++ b/sc/source/ui/unoobj/celllistsource.cxx @@ -315,12 +315,12 @@ namespace calc EventObject aEvent; aEvent.Source.set(*this); - ::comphelper::OInterfaceIteratorHelper2 aIter( m_aListEntryListeners ); + ::comphelper::OInterfaceIteratorHelper3 aIter( m_aListEntryListeners ); while ( aIter.hasMoreElements() ) { try { - static_cast< XListEntryListener* >( aIter.next() )->allEntriesChanged( aEvent ); + aIter.next()->allEntriesChanged( aEvent ); } catch( const RuntimeException& ) { diff --git a/sc/source/ui/unoobj/celllistsource.hxx b/sc/source/ui/unoobj/celllistsource.hxx index 9d4f35325972..7a5f72c02bd7 100644 --- a/sc/source/ui/unoobj/celllistsource.hxx +++ b/sc/source/ui/unoobj/celllistsource.hxx @@ -22,7 +22,7 @@ #include <com/sun/star/form/binding/XListEntryTypedSource.hpp> #include <cppuhelper/compbase4.hxx> #include <cppuhelper/basemutex.hxx> -#include <comphelper/interfacecontainer2.hxx> +#include <comphelper/interfacecontainer3.hxx> #include <comphelper/propertycontainer.hxx> #include <comphelper/uno3.hxx> #include <comphelper/proparrhlp.hxx> @@ -62,7 +62,7 @@ namespace calc m_xDocument; /// the document where our cell lives css::uno::Reference< css::table::XCellRange > m_xRange; /// the range of cells we're bound to - ::comphelper::OInterfaceContainerHelper2 + ::comphelper::OInterfaceContainerHelper3<css::form::binding::XListEntryListener> m_aListEntryListeners; /// our listeners bool m_bInitialized; /// has XInitialization::initialize been called? diff --git a/sc/source/ui/unoobj/cellvaluebinding.cxx b/sc/source/ui/unoobj/cellvaluebinding.cxx index cba68f9cbc35..701743277e43 100644 --- a/sc/source/ui/unoobj/cellvaluebinding.cxx +++ b/sc/source/ui/unoobj/cellvaluebinding.cxx @@ -456,12 +456,12 @@ namespace calc EventObject aEvent; aEvent.Source.set(*this); - ::comphelper::OInterfaceIteratorHelper2 aIter( m_aModifyListeners ); + ::comphelper::OInterfaceIteratorHelper3 aIter( m_aModifyListeners ); while ( aIter.hasMoreElements() ) { try { - static_cast< XModifyListener* >( aIter.next() )->modified( aEvent ); + aIter.next()->modified( aEvent ); } catch( const RuntimeException& ) { diff --git a/sc/source/ui/unoobj/cellvaluebinding.hxx b/sc/source/ui/unoobj/cellvaluebinding.hxx index 75fcf4eb7912..048e7d504760 100644 --- a/sc/source/ui/unoobj/cellvaluebinding.hxx +++ b/sc/source/ui/unoobj/cellvaluebinding.hxx @@ -23,7 +23,7 @@ #include <com/sun/star/util/XModifyBroadcaster.hpp> #include <cppuhelper/compbase5.hxx> #include <cppuhelper/basemutex.hxx> -#include <comphelper/interfacecontainer2.hxx> +#include <comphelper/interfacecontainer3.hxx> #include <comphelper/propertycontainer.hxx> #include <comphelper/uno3.hxx> #include <comphelper/proparrhlp.hxx> @@ -65,7 +65,7 @@ namespace calc m_xCell; /// the cell we're bound to, for double value access css::uno::Reference< css::text::XTextRange > m_xCellText; /// the cell we're bound to, for text access - ::comphelper::OInterfaceContainerHelper2 + ::comphelper::OInterfaceContainerHelper3<css::util::XModifyListener> m_aModifyListeners; /// our modify listeners bool m_bInitialized; /// has XInitialization::initialize been called? bool m_bListPos; /// constructed as ListPositionCellBinding? diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index 162eb706c1ae..7e05bf657e6a 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -3177,12 +3177,12 @@ void ScModelObj::NotifyChanges( const OUString& rOperation, const ScRangeList& r rChange.ReplacedElement <<= xRangeObj; } - ::comphelper::OInterfaceIteratorHelper2 aIter( maChangesListeners ); + ::comphelper::OInterfaceIteratorHelper3 aIter( maChangesListeners ); while ( aIter.hasMoreElements() ) { try { - static_cast< util::XChangesListener* >( aIter.next() )->changesOccurred( aEvent ); + aIter.next()->changesOccurred( aEvent ); } catch( uno::Exception& ) { diff --git a/sc/source/ui/unoobj/fielduno.cxx b/sc/source/ui/unoobj/fielduno.cxx index 29f1d02e0a11..5c8d58baa154 100644 --- a/sc/source/ui/unoobj/fielduno.cxx +++ b/sc/source/ui/unoobj/fielduno.cxx @@ -406,7 +406,7 @@ void SAL_CALL ScCellFieldsObj::addRefreshListener( const uno::Reference< util::X { SolarMutexGuard aGuard; if (!mpRefreshListeners) - mpRefreshListeners.reset( new comphelper::OInterfaceContainerHelper2(aMutex) ); + mpRefreshListeners.reset( new comphelper::OInterfaceContainerHelper3<util::XRefreshListener>(aMutex) ); mpRefreshListeners->addInterface(xListener); } } @@ -557,7 +557,7 @@ void SAL_CALL ScHeaderFieldsObj::addRefreshListener( const uno::Reference< util: { SolarMutexGuard aGuard; if (!mpRefreshListeners) - mpRefreshListeners.reset(new comphelper::OInterfaceContainerHelper2(aMutex)); + mpRefreshListeners.reset(new comphelper::OInterfaceContainerHelper3<util::XRefreshListener>(aMutex)); mpRefreshListeners->addInterface(xListener); } } |