Is there any possibility to cancel the event propagation in an XEventListener ?
I have a class, DocumentEventListener, implementing the XEventListener interface which is added as a listener with the following code:
Object globalEventBroadcaster = m_xContext.getServiceManager().createInstanceWithContext("com.sun.star.frame.GlobalEventBroadcaster", m_xContext);
XEventBroadcaster xEVBC = (XEventBroadcaster) UnoRuntime.queryInterface(XEventBroadcaster.class, globalEventBroadcaster);
xEVBC.addEventListener(new DocumentEventListener(m_xContext));
Cancel event propagation in an XEventListener
Cancel event propagation in an XEventListener
OpenOffice 3.1 on Windows Vista / NeoOffice 2.2.3 with MacOS 10.4 / OpenOffice 2.4 on Ubuntu 9.04
Re: Cancel event propagation in an XEventListener
Remove the event listener. This requires a reference to the original listener you attached to the calling object. In Basic you would assign a global variable to the listener and add/remove this object as needed.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice