summaryrefslogtreecommitdiff
path: root/UnoControls
diff options
context:
space:
mode:
authorNoel <noel.grandin@collabora.co.uk>2021-03-26 13:35:54 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-03-26 18:02:19 +0100
commitb624b13b3d5a8e573c7de8158cadc66b1982d157 (patch)
tree56948e6a5e8d7f5a7cbde6328a27f13ecd8a72bc /UnoControls
parent8136620ff432bf17815bef1f88c7531edb839d23 (diff)
loplugin:flatten
Change-Id: Ib7a895fba66f8dc9b6501e61631c02694053b7fc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113157 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'UnoControls')
-rw-r--r--UnoControls/source/base/multiplexer.cxx43
1 files changed, 20 insertions, 23 deletions
diff --git a/UnoControls/source/base/multiplexer.cxx b/UnoControls/source/base/multiplexer.cxx
index 2e0f48dd75fb..a8322d845c43 100644
--- a/UnoControls/source/base/multiplexer.cxx
+++ b/UnoControls/source/base/multiplexer.cxx
@@ -40,29 +40,26 @@ namespace unocontrols {
/* First get all interfaces from container with right type.*/ \
OInterfaceContainerHelper* pContainer = m_aListenerHolder.getContainer( cppu::UnoType<INTERFACE>::get() ); \
/* Do the follow only, if elements in container exist.*/ \
- if( pContainer != nullptr ) \
- { \
- OInterfaceIteratorHelper aIterator( *pContainer ); \
- EVENTTYP aLocalEvent = EVENT; \
- /* Remark: The control is the event source not the peer.*/ \
- /* We must change the source of the event. */ \
- aLocalEvent.Source = m_xControl; \
- /* Is the control not destroyed? */ \
- if( aLocalEvent.Source.is() ) \
- { \
- if( aIterator.hasMoreElements() ) \
- { \
- INTERFACE * pListener = static_cast<INTERFACE *>(aIterator.next()); \
- try \
- { \
- pListener->METHOD( aLocalEvent ); \
- } \
- catch(const RuntimeException& ) \
- { \
- /* Ignore all system exceptions from the listener! */ \
- } \
- } \
- } \
+ if( !pContainer ) \
+ return; \
+ OInterfaceIteratorHelper aIterator( *pContainer ); \
+ EVENTTYP aLocalEvent = EVENT; \
+ /* Remark: The control is the event source not the peer.*/ \
+ /* We must change the source of the event. */ \
+ aLocalEvent.Source = m_xControl; \
+ /* Is the control not destroyed? */ \
+ if( !aLocalEvent.Source ) \
+ return; \
+ if( !aIterator.hasMoreElements() ) \
+ return; \
+ INTERFACE * pListener = static_cast<INTERFACE *>(aIterator.next()); \
+ try \
+ { \
+ pListener->METHOD( aLocalEvent ); \
+ } \
+ catch(const RuntimeException& ) \
+ { \
+ /* Ignore all system exceptions from the listener! */ \
}
// construct/destruct