sfx2/source/notify/globalevents.cxx |   16 ++++------------
 1 file changed, 4 insertions(+), 12 deletions(-)

New commits:
commit ff4baa0770832cb7ffaac121dccd796669f7776c
Author:     Stephan Bergmann <stephan.bergm...@allotropia.de>
AuthorDate: Wed Nov 20 14:05:23 2024 +0100
Commit:     Stephan Bergmann <stephan.bergm...@allotropia.de>
CommitDate: Wed Nov 20 16:27:25 2024 +0100

    Use notifyEach
    
    ...as had already been done prior to 
8122c82d90117fc0c4c8ea87aa7f771d5e92bf36
    "osl::Mutex->std::mutex in SfxGlobalEvents_Impl"
    
    Change-Id: Ia74c07a3458d7a5af428b68d1728cc9e51aa42a4
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176853
    Reviewed-by: Stephan Bergmann <stephan.bergm...@allotropia.de>
    Tested-by: Jenkins

diff --git a/sfx2/source/notify/globalevents.cxx 
b/sfx2/source/notify/globalevents.cxx
index 525a547f82b0..bf440b5ce215 100644
--- a/sfx2/source/notify/globalevents.cxx
+++ b/sfx2/source/notify/globalevents.cxx
@@ -481,18 +481,10 @@ void SfxGlobalEvents_Impl::implts_notifyListener(const 
document::DocumentEvent&
     std::unique_lock g(m_aLock);
 
     document::EventObject aLegacyEvent(aEvent.Source, aEvent.EventName);
-    m_aLegacyListeners.forEach(g,
-        [&aLegacyEvent](const css::uno::Reference<document::XEventListener>& 
xListener)
-        {
-            xListener->notifyEvent(aLegacyEvent);
-        }
-    );
-    m_aDocumentListeners.forEach(g,
-        [&aEvent](const css::uno::Reference<document::XDocumentEventListener>& 
xListener)
-        {
-            xListener->documentEventOccured(aEvent);
-        }
-    );
+    m_aLegacyListeners.notifyEach(g,
+        &document::XEventListener::notifyEvent, aLegacyEvent);
+    m_aDocumentListeners.notifyEach(g,
+        &document::XDocumentEventListener::documentEventOccured, aEvent);
 }
 
 

Reply via email to