[Libreoffice-commits] .: Branch 'libreoffice-3-6-1' - sc/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Aug 20 15:29:59 PDT 2012


 sc/source/ui/docshell/impex.cxx |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 76ae3173bb16f5ce4899026bb2bed109ecee6ce4
Author: Eike Rathke <erack at redhat.com>
Date:   Mon Aug 20 14:38:27 2012 +0200

    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 at suse.cz>
    Signed-off-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    Signed-off-by: Kohei Yoshida <kohei.yoshida at gmail.com>

diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index ab2fc5e..2957661 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;


More information about the Libreoffice-commits mailing list