source/text/sbasic/shared/03/sf_filesystem.xhp | 33 +++++++++++++++++++++++-- source/text/sbasic/shared/03/sf_platform.xhp | 17 ++++++++++++ 2 files changed, 47 insertions(+), 3 deletions(-)
New commits: commit fbf1f624314ee83866d10c2b53741ac4c1d0e08f Author: Rafael Lima <rafael.palma.l...@gmail.com> AuthorDate: Wed Feb 9 22:13:26 2022 +0100 Commit: Alain Romedenne <libreoffici...@gerrit.libreoffice.org> CommitDate: Fri Feb 11 14:08:05 2022 +0100 Document new properties/methods in SF_Platform and SF_FileSystem This patch documents the Extensions property in SF_Platform and the new ExtensionFolder method in SF_FileSystem. Change-Id: I4adca2d71ae9ac6d2f6a3dfc59d055e92b0ceb2d Reviewed-on: https://gerrit.libreoffice.org/c/help/+/129757 Tested-by: Jenkins Reviewed-by: Alain Romedenne diff --git a/source/text/sbasic/shared/03/sf_filesystem.xhp b/source/text/sbasic/shared/03/sf_filesystem.xhp index bd21299b7..a8aa44775 100644 --- a/source/text/sbasic/shared/03/sf_filesystem.xhp +++ b/source/text/sbasic/shared/03/sf_filesystem.xhp @@ -296,11 +296,12 @@ <link href="text/sbasic/shared/03/sf_filesystem.xhp#CreateTextFile" name="CreateTextFile method">CreateTextFile</link><br/> <link href="text/sbasic/shared/03/sf_filesystem.xhp#DeleteFile" name="DeleteFile method">DeleteFile</link><br/> <link href="text/sbasic/shared/03/sf_filesystem.xhp#DeleteFolder" name="DeleteFolder method">DeleteFolder</link><br/> - <link href="text/sbasic/shared/03/sf_filesystem.xhp#FileExists" name="FileExists method">FileExists</link><br/> + <link href="text/sbasic/shared/03/sf_filesystem.xhp#ExtensionFolder" name="ExtensionFolder method">ExtensionFolder</link><br/> </paragraph> </tablecell> <tablecell> <paragraph id="par_id541611613601554" role="tablecontent" localize="false"> + <link href="text/sbasic/shared/03/sf_filesystem.xhp#FileExists" name="FileExists method">FileExists</link><br/> <link href="text/sbasic/shared/03/sf_filesystem.xhp#Files" name="Files method">Files</link><br/> <link href="text/sbasic/shared/03/sf_filesystem.xhp#FolderExists" name="FolderExists method">FolderExists</link><br/> <link href="text/sbasic/shared/03/sf_filesystem.xhp#GetBaseName" name="GetBaseName method">GetBaseName</link><br/> @@ -308,7 +309,7 @@ <link href="text/sbasic/shared/03/sf_filesystem.xhp#GetFileLen" name="GetFileLen method">GetFileLen</link><br/> <link href="text/sbasic/shared/03/sf_filesystem.xhp#GetFileModified" name="GetFileModified method">GetFileModified</link><br/> <link href="text/sbasic/shared/03/sf_filesystem.xhp#GetName" name="GetName method">GetName</link><br/> - <link href="text/sbasic/shared/03/sf_filesystem.xhp#GetParentFolderName" name="GetParentFolderName method">GetParentFolderName</link><br/><br/> + <link href="text/sbasic/shared/03/sf_filesystem.xhp#GetParentFolderName" name="GetParentFolderName method">GetParentFolderName</link><br/> </paragraph> </tablecell> <tablecell> @@ -579,6 +580,34 @@ </pycode> </section> +<section id="ExtensionFolder"> + <comment> ExtensionFolder --------------------------------------------------------------------------------------- </comment> + <bookmark xml-lang="en-US" localize="false" branch="index" id="bm_id91584882542365"> + <bookmark_value>FileSystem service;ExtensionFolder</bookmark_value> + </bookmark> + <h2 id="hd_id151584882542104" localize="false">ExtensionFolder</h2> + <paragraph role="paragraph" id="par_id11584882015025">Returns a string containing the folder where the specified extension package is installed.</paragraph> + <paragraph role="paragraph" id="par_id21612999775311">The current value of the property <literal>SF_FileSystem.FileNaming</literal> is used to determine the notation of the returned string.</paragraph> + <tip id="par_id891644442917193">Use the property <link href="text/sbasic/shared/03/sf_platform.xhp#hd_id711600788076834" name="Extensions_link"><literal>Extensions</literal></link> from the <literal>Platform</literal> service to get string array with the IDs of all installed extensions.</tip> + <embed href="text/sbasic/shared/00000003.xhp#functsyntax"/> + <paragraph role="paragraph" localize="false" id="par_id61626178211365"> + <input>svc.ExtensionFolder(extension: str): str</input> + </paragraph> + <embed href="text/sbasic/shared/00000003.xhp#functparameters"/> + <paragraph role="paragraph" id="par_id451584882542121"><emph>extension</emph>: A string value with the ID of the extension. If the extension is not installed, an exception is raised.</paragraph> + <embed href="text/sbasic/shared/00000003.xhp#functexample"/> + <paragraph role="paragraph" id="par_id651626217313369">The examples below in Basic and Python return the folder where the APSO extension is installed.</paragraph> + <bascode> + <paragraph role="bascode" localize="false" id="bas_id116444434113410">' Basic</paragraph> + <paragraph role="bascode" localize="false" id="bas_id751584882540355">sFolder = FSO.ExtensionFolder("apso.python.script.organizer")</paragraph> + <paragraph role="bascode" localize="false" id="bas_id611584882542269">' file:///home/username/.config/libreoffice/4/user/uno_packages/cache/uno_packages/lu10833wz3u2i.tmp_/apso_1_2_7.oxt</paragraph> + </bascode> + <pycode> + <paragraph role="pycode" localize="false" id="pyc_id441626217397588"># Python</paragraph> + <paragraph role="pycode" localize="false" id="pyc_id371626217398166">sFolder = fso.ExtensionFolder("apso.python.script.organizer")</paragraph> + </pycode> +</section> + <section id="FileExists"> <comment> FileExists --------------------------------------------------------------------------------------- </comment> <bookmark xml-lang="en-US" localize="false" branch="index" id="bm_id571583764426508"> diff --git a/source/text/sbasic/shared/03/sf_platform.xhp b/source/text/sbasic/shared/03/sf_platform.xhp index 1b0409f0a..07a4c4c05 100644 --- a/source/text/sbasic/shared/03/sf_platform.xhp +++ b/source/text/sbasic/shared/03/sf_platform.xhp @@ -60,6 +60,7 @@ <bookmark_value>Platform service;ComputerName</bookmark_value> <bookmark_value>Platform service;CPUCount</bookmark_value> <bookmark_value>Platform service;CurrentUser</bookmark_value> + <bookmark_value>Platform service;Extensions</bookmark_value> <bookmark_value>Platform service;Fonts</bookmark_value> <bookmark_value>Platform service;Locale</bookmark_value> <bookmark_value>Platform service;Machine</bookmark_value> @@ -144,6 +145,20 @@ <paragraph id="par_id91600788076674" role="tablecontent">The name of the currently logged user.</paragraph> </tablecell> </tablerow> + <tablerow> + <tablecell> + <paragraph id="par_id831633021719246" localize="false" role="tablecontent">Extensions</paragraph> + </tablecell> + <tablecell> + <paragraph id="par_id561633021747014" role="tablecontent">Yes</paragraph> + </tablecell> + <tablecell> + <paragraph id="par_id201633021748566" role="tablecontent">String array</paragraph> + </tablecell> + <tablecell> + <paragraph id="par_id831633021749125" role="tablecontent">Returns a zero-based array of strings containing the internal IDs of all installed extensions.</paragraph> + </tablecell> + </tablerow> <tablerow> <tablecell> <paragraph id="par_id831633021719135" localize="false" role="tablecontent">Fonts</paragraph> @@ -199,7 +214,7 @@ </tablecell> <tablecell> <paragraph id="par_id521600788076371" role="tablecontent">The actual %PRODUCTNAME version expressed as<br />' <literal>%PRODUCTNAME w.x.y.z (The Document Foundation)</literal>'.</paragraph> - <paragraph role="paragraph" id="par_id621614902220807">Example: '<literal>LibreOffice 7.1.1.2 (The Document Foundation, Debian and Ubuntu)</literal>'</paragraph> + <paragraph role="paragraph" id="par_id621614902220807">Example: '<literal>LibreOffice 7.4.1.2 (The Document Foundation, Debian and Ubuntu)</literal>'</paragraph> </tablecell> </tablerow> <tablerow>