From bcab8f876746434979e5b4538c268ae700aba278 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 16 Dec 2021 17:55:31 +0200 Subject: use OInterfaceContainerHelper3 in CommandDispatch Change-Id: Ib193947279c4fe1862559d681278a3a73c8e8249 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126987 Tested-by: Jenkins Reviewed-by: Noel Grandin --- chart2/source/controller/main/CommandDispatch.cxx | 8 +++----- chart2/source/controller/main/CommandDispatch.hxx | 4 ++-- 2 files changed, 5 insertions(+), 7 deletions(-) (limited to 'chart2/source/controller') diff --git a/chart2/source/controller/main/CommandDispatch.cxx b/chart2/source/controller/main/CommandDispatch.cxx index ed6370a5228b..9a16fbb73b8b 100644 --- a/chart2/source/controller/main/CommandDispatch.cxx +++ b/chart2/source/controller/main/CommandDispatch.cxx @@ -69,7 +69,7 @@ void SAL_CALL CommandDispatch::addStatusListener( const Reference< frame::XStatu { aIt = m_aListeners.insert( m_aListeners.begin(), - tListenerMap::value_type( URL.Complete, new ::comphelper::OInterfaceContainerHelper2( m_aMutex ))); + tListenerMap::value_type( URL.Complete, new ::comphelper::OInterfaceContainerHelper3( m_aMutex ))); } OSL_ASSERT( aIt != m_aListeners.end()); @@ -134,15 +134,13 @@ void CommandDispatch::fireStatusEventForURL( { if( aIt->second ) { - ::comphelper::OInterfaceIteratorHelper2 aIntfIt( *((*aIt).second) ); + ::comphelper::OInterfaceIteratorHelper3 aIntfIt( *((*aIt).second) ); while( aIntfIt.hasMoreElements()) { - Reference< frame::XStatusListener > xListener( aIntfIt.next(), uno::UNO_QUERY ); try { - if( xListener.is()) - xListener->statusChanged( aEventToSend ); + aIntfIt.next()->statusChanged( aEventToSend ); } catch( const uno::Exception & ) { diff --git a/chart2/source/controller/main/CommandDispatch.hxx b/chart2/source/controller/main/CommandDispatch.hxx index 37de7c59c119..81b70d0726f7 100644 --- a/chart2/source/controller/main/CommandDispatch.hxx +++ b/chart2/source/controller/main/CommandDispatch.hxx @@ -20,7 +20,7 @@ #include #include -#include +#include #include #include @@ -121,7 +121,7 @@ private: css::uno::Reference< css::uno::XComponentContext > m_xContext; css::uno::Reference< css::util::XURLTransformer > m_xURLTransformer; - typedef std::map< OUString, std::unique_ptr<::comphelper::OInterfaceContainerHelper2> > + typedef std::map< OUString, std::unique_ptr<::comphelper::OInterfaceContainerHelper3> > tListenerMap; tListenerMap m_aListeners; -- cgit