[Libreoffice-commits] core.git: sc/source

Aron Budea baron at caesar.elte.hu
Fri Sep 23 12:38:02 UTC 2016


 sc/source/ui/docshell/impex.cxx |   11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

New commits:
commit 451c7de9d750f8a2f1348b1eae1bcd8ee042563d
Author: Aron Budea <baron at caesar.elte.hu>
Date:   Thu Sep 22 03:24:53 2016 +0200

    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 at redhat.com>
    Tested-by: Eike Rathke <erack at redhat.com>

diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index 85efd9a..258780d 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)


More information about the Libreoffice-commits mailing list