summaryrefslogtreecommitdiff
path: root/wizards/source/scriptforge/SF_FileSystem.xba
diff options
context:
space:
mode:
authorJean-Pierre Ledure <jp@ledure.be>2021-03-09 11:37:07 +0100
committerJean-Pierre Ledure <jp@ledure.be>2021-03-09 15:36:32 +0100
commit055ba7014587b09e0a3166f0cc8d61db0b358a1c (patch)
treedb836ffe687d5631bd230168432dff2c828aee3b /wizards/source/scriptforge/SF_FileSystem.xba
parente3f62ee770afe34dceb467eb8ccda55eba0a2243 (diff)
ScriptForge - (scriptforge.py) FileSystem and TextStream classes
Addition of SF_FileSystem and SF_TextStream classes Machinery tuning: - freeze a predefined list of standard modules in the python persistent storage - error management reviewed to mimic Basic behaviour on wrong arguments Standard modules are predefined in scriptforge.py as well Both lists must be synchronized on a hardcoded entry number Basic has minor revisions: - complex boolean expressions return -1 and 0 to Python i.o. True and False => Add a CBool() function - [User]TemplatesFolder properties of FileSystem omitted the final "/" Change-Id: Ice138de956f5f87269557cdb3db023849081b99d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112199 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
Diffstat (limited to 'wizards/source/scriptforge/SF_FileSystem.xba')
-rw-r--r--wizards/source/scriptforge/SF_FileSystem.xba6
1 files changed, 3 insertions, 3 deletions
diff --git a/wizards/source/scriptforge/SF_FileSystem.xba b/wizards/source/scriptforge/SF_FileSystem.xba
index f626eba6fd92..11ec24c67a61 100644
--- a/wizards/source/scriptforge/SF_FileSystem.xba
+++ b/wizards/source/scriptforge/SF_FileSystem.xba
@@ -188,7 +188,7 @@ Const cstThisSub = &quot;FileSystem.getTemplatesFolder&quot;
SF_Utils._EnterFunction(cstThisSub)
sPath = SF_Utils._GetUNOService(&quot;PathSettings&quot;).Template
- TemplatesFolder = SF_FileSystem._ConvertFromUrl(Split(sPath, &quot;;&quot;)(0))
+ TemplatesFolder = SF_FileSystem._ConvertFromUrl(Split(sPath, &quot;;&quot;)(0) &amp; &quot;/&quot;)
SF_Utils._ExitFunction(cstThisSub)
End Property &apos; ScriptForge.SF_FileSystem.TemplatesFolder
@@ -214,7 +214,7 @@ Const cstThisSub = &quot;FileSystem.getUserTemplatesFolder&quot;
SF_Utils._EnterFunction(cstThisSub)
sPath = SF_Utils._GetUNOService(&quot;PathSettings&quot;).Template_writable
- UserTemplatesFolder = SF_FileSystem._ConvertFromUrl(sPath)
+ UserTemplatesFolder = SF_FileSystem._ConvertFromUrl(sPath &amp; &quot;/&quot;)
SF_Utils._ExitFunction(cstThisSub)
End Property &apos; ScriptForge.SF_FileSystem.UserTemplatesFolder
@@ -934,7 +934,7 @@ CatchNotExists:
End Function &apos; ScriptForge.SF_FileSystem.GetFileLen
REM -----------------------------------------------------------------------------
-Public Function GetFileModified(Optional ByVal FileName As Variant) As Date
+Public Function GetFileModified(Optional ByVal FileName As Variant) As Variant
&apos;&apos;&apos; Returns the last modified date for the given file
&apos;&apos;&apos; Args:
&apos;&apos;&apos; FileName: a string representing an existing file