From 86abf3a682b424dc0fcbccf030f5a0b9bfb81d8c Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Sat, 7 Aug 2021 09:24:46 +0200 Subject: create comphelper::OMultiTypeInterfaceContainerHelper2 and use it based on OInterfaceContainerHelper2 which is considerably faster than the original OInterfaceContainerHelper Change-Id: I9c8b6d0e5382018824bf7188a26343703abf2d51 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120161 Tested-by: Jenkins Reviewed-by: Noel Grandin --- avmedia/source/macavf/window.hxx | 4 ++-- avmedia/source/win/window.cxx | 16 ++++++++-------- avmedia/source/win/window.hxx | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) (limited to 'avmedia') diff --git a/avmedia/source/macavf/window.hxx b/avmedia/source/macavf/window.hxx index cfaae6f47d3b..14fdaf389811 100644 --- a/avmedia/source/macavf/window.hxx +++ b/avmedia/source/macavf/window.hxx @@ -21,7 +21,7 @@ #include "macavfcommon.hxx" #include -#include +#include #include @@ -92,7 +92,7 @@ public: private: ::osl::Mutex maMutex; - ::cppu::OMultiTypeInterfaceContainerHelper maListeners; + comphelper::OMultiTypeInterfaceContainerHelper2 maListeners; css::media::ZoomLevel meZoomLevel; Player& mrPlayer; int mnPointerType; diff --git a/avmedia/source/win/window.cxx b/avmedia/source/win/window.cxx index b7aa28ba26d5..4f4ef47456e6 100644 --- a/avmedia/source/win/window.cxx +++ b/avmedia/source/win/window.cxx @@ -423,11 +423,11 @@ void SAL_CALL Window::removeEventListener( const uno::Reference< lang::XEventLis void Window::fireMousePressedEvent( const css::awt::MouseEvent& rEvt ) { - ::cppu::OInterfaceContainerHelper* pContainer = maListeners.getContainer( cppu::UnoType::get()); + comphelper::OInterfaceContainerHelper2* pContainer = maListeners.getContainer( cppu::UnoType::get()); if( pContainer ) { - ::cppu::OInterfaceIteratorHelper aIter( *pContainer ); + comphelper::OInterfaceIteratorHelper2 aIter( *pContainer ); while( aIter.hasMoreElements() ) static_cast< awt::XMouseListener* >( aIter.next() )->mousePressed( rEvt ); @@ -436,11 +436,11 @@ void Window::fireMousePressedEvent( const css::awt::MouseEvent& rEvt ) void Window::fireMouseReleasedEvent( const css::awt::MouseEvent& rEvt ) { - ::cppu::OInterfaceContainerHelper* pContainer = maListeners.getContainer( cppu::UnoType::get()); + comphelper::OInterfaceContainerHelper2* pContainer = maListeners.getContainer( cppu::UnoType::get()); if( pContainer ) { - ::cppu::OInterfaceIteratorHelper aIter( *pContainer ); + comphelper::OInterfaceIteratorHelper2 aIter( *pContainer ); while( aIter.hasMoreElements() ) static_cast< awt::XMouseListener* >( aIter.next() )->mouseReleased( rEvt ); @@ -449,11 +449,11 @@ void Window::fireMouseReleasedEvent( const css::awt::MouseEvent& rEvt ) void Window::fireMouseMovedEvent( const css::awt::MouseEvent& rEvt ) { - ::cppu::OInterfaceContainerHelper* pContainer = maListeners.getContainer( cppu::UnoType::get()); + comphelper::OInterfaceContainerHelper2* pContainer = maListeners.getContainer( cppu::UnoType::get()); if( pContainer ) { - ::cppu::OInterfaceIteratorHelper aIter( *pContainer ); + comphelper::OInterfaceIteratorHelper2 aIter( *pContainer ); while( aIter.hasMoreElements() ) static_cast< awt::XMouseMotionListener* >( aIter.next() )->mouseMoved( rEvt ); @@ -462,11 +462,11 @@ void Window::fireMouseMovedEvent( const css::awt::MouseEvent& rEvt ) void Window::fireSetFocusEvent( const css::awt::FocusEvent& rEvt ) { - ::cppu::OInterfaceContainerHelper* pContainer = maListeners.getContainer( cppu::UnoType::get()); + comphelper::OInterfaceContainerHelper2* pContainer = maListeners.getContainer( cppu::UnoType::get()); if( pContainer ) { - ::cppu::OInterfaceIteratorHelper aIter( *pContainer ); + comphelper::OInterfaceIteratorHelper2 aIter( *pContainer ); while( aIter.hasMoreElements() ) static_cast< awt::XFocusListener* >( aIter.next() )->focusGained( rEvt ); diff --git a/avmedia/source/win/window.hxx b/avmedia/source/win/window.hxx index c13bd8b62ea4..39d5aec626c4 100644 --- a/avmedia/source/win/window.hxx +++ b/avmedia/source/win/window.hxx @@ -25,7 +25,7 @@ #include "wincommon.hxx" #include -#include +#include #include @@ -96,7 +96,7 @@ public: private: ::osl::Mutex maMutex; - ::cppu::OMultiTypeInterfaceContainerHelper maListeners; + comphelper::OMultiTypeInterfaceContainerHelper2 maListeners; css::media::ZoomLevel meZoomLevel; Player& mrPlayer; HWND mnFrameWnd; -- cgit