From 8173b0d29717438dcaa47b3cc2f7010c9646fbe0 Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Tue, 3 Jan 2012 13:54:41 -0500 Subject: 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. --- tools/source/stream/stream.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx index 3cfb90020b1f..f00e7ff55068 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 -- cgit