source/text/sbasic/shared/03/sf_platform.xhp | 29 ++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-)
New commits: commit aad9b295eab6bb3b6126ebda8e0b62b848369701 Author: Rafael Lima <rafael.palma.l...@gmail.com> AuthorDate: Mon Jul 19 14:00:18 2021 +0200 Commit: Jean-Pierre Ledure <j...@ledure.be> CommitDate: Wed Jul 21 12:49:35 2021 +0200 Python example in SF_Platform help page Change-Id: I3889815d7eb2e653f307e9853649e395f4f2e2fb Reviewed-on: https://gerrit.libreoffice.org/c/help/+/119175 Tested-by: Jenkins Tested-by: Jean-Pierre Ledure <j...@ledure.be> Reviewed-by: Jean-Pierre Ledure <j...@ledure.be> diff --git a/source/text/sbasic/shared/03/sf_platform.xhp b/source/text/sbasic/shared/03/sf_platform.xhp index ef534cc86..d1f5b61bc 100644 --- a/source/text/sbasic/shared/03/sf_platform.xhp +++ b/source/text/sbasic/shared/03/sf_platform.xhp @@ -40,14 +40,21 @@ </section> <note id="par_id951614903258253">All properties of the <literal>Platform</literal> service are read-only.</note> <h2 id="hd_id281600788076359" xml-lang="en-US">Service invocation</h2> - <paragraph role="paragraph" id="par_id321614902851541">The code snippet below instantiates the <literal>Platform</literal> service and accesses the <literal>Architecture</literal> property.</paragraph> + <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> - <paragraph role="bascode" localize="false" id="bas_id851600788076202">GlobalScope.BasicLibraries.LoadLibrary("ScriptForge")</paragraph> - <paragraph role="bascode" localize="false" id="bas_id1001600788076254">Dim platform As Variant</paragraph> - <paragraph role="bascode" localize="false" id="bas_id721600788076288">platform = CreateScriptService("Platform")</paragraph> - <paragraph role="bascode" localize="false" id="bas_id791600788431935">MsgBox platform.Architecture</paragraph> + <paragraph role="bascode" localize="false" id="bas_id851600788076202">GlobalScope.BasicLibraries.LoadLibrary("ScriptForge")</paragraph> + <paragraph role="bascode" localize="false" id="bas_id1001600788076254">Dim platform As Variant</paragraph> + <paragraph role="bascode" localize="false" id="bas_id721600788076288">platform = CreateScriptService("Platform")</paragraph> + <paragraph role="bascode" localize="false" id="bas_id791600788431935">MsgBox platform.Architecture</paragraph> </bascode> - <embed href="text/sbasic/shared/00000003.xhp#Python_Support"/> + <embed href="text/sbasic/shared/00000003.xhp#In_Python"/> + <pycode> + <paragraph role="pycode" localize="false" id="pyc_id631626695710139">from scriptforge import CreateScriptService</paragraph> + <paragraph role="pycode" localize="false" id="pyc_id981626695710433">svc = CreateScriptService("Platform")</paragraph> + <paragraph role="pycode" localize="false" id="pyc_id311626695710851">bas = CreateScriptService("Basic")</paragraph> + <paragraph role="pycode" localize="false" id="pyc_id391626695711082">bas.MsgBox(svc.Architecture)</paragraph> + </pycode> <bookmark xml-lang="en-US" branch="index" localize="false" id="bm_id111614901524769"> <bookmark_value>Platform service;Architecture</bookmark_value> <bookmark_value>Platform service;ComputerName</bookmark_value> @@ -238,10 +245,10 @@ </table> <embed href="text/sbasic/shared/03/lib_ScriptForge.xhp#SF_InternalUse"/> <section id="relatedtopics"> - <paragraph role="paragraph" id="par_id301613075694148"><link href="text/sbasic/python/python_platform.xhp" name="OS python">Identifying the operating system</link></paragraph> - <paragraph role="paragraph" id="par_id301613065794148"><link href="text/scalc/01/04060104.xhp" name="Platform information with Calc INFO formula">Platform information with INFO("system") Calc formula</link></paragraph> - <paragraph role="paragraph" id="par_id103613075694148"><link href="text/sbasic/shared/03132100.xhp" name="GetGuiType Function">GetGuiType function</link></paragraph> - <paragraph role="paragraph" id="par_id301316075694148"><link href="text/sbasic/shared/03/lib_tools.xhp" name="Tools library">Tools library</link></paragraph> + <embed href="text/sbasic/python/python_platform.xhp#pythonplatform"/> + <paragraph role="paragraph" id="par_id301613065794148"><link href="text/scalc/01/04060104.xhp#bm_id3691824" name="Calc_Info">Platform information with INFO("system") Calc formula</link></paragraph> + <embed href="text/sbasic/shared/03132100.xhp#getguitype2"/> + <embed href="text/sbasic/shared/03/lib_tools.xhp#tools_lib"/> </section> </body> -</helpdocument> \ No newline at end of file +</helpdocument> _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits