How the Scripting Framework works

From Apache OpenOffice Wiki
< Documentation‎ | DevGuide
Revision as of 07:10, 24 May 2010 by BMarcelly (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The goals of the ScriptingFramework are to provide plug-able support for new scripting languages and allow macros written in supported languages to be:

  • Executed
  • Displayed
  • Organized
  • Assigned to events, key combinations, menu and toolbar items

This is achieved by enabling new language support to be added by deploying an UNO component that satisfies the service definition specified by The ScriptingFramework detects supported languages by discovering the available components that satisfy the service specification and obey the naming convention "[Language]" comes with a number of reference LanguageScriptProviders installed by default.

Language Service name

For more details on naming conventions, interfaces and implementation of a LanguageScriptProvider please see Writing a LanguageScriptProvider UNO Component From Scratch and Writing a LanguageScriptProvider UNO Component using the Java Helper Classes.


The illustration above shows the simplified interaction between the Office Process and the ScriptingFramework when invoking a macro. Macros are identified by a URI and are represented by objects implementing the interface. When the getScript() method is called the ScriptingFramework uses the URI to determine the correct LanguageScriptProvider to call getScript() on. The LanguageScriptProvider translates a URI into a object that implements Xscript. Office can then invoke the macro by calling invoke on that object.

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