LibreOffice Module UnoControls (master)  1
Namespaces | Macros
multiplexer.cxx File Reference
#include <multiplexer.hxx>
#include <osl/diagnose.h>
#include <cppuhelper/queryinterface.hxx>
#include <com/sun/star/awt/XWindow.hpp>
#include <com/sun/star/awt/XTopWindow.hpp>
Include dependency graph for multiplexer.cxx:

Go to the source code of this file.

Namespaces

 unocontrols
 

Macros

#define MULTIPLEX(INTERFACE, METHOD, EVENTTYP, EVENT)
 

Macro Definition Documentation

#define MULTIPLEX (   INTERFACE,
  METHOD,
  EVENTTYP,
  EVENT 
)
Value:
\
/* First get all interfaces from container with right type.*/ \
comphelper::OInterfaceContainerHelper2* pContainer = m_aListenerHolder.getContainer( cppu::UnoType<INTERFACE>::get() ); \
/* Do the follow only, if elements in container exist.*/ \
if( !pContainer ) \
return; \
comphelper::OInterfaceIteratorHelper2 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! */ \
}
Reference< XControl > m_xControl

Definition at line 38 of file multiplexer.cxx.

Referenced by unocontrols::OMRCListenerMultiplexerHelper::focusGained(), unocontrols::OMRCListenerMultiplexerHelper::focusLost(), unocontrols::OMRCListenerMultiplexerHelper::keyPressed(), unocontrols::OMRCListenerMultiplexerHelper::keyReleased(), unocontrols::OMRCListenerMultiplexerHelper::mouseDragged(), unocontrols::OMRCListenerMultiplexerHelper::mouseEntered(), unocontrols::OMRCListenerMultiplexerHelper::mouseExited(), unocontrols::OMRCListenerMultiplexerHelper::mouseMoved(), unocontrols::OMRCListenerMultiplexerHelper::mousePressed(), unocontrols::OMRCListenerMultiplexerHelper::mouseReleased(), unocontrols::OMRCListenerMultiplexerHelper::windowActivated(), unocontrols::OMRCListenerMultiplexerHelper::windowClosed(), unocontrols::OMRCListenerMultiplexerHelper::windowClosing(), unocontrols::OMRCListenerMultiplexerHelper::windowDeactivated(), unocontrols::OMRCListenerMultiplexerHelper::windowHidden(), unocontrols::OMRCListenerMultiplexerHelper::windowMinimized(), unocontrols::OMRCListenerMultiplexerHelper::windowMoved(), unocontrols::OMRCListenerMultiplexerHelper::windowNormalized(), unocontrols::OMRCListenerMultiplexerHelper::windowOpened(), unocontrols::OMRCListenerMultiplexerHelper::windowPaint(), unocontrols::OMRCListenerMultiplexerHelper::windowResized(), and unocontrols::OMRCListenerMultiplexerHelper::windowShown().