From 27651c72f2beb3574efcf240e8472a6f441476a8 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 22 Nov 2021 18:43:35 +0200 Subject: use more OInterfaceContainerHelper3 in AnimationNode Change-Id: I619582287d3ce1712921782d47cc722deeb1e0d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125918 Tested-by: Jenkins Reviewed-by: Noel Grandin --- animations/source/animcore/animcore.cxx | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/animations/source/animcore/animcore.cxx b/animations/source/animcore/animcore.cxx index d5652fbc4ccf..5f20fa16139b 100644 --- a/animations/source/animcore/animcore.cxx +++ b/animations/source/animcore/animcore.cxx @@ -48,7 +48,7 @@ #include #include #include -#include +#include #include #include @@ -65,8 +65,8 @@ namespace com::sun::star::beans { struct NamedValue; } using ::osl::Mutex; using ::osl::Guard; -using ::comphelper::OInterfaceContainerHelper2; -using ::comphelper::OInterfaceIteratorHelper2; +using ::comphelper::OInterfaceContainerHelper3; +using ::comphelper::OInterfaceIteratorHelper3; using ::com::sun::star::uno::Any; using ::com::sun::star::uno::UNO_QUERY; using ::com::sun::star::uno::XInterface; @@ -299,7 +299,7 @@ public: void fireChangeListener(); private: - OInterfaceContainerHelper2 maChangeListener; + OInterfaceContainerHelper3 maChangeListener; static void initTypeProvider( sal_Int16 nNodeType ) noexcept; @@ -2100,18 +2100,14 @@ void AnimationNode::fireChangeListener() { Guard< Mutex > aGuard( maMutex ); - OInterfaceIteratorHelper2 aIterator( maChangeListener ); + OInterfaceIteratorHelper3 aIterator( maChangeListener ); if( aIterator.hasMoreElements() ) { Reference< XInterface > xSource( static_cast(this), UNO_QUERY ); Sequence< ElementChange > aChanges; const ChangesEvent aEvent( xSource, Any( mxParent.get() ), aChanges ); while( aIterator.hasMoreElements() ) - { - Reference< XChangesListener > xListener( aIterator.next(), UNO_QUERY ); - if( xListener.is() ) - xListener->changesOccurred( aEvent ); - } + aIterator.next()->changesOccurred( aEvent ); } //fdo#69645 use WeakReference of mxParent to test if mpParent is still valid -- cgit