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

New commits:
commit b44a402d5a05dd32aa2e1ab80c9ea75b560dc3b9
Author: Eike Rathke <er...@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

diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index 09da442..d110481 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -571,7 +571,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;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to