Ask Your Question
1

How to find out which macro is called? [closed]

asked 2016-12-27 13:25:18 +0200

ptoye gravatar image

I've inherited an LO calc spreadsheet which has a custom menu. I need to find out which macro is called when a menu item is selected. I can assign a macro to an event, but I can't see any way of finding which one is already assigned in the IDE. Any pointers, or do I have to set a breakpoint in every possible macro and see which one happens?

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by ptoye
close date 2016-12-29 20:05:42.741251

1 Answer

Sort by » oldest newest most voted
1

answered 2016-12-27 17:02:59 +0200

peterwt gravatar image

When a macro is assigned to a custom menu the name of the macro is set in the menu. That name can be changed to perhaps a more descriptive name so the name of the macro is no longer shown.
If you open the LO Calc file with an archive program and select the Configurations folder and then the menubar folder there will be menubar.xml. If you view this xml you will see entries showing "menu:id=".uno:AddDirect"/> " followed by something like "menu:id="vnd.sun.star.script:Standard.Module1.Vmade?" where Vmade is the macro name in this case. This will be followed by something like "language=Basic&location=application" menu:label="TestM"/> " where TestM is the name in the Menu.

edit flag offensive delete link more

Comments

Thanks very much - that worked fine and saved me a load of debugging.

ptoye gravatar imageptoye ( 2016-12-27 17:30:52 +0200 )edit

Question Tools

1 follower

Stats

Asked: 2016-12-27 13:25:18 +0200

Seen: 75 times

Last updated: Dec 27 '16