From 6b24e1b46b633ccbbf65159f858c9a496479e426 Mon Sep 17 00:00:00 2001 From: Alain Romedenne Date: Thu, 29 Apr 2021 18:17:27 +0200 Subject: sf_basic.xhp pt. 2 Change-Id: Icb81fca7bdea283d3da6c113d1305d47c5bc6ff3 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/114867 Tested-by: Jenkins Reviewed-by: Rafael Lima --- source/text/sbasic/shared/03/lib_ScriptForge.xhp | 31 +++++++++++++++--------- 1 file changed, 20 insertions(+), 11 deletions(-) (limited to 'source/text') diff --git a/source/text/sbasic/shared/03/lib_ScriptForge.xhp b/source/text/sbasic/shared/03/lib_ScriptForge.xhp index dc3c9674f6..f3aa899f22 100644 --- a/source/text/sbasic/shared/03/lib_ScriptForge.xhp +++ b/source/text/sbasic/shared/03/lib_ScriptForge.xhp @@ -15,22 +15,28 @@ -

The ScriptForge Library

+

The ScriptForge Library

BASIC ScriptForge library
-
- GlobalScope.BasicLibraries.LoadLibrary("ScriptForge")
- The described modules and classes are invoked from user scripts as "Services". A generic constructor of those services has been designed for that purpose: + ScriptForge libraries build up an extensible collection of macro scripting resources for %PRODUCTNAME to be invoked from Basic macros or Python scripts. + • Basic macros require to load ScriptForge library using the following statement:
GlobalScope.BasicLibraries.LoadLibrary("ScriptForge")

• Python scripts require an import from scriptforge module:
+ from scriptforge import CreateScriptService +
+ 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: - CreateScriptService("servicename"[, arg0, Arg1, ...]) + GlobalScope.BasicLibraries.LoadLibrary("ScriptForge") + Set oSvc = CreateScriptService("servicename"[, arg0, arg1, ...]) - Services from external libraries can be registered with the RegisterScriptServices(...) method in order to extend the set of available services. - The ScriptForge Basic library is available from %PRODUCTNAME 7.1 onwards. - + + from scriptforge import CreateScriptService + svc = CreateScriptService('servicename'[, arg0, arg1, ...]) + + + The ScriptForge Basic library is available from %PRODUCTNAME 7.1 onwards.
Python scriptforge module is available from %PRODUCTNAME 7.2 onwards.

Services provided by the ScriptForge library

@@ -70,13 +76,14 @@ Base
+ Basic
Calc
Database
- Document + Document
Form
FormControl

@@ -116,13 +123,15 @@
-
+
+ +
@@ -183,4 +192,4 @@ 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. - + \ No newline at end of file -- cgit