summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAron Budea <baron@caesar.elte.hu>2016-09-22 03:24:53 +0200
committerEike Rathke <erack@redhat.com>2016-09-23 12:35:59 +0000
commit451c7de9d750f8a2f1348b1eae1bcd8ee042563d (patch)
treef23c7041515e7425a199582a1902ab4a4cce97d3
parent949fa9a462d1f5fa59dd845fb93d55c77d8b153f (diff)
tdf#102216: move row overflow check after EoF check (CSV import)
With the check in the original place, importing exactly 1048576 rows gave a warning. Change-Id: Iae98c07f638168d8537436045423ae6274ef7f64 Reviewed-on: https://gerrit.libreoffice.org/29159 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
-rw-r--r--sc/source/ui/docshell/impex.cxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index 85efd9ab8219..258780d30d83 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -1361,6 +1361,12 @@ bool ScImportExport::ExtText2Doc( SvStream& rStrm )
if ( rStrm.IsEof() && aLine.isEmpty() )
break;
+ if ( nRow > MAXROW )
+ {
+ bOverflowRow = true; // display warning on import
+ break; // for
+ }
+
EmbeddedNullTreatment( aLine);
sal_Int32 nLineLen = aLine.getLength();
@@ -1452,11 +1458,6 @@ bool ScImportExport::ExtText2Doc( SvStream& rStrm )
xProgress->SetStateOnPercent( rStrm.Tell() - nOldPos );
}
++nRow;
- if ( nRow > MAXROW )
- {
- bOverflowRow = true; // display warning on import
- break; // for
- }
}
// so far nRow/nEndCol pointed to the next free
if (nRow > nStartRow)