diff options
author | Alain Romedenne <alain.romedenne@libreoffice.org> | 2021-04-29 18:17:27 +0200 |
---|---|---|
committer | Rafael Lima <rafael.palma.lima@gmail.com> | 2021-04-30 22:14:29 +0200 |
commit | 6b24e1b46b633ccbbf65159f858c9a496479e426 (patch) | |
tree | 5111e60f2342c74a66773011d4361f0d02b33a5b /source | |
parent | 4ee2f0f82f99a865e765309eda367d5fc016674b (diff) |
sf_basic.xhp pt. 2
Change-Id: Icb81fca7bdea283d3da6c113d1305d47c5bc6ff3
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/114867
Tested-by: Jenkins
Reviewed-by: Rafael Lima <rafael.palma.lima@gmail.com>
Diffstat (limited to 'source')
-rw-r--r-- | source/text/sbasic/shared/03/lib_ScriptForge.xhp | 31 |
1 files changed, 20 insertions, 11 deletions
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 @@ </topic> </meta> <body> - <h1 id="hd_id31529004750471" xml-lang="en-US"><variable id="ScriptForge_lib"><link href="text/sbasic/shared/03/lib_ScriptForge.xhp" name="ScriptForge library">The <item type="literal">ScriptForge</item> Library</link></variable></h1> + <h1 id="hd_id31529004750471" xml-lang="en-US"><variable id="ScriptForge_lib"><link href="text/sbasic/shared/03/lib_ScriptForge.xhp" name="ScriptForge library">The <literal>ScriptForge</literal> Library</link></variable></h1> <bookmark xml-lang="en-US" branch="index" id="bm_id491529070339774"> <bookmark_value>BASIC ScriptForge library</bookmark_value> </bookmark> <section id="howtoget"> <embed href="text/sbasic/shared/00000003.xhp#basiclibhowtoget"/> </section> - <note id="par_id901528999850603" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#basiclibrarynote" markup="keep"/><br/> - <item type="literal">GlobalScope.BasicLibraries.LoadLibrary("ScriptForge")</item></note> - <paragraph role="paragraph" id="par_id781606153472028">The described modules and classes are invoked from user scripts as "Services". A generic constructor of those services has been designed for that purpose:</paragraph> + <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> + <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> + <paragraph role="paragraph" id="par_id781606153472028">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:</paragraph> <bascode> - <paragraph role="bascode" localize="false" id="bas_id201606153529501">CreateScriptService("servicename"[, arg0, Arg1, ...])</paragraph> + <paragraph role="bascode" localize="false" id="bas_id901619770181787">GlobalScope.BasicLibraries.LoadLibrary("ScriptForge")</paragraph> + <paragraph role="bascode" localize="false" id="bas_id201606153529501">Set oSvc = CreateScriptService("servicename"[, arg0, arg1, ...])</paragraph> </bascode> - <paragraph role="paragraph" id="par_id891606153700196">Services from external libraries can be registered with the <literal>RegisterScriptServices(...)</literal> method in order to extend the set of available services.</paragraph> - <note id="par_id851605659675843">The <literal>ScriptForge</literal> Basic library is available from %PRODUCTNAME 7.1 onwards.</note> - + <pycode> + <paragraph role="pycode" id="pyc_id701619701322002" localize="false">from scriptforge import CreateScriptService</paragraph> + <paragraph role="pycode" id="pyc_id531619701322249" localize="false">svc = CreateScriptService('servicename'[, arg0, arg1, ...])</paragraph> + <paragraph role="pycode" id="pyc_id471619701322489"></paragraph> + </pycode> + <note id="par_id851605659675843">The <literal>ScriptForge</literal> Basic library is available from %PRODUCTNAME 7.1 onwards.<br/>Python <literal>scriptforge</literal> module is available from %PRODUCTNAME 7.2 onwards.</note> <h2 id="hd_id851613836643580">Services provided by the ScriptForge library</h2> <table id="tab_id311613838858931"> <tablerow> @@ -70,13 +76,14 @@ <tablecell> <paragraph role="paragraph" localize="false" id="par_id771613836902464"> <link href="text/sbasic/shared/03/lib_ScriptForge.xhp#Base" name="Base service">Base</link><br/> + <link href="text/sbasic/shared/03/lib_ScriptForge.xhp#Basic" name="Basic service">Basic</link><br/> <link href="text/sbasic/shared/03/lib_ScriptForge.xhp#Calc" name="Calc service">Calc</link><br/> <link href="text/sbasic/shared/03/lib_ScriptForge.xhp#Database" name="Database service">Database</link><br/> </paragraph> </tablecell> <tablecell> <paragraph id="par_id441543838858931" localize="false" role="tablecontent"> - <link href="text/sbasic/shared/03/lib_ScriptForge.xhp#Document" name="Document service">Document</link> + <link href="text/sbasic/shared/03/lib_ScriptForge.xhp#Document" name="Document service">Document</link><br/> <link href="text/sbasic/shared/03/lib_ScriptForge.xhp#Form" name="Form service">Form</link><br/> <link href="text/sbasic/shared/03/lib_ScriptForge.xhp#FormControl" name="FormControl service">FormControl</link><br/><br/> </paragraph> @@ -116,13 +123,15 @@ </tablecell> </tablerow> </table> - <section id="Array"> <embed href="text/sbasic/shared/03/sf_array.xhp#abstract"/> </section> <section id="Base"> <embed href="text/sbasic/shared/03/sf_base.xhp#abstract"/> </section> + <section id="Basic"> + <embed href="text/sbasic/shared/03/sf_basic.xhp#abstract"/> + </section> <section id="Calc"> <embed href="text/sbasic/shared/03/sf_calc.xhp#abstract"/> </section> @@ -183,4 +192,4 @@ <warning id="par_id851506659675843">All <literal>ScriptForge</literal> 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.</warning> </section> </body> -</helpdocument> +</helpdocument>
\ No newline at end of file |