summaryrefslogtreecommitdiff
path: root/ucb
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-12-01 21:41:57 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-12-04 12:33:57 +0100
commite782eefb2610af6d412d91d1a94dafaf53806f89 (patch)
tree538d84f24c3f86c28bc9daa5a81b1a23c024bae4 /ucb
parent9f636b5ee56e552e19a23a553cb034c76407a662 (diff)
use OMultiTypeInterfaceContainerHelperVar3 in ContentResultSetWrapper
Change-Id: I50d79f400833987b5f5050826c7901c4fc22386e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126341 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'ucb')
-rw-r--r--ucb/source/cacher/contentresultsetwrapper.cxx26
-rw-r--r--ucb/source/cacher/contentresultsetwrapper.hxx8
2 files changed, 18 insertions, 16 deletions
diff --git a/ucb/source/cacher/contentresultsetwrapper.cxx b/ucb/source/cacher/contentresultsetwrapper.cxx
index f9e504e2d933..f19353446dde 100644
--- a/ucb/source/cacher/contentresultsetwrapper.cxx
+++ b/ucb/source/cacher/contentresultsetwrapper.cxx
@@ -169,7 +169,7 @@ void ContentResultSetWrapper::impl_getVetoableChangeListenerContainer()
osl::Guard< osl::Mutex > aGuard( m_aMutex );
if ( !m_pVetoableChangeListeners )
m_pVetoableChangeListeners.reset(
- new PropertyChangeListenerContainer_Impl( m_aContainerMutex ) );
+ new VetoableChangeListenerContainer_Impl( m_aContainerMutex ) );
}
void ContentResultSetWrapper::impl_notifyPropertyChangeListeners( const PropertyChangeEvent& rEvt )
@@ -181,14 +181,14 @@ void ContentResultSetWrapper::impl_notifyPropertyChangeListeners( const Property
}
// Notify listeners interested especially in the changed property.
- OInterfaceContainerHelper2* pContainer =
+ OInterfaceContainerHelper3<XPropertyChangeListener>* pContainer =
m_pPropertyChangeListeners->getContainer( rEvt.PropertyName );
if( pContainer )
{
- OInterfaceIteratorHelper2 aIter( *pContainer );
+ OInterfaceIteratorHelper3 aIter( *pContainer );
while( aIter.hasMoreElements() )
{
- static_cast< XPropertyChangeListener* >( aIter.next() )->propertyChange( rEvt );
+ aIter.next()->propertyChange( rEvt );
}
}
@@ -196,10 +196,10 @@ void ContentResultSetWrapper::impl_notifyPropertyChangeListeners( const Property
pContainer = m_pPropertyChangeListeners->getContainer( OUString() );
if( pContainer )
{
- OInterfaceIteratorHelper2 aIter( *pContainer );
+ OInterfaceIteratorHelper3 aIter( *pContainer );
while( aIter.hasMoreElements() )
{
- static_cast< XPropertyChangeListener* >( aIter.next() )->propertyChange( rEvt );
+ aIter.next()->propertyChange( rEvt );
}
}
}
@@ -213,14 +213,14 @@ void ContentResultSetWrapper::impl_notifyVetoableChangeListeners( const Property
}
// Notify listeners interested especially in the changed property.
- OInterfaceContainerHelper2* pContainer =
+ OInterfaceContainerHelper3<XVetoableChangeListener>* pContainer =
m_pVetoableChangeListeners->getContainer( rEvt.PropertyName );
if( pContainer )
{
- OInterfaceIteratorHelper2 aIter( *pContainer );
+ OInterfaceIteratorHelper3 aIter( *pContainer );
while( aIter.hasMoreElements() )
{
- static_cast< XVetoableChangeListener* >( aIter.next() )->vetoableChange( rEvt );
+ aIter.next()->vetoableChange( rEvt );
}
}
@@ -228,10 +228,10 @@ void ContentResultSetWrapper::impl_notifyVetoableChangeListeners( const Property
pContainer = m_pVetoableChangeListeners->getContainer( OUString() );
if( pContainer )
{
- OInterfaceIteratorHelper2 aIter( *pContainer );
+ OInterfaceIteratorHelper3 aIter( *pContainer );
while( aIter.hasMoreElements() )
{
- static_cast< XVetoableChangeListener* >( aIter.next() )->vetoableChange( rEvt );
+ aIter.next()->vetoableChange( rEvt );
}
}
}
@@ -606,7 +606,7 @@ void SAL_CALL ContentResultSetWrapper::removePropertyChangeListener( const OUStr
if( !m_pPropertyChangeListeners )
return;
}
- OInterfaceContainerHelper2* pContainer =
+ OInterfaceContainerHelper3<XPropertyChangeListener>* pContainer =
m_pPropertyChangeListeners->getContainer( rPropertyName );
if( !pContainer )
@@ -659,7 +659,7 @@ void SAL_CALL ContentResultSetWrapper::removeVetoableChangeListener( const OUStr
if( !m_pVetoableChangeListeners )
return;
}
- OInterfaceContainerHelper2* pContainer =
+ OInterfaceContainerHelper3<XVetoableChangeListener>* pContainer =
m_pVetoableChangeListeners->getContainer( rPropertyName );
if( !pContainer )
diff --git a/ucb/source/cacher/contentresultsetwrapper.hxx b/ucb/source/cacher/contentresultsetwrapper.hxx
index eda5b5e83e9d..ce39650317c0 100644
--- a/ucb/source/cacher/contentresultsetwrapper.hxx
+++ b/ucb/source/cacher/contentresultsetwrapper.hxx
@@ -32,7 +32,7 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <cppuhelper/interfacecontainer.h>
#include <comphelper/interfacecontainer3.hxx>
-#include <comphelper/multiinterfacecontainer2.hxx>
+#include <comphelper/multiinterfacecontainer3.hxx>
#include <memory>
@@ -48,8 +48,10 @@ class ContentResultSetWrapper
, public css::sdbc::XRow
{
protected:
- typedef comphelper::OMultiTypeInterfaceContainerHelperVar2<OUString>
+ typedef comphelper::OMultiTypeInterfaceContainerHelperVar3<css::beans::XPropertyChangeListener, OUString>
PropertyChangeListenerContainer_Impl;
+ typedef comphelper::OMultiTypeInterfaceContainerHelperVar3<css::beans::XVetoableChangeListener, OUString>
+ VetoableChangeListenerContainer_Impl;
//members
@@ -90,7 +92,7 @@ private:
m_pDisposeEventListeners;
std::unique_ptr<PropertyChangeListenerContainer_Impl>
m_pPropertyChangeListeners;
- std::unique_ptr<PropertyChangeListenerContainer_Impl>
+ std::unique_ptr<VetoableChangeListenerContainer_Impl>
m_pVetoableChangeListeners;