diff options
author | Jean-Pierre Ledure <jp@ledure.be> | 2021-03-09 11:37:07 +0100 |
---|---|---|
committer | Jean-Pierre Ledure <jp@ledure.be> | 2021-03-09 15:36:32 +0100 |
commit | 055ba7014587b09e0a3166f0cc8d61db0b358a1c (patch) | |
tree | db836ffe687d5631bd230168432dff2c828aee3b /wizards/source/scriptforge/SF_FileSystem.xba | |
parent | e3f62ee770afe34dceb467eb8ccda55eba0a2243 (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.xba | 6 |
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 = "FileSystem.getTemplatesFolder" SF_Utils._EnterFunction(cstThisSub) sPath = SF_Utils._GetUNOService("PathSettings").Template - TemplatesFolder = SF_FileSystem._ConvertFromUrl(Split(sPath, ";")(0)) + TemplatesFolder = SF_FileSystem._ConvertFromUrl(Split(sPath, ";")(0) & "/") SF_Utils._ExitFunction(cstThisSub) End Property ' ScriptForge.SF_FileSystem.TemplatesFolder @@ -214,7 +214,7 @@ Const cstThisSub = "FileSystem.getUserTemplatesFolder" SF_Utils._EnterFunction(cstThisSub) sPath = SF_Utils._GetUNOService("PathSettings").Template_writable - UserTemplatesFolder = SF_FileSystem._ConvertFromUrl(sPath) + UserTemplatesFolder = SF_FileSystem._ConvertFromUrl(sPath & "/") SF_Utils._ExitFunction(cstThisSub) End Property ' ScriptForge.SF_FileSystem.UserTemplatesFolder @@ -934,7 +934,7 @@ CatchNotExists: End Function ' 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 ''' Returns the last modified date for the given file ''' Args: ''' FileName: a string representing an existing file |