summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-12-01 19:07:50 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-12-03 08:39:51 +0100
commitcd888e4c04d209a8d436906369c13d6206c176f4 (patch)
tree3ff8003ebdcc41c11d84e2d5a5d197a931085bd3 /dbaccess
parentc67e6db61c4abc0f63221ef324408080a6ebf4f1 (diff)
use OMultiTypeInterfaceContainerHelperVar3 in SbaXVetoableChangeMultiplexer
Change-Id: I60088bdf046659ca94a2aa9c09a3091e2dd03945 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126196 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/ui/browser/sbamultiplex.cxx14
-rw-r--r--dbaccess/source/ui/inc/sbamultiplex.hxx10
2 files changed, 12 insertions, 12 deletions
diff --git a/dbaccess/source/ui/browser/sbamultiplex.cxx b/dbaccess/source/ui/browser/sbamultiplex.cxx
index 76a625d47069..48e907221b39 100644
--- a/dbaccess/source/ui/browser/sbamultiplex.cxx
+++ b/dbaccess/source/ui/browser/sbamultiplex.cxx
@@ -464,7 +464,7 @@ void SAL_CALL SbaXVetoableChangeMultiplexer::disposing(const css::lang::EventObj
}
void SAL_CALL SbaXVetoableChangeMultiplexer::vetoableChange(const css::beans::PropertyChangeEvent& e)
{
- ::comphelper::OInterfaceContainerHelper2* pListeners = m_aListeners.getContainer(e.PropertyName);
+ ::comphelper::OInterfaceContainerHelper3<css::beans::XVetoableChangeListener>* pListeners = m_aListeners.getContainer(e.PropertyName);
if (pListeners)
Notify(*pListeners, e);
@@ -475,13 +475,13 @@ void SAL_CALL SbaXVetoableChangeMultiplexer::vetoableChange(const css::beans::Pr
}
void SbaXVetoableChangeMultiplexer::addInterface(const OUString& rName,
- const css::uno::Reference< css::uno::XInterface > & rListener)
+ const css::uno::Reference< css::beans::XVetoableChangeListener > & rListener)
{
m_aListeners.addInterface(rName, rListener);
}
void SbaXVetoableChangeMultiplexer::removeInterface(const OUString& rName,
- const css::uno::Reference< css::uno::XInterface > & rListener)
+ const css::uno::Reference< css::beans::XVetoableChangeListener > & rListener)
{
m_aListeners.removeInterface(rName, rListener);
}
@@ -498,7 +498,7 @@ sal_Int32 SbaXVetoableChangeMultiplexer::getOverallLen() const
const std::vector< OUString > aContained = m_aListeners.getContainedTypes();
for ( OUString const & s : aContained)
{
- ::comphelper::OInterfaceContainerHelper2* pListeners = m_aListeners.getContainer(s);
+ ::comphelper::OInterfaceContainerHelper3<XVetoableChangeListener>* pListeners = m_aListeners.getContainer(s);
if (!pListeners)
continue;
nLen += pListeners->getLength();
@@ -506,13 +506,13 @@ sal_Int32 SbaXVetoableChangeMultiplexer::getOverallLen() const
return nLen;
}
-void SbaXVetoableChangeMultiplexer::Notify(::comphelper::OInterfaceContainerHelper2& rListeners, const css::beans::PropertyChangeEvent& e)
+void SbaXVetoableChangeMultiplexer::Notify(::comphelper::OInterfaceContainerHelper3<XVetoableChangeListener>& 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::XVetoableChangeListener*>(aIt.next())->vetoableChange(aMulti);
+ aIt.next()->vetoableChange(aMulti);
}
// css::beans::XPropertiesChangeListener
diff --git a/dbaccess/source/ui/inc/sbamultiplex.hxx b/dbaccess/source/ui/inc/sbamultiplex.hxx
index a3af5d5e0af3..88d1ad3bf1a3 100644
--- a/dbaccess/source/ui/inc/sbamultiplex.hxx
+++ b/dbaccess/source/ui/inc/sbamultiplex.hxx
@@ -259,7 +259,7 @@ namespace dbaui
:public OSbaWeakSubObject
,public css::beans::XVetoableChangeListener
{
- typedef ::comphelper::OMultiTypeInterfaceContainerHelperVar2<OUString > ListenerContainerMap;
+ typedef ::comphelper::OMultiTypeInterfaceContainerHelperVar3<css::beans::XVetoableChangeListener, OUString > ListenerContainerMap;
ListenerContainerMap m_aListeners;
public:
@@ -272,18 +272,18 @@ namespace dbaui
virtual void SAL_CALL vetoableChange(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::XVetoableChangeListener >& rListener);
+ void removeInterface(const OUString& rName, const css::uno::Reference< css::beans::XVetoableChangeListener >& rListener);
void disposeAndClear();
sal_Int32 getOverallLen() const;
- ::comphelper::OInterfaceContainerHelper2* getContainer(const OUString& rName)
+ ::comphelper::OInterfaceContainerHelper3<css::beans::XVetoableChangeListener>* 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::XVetoableChangeListener>& rListeners, const css::beans::PropertyChangeEvent& e);
};
// css::beans::XPropertiesChangeListener