diff options
author | Stephan Bergmann <stephan.bergmann@allotropia.de> | 2024-11-20 14:05:23 +0100 |
---|---|---|
committer | Stephan Bergmann <stephan.bergmann@allotropia.de> | 2024-11-20 16:27:25 +0100 |
commit | ff4baa0770832cb7ffaac121dccd796669f7776c (patch) | |
tree | 15fc0be386947124623dcbde48013aedac6351de /sfx2/source | |
parent | 1a949fceae16913b29efae713b5890398c69ffac (diff) |
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.bergmann@allotropia.de>
Tested-by: Jenkins
Diffstat (limited to 'sfx2/source')
-rw-r--r-- | sfx2/source/notify/globalevents.cxx | 16 |
1 files changed, 4 insertions, 12 deletions
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); } |