(incubating) | The Free and Open Productivity Suite

Developer's Guide

API

SDK

Tips 'n' Tricks

Miscellaneous

Content for OpenOffice.org version 3.3.

:: com :: sun :: star :: script ::

deprecated interface XEngine
Usage Restrictions
deprecated
Description
makes it possible to control a scripting engine.

Methods' Summary
setRoot sets an interface to an object as a scripting root.  
getRoot gets an interface to the object which is the scripting root.  
setLibraryAccess sets an access object to get external functions.  
compile compiles a script module in the scope of the root object.  
run runs a script specified by a string.  
runAsync runs the script specified by a string and makes callbacks.  
cancel terminates the execution of the running script.  
addEngineListener adds an engine listener.  
removeEngineListener removes an engine listener.  
Methods' Details
setRoot
void
setRoot( [in] ::com::sun::star::uno::XInterface  xRoot );

Description
sets an interface to an object as a scripting root.

If the root object implements the XInvocation interface, then the engine uses this interface to set/get properties and call methods.

getRoot
::com::sun::star::uno::XInterface
getRoot();

Description
gets an interface to the object which is the scripting root.
setLibraryAccess
void
setLibraryAccess( [in] XLibraryAccess  Library );

Description
sets an access object to get external functions.
compile
boolean
compile( [in] string  ModuleName,
[in] string  Script,
[in] boolean  CreateDebugInfo );

Description
compiles a script module in the scope of the root object.
run
any
run( [in] string  aScript,
[in] ::com::sun::star::uno::XInterface  xThis,
[in] sequence< any >  aArgs );

Description
runs a script specified by a string.

The arguments given in aArgs can be ignored by the engine. The Script is executed synchronously.

runAsync
void
runAsync( [in] string  acript,
[in] ::com::sun::star::uno::XInterface  xThis,
[in] sequence< any >  args,
[in] XEngineListener  xCallback );

Description
runs the script specified by a string and makes callbacks.

The arguments given in aArgs can be ignored by the engine. The script is executed asynchronously.

cancel
void
cancel();

Description
terminates the execution of the running script.

The waiting queue is cleared too.

addEngineListener
void
addEngineListener( [in] XEngineListener  Listener );

Description
adds an engine listener.

It is suggested to allow multiple registration of the same listener, thus for each time a listener is added, it has to be removed.

removeEngineListener
void
removeEngineListener( [in] XEngineListener  Listener );

Description
removes an engine listener.

It is suggested to allow multiple registration of the same listener, thus for each time a listener is added, it has to be removed.

Top of Page

Apache OpenOffice is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF.

Copyright & License
Apache and the Apache feather logos are trademarks of The Apache Software Foundation. OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.