summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Pierre Ledure <jp@ledure.be>2022-02-09 14:33:25 +0100
committerJean-Pierre Ledure <jp@ledure.be>2022-02-10 09:43:10 +0100
commit3e340d3f7b73c8577e58c561a34c2b826e77da51 (patch)
tree74a8a8754ab00409c8c8b4eecc495df83266b141
parentcecf2082df0427babc491dfad10f6e15e0ec7583 (diff)
ScriptForge - (SF_Utils) review optional argument of _Repr()
As from LO 7.3, optional missing arguments must not be used in assignments and comparisons. The Basic interpreter tolerated it before 7.3. Probable commit having changed Basic behaviour: https://gerrit.libreoffice.org/c/core/+/121794 A unique case of this singularity was found in the SF_Utils._Repr() method. The bad consequence was that the commonly used SF_Exception.DebugPrint() method calls above method. This broke in fact the whole ScriptForge library. Change-Id: Iba8792b92c73c992429de4382bd8a3dc4b58a94f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129728 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
-rw-r--r--wizards/source/scriptforge/SF_Utils.xba3
1 files changed, 2 insertions, 1 deletions
diff --git a/wizards/source/scriptforge/SF_Utils.xba b/wizards/source/scriptforge/SF_Utils.xba
index 2ca9a6fe09d3..a6a4f49abe4d 100644
--- a/wizards/source/scriptforge/SF_Utils.xba
+++ b/wizards/source/scriptforge/SF_Utils.xba
@@ -542,7 +542,8 @@ Const cstMaxLength = 2^15 - 1 &apos; 32767
Const cstByteLength = 25
Const cstEtc = &quot; … &quot;
- If IsMissing(plMax) Or plMax = 0 Then plMax = cstMaxLength
+ If IsMissing(plMax) Then plMax = cstMaxLength
+ If plMax = 0 Then plMax = cstMaxLength
If IsArray(pvArg) Then
sArg = SF_Array._Repr(pvArg)
Else