summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael Lima <rafael.palma.lima@gmail.com>2021-11-18 19:16:25 +0200
committerAlain Romedenne <alain.romedenne@libreoffice.org>2021-11-22 15:16:19 +0100
commit023b21a704bf0bae904b87907dd72d48d518ac09 (patch)
tree79d8e4f88666d2b253bc34c2d6154fb851091519
parent957baaaa79fc771842444d2fd5df6c9f9383f6d7 (diff)
Document ScriptForge Dispose() method
Change-Id: Ic2ff80cfc2dc987ea7e62d7c216358af279712a7 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/125452 Tested-by: Jenkins Reviewed-by: Alain Romedenne <alain.romedenne@libreoffice.org>
-rw-r--r--source/text/sbasic/shared/03/lib_ScriptForge.xhp31
1 files changed, 19 insertions, 12 deletions
diff --git a/source/text/sbasic/shared/03/lib_ScriptForge.xhp b/source/text/sbasic/shared/03/lib_ScriptForge.xhp
index 60a1026597..2d1c640a22 100644
--- a/source/text/sbasic/shared/03/lib_ScriptForge.xhp
+++ b/source/text/sbasic/shared/03/lib_ScriptForge.xhp
@@ -25,20 +25,27 @@
<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>
- <note id="par_id901528999850603" localize="false">&#8226; Basic macros require to load <literal>ScriptForge</literal> library using the following statement:<br/> <literal>GlobalScope.BasicLibraries.LoadLibrary("ScriptForge")</literal><br/><br/>&#8226; Python scripts require an import from <literal>scriptforge</literal> module:<br/>
+ <note id="par_id901528999850603" localize="false">&#8226; Basic macros require to load <literal>ScriptForge</literal> library using the following statement:<br/> <literal>GlobalScope.BasicLibraries.loadLibrary("ScriptForge")</literal><br/><br/>&#8226; Python scripts require an import from <literal>scriptforge</literal> module:<br/>
<literal>from scriptforge import CreateScriptService</literal>
</note>
<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>
- <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_id901619770181787">GlobalScope.BasicLibraries.LoadLibrary("ScriptForge")</paragraph>
- <paragraph role="bascode" localize="false" id="bas_id201606153529501">Set oSvc = CreateScriptService("servicename"[, arg0, arg1, ...])</paragraph>
- </bascode>
- <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>
- </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_id781637256119733">Invoking ScriptForge services</h2>
+ <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_id901619770181787">GlobalScope.BasicLibraries.LoadLibrary("ScriptForge")</paragraph>
+ <paragraph role="bascode" localize="false" id="bas_id201606153529501">Set oSvc = CreateScriptService("servicename"[, arg0, arg1, ...])</paragraph>
+ <paragraph role="bascode" localize="false" id="bas_id701637256465858">' ...</paragraph>
+ <paragraph role="bascode" localize="false" id="bas_id851637256466244">oSvc.Dispose()</paragraph>
+ </bascode>
+ <pycode>
+ <paragraph role="pycode" localize="false" id="pyc_id701619701322002">from scriptforge import CreateScriptService</paragraph>
+ <paragraph role="pycode" localize="false" id="pyc_id531619701322249">svc = CreateScriptService('servicename'[, arg0, arg1, ...])</paragraph>
+ <paragraph role="pycode" localize="false" id="pyc_id271637256185236"># ...</paragraph>
+ <paragraph role="pycode" localize="false" id="pyc_id501637256192213">svc.Dispose()</paragraph>
+ </pycode>
+ <paragraph role="paragraph" id="par_id871637256506167">The <literal>Dispose</literal> method is available in all services and should be called to free up resources after usage.</paragraph>
+
<h2 id="hd_id851613836643580">Services provided by the ScriptForge library</h2>
<table id="tab_id311613838858931">
<tablerow>
@@ -200,7 +207,7 @@
<comment>Restricted use for SF_Root, SF_Utils modules as well as internal methods</comment>
<paragraph role="paragraph" id="par_id331608220104798"><emph>Note:</emph> Other <literal>ScriptForge</literal> undescribed modules are reserved for internal use. Their content is subject to change without notice.</paragraph>
<section id="SF_InternalUse">
- <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>
+ <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 or Python scripts.</warning>
</section>
</body>
</helpdocument>