UnoControls/source/base/multiplexer.cxx | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-)
New commits: commit 57b6d2d6f15028e1b9966be85abf8271ef6e8594 Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Sat Nov 9 00:42:50 2024 +0500 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Sat Nov 9 06:32:56 2024 +0100 Make Multiplex do what it claims Since the initial import, it used to only notify the first listener. I guess it was just an overlook of using 'if' instead of 'while' in the macro code, later flattened. Change-Id: If2b769e71f937271c004a7152da751b26a2e0f24 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176293 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/UnoControls/source/base/multiplexer.cxx b/UnoControls/source/base/multiplexer.cxx index a51cbbd36fc3..ec53697276e3 100644 --- a/UnoControls/source/base/multiplexer.cxx +++ b/UnoControls/source/base/multiplexer.cxx @@ -52,17 +52,18 @@ void OMRCListenerMultiplexerHelper::Multiplex(void (SAL_CALL Interface::*method) /* Is the control not destroyed? */ if (!aLocalEvent.Source) return; - if (!aIterator.hasMoreElements()) - return; - auto* pListener = aIterator.next().get(); - assert(dynamic_cast<Interface*>(pListener)); - try - { - (static_cast<Interface*>(pListener)->*method)(aLocalEvent); - } - catch (const RuntimeException&) + while (aIterator.hasMoreElements()) { - /* Ignore all system exceptions from the listener! */ + auto* pListener = aIterator.next().get(); + assert(dynamic_cast<Interface*>(pListener)); + try + { + (static_cast<Interface*>(pListener)->*method)(aLocalEvent); + } + catch (const RuntimeException&) + { + /* Ignore all system exceptions from the listener! */ + } } }