summaryrefslogtreecommitdiff
path: root/sc/source/ui/docshell/impex.cxx
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2021-05-21 00:03:43 +0200
committerMike Kaganski <mike.kaganski@collabora.com>2021-05-21 06:11:23 +0200
commit6155689bb6f1d72f29b43ac5ae94b32522ef9b42 (patch)
treeecbcb0dd4a06a52df96be045de082f324e1e5370 /sc/source/ui/docshell/impex.cxx
parenteda109d5d91e82adb675ebf6db952bf6d82b3391 (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>
Diffstat (limited to 'sc/source/ui/docshell/impex.cxx')
-rw-r--r--sc/source/ui/docshell/impex.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index 3e58a9767cbe..b1a553a2ac10 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -1592,7 +1592,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", "..."
@@ -1603,7 +1603,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;