LibreOffice: XEngine Interface Reference

LibreOffice LibreOffice 26.8 SDK API Reference

Loading...
Searching...
No Matches
XEngine Interface Referencepublished

makes it possible to control a scripting engine. More...

`import "XEngine.idl";`

Inheritance diagram for XEngine:

## Public Member Functions
void | setRoot ([in] com::sun::star::uno::XInterface xRoot)
| sets an interface to an object as a scripting root.
com::sun::star::uno::XInterface | getRoot ()
| gets an interface to the object which is the scripting root.
void | setLibraryAccess ([in] com::sun::star::script::XLibraryAccess Library)
| sets an access object to get external functions.
boolean | compile ([in] string ModuleName, [in] string Script, [in] boolean CreateDebugInfo)
| compiles a script module in the scope of the root object.
any | run ([in] string aScript, [in] com::sun::star::uno::XInterface xThis, [in] sequence< any > aArgs)
| runs a script specified by a string.
void | runAsync ([in] string acript, [in] com::sun::star::uno::XInterface xThis, [in] sequence< any > args, [in] com::sun::star::script::XEngineListener xCallback)
| runs the script specified by a string and makes callbacks.
void | cancel ()
| terminates the execution of the running script.
void | addEngineListener ([in] com::sun::star::script::XEngineListener Listener)
| adds an engine listener.
void | removeEngineListener ([in] com::sun::star::script::XEngineListener Listener)
| removes an engine listener.
Public Member Functions inherited from XInterface
any | queryInterface ([in] type aType)
| queries for a new interface to an existing UNO object.
void | acquire ()
| increases the reference counter by one.
void | release ()
| decreases the reference counter by one.

## Detailed Description

makes it possible to control a scripting engine.

Deprecated

## Member Function Documentation

## ◆ addEngineListener()

void addEngineListener | ( | [in] com::sun::star::script::XEngineListener | Listener | ) |

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.

## ◆ cancel()

void cancel | ( |  | ) |

terminates the execution of the running script.

The waiting queue is cleared too.

## ◆ compile()

boolean compile | ( | [in] string | ModuleName,
|  | [in] string | Script,
|  | [in] boolean | CreateDebugInfo )

compiles a script module in the scope of the root object.

## ◆ getRoot()

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

gets an interface to the object which is the scripting root.

## ◆ removeEngineListener()

void removeEngineListener | ( | [in] com::sun::star::script::XEngineListener | Listener | ) |

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.

## ◆ run()

any run | ( | [in] string | aScript,
|  | [in] com::sun::star::uno::XInterface | xThis,
|  | [in] sequence< any > | aArgs )

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] com::sun::star::script::XEngineListener | xCallback )

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.

## ◆ setLibraryAccess()

void setLibraryAccess | ( | [in] com::sun::star::script::XLibraryAccess | Library | ) |

sets an access object to get external functions.

## ◆ setRoot()

void setRoot | ( | [in] com::sun::star::uno::XInterface | xRoot | ) |

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.

The documentation for this interface was generated from the following file:

- com/sun/star/script/XEngine.idl