summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-12-01 19:05:00 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-12-03 08:39:39 +0100
commitc67e6db61c4abc0f63221ef324408080a6ebf4f1 (patch)
tree71da8d0f8d0677e00e532366ac7608a334c548c2 /dbaccess
parent0edde043a03cb7c6b6123d79700bfcdff9882f88 (diff)
use OMultiTypeInterfaceContainerHelperVar3 in SbaXPropertyChangeMultiplexer
Change-Id: I744a3e5a7c7f4172bd4619647fb6decc6cd8e132 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126195 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/ui/browser/formadapter.cxx4
-rw-r--r--dbaccess/source/ui/browser/sbamultiplex.cxx14
-rw-r--r--dbaccess/source/ui/inc/sbamultiplex.hxx11
3 files changed, 15 insertions, 14 deletions
diff --git a/dbaccess/source/ui/browser/formadapter.cxx b/dbaccess/source/ui/browser/formadapter.cxx
index 8dafddca1442..1f042a58ae8d 100644
--- a/dbaccess/source/ui/browser/formadapter.cxx
+++ b/dbaccess/source/ui/browser/formadapter.cxx
@@ -1312,9 +1312,9 @@ void SAL_CALL SbaXFormAdapter::setFastPropertyValue(sal_Int32 nHandle, const Any
aValue >>= m_sName;
- ::comphelper::OInterfaceIteratorHelper2 aIt(*m_aPropertyChangeListeners.getContainer(PROPERTY_NAME));
+ ::comphelper::OInterfaceIteratorHelper3 aIt(*m_aPropertyChangeListeners.getContainer(PROPERTY_NAME));
while (aIt.hasMoreElements())
- static_cast< css::beans::XPropertyChangeListener*>(aIt.next())->propertyChange(aEvt);
+ aIt.next()->propertyChange(aEvt);
return;
}
diff --git a/dbaccess/source/ui/browser/sbamultiplex.cxx b/dbaccess/source/ui/browser/sbamultiplex.cxx
index 732b730c2b3d..76a625d47069 100644
--- a/dbaccess/source/ui/browser/sbamultiplex.cxx
+++ b/dbaccess/source/ui/browser/sbamultiplex.cxx
@@ -390,7 +390,7 @@ void SAL_CALL SbaXPropertyChangeMultiplexer::disposing(const css::lang::EventObj
}
void SAL_CALL SbaXPropertyChangeMultiplexer::propertyChange(const css::beans::PropertyChangeEvent& e)
{
- ::comphelper::OInterfaceContainerHelper2* pListeners = m_aListeners.getContainer(e.PropertyName);
+ ::comphelper::OInterfaceContainerHelper3<XPropertyChangeListener>* pListeners = m_aListeners.getContainer(e.PropertyName);
if (pListeners)
Notify(*pListeners, e);
@@ -401,13 +401,13 @@ void SAL_CALL SbaXPropertyChangeMultiplexer::propertyChange(const css::beans::Pr
}
void SbaXPropertyChangeMultiplexer::addInterface(const OUString& rName,
- const css::uno::Reference< css::uno::XInterface > & rListener)
+ const css::uno::Reference< css::beans::XPropertyChangeListener > & rListener)
{
m_aListeners.addInterface(rName, rListener);
}
void SbaXPropertyChangeMultiplexer::removeInterface(const OUString& rName,
- const css::uno::Reference< css::uno::XInterface > & rListener)
+ const css::uno::Reference< css::beans::XPropertyChangeListener > & rListener)
{
m_aListeners.removeInterface(rName, rListener);
}
@@ -424,7 +424,7 @@ sal_Int32 SbaXPropertyChangeMultiplexer::getOverallLen() const
const std::vector< OUString > aContained = m_aListeners.getContainedTypes();
for ( OUString const & s : aContained)
{
- ::comphelper::OInterfaceContainerHelper2* pListeners = m_aListeners.getContainer(s);
+ ::comphelper::OInterfaceContainerHelper3<XPropertyChangeListener>* pListeners = m_aListeners.getContainer(s);
if (!pListeners)
continue;
nLen += pListeners->getLength();
@@ -432,13 +432,13 @@ sal_Int32 SbaXPropertyChangeMultiplexer::getOverallLen() const
return nLen;
}
-void SbaXPropertyChangeMultiplexer::Notify(::comphelper::OInterfaceContainerHelper2& rListeners, const css::beans::PropertyChangeEvent& e)
+void SbaXPropertyChangeMultiplexer::Notify(::comphelper::OInterfaceContainerHelper3<XPropertyChangeListener>& rListeners, const css::beans::PropertyChangeEvent& e)
{
css::beans::PropertyChangeEvent aMulti(e);
aMulti.Source = &m_rParent;
- ::comphelper::OInterfaceIteratorHelper2 aIt(rListeners);
+ ::comphelper::OInterfaceIteratorHelper3 aIt(rListeners);
while (aIt.hasMoreElements())
- static_cast< css::beans::XPropertyChangeListener*>(aIt.next())->propertyChange(aMulti);
+ aIt.next()->propertyChange(aMulti);
}
// css::beans::XVetoableChangeListener
diff --git a/dbaccess/source/ui/inc/sbamultiplex.hxx b/dbaccess/source/ui/inc/sbamultiplex.hxx
index 87d31c88dc2b..a3af5d5e0af3 100644
--- a/dbaccess/source/ui/inc/sbamultiplex.hxx
+++ b/dbaccess/source/ui/inc/sbamultiplex.hxx
@@ -34,6 +34,7 @@
#include <cppuhelper/interfacecontainer.hxx>
#include <comphelper/interfacecontainer3.hxx>
#include <comphelper/multiinterfacecontainer2.hxx>
+#include <comphelper/multiinterfacecontainer3.hxx>
#include <cppuhelper/queryinterface.hxx>
#include <cppuhelper/weak.hxx>
@@ -226,7 +227,7 @@ namespace dbaui
:public OSbaWeakSubObject
,public css::beans::XPropertyChangeListener
{
- typedef ::comphelper::OMultiTypeInterfaceContainerHelperVar2<OUString > ListenerContainerMap;
+ typedef ::comphelper::OMultiTypeInterfaceContainerHelperVar3<css::beans::XPropertyChangeListener, OUString> ListenerContainerMap;
ListenerContainerMap m_aListeners;
public:
@@ -239,18 +240,18 @@ namespace dbaui
virtual void SAL_CALL propertyChange(const css::beans::PropertyChangeEvent& e) override;
- void addInterface(const OUString& rName, const css::uno::Reference< css::uno::XInterface >& rListener);
- void removeInterface(const OUString& rName, const css::uno::Reference< css::uno::XInterface >& rListener);
+ void addInterface(const OUString& rName, const css::uno::Reference< css::beans::XPropertyChangeListener >& rListener);
+ void removeInterface(const OUString& rName, const css::uno::Reference< css::beans::XPropertyChangeListener >& rListener);
void disposeAndClear();
sal_Int32 getOverallLen() const;
- ::comphelper::OInterfaceContainerHelper2* getContainer(const OUString& rName)
+ ::comphelper::OInterfaceContainerHelper3<css::beans::XPropertyChangeListener>* getContainer(const OUString& rName)
{ return m_aListeners.getContainer(rName); }
private:
- void Notify(::comphelper::OInterfaceContainerHelper2& rListeners, const css::beans::PropertyChangeEvent& e);
+ void Notify(::comphelper::OInterfaceContainerHelper3<css::beans::XPropertyChangeListener>& rListeners, const css::beans::PropertyChangeEvent& e);
};
// css::beans::XVetoableChangeListener