summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlain Romedenne <alain.romedenne@libreoffice.org>2022-04-04 15:33:05 +0100
committerAlain Romedenne <alain.romedenne@libreoffice.org>2022-04-06 20:00:15 +0200
commit4b68b8f837be5932a30a9ff3546afeeaea4f93a5 (patch)
treef0f2d8925a44dec0a0fd64bfa6e26412c5a56e85
parenta6304ba5dd0efe2d5e2a16254aa9e7d2e74f5660 (diff)
Some ScriptForge services lack a pre-requisite note 2/3:
- included pre-requisite note in SF help page - created a Python biaised note for 'Basic' service - will create a Basic biaised note for Basic oriented services in a subsequent patch Change-Id: I0810602b527fde14e4a013857482fc892593ca7f Reviewed-on: https://gerrit.libreoffice.org/c/help/+/132386 Tested-by: Jenkins Reviewed-by: Alain Romedenne <alain.romedenne@libreoffice.org>
-rw-r--r--source/text/sbasic/shared/03/sf_basic.xhp2
-rw-r--r--source/text/sbasic/shared/03/sf_dialog.xhp3
-rw-r--r--source/text/sbasic/shared/03/sf_dialogcontrol.xhp3
-rw-r--r--source/text/sbasic/shared/03/sf_l10n.xhp3
-rw-r--r--source/text/sbasic/shared/03/sf_menu.xhp3
-rw-r--r--source/text/sbasic/shared/03/sf_platform.xhp3
-rw-r--r--source/text/sbasic/shared/03/sf_popupmenu.xhp3
-rw-r--r--source/text/sbasic/shared/03/sf_session.xhp3
-rw-r--r--source/text/sbasic/shared/03/sf_timer.xhp3
-rw-r--r--source/text/sbasic/shared/03/sf_ui.xhp3
10 files changed, 28 insertions, 1 deletions
diff --git a/source/text/sbasic/shared/03/sf_basic.xhp b/source/text/sbasic/shared/03/sf_basic.xhp
index a5d6352022..300838e7b8 100644
--- a/source/text/sbasic/shared/03/sf_basic.xhp
+++ b/source/text/sbasic/shared/03/sf_basic.xhp
@@ -31,7 +31,7 @@
</pycode>
<warning id="par_id151618849022977"><literal>ScriptForge</literal>.<literal>Basic</literal> service is limited to Python scripts.</warning>
<h2 id="hd_id581582885621841" xml-lang="en-US">Service invocation</h2>
- <paragraph role="paragraph" id="par_id141610734722352">Before using the <literal>Basic</literal> service, import the <literal>CreateScriptService()</literal> method from the <literal>scriptforge</literal> module:</paragraph>
+ <note id="par_id141610734722352">Before using the <literal>Basic</literal> service, import the <literal>CreateScriptService()</literal> method from the <literal>scriptforge</literal> module:</note>
<pycode>
<paragraph role="pycode" localize="false" id="pyc_id551610734764343">from scriptforge import CreateScriptService</paragraph>
<paragraph role="pycode" localize="false" id="pyc_id121618496552817">bas = CreateScriptService("Basic")</paragraph>
diff --git a/source/text/sbasic/shared/03/sf_dialog.xhp b/source/text/sbasic/shared/03/sf_dialog.xhp
index cc87748b0b..8499434e77 100644
--- a/source/text/sbasic/shared/03/sf_dialog.xhp
+++ b/source/text/sbasic/shared/03/sf_dialog.xhp
@@ -31,6 +31,9 @@
<tip id="par_id891598188164936" xml-lang="en-US">The <literal>SFDialogs.Dialog</literal> service is closely related to the <literal>SFDialogs.DialogControl</literal> service.</tip>
<h2 id="hd_id581582885621841" xml-lang="en-US">Service invocation and usage</h2>
+ <paragraph role="paragraph" id="par_id141609955500101">Before using the <literal>Dialog</literal> service the <literal>ScriptForge</literal> library needs to be loaded or imported:</paragraph>
+ <embed href="text/sbasic/shared/03/lib_ScriptForge.xhp#importLibs"/>
+
<paragraph role="paragraph" id="par_id361598174756160" xml-lang="en-US">The <literal>Dialog</literal> service is invoked through the <literal>CreateScriptService</literal> method. It requires three positional arguments to specify the dialog box to activate:</paragraph>
<paragraph role="paragraph" id="par_id31612271944733"><emph>Container</emph>: "<link href="text/sbasic/shared/03131900.xhp" name="GlobalScope specifier"><literal>GlobalScope</literal></link>" for preinstalled libraries or a window name as defined by <link href="text/sbasic/shared/03/sf_ui.xhp" name="ScriptForge.UI"><literal>ScriptForge.UI</literal></link> service. Empty string "" default value stands for the current document.</paragraph>
<paragraph role="paragraph" id="par_id311612271947124"><emph>Library</emph>: The case-sensitive name of a library contained in the container. Default value is "Standard".</paragraph>
diff --git a/source/text/sbasic/shared/03/sf_dialogcontrol.xhp b/source/text/sbasic/shared/03/sf_dialogcontrol.xhp
index eb97854d34..9f92015a78 100644
--- a/source/text/sbasic/shared/03/sf_dialogcontrol.xhp
+++ b/source/text/sbasic/shared/03/sf_dialogcontrol.xhp
@@ -31,6 +31,9 @@
</section>
<tip id="par_id891598188164936" xml-lang="en-US">The <literal>SFDialogs.DialogControl</literal> service is closely related to the <link href="text/sbasic/shared/03/sf_dialog.xhp" name="Dialog service"><literal>SFDialogs.Dialog</literal></link> service.</tip>
<h2 id="hd_id581582885621841" xml-lang="en-US">Service invocation</h2>
+ <paragraph role="paragraph" id="par_id141609955500101">Before using the <literal>DialogControl</literal> service the <literal>ScriptForge</literal> library needs to be loaded or imported:</paragraph>
+ <embed href="text/sbasic/shared/03/lib_ScriptForge.xhp#importLibs"/>
+
<paragraph role="paragraph" id="par_id361598174756160" xml-lang="en-US">The <literal>DialogControl</literal> service is invoked from an existing <literal>Dialog</literal> service instance through its <literal>Controls()</literal> method. The dialog must be initiated with the <literal>SFDialogs.Dialog</literal> service.</paragraph>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id791598453192421">Dim myDialog As Object, myControl As Object</paragraph>
diff --git a/source/text/sbasic/shared/03/sf_l10n.xhp b/source/text/sbasic/shared/03/sf_l10n.xhp
index 2a3dc712d1..453fe345ab 100644
--- a/source/text/sbasic/shared/03/sf_l10n.xhp
+++ b/source/text/sbasic/shared/03/sf_l10n.xhp
@@ -57,6 +57,9 @@
<note id="par_id361614361362393">Note that the first two methods are used to build a set of translatable strings and export them to a POT file. However, it is not mandatory to create POT files using these methods. Since they are text files, the programmer could have created them using any text editor.</note>
<h2 id="hd_id351585843652312" xml-lang="en-US">Service invocation</h2>
+ <paragraph role="paragraph" id="par_id141609955500101">Before using the <literal>L10N</literal> service the <literal>ScriptForge</literal> library needs to be loaded or imported:</paragraph>
+ <embed href="text/sbasic/shared/03/lib_ScriptForge.xhp#importLibs"/>
+
<paragraph role="paragraph" id="par_id421614353247163">There are several ways to invoke the <literal>L10N</literal> service using up to five optional arguments that specify the folder where PO files are stored, the locale and encoding to be used, as well as a fallback PO file and its encoding.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<paragraph role="paragraph" localize="false" id="par_id481625854402332">
diff --git a/source/text/sbasic/shared/03/sf_menu.xhp b/source/text/sbasic/shared/03/sf_menu.xhp
index 1798215ef9..56ef1531d4 100644
--- a/source/text/sbasic/shared/03/sf_menu.xhp
+++ b/source/text/sbasic/shared/03/sf_menu.xhp
@@ -36,6 +36,9 @@
<warning id="par_id291643224925643">When OLE objects such as Math formulas or Calc charts are edited from within a document, %PRODUCTNAME reconfigures the menubar according to the object. When this happens, the menus created with the <literal>Menu</literal> service are removed and are not be restored after editing the OLE object.</warning>
<h2 id="hd_id281600788076359">Service invocation</h2>
+ <paragraph role="paragraph" id="par_id141609955500101">Before using the <literal>Menu</literal> service the <literal>ScriptForge</literal> library needs to be loaded or imported:</paragraph>
+ <embed href="text/sbasic/shared/03/lib_ScriptForge.xhp#importLibs"/>
+
<embed href="text/sbasic/shared/00000003.xhp#In_Basic"/>
<paragraph role="paragraph" id="par_id321614902851541">The <literal>Menu</literal> service is instantiated by calling the <link href="text/sbasic/shared/03/sf_document.xhp#CreateMenu" name="CreateMenu_link"><literal>CreateMenu</literal></link> method from the <literal>Document</literal> service. The code snippet below creates a menu named <emph>My Menu</emph> in the current document window with two entries <emph>Item A</emph> and <emph>Item B</emph>.</paragraph>
<bascode>
diff --git a/source/text/sbasic/shared/03/sf_platform.xhp b/source/text/sbasic/shared/03/sf_platform.xhp
index e6b94a9955..f98a1f0c60 100644
--- a/source/text/sbasic/shared/03/sf_platform.xhp
+++ b/source/text/sbasic/shared/03/sf_platform.xhp
@@ -40,6 +40,9 @@
</section>
<note id="par_id951614903258253">All properties of the <literal>Platform</literal> service are read-only.</note>
<h2 id="hd_id281600788076359">Service invocation</h2>
+ <paragraph role="paragraph" id="par_id141609955500101">Before using the <literal>Platform</literal> service the <literal>ScriptForge</literal> library needs to be loaded or imported:</paragraph>
+ <embed href="text/sbasic/shared/03/lib_ScriptForge.xhp#importLibs"/>
+
<paragraph role="paragraph" id="par_id321614902851541">The examples below in Basic and Python instantiate the <literal>Platform</literal> service and access the <literal>Architecture</literal> property.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#In_Basic"/>
<bascode>
diff --git a/source/text/sbasic/shared/03/sf_popupmenu.xhp b/source/text/sbasic/shared/03/sf_popupmenu.xhp
index 8a2edf74a9..b36ebbda39 100644
--- a/source/text/sbasic/shared/03/sf_popupmenu.xhp
+++ b/source/text/sbasic/shared/03/sf_popupmenu.xhp
@@ -35,6 +35,9 @@
</section>
<h2 id="hd_id281600788076359">Service invocation</h2>
+ <paragraph role="paragraph" id="par_id141609955500101">Before using the <literal>PopupMenu</literal> service the <literal>ScriptForge</literal> library needs to be loaded or imported:</paragraph>
+ <embed href="text/sbasic/shared/03/lib_ScriptForge.xhp#importLibs"/>
+
<embed href="text/sbasic/shared/00000003.xhp#In_Basic"/>
<paragraph role="paragraph" id="par_id321614902851541">The <literal>PopupMenu</literal> service can be instantiated in multiple ways. The example below creates a popup menu without associating it with a mouse or application event.</paragraph>
<bascode>
diff --git a/source/text/sbasic/shared/03/sf_session.xhp b/source/text/sbasic/shared/03/sf_session.xhp
index 1ce31f8f63..ff41243230 100644
--- a/source/text/sbasic/shared/03/sf_session.xhp
+++ b/source/text/sbasic/shared/03/sf_session.xhp
@@ -36,6 +36,9 @@
</section>
<h2 id="hd_id91582814720116" xml-lang="en-US">Service invocation</h2>
+ <paragraph role="paragraph" id="par_id141609955500101">Before using the <literal>Session</literal> service the <literal>ScriptForge</literal> library needs to be loaded or imported:</paragraph>
+ <embed href="text/sbasic/shared/03/lib_ScriptForge.xhp#importLibs"/>
+
<embed href="text/sbasic/shared/00000003.xhp#In_Basic"/>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id931582897922121">GlobalScope.BasicLibraries.LoadLibrary("ScriptForge")</paragraph>
diff --git a/source/text/sbasic/shared/03/sf_timer.xhp b/source/text/sbasic/shared/03/sf_timer.xhp
index dc4ae0cd30..b3c2ea2dd1 100644
--- a/source/text/sbasic/shared/03/sf_timer.xhp
+++ b/source/text/sbasic/shared/03/sf_timer.xhp
@@ -45,6 +45,9 @@
<paragraph role="tip" id="par_id991582733781280" xml-lang="en-US">Durations are expressed in seconds with a precision of 3 decimal digits (milliseconds). A duration value of 12.345 means 12 seconds and 345 milliseconds</paragraph>
<h2 id="hd_id201582733781265" xml-lang="en-US">Service invocation</h2>
+ <paragraph role="paragraph" id="par_id141609955500101">Before using the <literal>Timer</literal> service the <literal>ScriptForge</literal> library needs to be loaded or imported:</paragraph>
+ <embed href="text/sbasic/shared/03/lib_ScriptForge.xhp#importLibs"/>
+
<embed href="text/sbasic/shared/00000003.xhp#In_Basic"/>
<paragraph role="paragraph" id="par_id891610734806133">The example below creates a <literal>Timer</literal> object named <literal>myTimer</literal> and starts it immediately.</paragraph>
<bascode>
diff --git a/source/text/sbasic/shared/03/sf_ui.xhp b/source/text/sbasic/shared/03/sf_ui.xhp
index ed4505fa8a..1c012cfae8 100644
--- a/source/text/sbasic/shared/03/sf_ui.xhp
+++ b/source/text/sbasic/shared/03/sf_ui.xhp
@@ -78,6 +78,9 @@
<tip id="par_id971588521292976" xml-lang="en-US">The implementation of the document objects class is done in the <literal>SFDocuments</literal> associated library. See its "<literal>Document</literal>" service.</tip>
<h2 id="hd_id91587913266988" xml-lang="en-US">Service invocation</h2>
+ <paragraph role="paragraph" id="par_id141609955500101">Before using the <literal>UI</literal> service the <literal>ScriptForge</literal> library needs to be loaded or imported:</paragraph>
+ <embed href="text/sbasic/shared/03/lib_ScriptForge.xhp#importLibs"/>
+
<embed href="text/sbasic/shared/00000003.xhp#In_Basic"/>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id391587913266269">Dim ui As Variant</paragraph>