How to get events(actions) menubar in libreoffice?

asked 2017-11-30 15:36:44 +0100

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

hi i have sample extension, i will get events menubar in main libreoffice when select that, for example event copy when click "copy" from menubar or event "copy" from right click. how to get this events? sample Extension:

Object xGlobalBroadCaster = m_xCmpCtx.getServiceManager().createInstanceWithContext( "com.sun.star.frame.GlobalEventBroadcaster", m_xCmpCtx);

XEventBroadcaster xEventBroad = (XEventBroadcaster)UnoRuntime.queryInterface(XEventBroadcaster.class, xGlobalBroadCaster);

synchronized (xEventBroad) {xEventBroad.addEventListener(new XEventListener() { public void notifyEvent(EventObject oEvent) { System.out.println("Event: " + oEvent.EventName); } public void disposing(com.sun.star.lang.EventObject e) { } });

i can not resive event copy or paste from menubar. how to get this events menubar?

edit retag flag offensive close merge delete

Comments

Where did you find this sample extension? More details and clarity are needed. Perhaps show example code as well. See my suggested guidelines for asking.

Jim K gravatar imageJim K ( 2017-11-30 19:43:22 +0100 )edit

I withdrew my answer simply because each time I read the question I can interpret it differently. Jim K is correct in that you need to be more specific on what you are looking for.

Ratslinger gravatar imageRatslinger ( 2017-12-03 22:52:49 +0100 )edit