diff options
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/ui/Accessibility/DrawModelBroadcaster.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/inc/DrawModelBroadcaster.hxx | 4 | ||||
-rw-r--r-- | sc/source/ui/unoobj/celllistsource.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/unoobj/celllistsource.hxx | 3 | ||||
-rw-r--r-- | sc/source/ui/unoobj/cellvaluebinding.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/unoobj/cellvaluebinding.hxx | 3 | ||||
-rw-r--r-- | sc/source/ui/unoobj/docuno.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/unoobj/fielduno.cxx | 68 |
8 files changed, 18 insertions, 68 deletions
diff --git a/sc/source/ui/Accessibility/DrawModelBroadcaster.cxx b/sc/source/ui/Accessibility/DrawModelBroadcaster.cxx index 844bf114e222..f87caa44b271 100644 --- a/sc/source/ui/Accessibility/DrawModelBroadcaster.cxx +++ b/sc/source/ui/Accessibility/DrawModelBroadcaster.cxx @@ -62,7 +62,7 @@ void ScDrawModelBroadcaster::Notify( SfxBroadcaster&, if( !SvxUnoDrawMSFactory::createEvent( mpDrawModel, pSdrHint, aEvent ) ) return; - ::cppu::OInterfaceIteratorHelper aIter( maEventListeners ); + ::comphelper::OInterfaceIteratorHelper2 aIter( maEventListeners ); while( aIter.hasMoreElements() ) { uno::Reference < document::XEventListener > xListener( aIter.next(), uno::UNO_QUERY ); diff --git a/sc/source/ui/inc/DrawModelBroadcaster.hxx b/sc/source/ui/inc/DrawModelBroadcaster.hxx index bde6810533d4..b74ffccdaec9 100644 --- a/sc/source/ui/inc/DrawModelBroadcaster.hxx +++ b/sc/source/ui/inc/DrawModelBroadcaster.hxx @@ -21,7 +21,7 @@ #define INCLUDED_SC_SOURCE_UI_INC_DRAWMODELBROADCASTER_HXX #include <svl/lstner.hxx> -#include <cppuhelper/interfacecontainer.h> +#include <comphelper/interfacecontainer2.hxx> #include <cppuhelper/implbase.hxx> #include <com/sun/star/document/XEventBroadcaster.hpp> @@ -31,7 +31,7 @@ class ScDrawModelBroadcaster : public SfxListener, public ::cppu::WeakImplHelper< css::document::XEventBroadcaster > { mutable ::osl::Mutex maListenerMutex; - ::cppu::OInterfaceContainerHelper maEventListeners; + ::comphelper::OInterfaceContainerHelper2 maEventListeners; SdrModel *mpDrawModel; public: diff --git a/sc/source/ui/unoobj/celllistsource.cxx b/sc/source/ui/unoobj/celllistsource.cxx index ae58c527aced..d7222686b20f 100644 --- a/sc/source/ui/unoobj/celllistsource.cxx +++ b/sc/source/ui/unoobj/celllistsource.cxx @@ -247,7 +247,7 @@ namespace calc EventObject aEvent; aEvent.Source.set(*this); - ::cppu::OInterfaceIteratorHelper aIter( m_aListEntryListeners ); + ::comphelper::OInterfaceIteratorHelper2 aIter( m_aListEntryListeners ); while ( aIter.hasMoreElements() ) { try diff --git a/sc/source/ui/unoobj/celllistsource.hxx b/sc/source/ui/unoobj/celllistsource.hxx index 538fe7e9edef..ceb2e1573991 100644 --- a/sc/source/ui/unoobj/celllistsource.hxx +++ b/sc/source/ui/unoobj/celllistsource.hxx @@ -22,6 +22,7 @@ #include <com/sun/star/form/binding/XListEntrySource.hpp> #include <cppuhelper/compbase4.hxx> +#include <comphelper/interfacecontainer2.hxx> #include <comphelper/propertycontainer.hxx> #include <comphelper/uno3.hxx> #include <comphelper/broadcasthelper.hxx> @@ -62,7 +63,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 - ::cppu::OInterfaceContainerHelper + ::comphelper::OInterfaceContainerHelper2 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 c34fb023ee87..8b73ac68cd93 100644 --- a/sc/source/ui/unoobj/cellvaluebinding.cxx +++ b/sc/source/ui/unoobj/cellvaluebinding.cxx @@ -451,7 +451,7 @@ namespace calc EventObject aEvent; aEvent.Source.set(*this); - ::cppu::OInterfaceIteratorHelper aIter( m_aModifyListeners ); + ::comphelper::OInterfaceIteratorHelper2 aIter( m_aModifyListeners ); while ( aIter.hasMoreElements() ) { try diff --git a/sc/source/ui/unoobj/cellvaluebinding.hxx b/sc/source/ui/unoobj/cellvaluebinding.hxx index 4979a5e979d6..94c8e63a170c 100644 --- a/sc/source/ui/unoobj/cellvaluebinding.hxx +++ b/sc/source/ui/unoobj/cellvaluebinding.hxx @@ -23,6 +23,7 @@ #include <com/sun/star/form/binding/XValueBinding.hpp> #include <com/sun/star/util/XModifyBroadcaster.hpp> #include <cppuhelper/compbase5.hxx> +#include <comphelper/interfacecontainer2.hxx> #include <comphelper/propertycontainer.hxx> #include <comphelper/uno3.hxx> #include <comphelper/broadcasthelper.hxx> @@ -66,7 +67,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 - ::cppu::OInterfaceContainerHelper + ::comphelper::OInterfaceContainerHelper2 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 f39c8698bde3..d250fbd8c2dd 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -2678,7 +2678,7 @@ void ScModelObj::NotifyChanges( const OUString& rOperation, const ScRangeList& r rChange.ReplacedElement <<= xRangeObj; } - ::cppu::OInterfaceIteratorHelper aIter( maChangesListeners ); + ::comphelper::OInterfaceIteratorHelper2 aIter( maChangesListeners ); while ( aIter.hasMoreElements() ) { try diff --git a/sc/source/ui/unoobj/fielduno.cxx b/sc/source/ui/unoobj/fielduno.cxx index a0fa9df6daf5..8ec23e93a57e 100644 --- a/sc/source/ui/unoobj/fielduno.cxx +++ b/sc/source/ui/unoobj/fielduno.cxx @@ -410,35 +410,9 @@ void SAL_CALL ScCellFieldsObj::refresh( ) if (mpRefreshListeners) { // Call all listeners. - uno::Sequence< uno::Reference< uno::XInterface > > aListeners(mpRefreshListeners->getElements()); - sal_uInt32 nLength(aListeners.getLength()); - if (nLength) - { - const uno::Reference< uno::XInterface >* pInterfaces = aListeners.getConstArray(); - if (pInterfaces) - { - lang::EventObject aEvent; - aEvent.Source.set(uno::Reference< util::XRefreshable >(this)); - sal_uInt32 i(0); - while (i < nLength) - { - try - { - while(i < nLength) - { - static_cast< util::XRefreshListener* >(pInterfaces->get())->refreshed(aEvent); - ++pInterfaces; - ++i; - } - } - catch(uno::RuntimeException&) - { - ++pInterfaces; - ++i; - } - } - } - } + lang::EventObject aEvent; + aEvent.Source.set(uno::Reference< util::XRefreshable >(this)); + mpRefreshListeners->notifyEach( &util::XRefreshListener::refreshed, aEvent ); } } @@ -449,7 +423,7 @@ void SAL_CALL ScCellFieldsObj::addRefreshListener( const uno::Reference< util::X { SolarMutexGuard aGuard; if (!mpRefreshListeners) - mpRefreshListeners = new cppu::OInterfaceContainerHelper(aMutex); + mpRefreshListeners = new comphelper::OInterfaceContainerHelper2(aMutex); mpRefreshListeners->addInterface(xListener); } } @@ -590,35 +564,9 @@ void SAL_CALL ScHeaderFieldsObj::refresh( ) if (mpRefreshListeners) { // Call all listeners. - uno::Sequence< uno::Reference< uno::XInterface > > aListeners(mpRefreshListeners->getElements()); - sal_uInt32 nLength(aListeners.getLength()); - if (nLength) - { - const uno::Reference< uno::XInterface >* pInterfaces = aListeners.getConstArray(); - if (pInterfaces) - { - lang::EventObject aEvent; - aEvent.Source.set(uno::Reference< util::XRefreshable >(this)); - sal_uInt32 i(0); - while (i < nLength) - { - try - { - while(i < nLength) - { - static_cast< util::XRefreshListener* >(pInterfaces->get())->refreshed(aEvent); - ++pInterfaces; - ++i; - } - } - catch(uno::RuntimeException&) - { - ++pInterfaces; - ++i; - } - } - } - } + lang::EventObject aEvent; + aEvent.Source.set(uno::Reference< util::XRefreshable >(this)); + mpRefreshListeners->notifyEach( &util::XRefreshListener::refreshed, aEvent); } } @@ -629,7 +577,7 @@ void SAL_CALL ScHeaderFieldsObj::addRefreshListener( const uno::Reference< util: { SolarMutexGuard aGuard; if (!mpRefreshListeners) - mpRefreshListeners = new cppu::OInterfaceContainerHelper(aMutex); + mpRefreshListeners = new comphelper::OInterfaceContainerHelper2(aMutex); mpRefreshListeners->addInterface(xListener); } } |