diff options
| author | Eike Rathke <erack@redhat.com> | 2012-08-20 14:38:27 +0200 |
|---|---|---|
| committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-08-20 18:26:05 -0400 |
| commit | 76ae3173bb16f5ce4899026bb2bed109ecee6ce4 (patch) | |
| tree | a3fafa9b69ea881ead0aafa7581af8ea2ab63828 | |
| parent | 9127c6d7534d77f0ee5cf34264b682a7e97a92df (diff) | |
resolved fdo#53325 CSV space delimiter and quoted field
CSV import didn't recognize end of field if a field was quoted and the
delimiter was space.
Change-Id: I46de608d545011437fe8a298854c134d6cf54b6b
Signed-off-by: Petr Mladek <pmladek@suse.cz>
Signed-off-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Signed-off-by: Kohei Yoshida <kohei.yoshida@gmail.com>
| -rw-r--r-- | sc/source/ui/docshell/impex.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx index ab2fc5ed59af..295766197fa9 100644 --- a/sc/source/ui/docshell/impex.cxx +++ b/sc/source/ui/docshell/impex.cxx @@ -596,7 +596,10 @@ static QuoteType lcl_isFieldEndQuote( const sal_Unicode* p, const sal_Unicode* p // Due to broken CSV generators that don't double embedded quotes check if // a field separator immediately or with trailing spaces follows the quote, // only then end the field, or at end of string. - while (p[1] == ' ') + const sal_Unicode cBlank = ' '; + if (p[1] == cBlank && ScGlobal::UnicodeStrChr( pSeps, cBlank)) + return FIELDEND_QUOTE; + while (p[1] == cBlank) ++p; if (!p[1] || ScGlobal::UnicodeStrChr( pSeps, p[1])) return FIELDEND_QUOTE; |
