source/text/sbasic/shared/03/lib_ScriptForge.xhp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
New commits: commit 046e5b4b6101edcc1614dd2dc392d8feab9eb891 Author: flywire <flywi...@gmail.com> AuthorDate: Tue Feb 22 04:02:47 2022 +0100 Commit: Olivier Hallot <olivier.hal...@libreoffice.org> CommitDate: Wed Feb 23 14:54:27 2022 +0100 Add ScriptForge services language headings Change-Id: I22fbe569cb3702d784f944738261d7aed6de3ca0 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/130314 Tested-by: Jenkins Reviewed-by: Alain Romedenne diff --git a/source/text/sbasic/shared/03/lib_ScriptForge.xhp b/source/text/sbasic/shared/03/lib_ScriptForge.xhp index 6ef001131..2b7e50b6e 100644 --- a/source/text/sbasic/shared/03/lib_ScriptForge.xhp +++ b/source/text/sbasic/shared/03/lib_ScriptForge.xhp @@ -31,20 +31,22 @@ <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> - <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> + <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> + <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> + <embed href="text/sbasic/shared/00000003.xhp#In_Basic"/> <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> + <embed href="text/sbasic/shared/00000003.xhp#In_Python"/> <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"> @@ -237,4 +239,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 or Python scripts.</warning> </section> </body> -</helpdocument> +</helpdocument> \ No newline at end of file