summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@suse.com>2012-01-03 13:54:41 -0500
committerKohei Yoshida <kohei.yoshida@suse.com>2012-01-03 13:58:32 -0500
commit9e184d07ee793939e4568632cd9be00d7440188e (patch)
tree7761e0bcb170330808db6085f808db6a67d91d47 /tools
parent54ad0a3a5e30e8206342201036a0466a3056ca4c (diff)
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.
Diffstat (limited to 'tools')
-rw-r--r--tools/source/stream/stream.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx
index 33eef858ab27..48798c544061 100644
--- a/tools/source/stream/stream.cxx
+++ b/tools/source/stream/stream.cxx
@@ -1073,7 +1073,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