summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-12-16 17:55:31 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-12-17 07:26:43 +0100
commitbcab8f876746434979e5b4538c268ae700aba278 (patch)
tree467437a621a9835642ed560ec28dbb38096f1ed8
parent7994791e0a3681d46d8b257f09422b04deeae41c (diff)
use OInterfaceContainerHelper3 in CommandDispatch
Change-Id: Ib193947279c4fe1862559d681278a3a73c8e8249 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126987 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--chart2/source/controller/main/CommandDispatch.cxx8
-rw-r--r--chart2/source/controller/main/CommandDispatch.hxx4
2 files changed, 5 insertions, 7 deletions
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<css::frame::XStatusListener>( 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 <MutexContainer.hxx>
#include <cppuhelper/compbase.hxx>
-#include <comphelper/interfacecontainer2.hxx>
+#include <comphelper/interfacecontainer3.hxx>
#include <com/sun/star/frame/XDispatch.hpp>
#include <com/sun/star/util/XModifyListener.hpp>
@@ -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<css::frame::XStatusListener>> >
tListenerMap;
tListenerMap m_aListeners;