summaryrefslogtreecommitdiff
path: root/toolkit/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-12-15 11:43:32 +0000
committerCaolán McNamara <caolanm@redhat.com>2021-12-16 16:34:29 +0100
commitb2aa646ef09dc8434d3ca8a5bba53a8d8ff3f910 (patch)
tree698f6685374b0cea17b925c522aa6a1aac4770a3 /toolkit/source
parent6ce377a649c8db7576dbb7a30949d0f89c08439f (diff)
use more OInterfaceContainerHelper3 in toolkit
Change-Id: I3861a254d660662cbf575e9669cbacba36634856 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126855 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'toolkit/source')
-rw-r--r--toolkit/source/awt/vclxcontainer.cxx2
-rw-r--r--toolkit/source/awt/vclxwindow.cxx5
-rw-r--r--toolkit/source/controls/tree/treecontrol.cxx8
-rw-r--r--toolkit/source/helper/listenermultiplexer.cxx25
4 files changed, 10 insertions, 30 deletions
diff --git a/toolkit/source/awt/vclxcontainer.cxx b/toolkit/source/awt/vclxcontainer.cxx
index 082cdacaa786..05e321d1b538 100644
--- a/toolkit/source/awt/vclxcontainer.cxx
+++ b/toolkit/source/awt/vclxcontainer.cxx
@@ -22,7 +22,7 @@
#include <toolkit/helper/vclunohelper.hxx>
#include <cppuhelper/typeprovider.hxx>
#include <cppuhelper/queryinterface.hxx>
-#include <comphelper/interfacecontainer2.hxx>
+#include <comphelper/interfacecontainer3.hxx>
#include <vcl/svapp.hxx>
#include <vcl/window.hxx>
diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx
index 6a07668e436b..d3252dd7ad2c 100644
--- a/toolkit/source/awt/vclxwindow.cxx
+++ b/toolkit/source/awt/vclxwindow.cxx
@@ -54,7 +54,6 @@
#include <vcl/settings.hxx>
#include <vcl/commandevent.hxx>
#include <comphelper/flagguard.hxx>
-#include <comphelper/interfacecontainer2.hxx>
#include <comphelper/interfacecontainer3.hxx>
#include <comphelper/profilezone.hxx>
#include "stylesettings.hxx"
@@ -1349,12 +1348,12 @@ void VCLXWindow::GetPropertyIds( std::vector< sal_uInt16 >& _out_rIds )
return ImplGetPropertyIds( _out_rIds, mpImpl->mbWithDefaultProps );
}
-::comphelper::OInterfaceContainerHelper2& VCLXWindow::GetContainerListeners()
+::comphelper::OInterfaceContainerHelper3<css::awt::XVclContainerListener>& VCLXWindow::GetContainerListeners()
{
return mpImpl->getContainerListeners();
}
-::comphelper::OInterfaceContainerHelper2& VCLXWindow::GetTopWindowListeners()
+::comphelper::OInterfaceContainerHelper3<css::awt::XTopWindowListener>& VCLXWindow::GetTopWindowListeners()
{
return mpImpl->getTopWindowListeners();
}
diff --git a/toolkit/source/controls/tree/treecontrol.cxx b/toolkit/source/controls/tree/treecontrol.cxx
index 34cfb95acdb4..76e3efd7a274 100644
--- a/toolkit/source/controls/tree/treecontrol.cxx
+++ b/toolkit/source/controls/tree/treecontrol.cxx
@@ -451,10 +451,10 @@ void UnoTreeControl::createPeer( const uno::Reference< awt::XToolkit > & rxToolk
void SAL_CALL TreeEditListenerMultiplexer::nodeEditing( const Reference< XTreeNode >& Node )
{
- ::comphelper::OInterfaceIteratorHelper2 aIt( *this );
+ ::comphelper::OInterfaceIteratorHelper3 aIt(*this);
while( aIt.hasMoreElements() )
{
- Reference< XTreeEditListener > xListener(static_cast< XTreeEditListener* >( aIt.next() ) );
+ Reference<XTreeEditListener> xListener(aIt.next());
try
{
xListener->nodeEditing( Node );
@@ -474,10 +474,10 @@ void SAL_CALL TreeEditListenerMultiplexer::nodeEditing( const Reference< XTreeNo
void SAL_CALL TreeEditListenerMultiplexer::nodeEdited( const Reference< XTreeNode >& Node, const OUString& NewText )
{
- ::comphelper::OInterfaceIteratorHelper2 aIt( *this );
+ ::comphelper::OInterfaceIteratorHelper3 aIt(*this);
while( aIt.hasMoreElements() )
{
- Reference< XTreeEditListener > xListener( static_cast< XTreeEditListener* >( aIt.next() ) );
+ Reference<XTreeEditListener> xListener(aIt.next());
try
{
xListener->nodeEdited( Node, NewText );
diff --git a/toolkit/source/helper/listenermultiplexer.cxx b/toolkit/source/helper/listenermultiplexer.cxx
index 2cb6988f8a04..eeed767ffa48 100644
--- a/toolkit/source/helper/listenermultiplexer.cxx
+++ b/toolkit/source/helper/listenermultiplexer.cxx
@@ -20,25 +20,6 @@
#include <toolkit/helper/listenermultiplexer.hxx>
#include <toolkit/helper/macros.hxx>
#include <com/sun/star/lang/DisposedException.hpp>
-#include <cppuhelper/queryinterface.hxx>
-
-// class ListenerMultiplexerBase
-
-ListenerMultiplexerBase::ListenerMultiplexerBase( ::cppu::OWeakObject& rSource )
- : ::comphelper::OInterfaceContainerHelper2( GetMutex() ), mrContext( rSource )
-{
-}
-
-ListenerMultiplexerBase::~ListenerMultiplexerBase()
-{
-}
-
-// css::uno::XInterface
-css::uno::Any ListenerMultiplexerBase::queryInterface( const css::uno::Type & rType )
-{
- return ::cppu::queryInterface( rType, static_cast< css::uno::XInterface* >(this) );
-}
-
// class EventListenerMultiplexer
@@ -51,6 +32,7 @@ void SAL_CALL EventListenerMultiplexer::acquire() noexcept
{
return ListenerMultiplexerBase::acquire();
}
+
void SAL_CALL EventListenerMultiplexer::release() noexcept
{
return ListenerMultiplexerBase::release();
@@ -165,11 +147,10 @@ IMPL_TABLISTENERMULTIPLEXER_LISTENERMETHOD_BODY_1PARAM( TabListenerMultiplexer,
void TabListenerMultiplexer::changed( sal_Int32 evt, const css::uno::Sequence< css::beans::NamedValue >& evt2 )
{
sal_Int32 aMulti( evt );
- ::comphelper::OInterfaceIteratorHelper2 aIt( *this );
+ ::comphelper::OInterfaceIteratorHelper3 aIt(*this);
while( aIt.hasMoreElements() )
{
- css::uno::Reference< css::awt::XTabListener > xListener(
- static_cast< css::awt::XTabListener* >( aIt.next() ) );
+ css::uno::Reference<css::awt::XTabListener> xListener(aIt.next());
try
{
xListener->changed( aMulti, evt2 );