summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-08-20 13:46:01 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-08-20 20:35:01 +0200
commit89ea9340aca77a87ef10785a734201d2f400a933 (patch)
treedf76ea47dac8c0b800b4d9ea68e2b3eee4dc3fab /sc/source
parent8d84f32d55df06c2944da78e2b779de2dba21d50 (diff)
tdf#119388 speed up listener broadcast
when deleting columns with lots of shapes. The UNO_QUERY is expensive in this case, so create a new comphelper::OInterfaceContainerHelper3 that knows what type the listener interface is. Takes the time from 47s to 41s for me. Change-Id: Id575a59af8505fbd3b0638fd5224e70fd556215f Reviewed-on: https://gerrit.libreoffice.org/77824 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/ui/Accessibility/DrawModelBroadcaster.cxx4
-rw-r--r--sc/source/ui/inc/DrawModelBroadcaster.hxx4
2 files changed, 4 insertions, 4 deletions
diff --git a/sc/source/ui/Accessibility/DrawModelBroadcaster.cxx b/sc/source/ui/Accessibility/DrawModelBroadcaster.cxx
index 0135865c361a..4cf1567856c5 100644
--- a/sc/source/ui/Accessibility/DrawModelBroadcaster.cxx
+++ b/sc/source/ui/Accessibility/DrawModelBroadcaster.cxx
@@ -60,10 +60,10 @@ void ScDrawModelBroadcaster::Notify( SfxBroadcaster&,
if( !SvxUnoDrawMSFactory::createEvent( mpDrawModel, pSdrHint, aEvent ) )
return;
- ::comphelper::OInterfaceIteratorHelper2 aIter( maEventListeners );
+ ::comphelper::OInterfaceIteratorHelper3 aIter( maEventListeners );
while( aIter.hasMoreElements() )
{
- uno::Reference < document::XEventListener > xListener( aIter.next(), uno::UNO_QUERY );
+ const uno::Reference < document::XEventListener >& xListener = aIter.next();
try
{
xListener->notifyEvent( aEvent );
diff --git a/sc/source/ui/inc/DrawModelBroadcaster.hxx b/sc/source/ui/inc/DrawModelBroadcaster.hxx
index 6c014da85713..6a967a075075 100644
--- a/sc/source/ui/inc/DrawModelBroadcaster.hxx
+++ b/sc/source/ui/inc/DrawModelBroadcaster.hxx
@@ -21,7 +21,7 @@
#define INCLUDED_SC_SOURCE_UI_INC_DRAWMODELBROADCASTER_HXX
#include <svl/lstner.hxx>
-#include <comphelper/interfacecontainer2.hxx>
+#include <comphelper/interfacecontainer3.hxx>
#include <cppuhelper/implbase.hxx>
#include <com/sun/star/document/XEventBroadcaster.hpp>
@@ -31,7 +31,7 @@ class ScDrawModelBroadcaster : public SfxListener,
public ::cppu::WeakImplHelper< css::document::XEventBroadcaster >
{
mutable ::osl::Mutex maListenerMutex;
- ::comphelper::OInterfaceContainerHelper2 maEventListeners;
+ ::comphelper::OInterfaceContainerHelper3<css::document::XEventListener> maEventListeners;
SdrModel *mpDrawModel;
public: