summaryrefslogtreecommitdiff
path: root/comphelper
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-11-22 18:07:24 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-11-27 06:48:51 +0100
commit14d2b32a462be277038f6a3dbb056d267c3413a3 (patch)
tree1c3cb4ff832fb54fc994f890db3bbc87527cb867 /comphelper
parent7d30094766d6ef0f1084c42993dd2eb6b413cac7 (diff)
use more OInterfaceContainerHelper3 in ImplEventAttacherManager
Change-Id: I5c73d61a5b7a0a7fcc218e0ee839be5b9fdbb987 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125916 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'comphelper')
-rw-r--r--comphelper/source/eventattachermgr/eventattachermgr.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/comphelper/source/eventattachermgr/eventattachermgr.cxx b/comphelper/source/eventattachermgr/eventattachermgr.cxx
index 1fc4673b631a..35e90a8379b0 100644
--- a/comphelper/source/eventattachermgr/eventattachermgr.cxx
+++ b/comphelper/source/eventattachermgr/eventattachermgr.cxx
@@ -42,7 +42,7 @@
#include <com/sun/star/script/XEventAttacherManager.hpp>
#include <com/sun/star/script/XScriptListener.hpp>
#include <cppuhelper/weak.hxx>
-#include <comphelper/interfacecontainer2.hxx>
+#include <comphelper/interfacecontainer3.hxx>
#include <cppuhelper/exc_hlp.hxx>
#include <cppuhelper/implbase.hxx>
#include <rtl/ref.hxx>
@@ -86,7 +86,7 @@ class ImplEventAttacherManager
std::deque< AttacherIndex_Impl > aIndex;
Mutex aLock;
// Container for the ScriptListener
- OInterfaceContainerHelper2 aScriptListeners;
+ OInterfaceContainerHelper3<XScriptListener> aScriptListeners;
// Instance of EventAttacher
Reference< XEventAttacher2 > xAttacher;
Reference< XComponentContext > mxContext;
@@ -179,9 +179,9 @@ void SAL_CALL AttacherAllListener_Impl::firing(const AllEventObject& Event)
aScriptEvent.ScriptCode = aScriptCode;
// Iterate over all listeners and pass events.
- OInterfaceIteratorHelper2 aIt( mxManager->aScriptListeners );
+ OInterfaceIteratorHelper3 aIt( mxManager->aScriptListeners );
while( aIt.hasMoreElements() )
- static_cast<XScriptListener *>(aIt.next())->firing( aScriptEvent );
+ aIt.next()->firing( aScriptEvent );
}
@@ -242,10 +242,10 @@ Any SAL_CALL AttacherAllListener_Impl::approveFiring( const AllEventObject& Even
Any aRet;
// Iterate over all listeners and pass events.
- OInterfaceIteratorHelper2 aIt( mxManager->aScriptListeners );
+ OInterfaceIteratorHelper3 aIt( mxManager->aScriptListeners );
while( aIt.hasMoreElements() )
{
- aRet = static_cast<XScriptListener *>(aIt.next())->approveFiring( aScriptEvent );
+ aRet = aIt.next()->approveFiring( aScriptEvent );
try
{
Reference< XIdlClass > xListenerType = mxManager->getReflection()->