Scripting Framework URI Specification

From Apache OpenOffice Wiki
< Documentation‎ | DevGuide
Revision as of 13:05, 15 February 2008 by Ccornell (Talk | contribs)

Jump to: navigation, search



vnd.sun.star.script:MACROREF?language=Language&location=[user|share|document]

where:

  • MACROREF is a name that identifies the macro and the naming convention for MACROREF identifiers is LanguageScriptProvider specific. It allows the LanguageScriptProvider to associate MACROREF with a macro. In the case of the LanguageScriptProviders for the Java based languages supported by OpenOffice.org e.g. (Java, JavaScript & Beanshell) the convention is Library.functionname where Library is the subdirectory under the language specific directory and functionname is the function name from the parcel-descriptor.xml in the Library directory. See Scripting Framework URI Specification.
  • Language specifies the LanguageScriptProvider needed to execute the macro as described.

Example 1 – URI for a JavaScript macro Library1.myMacro.js located in the share directory of a OpenOffice.org installation.

 vnd.sun.star.script:Library1.myMacro.js?language=JavaScript&location=share

In general macros contained in extensions have the format

 vnd.sun.star.script:MACROREF?language=TheLanguage&location=[user:uno_packages/packageName|share:uno_packages/packageName]

Example 2 - URI for a JavaScript macro Library1.myMacro.js located in an extension called myUnoPkg.oxt located in share directory of a OpenOffice.org installation.

 vnd.sun.star.script:Library1.myMacro.js?language=JavaScript&location=share:uno_packages/myUnoPkg.oxt

Template:Documentation/Note

Content on this page is licensed under the Public Documentation License (PDL).
Personal tools