summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Pierre Ledure <jp@ledure.be>2021-08-19 17:24:59 +0200
committerJean-Pierre Ledure <jp@ledure.be>2021-08-19 18:39:31 +0200
commit852454a487aefc17523804dc93892f34047365a0 (patch)
treefc10418043686f88b5cf8d5787b19b9dfa8a5f69
parenttdf#134569 writerfilter: move tableParaProps on table endLevel (diff)
downloadcore-852454a487aefc17523804dc93892f34047365a0.tar.gz
core-852454a487aefc17523804dc93892f34047365a0.zip
ScriptForge - (SF_String) FIX misplaced brackets in _Repr()
Next Basic code: Sub ReprNotPrintable() Dim a,b GlobalScope.BasicLibraries.loadLibrary("ScriptForge") a = "abc" & Chr(31) & "def" b = SF_String.Represent(a) End Sub gives a Basic runtime error « Invalid procedure call » when error handling is disabled. Reason: misplaced brackets in SF_String._Repr() when the argument contains a non-printable character. ScriptForge additional info : Location : String.Represent/2113 Invalid procedure call. Should give : b = "abc\x1Fdef" Bug fixed on master in commit https://gerrit.libreoffice.org/c/core/+/119824 Change-Id: I9d180de99c803a49a56c4c1b22847cfc5a1f9608 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120748 Tested-by: Jenkins Reviewed-by: Alain Romedenne <alain.romedenne@libreoffice.org>
-rw-r--r--wizards/source/scriptforge/SF_String.xba2
1 files changed, 1 insertions, 1 deletions
diff --git a/wizards/source/scriptforge/SF_String.xba b/wizards/source/scriptforge/SF_String.xba
index f7c645981c8b..799c055942cb 100644
--- a/wizards/source/scriptforge/SF_String.xba
+++ b/wizards/source/scriptforge/SF_String.xba
@@ -2709,7 +2709,7 @@ Dim i As Long
sChar = Mid(sString, lPos, 1)
If Not SF_String.IsPrintable(sChar) Then
lAsc = Asc(sChar)
- sChar = &quot;\x&quot; &amp; Iif(lAsc &lt; 255, Right(&quot;00&quot; &amp; Hex(lAsc, 2)), Right(&quot;0000&quot; &amp; Hex(lAsc, 4)))
+ sChar = &quot;\x&quot; &amp; Iif(lAsc &lt; 255, Right(&quot;00&quot; &amp; Hex(lAsc), 2), Right(&quot;0000&quot; &amp; Hex(lAsc), 4))
If lPos &lt; Len(sString) Then
sString = Left(sString, lPos - 1) &amp; sChar &amp; Mid(sString, lPos + 1)
Else