wizards/source/scriptforge/SF_Timer.xba |    6 +++---
 wizards/source/scriptforge/script.xlb   |   18 +++++++++---------
 2 files changed, 12 insertions(+), 12 deletions(-)

New commits:
commit 61c6321c760f56e958c7eff256a55ca8d36eb436
Author:     Jean-Pierre Ledure <[email protected]>
AuthorDate: Sun Nov 16 15:53:35 2025 +0100
Commit:     Jean-Pierre Ledure <[email protected]>
CommitDate: Sun Nov 16 17:14:07 2025 +0100

    ScriptForge Timer uses Basic Now function
    
    The durations in the Timer service
    are measured with a precision of
    the millisecond.
    
    Thanks to tdf#161469 the Basic Now()
    function provides sub-seconds precision
    since LO 25.2.
    
    Hence the use of the Calc NOW() function
    is replaced in the Basic code by the
    more immediately available Basic Now()
    equivalent.
    
    No impact on existing user scripts.
    Documentation is unchanged.
    
    Change-Id: Ia3b0f07918d9b9a9e96f62aaa5ce3862a2b48579
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194070
    Tested-by: Jenkins
    Reviewed-by: Jean-Pierre Ledure <[email protected]>

diff --git a/wizards/source/scriptforge/SF_Timer.xba 
b/wizards/source/scriptforge/SF_Timer.xba
index 2b3286e041ab..ea44c62f0235 100644
--- a/wizards/source/scriptforge/SF_Timer.xba
+++ b/wizards/source/scriptforge/SF_Timer.xba
@@ -382,14 +382,14 @@ REM 
=========================================================== PRIVATE FUNCTION
 
 REM 
-----------------------------------------------------------------------------
 Private Function _Now() As Double
-&apos;&apos;&apos;     Returns the current date and time
-&apos;&apos;&apos;     Uses the Calc NOW() function to get a higher precision 
than the usual Basic Now() function
+&apos;&apos;&apos;     Returns the current date and time with a required 
precision of at least the millisecond.
+&apos;&apos;&apos;     Uses the Basic NOW() (i.o. Calc&apos;s) function as it 
provides the required precision since LO 25.2 (tdf#161469).
 &apos;&apos;&apos;     Args:
 &apos;&apos;&apos;     Returns:
 &apos;&apos;&apos;             The actual time as a number
 &apos;&apos;&apos;             The integer part represents the date, the 
decimal part represents the time
 
-       _Now = SF_Session.ExecuteCalcFunction(&quot;NOW&quot;)
+       _Now = CDbl(Now())
 
 End Function   &apos;  ScriptForge.SF_Timer._Now
 
diff --git a/wizards/source/scriptforge/script.xlb 
b/wizards/source/scriptforge/script.xlb
index 68efd282406a..7c5f29231c27 100644
--- a/wizards/source/scriptforge/script.xlb
+++ b/wizards/source/scriptforge/script.xlb
@@ -1,11 +1,18 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 
1.0//EN" "library.dtd">
 <library:library xmlns:library="http://openoffice.org/2000/library"; 
library:name="ScriptForge" library:readonly="false" 
library:passwordprotected="false">
- <library:element library:name="__License"/>
- <library:element library:name="SF_Root"/>
+ <library:element library:name="SF_PythonHelper"/>
+ <library:element library:name="SF_Platform"/>
+ <library:element library:name="SF_Array"/>
+ <library:element library:name="SF_TextStream"/>
+ <library:element library:name="SF_Utils"/>
+ <library:element library:name="SF_String"/>
+ <library:element library:name="_ModuleModel"/>
  <library:element library:name="SF_SharedMemory"/>
  <library:element library:name="SF_L10N"/>
  <library:element library:name="SF_Region"/>
+ <library:element library:name="__License"/>
+ <library:element library:name="SF_Root"/>
  <library:element library:name="SF_Timer"/>
  <library:element library:name="SF_FileSystem"/>
  <library:element library:name="SF_Services"/>
@@ -14,11 +21,4 @@
  <library:element library:name="SF_Dictionary"/>
  <library:element library:name="SF_Session"/>
  <library:element library:name="_CodingConventions"/>
- <library:element library:name="_ModuleModel"/>
- <library:element library:name="SF_String"/>
- <library:element library:name="SF_Utils"/>
- <library:element library:name="SF_TextStream"/>
- <library:element library:name="SF_Array"/>
- <library:element library:name="SF_Platform"/>
- <library:element library:name="SF_PythonHelper"/>
 </library:library>
\ No newline at end of file

Reply via email to