sfx2/source/appl/appinit.cxx | 9 ++++++++- wizards/source/scriptforge/SF_String.xba | 9 +++------ 2 files changed, 11 insertions(+), 7 deletions(-)
New commits: commit 15d1397b1ead0d043b49f2e33d0da17c62119075 Author: Jean-Pierre Ledure <[email protected]> AuthorDate: Sat Sep 20 13:33:16 2025 +0200 Commit: Andras Timar <[email protected]> CommitDate: Mon Sep 22 12:15:08 2025 +0200 ScriptForge fix tdf#168433 array.ImportFromCSVFile The import of a CSV-formatted file into an array fails when specific combinations of double quotes and commas (= delimiter) are present. The array.ImportFromCSVFile() method uses internally the string.SplitNotQuoted() method for parsing the input records. The latter method skips the delimiters located inside quoted strings. It was buggy and needed a revision. Documentation unchanged. Change-Id: Ie156455b99749c6a8e4f43f4d3c258772904848f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191227 Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <[email protected]> (cherry picked from commit cf57cf042aaa863ff6a730e79df1df1a5dbefc9e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191229 (cherry picked from commit 445d1ece2922bd6cf278b35c62cef9bb51879417) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191242 diff --git a/wizards/source/scriptforge/SF_String.xba b/wizards/source/scriptforge/SF_String.xba index 888cf672c5da..01205534fcb9 100644 --- a/wizards/source/scriptforge/SF_String.xba +++ b/wizards/source/scriptforge/SF_String.xba @@ -2281,7 +2281,7 @@ Public Function SplitNotQuoted(Optional ByRef InputStr As Variant _ ''' Args: ''' InputStr: the input string ''' Might contain quoted substrings: -''' The quoting character must be the double quote (") +''' The quoting character must be the double quote ["] (default) or the single quote ['] ''' To preserve a quoting character inside the quoted substring, use (\) or (") as escape character ''' => [str\"i""ng] means [str"i"ng] ''' Delimiter: A string of one or more characters that is used to delimit the input string @@ -2303,7 +2303,6 @@ Dim vEnd As Variant ' Array of end positions of quoted strings Dim lInStr As Long ' InStr() on input string Dim lInStrPrev As Long ' Previous value of lInputStr Dim lBound As Long ' UBound of vStart and vEnd -Dim lMin As Long ' Lower bound to consider when searching vStart and vEnd Dim oCharacterClass As Object ' com.sun.star.i18n.CharacterClassification Dim oLocale As Object ' com.sun.star.lang.Locale Dim oParse As Object ' com.sun.star.i18n.ParseResult @@ -2366,22 +2365,20 @@ Try: vSplit = Split(InputStr, Delimiter, Occurrences) Else ' Split chunk by chunk - lMin = 0 lInStrPrev = 0 lInStr = InStr(1, InputStr, Delimiter, 0) Do While lInStr > 0 If Occurrences > 0 And Occurrences = UBound(vSplit) - 1 Then Exit Do bSplit = False ' Ignore found Delimiter if in quoted string - For i = lMin To lBound + For i = 0 To lBound If lInStr < vStart(i) Then bSplit = True Exit For ElseIf lInStr > vStart(i) And lInStr < vEnd (i) Then Exit For Else - lMin = i + 1 - If i = lBound Then bSplit = True Else bSplit = ( lInStr < vStart(lMin) ) + If i = lBound Then bSplit = True Else bSplit = ( lInStr < vStart(i + 1) ) End If Next i ' Build next chunk and store in split array commit 630600e411cdc3a6d08ac2438555c1b385e76d5e Author: Noel Grandin <[email protected]> AuthorDate: Fri Sep 19 11:10:30 2025 +0200 Commit: Andras Timar <[email protected]> CommitDate: Mon Sep 22 12:15:08 2025 +0200 tdf#166483 special char dialog not available with mergedlibs build Change-Id: I08cc1fe82845cfea82150e332b0ea0ad597f6cda Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191189 Tested-by: Jenkins Reviewed-by: Noel Grandin <[email protected]> (cherry picked from commit 9f4304ff2dbb706a1160afd347e538e615e1290f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191192 Reviewed-by: Adolfo Jayme Barrientos <[email protected]> diff --git a/sfx2/source/appl/appinit.cxx b/sfx2/source/appl/appinit.cxx index 76f9b0fc75c6..2356099ecc88 100644 --- a/sfx2/source/appl/appinit.cxx +++ b/sfx2/source/appl/appinit.cxx @@ -148,7 +148,14 @@ static OUString SfxGetSpecialCharsForEdit(weld::Widget* pParent, const vcl::Font PFunc_getSpecialCharsForEdit pfunc = nullptr; #ifndef DISABLE_DYNLOADING osl::Module aMod; - aMod.loadRelative(&thisModule, SVLIBRARY("cui")); + aMod.loadRelative( + &thisModule, +#if ENABLE_MERGELIBS + SVLIBRARY("merged") +#else + SVLIBRARY("cui") +#endif + ); // get symbol pfunc = reinterpret_cast<PFunc_getSpecialCharsForEdit>(aMod.getFunctionSymbol("GetSpecialCharsForEdit"));
