Writing a LanguageScriptProvider UNO Component from scratch
From Apache OpenOffice Wiki
< Documentation | DevGuide
- Writing Macros
- How the Scripting Framework Works
- Writing a LanguageScriptProvider UNO Component using the Java Helper Classes
- Writing a LanguageScriptProvider UNO Component From Scratch
To provide support for a new scripting language a new
LanguageScriptProvider for that language needs to be created. The new
LanguageScriptProvider, an UNO component, must be written in a language from which there is an existing UNO bridge. Details about UNO bridges can be found at UNO C++ Bridges.
LanguageScriptProvider is an UNO component that provides the environment to execute a macro for a specific language. For example when Apache OpenOffice encounters a Scripting Framework URI (see Scripting Framework URI Specification) the
ScriptingFramework finds the appropriate
LanguageScriptProvider to execute the script. A
LanguageScriptProvider has the following responsibilities:
- It must support the com.sun.star.script.provider.LanguageScriptProvider service.
- It is responsible for creating the environment necessary to run a script.
- It is responsible for implementing the com.sun.star.script.browse.BrowseNode service to allow macros to be organized and browsed.
- Given a script URI it is responsible for returning a command like object that implements the com.sun.star.script.provider.XScript interface that can execute the macro indicated by the URI.
- The name of the any
LanguageScriptProviderservice must be of the form "
com.sun.star.script.provider.ScriptProviderFor[Language]", where Language is the language name as it appears in a script URI.
|Content on this page is licensed under the Public Documentation License (PDL).|