Difference between revisions of "Documentation/DevGuide/Scripting/Writing a LanguageScriptProvider UNO Component From Scratch"
From Apache OpenOffice Wiki
< Documentation | DevGuide
OOoWikiBot (Talk | contribs) m (FINAL VERSION FOR L10N) |
|||
Line 17: | Line 17: | ||
* The name of the any <code>LanguageScriptProvider</code> service must be of the form "<code>com.sun.star.script.provider.ScriptProviderFor[Language]</code>", where Language is the language name as it appears in a script URI. | * The name of the any <code>LanguageScriptProvider</code> service must be of the form "<code>com.sun.star.script.provider.ScriptProviderFor[Language]</code>", where Language is the language name as it appears in a script URI. | ||
− | {{ | + | {{Note|The name of the <tt>LanguageScriptProvider</tt> MUST be as above otherwise it will not operate correctly.}} |
{{PDL1}} | {{PDL1}} | ||
[[Category:Documentation/Developer's Guide/Scripting]] | [[Category:Documentation/Developer's Guide/Scripting]] |
Revision as of 20:57, 3 July 2018
- 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.
The LanguageScriptProvider
is an UNO component that provides the environment to execute a macro for a specific language. For example when OpenOffice.org 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
LanguageScriptProvider
service 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). |