summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Pierre Ledure <jp@ledure.be>2022-02-10 10:09:54 +0100
committerJean-Pierre Ledure <jp@ledure.be>2022-02-10 12:31:52 +0100
commit550a82c782e29dac405ead56dff5a9515c88cf1d (patch)
tree56aa75836de1e62493c849887489c0da67f4209f
parentBetter handling of inetlocs (diff)
downloadcore-550a82c782e29dac405ead56dff5a9515c88cf1d.tar.gz
core-550a82c782e29dac405ead56dff5a9515c88cf1d.zip
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. Equivalent commit on master: https://gerrit.libreoffice.org/c/core/+/129728 Change-Id: I6b1a8aa9cf8e534c645d1944e75de3b73d285e1b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129771 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 b3031e33f09a..1b54b22ec7ca 100644
--- a/wizards/source/scriptforge/SF_Utils.xba
+++ b/wizards/source/scriptforge/SF_Utils.xba
@@ -507,7 +507,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