diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2021-11-22 18:43:35 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-11-27 08:09:31 +0100 |
commit | 27651c72f2beb3574efcf240e8472a6f441476a8 (patch) | |
tree | 6d68b4a7e1543845e4c13fe11ca74b1249134544 | |
parent | d7cd65577d9b5209e4bd2334e2d63f12c4831143 (diff) |
use more OInterfaceContainerHelper3 in AnimationNode
Change-Id: I619582287d3ce1712921782d47cc722deeb1e0d4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125918
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | animations/source/animcore/animcore.cxx | 16 |
1 files 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 <com/sun/star/lang/XUnoTunnel.hpp> #include <comphelper/servicehelper.hxx> #include <cppuhelper/queryinterface.hxx> -#include <comphelper/interfacecontainer2.hxx> +#include <comphelper/interfacecontainer3.hxx> #include <cppuhelper/supportsservice.hxx> #include <cppuhelper/weakref.hxx> @@ -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<XChangesListener> 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<OWeakObject*>(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 |