source/text/sbasic/shared/03020303.xhp | 6 +++--- source/text/sbasic/shared/03020408.xhp | 19 ++++++++++--------- 2 files changed, 13 insertions(+), 12 deletions(-)
New commits: commit 400a0ea4d37d8d2ccd2ee51a661aa9aecf440e5e Author: Alain Romedenne <alain.romede...@libreoffice.org> AuthorDate: Thu May 5 10:20:26 2022 +0100 Commit: Alain Romedenne <alain.romede...@libreoffice.org> CommitDate: Thu May 12 17:46:39 2022 +0200 Filelen() Basic function's upper limit is 2GB. This patch links to ScriptForge.FileSystem.GetFileLen() alternative method who returns higher range numbers, assuming libO Python Scripting framework is present. Change-Id: Id4a3f47cbe7be2ed27d162532b87c1388f23fce1 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/133857 Tested-by: Jenkins Reviewed-by: Rafael Lima <rafael.palma.l...@gmail.com> diff --git a/source/text/sbasic/shared/03020303.xhp b/source/text/sbasic/shared/03020303.xhp index 0c33d2343..3741e50cf 100644 --- a/source/text/sbasic/shared/03020303.xhp +++ b/source/text/sbasic/shared/03020303.xhp @@ -38,14 +38,14 @@ </section> <embed href="text/sbasic/shared/00000003.xhp#functsyntax"/> <bascode> -<paragraph role="bascode" id="par_id3150359" xml-lang="en-US">Lof (FileNumber)</paragraph> +<paragraph role="bascode" id="par_id3150359" xml-lang="en-US">Lof (FileNumber) As Long</paragraph> </bascode> <embed href="text/sbasic/shared/00000003.xhp#functvalue"/> <paragraph role="paragraph" localize="false" id="par_id3147230" xml-lang="en-US">Long</paragraph> <embed href="text/sbasic/shared/00000003.xhp#functparameters"/> <paragraph role="paragraph" id="par_id3150869" xml-lang="en-US"> -<emph>FileNumber:</emph> Any numeric expression that contains the file number that is specified in the Open statement.</paragraph> -<paragraph role="tip" id="par_id3147349" xml-lang="en-US">To obtain the length of a file that is not open, use the <emph>FileLen</emph> function.</paragraph> +<emph>FileNumber:</emph> Any numeric expression that contains the file number that is specified in the <literal>Open</literal> statement.</paragraph> +<paragraph role="tip" id="par_id3147349" xml-lang="en-US">To obtain the length of a file that is not open, use the <link href="text/sbasic/shared/03020408.xhp" name="FileLen function"><literal>FileLen</literal></link> function.</paragraph> <embed href="text/sbasic/shared/00000003.xhp#errorcode"/> <embed href="text/sbasic/shared/00000003.xhp#err5"/> <embed href="text/sbasic/shared/00000003.xhp#err52"/> diff --git a/source/text/sbasic/shared/03020408.xhp b/source/text/sbasic/shared/03020408.xhp index f0fc5cb0d..bb3a030f2 100644 --- a/source/text/sbasic/shared/03020408.xhp +++ b/source/text/sbasic/shared/03020408.xhp @@ -38,25 +38,26 @@ <paragraph id="par_id3145068" role="paragraph" xml-lang="en-US">Returns the length of a file in bytes.</paragraph> </section> -<paragraph id="hd_id3159414" role="heading" level="2" xml-lang="en-US">Syntax:</paragraph> +<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/> <bascode> -<paragraph id="par_id3149656" role="bascode" xml-lang="en-US">FileLen (Text As String)</paragraph> +<paragraph id="par_id3149656" role="bascode" localize="false">FileLen (Text As String) As Long</paragraph> </bascode> -<paragraph id="hd_id3148798" role="heading" level="2" xml-lang="en-US">Return value:</paragraph> +<embed href="text/sbasic/shared/00000003.xhp#functvalue"/> <paragraph id="par_id3156282" localize="false" role="paragraph" xml-lang="en-US">Long</paragraph> +<tip id="par_id401651744449325">Use <link href="text/sbasic/shared/03/sf_filesystem.xhp" name="ScriptForge.FileSystem service">ScriptForge.FileSystem</link> service <link href="text/sbasic/shared/03/sf_filesystem.xhp#GetFileLen" name="GetFileLen method">GetFileLen()</link> method when size is expected to be over 2 gigabytes.</tip> -<paragraph id="hd_id3150768" role="heading" level="2" xml-lang="en-US">Parameters:</paragraph> +<embed href="text/sbasic/shared/00000003.xhp#functparameters"/> <paragraph id="par_id3153193" role="paragraph" xml-lang="en-US"> <emph>Text:</emph> Any string expression that contains an unambiguous file specification. You can also use <link href="text/sbasic/shared/00000002.xhp" name="URL notation">URL notation</link>.</paragraph> -<paragraph id="par_id3150439" role="paragraph" xml-lang="en-US">This function determines the length of a file. If the FileLen function is called for an open file, it returns the file length before it was opened. To determine the current file length of an open file, use the Lof function.</paragraph> +<paragraph id="par_id3150439" role="paragraph" xml-lang="en-US">This function determines the length of a file. If the <literal>FileLen</literal> function is called for an open file, it returns the file length before it was opened. To determine the current file length of an open file, use the <link href="text/sbasic/shared/03020303.xhp" name="Lof function"><literal>Lof</literal></link> function.</paragraph> <embed href="text/sbasic/shared/00000003.xhp#errorcode"/> <embed href="text/sbasic/shared/00000003.xhp#err5"/> -<paragraph id="hd_id3163710" role="heading" level="2" xml-lang="en-US">Example:</paragraph> +<embed href="text/sbasic/shared/00000003.xhp#functexample"/> <bascode> -<paragraph id="par_idm1341573440" role="bascode" localize="false" xml-lang="en-US">Sub ExampleFileLen</paragraph> -<paragraph id="par_idm1341572208" role="bascode" localize="false" xml-lang="en-US"> MsgBox FileLen("C:\autoexec.bat")</paragraph> -<paragraph id="par_idm1341570960" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph> +<paragraph id="par_idm1341573440" role="bascode" localize="false">Sub ExampleFileLen</paragraph> +<paragraph id="par_idm1341572208" role="bascode" localize="false"> MsgBox FileLen("C:\autoexec.bat")</paragraph> +<paragraph id="par_idm1341570960" role="bascode" localize="false">End Sub</paragraph> </bascode> </body>