But it cannot find the macro it throws an exception. However, if I move my macro and module to "My macros and dialogs" and change the string to
"vnd.sun.star.script:Standard.GraphAlgorithm.eval?language=Basic&location=application"
it works. My document is a drawing.
The extension is written in java and gets the script by this code:
Code: Select all
XScriptProviderFactory spFactory= (XScriptProviderFactory) UnoRuntime.queryInterface(XScriptProviderFactory.class,
x.getValueByName("/singletons/com.sun.star.script.provider.theMasterScriptProviderFactory"));
XScriptProvider sp = spFactory.createScriptProvider("");
XScript xScript = sp.getScript("vnd.sun.star.script:" + macroName);