summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2013-05-14 13:39:27 +0200
committerFridrich Strba <fridrich@documentfoundation.org>2013-05-15 08:46:20 +0000
commitb2b6753df528d62c7f0a2be902c822a029512523 (patch)
tree4c7c64821617fcd4e4ec84b0450b009741fc78df
parent2c84287f151f14a4a6204fef30546414cf3d27f8 (diff)
resolved fdo#60468 no special tab case workaround for CSV import
This reverts 322cbc3818b0553254aab2dfb3c5b196fe814097 "Import mal-formed csv files gracefully." (code now moved to a different location) which was a workaround for a specific situation that breaks things with other documents. With the rework of CSV import for 3.6 the import of the one failing document https://bugzilla.novell.com/attachment.cgi?id=294589 from https://bugzilla.novell.com/show_bug.cgi?id=507322 works almost fine without this workaround, with one difference in row 1805 where data is completely broken and parts of two rows end up in one cell P1805. That row wasn't correct with the workaround either, see also cell P1805 in earlier versions. As a result now without that workaround there is one data row less for the broken document but correct data for correct documents. Change-Id: Iacf56993619cd92c1df81f0c49de0eeb04c2e4e4 (cherry picked from commit a883783c2a1b0e7a8ee5b46387d1e1e3bc5e19bd) Reviewed-on: https://gerrit.libreoffice.org/3906 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
-rw-r--r--sc/source/ui/docshell/impex.cxx13
1 files changed, 0 insertions, 13 deletions
diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index 295766197fa9..f6526a497466 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -2327,9 +2327,6 @@ rtl::OUString ReadCsvLine( SvStream &rStream, bool bEmbeddedLineBreak,
{
const sal_Unicode* pSeps = rFieldSeparators.GetBuffer();
- // See if the separator(s) include tab.
- bool bTabSep = lcl_UnicodeStrChr(pSeps, '\t') != NULL;
-
QuoteType eQuoteState = FIELDEND_QUOTE;
bool bFieldStart = true;
@@ -2344,16 +2341,6 @@ rtl::OUString ReadCsvLine( SvStream &rStream, bool bEmbeddedLineBreak,
{
if (nQuotes)
{
- 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
- // this helps keep mal-formed rows from damaging
- // other, well-formed rows.
- nQuotes = 0;
- break;
- }
-
if (*p == cFieldQuote)
{
if (bFieldStart)