ucb/source/core/ucbstore.cxx | 15 +++++++-------- ucb/source/core/ucbstore.hxx | 4 ++-- 2 files changed, 9 insertions(+), 10 deletions(-)
New commits: commit a469d1353f4efd2c22d2fd8497a0d456e11760ad Author: Noel Grandin <noelgran...@gmail.com> AuthorDate: Wed Dec 1 21:37:24 2021 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Sat Dec 4 12:20:43 2021 +0100 use OMultiTypeInterfaceContainerHelperVar3 in PersistentPropertySet Change-Id: I4bb884fc76f766d58afec3632c7443e348ea5342 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126340 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/ucb/source/core/ucbstore.cxx b/ucb/source/core/ucbstore.cxx index db1cfea7ceab..9d0301e16268 100644 --- a/ucb/source/core/ucbstore.cxx +++ b/ucb/source/core/ucbstore.cxx @@ -1902,29 +1902,28 @@ void PersistentPropertySet::notifyPropertyChangeEvent( const PropertyChangeEvent& rEvent ) const { // Get "normal" listeners for the property. - OInterfaceContainerHelper2* pContainer = - m_pPropertyChangeListeners->getContainer( - rEvent.PropertyName ); + OInterfaceContainerHelper3<XPropertyChangeListener>* pContainer = + m_pPropertyChangeListeners->getContainer( rEvent.PropertyName ); if ( pContainer && pContainer->getLength() ) { - OInterfaceIteratorHelper2 aIter( *pContainer ); + OInterfaceIteratorHelper3 aIter( *pContainer ); while ( aIter.hasMoreElements() ) { // Propagate event. - static_cast< XPropertyChangeListener* >( aIter.next() )->propertyChange( rEvent ); + aIter.next()->propertyChange( rEvent ); } } // Get "normal" listeners for all properties. - OInterfaceContainerHelper2* pNoNameContainer = + OInterfaceContainerHelper3<XPropertyChangeListener>* pNoNameContainer = m_pPropertyChangeListeners->getContainer( OUString() ); if ( pNoNameContainer && pNoNameContainer->getLength() ) { - OInterfaceIteratorHelper2 aIter( *pNoNameContainer ); + OInterfaceIteratorHelper3 aIter( *pNoNameContainer ); while ( aIter.hasMoreElements() ) { // Propagate event. - static_cast< XPropertyChangeListener* >( aIter.next() )->propertyChange( rEvent ); + aIter.next()->propertyChange( rEvent ); } } } diff --git a/ucb/source/core/ucbstore.hxx b/ucb/source/core/ucbstore.hxx index d3c5eb36c0cf..de9488b28c05 100644 --- a/ucb/source/core/ucbstore.hxx +++ b/ucb/source/core/ucbstore.hxx @@ -34,7 +34,7 @@ #include <com/sun/star/lang/XComponent.hpp> #include <com/sun/star/lang/XInitialization.hpp> #include <comphelper/interfacecontainer3.hxx> -#include <comphelper/multiinterfacecontainer2.hxx> +#include <comphelper/multiinterfacecontainer3.hxx> #include <cppuhelper/compbase.hxx> #include <cppuhelper/basemutex.hxx> #include <unordered_map> @@ -143,7 +143,7 @@ public: class PropertySetInfo_Impl; -typedef comphelper::OMultiTypeInterfaceContainerHelperVar2<OUString> PropertyListeners_Impl; +typedef comphelper::OMultiTypeInterfaceContainerHelperVar3<css::beans::XPropertyChangeListener, OUString> PropertyListeners_Impl; class PersistentPropertySet : public cppu::WeakImplHelper < css::lang::XServiceInfo,