animations/source/animcore/animcore.cxx | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-)
New commits: commit 27651c72f2beb3574efcf240e8472a6f441476a8 Author: Noel Grandin <noelgran...@gmail.com> AuthorDate: Mon Nov 22 18:43:35 2021 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Sat Nov 27 08:09:31 2021 +0100 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.gran...@collabora.co.uk> 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