diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2021-05-21 00:03:43 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-05-22 08:33:07 +0200 |
commit | c55f64f1f4bcd37f071225c8fedca4265f2a59e3 (patch) | |
tree | d6a27098d11f65138b0b03a44ba9cdda5b60a330 | |
parent | 887f1dbbda9dd371f52111c2f5a3bbbc67fc5615 (diff) |
tdf#142395: properly handle "no string delimiter" case
In this case, the delimiter character value would be '\0'.
Change-Id: Idb0f01756991b3ea35a92f11b78fddd56c25265a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115839
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
(cherry picked from commit 6155689bb6f1d72f29b43ac5ae94b32522ef9b42)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115851
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
-rw-r--r-- | sc/source/ui/docshell/impex.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx index 4db43588af50..43d77256a08a 100644 --- a/sc/source/ui/docshell/impex.cxx +++ b/sc/source/ui/docshell/impex.cxx @@ -1553,7 +1553,7 @@ const sal_Unicode* ScImportExport::ScanNextFieldFromString( const sal_Unicode* p rbIsQuoted = false; rField.clear(); const sal_Unicode cBlank = ' '; - if (!ScGlobal::UnicodeStrChr( pSeps, cBlank)) + if (cStr && !ScGlobal::UnicodeStrChr(pSeps, cBlank)) { // Cope with broken generators that put leading blanks before a quoted // field, like "field1", "field2", "..." @@ -1564,7 +1564,7 @@ const sal_Unicode* ScImportExport::ScanNextFieldFromString( const sal_Unicode* p if (*pb == cStr) p = pb; } - if ( *p == cStr ) // String in quotes + if (cStr && *p == cStr) // String in quotes { rbIsQuoted = true; const sal_Unicode* p1; |