From 0ce7571dc9f2262e6ef9f50f895b840813e9b30a Mon Sep 17 00:00:00 2001 From: Rafael Lima Date: Mon, 21 Jun 2021 19:12:17 +0200 Subject: Add note about Python support availability on some SF services This patch is being cherry-picked for LO 7.2 because some SF services have Python support but the help pages could not be updated in time. Hence, this patch adds a note to these help pages to let users know that these SF services also support Python. Change-Id: I226b0b92fcc2b380fa6687cba87276b485009151 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/117567 Tested-by: Jenkins Tested-by: Jean-Pierre Ledure Reviewed-by: Olivier Hallot (cherry picked from commit 3c0fb9a710915c30adf5287a734a185696fa0b76) Reviewed-on: https://gerrit.libreoffice.org/c/help/+/117635 --- source/text/sbasic/shared/00000003.xhp | 4 ++++ source/text/sbasic/shared/03/sf_database.xhp | 1 + source/text/sbasic/shared/03/sf_filesystem.xhp | 1 + source/text/sbasic/shared/03/sf_l10n.xhp | 2 +- source/text/sbasic/shared/03/sf_platform.xhp | 1 + source/text/sbasic/shared/03/sf_session.xhp | 2 +- source/text/sbasic/shared/03/sf_textstream.xhp | 1 + source/text/sbasic/shared/03/sf_timer.xhp | 2 ++ 8 files changed, 12 insertions(+), 2 deletions(-) diff --git a/source/text/sbasic/shared/00000003.xhp b/source/text/sbasic/shared/00000003.xhp index 9f24e8eb68..5c2b7fb2be 100644 --- a/source/text/sbasic/shared/00000003.xhp +++ b/source/text/sbasic/shared/00000003.xhp @@ -232,6 +232,10 @@ This method requires the installation of the APSO (Alternative Script Organizer for Python) extension. If it is not installed, an error will occur. +
+This service is fully supported in both Basic and Python languages. All examples are expressed using the Basic programming language and can be easily converted to Python. +
+ String functions diff --git a/source/text/sbasic/shared/03/sf_database.xhp b/source/text/sbasic/shared/03/sf_database.xhp index 3b67abbe87..bbc936356f 100644 --- a/source/text/sbasic/shared/03/sf_database.xhp +++ b/source/text/sbasic/shared/03/sf_database.xhp @@ -59,6 +59,7 @@ Conversely, if a RegistrationName is specified, the FileName parameter should not be defined. ReadOnly: Determines if the database will be opened as readonly (Default = True). User, Password: Additional connection parameters to the database server. +

Accessing Databases with the UI Service

It is also possible to access the database associated with a Base document using the ScriptForge.UI service, as shown in the example below: diff --git a/source/text/sbasic/shared/03/sf_filesystem.xhp b/source/text/sbasic/shared/03/sf_filesystem.xhp index e598a32382..18b36a4b99 100644 --- a/source/text/sbasic/shared/03/sf_filesystem.xhp +++ b/source/text/sbasic/shared/03/sf_filesystem.xhp @@ -121,6 +121,7 @@ FSO = CreateScriptService("FileSystem") FSO.BuildPath(...) + FileSystem service;FileNaming property diff --git a/source/text/sbasic/shared/03/sf_l10n.xhp b/source/text/sbasic/shared/03/sf_l10n.xhp index 2cf76682a4..2a964fe003 100644 --- a/source/text/sbasic/shared/03/sf_l10n.xhp +++ b/source/text/sbasic/shared/03/sf_l10n.xhp @@ -24,7 +24,6 @@

ScriptForge.L10N service

- 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: @@ -63,6 +62,7 @@ FolderName: The folder containing the PO files. It must be expressed in the FileSystem.FileNaming notation. Locale: A string in the form "la-CO" (language-COUNTRY) or in the form "la" (language) only. Several instances of the L10N service may coexist. However, each instance must use a separate directory for its PO files. +

The following example instantiates the L10N service without any optional arguments. This will only enable the AddText and ExportToPOTFile methods. diff --git a/source/text/sbasic/shared/03/sf_platform.xhp b/source/text/sbasic/shared/03/sf_platform.xhp index d66f41827e..ef534cc867 100644 --- a/source/text/sbasic/shared/03/sf_platform.xhp +++ b/source/text/sbasic/shared/03/sf_platform.xhp @@ -47,6 +47,7 @@ platform = CreateScriptService("Platform") MsgBox platform.Architecture + Platform service;Architecture Platform service;ComputerName diff --git a/source/text/sbasic/shared/03/sf_session.xhp b/source/text/sbasic/shared/03/sf_session.xhp index 26d533188b..5713bf4976 100644 --- a/source/text/sbasic/shared/03/sf_session.xhp +++ b/source/text/sbasic/shared/03/sf_session.xhp @@ -46,7 +46,7 @@ Dim session As Variant session = CreateScriptService("Session") - +

Constants

Below is a list of constants available to ease the designation of the library containing a Basic or Python script to invoke.
Use them as session.CONSTANT.
diff --git a/source/text/sbasic/shared/03/sf_textstream.xhp b/source/text/sbasic/shared/03/sf_textstream.xhp index 1659d32a54..61210f46c0 100644 --- a/source/text/sbasic/shared/03/sf_textstream.xhp +++ b/source/text/sbasic/shared/03/sf_textstream.xhp @@ -40,6 +40,7 @@ FSO = CreateScriptService("FileSystem") Set myFile = FSO.OpenTextFile("C:\Temp\ThisFile.txt", FSO.ForReading) + The file must be closed with the CloseFile method after all read or write operations have been executed: myFile.CloseFile() diff --git a/source/text/sbasic/shared/03/sf_timer.xhp b/source/text/sbasic/shared/03/sf_timer.xhp index 809d473cc6..ae2416cdd5 100644 --- a/source/text/sbasic/shared/03/sf_timer.xhp +++ b/source/text/sbasic/shared/03/sf_timer.xhp @@ -59,6 +59,8 @@ Set myTimer = myTimer.Dispose() + +

Properties

-- cgit