summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-11-22 18:50:58 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-11-27 06:48:07 +0100
commit11599f6f00bbcad78ad7c3f563606616e8506ea8 (patch)
treee3810421ab04f2d5b8eabb993a4f2de7a26c27b1 /basic
parentae36ee4f3aa544e53e2edad93d6d79160b27bc9d (diff)
use more OInterfaceContainerHelper3 in NameContainer
Change-Id: I75cb302156ea93fe0b545b22ca85a0c537cce760 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125919 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basic')
-rw-r--r--basic/source/inc/namecont.hxx5
-rw-r--r--basic/source/uno/namecont.cxx8
2 files changed, 7 insertions, 6 deletions
diff --git a/basic/source/inc/namecont.hxx b/basic/source/inc/namecont.hxx
index 096f614a84d2..9a8bfa12f257 100644
--- a/basic/source/inc/namecont.hxx
+++ b/basic/source/inc/namecont.hxx
@@ -51,6 +51,7 @@
#include <rtl/ref.hxx>
#include <comphelper/listenernotification.hxx>
#include <xmlscript/xmllib_imexp.hxx>
+#include <comphelper/interfacecontainer3.hxx>
class BasicManager;
@@ -74,8 +75,8 @@ class NameContainer final : public ::cppu::BaseMutex, public NameContainer_BASE
css::uno::Type mType;
css::uno::XInterface* mpxEventSource;
- ::comphelper::OInterfaceContainerHelper2 maContainerListeners;
- ::comphelper::OInterfaceContainerHelper2 maChangesListeners;
+ ::comphelper::OInterfaceContainerHelper3<css::container::XContainerListener> maContainerListeners;
+ ::comphelper::OInterfaceContainerHelper3<css::util::XChangesListener> maChangesListeners;
public:
NameContainer( const css::uno::Type& rType )
diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx
index a2cb37611f08..87b33ea9be66 100644
--- a/basic/source/uno/namecont.cxx
+++ b/basic/source/uno/namecont.cxx
@@ -287,7 +287,7 @@ void SAL_CALL NameContainer::addContainerListener( const Reference< XContainerLi
{
throw RuntimeException("addContainerListener called with null xListener",static_cast< cppu::OWeakObject * >(this));
}
- maContainerListeners.addInterface( Reference<XInterface>(xListener, UNO_QUERY) );
+ maContainerListeners.addInterface( xListener );
}
void SAL_CALL NameContainer::removeContainerListener( const Reference< XContainerListener >& xListener )
@@ -296,7 +296,7 @@ void SAL_CALL NameContainer::removeContainerListener( const Reference< XContaine
{
throw RuntimeException("removeContainerListener called with null xListener",static_cast< cppu::OWeakObject * >(this));
}
- maContainerListeners.removeInterface( Reference<XInterface>(xListener, UNO_QUERY) );
+ maContainerListeners.removeInterface( xListener );
}
// Methods XChangesNotifier
@@ -306,7 +306,7 @@ void SAL_CALL NameContainer::addChangesListener( const Reference< XChangesListen
{
throw RuntimeException("addChangesListener called with null xListener",static_cast< cppu::OWeakObject * >(this));
}
- maChangesListeners.addInterface( Reference<XInterface>(xListener, UNO_QUERY) );
+ maChangesListeners.addInterface( xListener );
}
void SAL_CALL NameContainer::removeChangesListener( const Reference< XChangesListener >& xListener )
@@ -315,7 +315,7 @@ void SAL_CALL NameContainer::removeChangesListener( const Reference< XChangesLis
{
throw RuntimeException("removeChangesListener called with null xListener",static_cast< cppu::OWeakObject * >(this));
}
- maChangesListeners.removeInterface( Reference<XInterface>(xListener, UNO_QUERY) );
+ maChangesListeners.removeInterface( xListener );
}