diff options
author | Kohei Yoshida <kohei.yoshida@suse.com> | 2012-01-03 13:54:41 -0500 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@suse.com> | 2012-01-03 13:59:28 -0500 |
commit | 8173b0d29717438dcaa47b3cc2f7010c9646fbe0 (patch) | |
tree | 74e840a6d55998817dd1f8d0cde42fde8ac2997f /tools | |
parent | localize nlpsolver .properties files within the build (diff) | |
download | core-8173b0d29717438dcaa47b3cc2f7010c9646fbe0.tar.gz core-8173b0d29717438dcaa47b3cc2f7010c9646fbe0.zip |
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.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
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 |