[Libreoffice-commits] .: tools/source
Kohei Yoshida
kohei at kemper.freedesktop.org
Tue Jan 3 10:58:51 PST 2012
tools/source/stream/stream.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 8173b0d29717438dcaa47b3cc2f7010c9646fbe0
Author: Kohei Yoshida <kohei.yoshida at suse.com>
Date: Tue Jan 3 13:54:41 2012 -0500
Fix import of multi-line cell contents during csv import.
Regression from 3.3.x.
Import of tab-delimited csv documents containing multi-line cells
were unfortunately broken with my fix for handling malformed csv
documents. The intent was to break out of the loop only when a tab
character is encountered before the closing quote is encountered, but
the old code would break out whenever a tab character is encountered
even outside the quotes.
This commit fixes it.
diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx
index 3cfb900..f00e7ff 100644
--- a/tools/source/stream/stream.cxx
+++ b/tools/source/stream/stream.cxx
@@ -1062,7 +1062,7 @@ sal_Bool SvStream::ReadCsvLine( String& rStr, sal_Bool bEmbeddedLineBreak,
{
if (nQuotes)
{
- if (bTabSep && *p == '\t')
+ if (bTabSep && *p == '\t' && (nQuotes % 2) != 0)
{
// When tab-delimited, tab char ends quoted sequence
// even if we haven't reached the end quote. Doing
More information about the Libreoffice-commits
mailing list