The described modules and classes are invoked from user scripts as "Services". A generic constructor of those services has been designed for that purpose for each language.
The Dispose method is available in all services and should be called to free up resources after usage:
Provides a collection of methods for manipulating and transforming arrays of one dimension (vectors) and arrays of two dimensions (matrices). This includes set operations, sorting, importing from and exporting to text files.
Arrays with more than two dimensions cannot be used with the methods in this service, the only exception being the CountDims method that accepts Arrays with any number of dimensions.
The Base service provides a number of methods and properties to facilitate the management and handling of LibreOfficeDev Base documents.
This service is closely related to the Document service, which provides generic methods for handling LibreOfficeDev documents, including Base documents. Hence, the Base service extends the Document service and provides additional methods that are specific for Base documents, enabling users to:
Get access to the database contained in a Base document.
Open form documents stored in a Base document.
Check if a form document from a Base document is currently loaded.
The ScriptForge.Basic service proposes a collection of LibreOfficeDev Basic methods to be executed in a Python context. Basic service methods reproduce the exact syntax and behaviour of Basic builtin functions.
The SFDocuments shared library provides a number of methods and properties to facilitate the management and handling of LibreOfficeDev documents.
The SFDocuments.Calc service is a subclass of the SFDocuments.Document service. All methods and properties defined for the Document service can also be accessed using a Calc service instance.
The Calc service is focused on:
Handling sheets within a Calc document (copy, insert, move, etc)
Exchanging data between Basic data structures and Calc ranges
The Datasheet service allows to visualize the contents of database tables as well as the results of queries and SQL statements using Base's Data View. Additionally, this service allows to:
Add custom menus to the data view.
Access values in specific positions of the data view.
Position the cursor in a specific cell of the data view.
The Dialog service contributes to the management of dialogs created with the Basic Dialog Editor or dialogs created on-the-fly. Each instance of the current class represents a single dialog box displayed to the user.
The DialogControl service manages the controls belonging to a dialog defined with the Basic Dialog Editor. Each instance of the current service represents a single control within a dialog box.
The focus is set on getting and setting the values displayed by the controls of the dialog box. Formatting is accessible via the XControlModel and XControlView properties.
Note that the unique DialogControl.Value property content varies according to the control type.
A special attention is given to controls of type tree control. It is easy to populate a tree, either branch by branch, or with a set of branches at once. Populating a tree control can be performed statically or dynamically.
The SFDocuments library provides methods and properties to facilitate the management and manipulation of LibreOfficeDev documents.
Methods that are applicable for all types of documents (Text Documents, Sheets, Presentations, etc) are provided by the SFDocuments.Document service. Some examples are:
Opening, closing and saving documents
Accessing standard or custom properties of documents
The Exception service is a collection of methods to assist in code debugging in Basic and Python scripts and in error handling in Basic scripts.
In Basic scripts, when a run-time error occurs, the methods and properties of the Exception service help identify the error context and allow to handle it.
The Form service provides methods and properties to manage forms in LibreOfficeDev documents. This service supports forms in Base, Calc and Writer documents and allows to:
The FormControl service provides access to the controls that belong to a form, a subform or a table control of a FormDocument. Each instance of the FormControl service refers to a single control in the form. This service allows users to:
Get and set the properties of the control represented by the FormControl instance.
Access the current value displayed by the control.
The FormDocument service allows to access form documents stored in LibreOfficeDev Base documents.
In a Base document, existing form documents can be viewed by selecting View - Forms in the user interface. Each form document may be composed of one or more forms, including the main form and other sub-forms.
This service provides a number of methods related to the translation of strings with minimal impact on the program's source code. The methods provided by the L10N service can be used mainly to:
Create POT files that can be used as templates for translation of all strings in the program.
Get translated strings at runtime for the language defined in the Locale property.
The Menu service can be used to create and remove menus from the menubar of a LibreOfficeDev document window. Each menu entry can be associated with a script or with a UNO command. This service provides the following capabilities:
Creation of menus with custom entries, checkboxes, radio buttons and separators.
The PopupMenu service can be used to create popup menus that can be associated with events or executed by scripts. This service provides the following capabilities:
Creation of popup menus with custom entries, checkboxes and radio buttons.
The main purpose of the Services module is to provide access to the CreateScriptService method, which can be called in user scripts to instantiate services that are implemented using the ScriptForge framework.
The Toolbar service allows to retrieve information related to the toolbars available for a specific document window. With this service it is possible to:
Toggle the visibility of specific toolbars.
Access information about the buttons available in each toolbar.
The ToolbarButton service allows to retrieve information related to the toolbar buttons available in a given toolbar. With this service it is possible to:
Toggle the visibility of toolbar elements.
Execute the command associated with a given toolbar button.
The UI (User Interface) service simplifies the identification and the manipulation of the different windows composing the whole LibreOfficeDev application:
The SFDocuments shared library provides a number of methods and properties to facilitate the management and handling of LibreOfficeDev documents.
Some methods are generic for all types of documents and are inherited from the SF_Document module, whereas other methods that are specific for Writer documents are defined in the SF_Writer module.
Notu: Aliaj ScriptForge nepriskribitaj moduloj estas rezervitaj por interna uzado. Ilia enhavo eble ŝanĝiĝos sen averto.
All ScriptForge Basic routines or identifiers that are prefixed with an underscore character "_" are reserved for internal use. They are not meant be used in Basic macros or Python scripts.