Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


Thank you, Michael. This will solve my doubt with XDocumentEventBroadcaster.
I will publish my experience and c++ code with XTermination,
XGlobalEventBroadcaster/XEventListener, and also mutithread at
Openoffice/Libreoffice Extension developers forums after I finish the
project. Then others can benefit from my experience.

Best,
Wendi


Michael Stahl-2 wrote

On 09/08/12 15:56, anwen wrote:
I am also interested in XDocumentEventBroadcaster/XDocumentEventListener.
I
am wondering if you could correct my following code which tries to
register
a XDocumentListener with the XDocumentEventBroadcaster in a Calc
Extension.
I did some research on this topic. Most of examples initialize a
EventBroadcaster following a bootstrap() method which could not be used
in
Calc Extension.

i don't think documents implement XDocumentEventBroadcaster, but there
is a GlobalEventBroadcaster service that you can get from the service
factory:

 Object oGEB = m_xMSF.createInstance(
                "com.sun.star.frame.GlobalEventBroadcaster");
 m_xGEB = UnoRuntime.queryInterface(XDocumentEventBroadcaster.class,
oGEB);

iirc the DocumentEvent that your listener gets then contains something
that identifies the document that the event is for.


_______________________________________________
LibreOffice mailing list
LibreOffice@.freedesktop
http://lists.freedesktop.org/mailman/listinfo/libreoffice





--
View this message in context: 
http://nabble.documentfoundation.org/Solarmutex-Deadlock-when-Closing-Calc-which-contains-functions-with-XVolatileResult-return-values-tp3998056p4000212.html
Sent from the Dev mailing list archive at Nabble.com.

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.