diff options
author | Alain Romedenne <alain.romedenne@libreoffice.org> | 2022-03-23 18:00:17 +0100 |
---|---|---|
committer | Alain Romedenne <alain.romedenne@libreoffice.org> | 2022-04-01 18:39:25 +0200 |
commit | 6bc28e0b9909efc3052105193564ec4161954d60 (patch) | |
tree | 8f6b79390c84692fcf04fe84f04b4b58aee3632e | |
parent | 6e7aa9a6c7a40149d05a611cee896c582a9952f7 (diff) |
Some SF services lack pre-requisite note
Change-Id: Idfd233430aabb5815f1f1db625ca48fd2e613b15
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/131873
Tested-by: Jenkins
Reviewed-by: Rafael Lima <rafael.palma.lima@gmail.com>
-rw-r--r-- | source/text/sbasic/shared/03/lib_ScriptForge.xhp | 2 | ||||
-rw-r--r-- | source/text/sbasic/shared/03/sf_base.xhp | 3 | ||||
-rw-r--r-- | source/text/sbasic/shared/03/sf_calc.xhp | 3 | ||||
-rw-r--r-- | source/text/sbasic/shared/03/sf_chart.xhp | 3 | ||||
-rw-r--r-- | source/text/sbasic/shared/03/sf_database.xhp | 3 | ||||
-rw-r--r-- | source/text/sbasic/shared/03/sf_document.xhp | 3 | ||||
-rw-r--r-- | source/text/sbasic/shared/03/sf_form.xhp | 3 | ||||
-rw-r--r-- | source/text/sbasic/shared/03/sf_formcontrol.xhp | 4 | ||||
-rw-r--r-- | source/text/sbasic/shared/03/sf_writer.xhp | 5 |
9 files changed, 28 insertions, 1 deletions
diff --git a/source/text/sbasic/shared/03/lib_ScriptForge.xhp b/source/text/sbasic/shared/03/lib_ScriptForge.xhp index 2b7e50b6e9..3dccd6a3c4 100644 --- a/source/text/sbasic/shared/03/lib_ScriptForge.xhp +++ b/source/text/sbasic/shared/03/lib_ScriptForge.xhp @@ -25,9 +25,11 @@ <embed href="text/sbasic/shared/00000003.xhp#basiclibhowtoget"/> </section> <paragraph role="paragraph" id="par_id681619700336879">ScriptForge libraries build up an extensible collection of macro scripting resources for %PRODUCTNAME to be invoked from Basic macros or Python scripts.</paragraph> + <section id="importLibs"> <note id="par_id901528999850603" localize="false">• Basic macros require to load <literal>ScriptForge</literal> library using the following statement:<br/> <literal>GlobalScope.BasicLibraries.loadLibrary("ScriptForge")</literal><br/><br/>• Python scripts require an import from <literal>scriptforge</literal> module:<br/> <literal>from scriptforge import CreateScriptService</literal> </note> + </section> <tip id="par_id1001623412767893">To learn more about how to create and execute Python scripts using the <literal>ScriptForge</literal> library, read the help page <link href="text/sbasic/shared/03/sf_intro.xhp" name="sfintro_link">Creating Python Scripts with ScriptForge</link>.</tip> <h2 id="hd_id781637256119733">Invoking ScriptForge services</h2> diff --git a/source/text/sbasic/shared/03/sf_base.xhp b/source/text/sbasic/shared/03/sf_base.xhp index 43b28fa3e1..a619a53e14 100644 --- a/source/text/sbasic/shared/03/sf_base.xhp +++ b/source/text/sbasic/shared/03/sf_base.xhp @@ -41,6 +41,9 @@ <tip id="par_id241619032941497">Refer to the <link href="text/sbasic/shared/03/sf_document.xhp" name="Document Service"><literal>Document</literal> service</link> to learn more about methods and properties that can be used to manage %PRODUCTNAME documents.</tip> <h2 id="hd_id581582885621841" xml-lang="en-US">Service invocation</h2> + <paragraph role="paragraph" id="par_id141609955500101">Before using the <literal>Base</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_id311619033224680">The Base service can be invoked in a variety of ways. The code snippet below uses the method <literal>CreateBaseDocument</literal> from the <literal>UI</literal> service to create a new Base file.</paragraph> <paragraph role="paragraph" id="par_id101619033666470">Note that in all examples the object <literal>oDoc</literal> is an instance of the <literal>Base</literal> service.</paragraph> diff --git a/source/text/sbasic/shared/03/sf_calc.xhp b/source/text/sbasic/shared/03/sf_calc.xhp index 54b50a279b..c191c0baad 100644 --- a/source/text/sbasic/shared/03/sf_calc.xhp +++ b/source/text/sbasic/shared/03/sf_calc.xhp @@ -43,6 +43,9 @@ <note id="par_id851638217526844">This help page describes methods and properties that are applicable only to Calc documents.</note> <h2 id="hd_id581582885621841" xml-lang="en-US">Service invocation</h2> + <paragraph role="paragraph" id="par_id141609955500101">Before using the <literal>Calc</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_id591589191059889" xml-lang="en-US">The <literal>Calc</literal> service is closely related to the <literal>UI</literal> service of the <literal>ScriptForge</literal> library. Below are a few examples of how the <literal>Calc</literal> service can be invoked.</paragraph> <embed href="text/sbasic/shared/00000003.xhp#In_Basic"/> <paragraph role="paragraph" id="par_id551621623999947">The code snippet below creates a <literal>Calc</literal> service instance that corresponds to the currently active Calc document.</paragraph> diff --git a/source/text/sbasic/shared/03/sf_chart.xhp b/source/text/sbasic/shared/03/sf_chart.xhp index a5f6d22bdc..ca1cc338ff 100644 --- a/source/text/sbasic/shared/03/sf_chart.xhp +++ b/source/text/sbasic/shared/03/sf_chart.xhp @@ -49,6 +49,9 @@ <note id="par_id191635273980553">The <literal>Chart</literal> service primarily uses the user-defined name to access a chart object. If it does not exist, than the internal name is used.</note> <h2 id="hd_id281600788076359">Service invocation</h2> + <paragraph role="paragraph" id="par_id141609955500101">Before using the <literal>Chart</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 <literal>Chart</literal> service is instantiated from a <literal>Calc</literal> service instance either using the <literal>Charts</literal> or <literal>CreateChart</literal> methods.</paragraph> <embed href="text/sbasic/shared/00000003.xhp#In_Basic"/> <paragraph role="paragraph" id="par_id531635274285114">The example below creates a <literal>Chart</literal> service instance from an existing chart in the current Calc document:</paragraph> diff --git a/source/text/sbasic/shared/03/sf_database.xhp b/source/text/sbasic/shared/03/sf_database.xhp index f788aa48d3..dc76976d86 100644 --- a/source/text/sbasic/shared/03/sf_database.xhp +++ b/source/text/sbasic/shared/03/sf_database.xhp @@ -45,6 +45,9 @@ <tip id="par_id891599407280007" xml-lang="en-US">To make SQL statements more readable, you may use square brackets "[ ]" to enclose names of tables, queries and fields instead of using other enclosing characters that may be exclusive to certain Relational Database Management Systems (RDBMS). But beware that enclosing characters are mandatory in this context.</tip> <h2 id="hd_id91587913266988" xml-lang="en-US">Service invocation</h2> + <paragraph role="paragraph" id="par_id141609955500101">Before using the <literal>Database</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#functsyntax"/> <paragraph role="paragraph" id="par_id541599408159668" xml-lang="en-US">To create a instance of the <literal>Database</literal> service you can use the <literal>CreateScriptService</literal> method:</paragraph> <paragraph role="paragraph" localize="false" id="par_id251625693098616"> diff --git a/source/text/sbasic/shared/03/sf_document.xhp b/source/text/sbasic/shared/03/sf_document.xhp index 73e308a3f1..e90658f570 100644 --- a/source/text/sbasic/shared/03/sf_document.xhp +++ b/source/text/sbasic/shared/03/sf_document.xhp @@ -42,6 +42,9 @@ <paragraph role="paragraph" id="par_id641611090052376">Although the Basic language does not offer inheritance between object classes, the latter services may be considered as subclasses of the <literal>SFDocuments.Document</literal> service. Such subclasses can invoke the properties and methods described below.</paragraph> <h2 id="hd_id581582885621841" xml-lang="en-US">Service invocation</h2> + <paragraph role="paragraph" id="par_id141609955500101">Before using the <literal>Document</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_id581611090387382">Below are three variants of how the <literal>Document</literal> service can be invoked.</paragraph> <embed href="text/sbasic/shared/00000003.xhp#In_Basic"/> <paragraph role="paragraph" id="par_id181622816732197">Using the <literal>getDocument</literal> method from the <literal>ScriptForge</literal>.<literal>UI</literal> service:</paragraph> diff --git a/source/text/sbasic/shared/03/sf_form.xhp b/source/text/sbasic/shared/03/sf_form.xhp index f797f3bf01..78354a0400 100644 --- a/source/text/sbasic/shared/03/sf_form.xhp +++ b/source/text/sbasic/shared/03/sf_form.xhp @@ -62,6 +62,9 @@ <tip id="par_id191616837111507" xml-lang="en-US">To invoke the <literal>SFDocuments</literal>.<literal>Form</literal> service refer to the methods <literal>Forms()</literal>, <literal>FormDocuments()</literal> and <literal>OpenFormDocument()</literal> of the <link href="text/sbasic/shared/03/sf_document.xhp" name="SFDocuments"><literal>SFDocuments</literal>.<literal>Document</literal></link> service</tip> <section id="serviceInvocation"> <h2 id="hd_id581582885621841" xml-lang="en-US">Service invocation</h2> + <paragraph role="paragraph" id="par_id141609955500101">Before using the <literal>Form</literal> service the <literal>ScriptForge</literal> library needs to be loaded or imported:</paragraph> + <embed href="text/sbasic/shared/03/lib_ScriptForge.xhp#importLibs"/> + <h3 id="hd_id991618179698545">In Writer documents</h3> <paragraph role="paragraph" id="par_id51616767892693" xml-lang="en-US">The code snippet below shows how to access the form named <literal>Form1</literal> that is inside a Writer file:</paragraph> <bascode> diff --git a/source/text/sbasic/shared/03/sf_formcontrol.xhp b/source/text/sbasic/shared/03/sf_formcontrol.xhp index 19a79df9fb..c1f673946d 100644 --- a/source/text/sbasic/shared/03/sf_formcontrol.xhp +++ b/source/text/sbasic/shared/03/sf_formcontrol.xhp @@ -45,7 +45,11 @@ <bookmark_value>API;awt.XControl</bookmark_value> <bookmark_value>API;awt.XControlModel</bookmark_value> </bookmark> + <h2 id="hd_id581582885621841" xml-lang="en-US">Service invocation</h2> + <paragraph role="paragraph" id="par_id141609955500101">Before using the <literal>FormControl</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>FormControl</literal> service is invoked from an existing <literal>Form</literal> service instance through its <literal>Controls</literal> method.</paragraph> <bascode> <paragraph role="bascode" localize="false" id="bas_id791598453192421">Dim oDoc as Object, myForm As Object, myControl As Object</paragraph> diff --git a/source/text/sbasic/shared/03/sf_writer.xhp b/source/text/sbasic/shared/03/sf_writer.xhp index 542d2fe8ff..d4ea1bdfc1 100644 --- a/source/text/sbasic/shared/03/sf_writer.xhp +++ b/source/text/sbasic/shared/03/sf_writer.xhp @@ -31,7 +31,10 @@ </section> <h2 id="hd_id581582885621841">Service invocation</h2> - <paragraph role="paragraph" id="par_id591589191059889" xml-lang="en-US">The <literal>Writer</literal> service is closely related to the <literal>UI</literal> service of the <literal>ScriptForge</literal> library. Below are a few examples of how the <literal>Writer</literal> service can be invoked.</paragraph> + <paragraph role="paragraph" id="par_id141609955500101">Before using the <literal>Writer</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_id591589191059889" xml-lang="en-US">The <literal>Writer</literal> service is closely related to the <literal>UI</literal> service of the <literal>ScriptForge</literal> library. Below are a few examples of how the <literal>Writer</literal> service can be invoked.</paragraph> <embed href="text/sbasic/shared/00000003.xhp#In_Basic"/> <paragraph role="paragraph" id="par_id551621623999947">The code snippet below creates a <literal>Writer</literal> service instance that corresponds to the currently active Writer document.</paragraph> <bascode> |