sc/source/ui/docshell/impex.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
New commits: commit 1d00b945c25c5b9df6553c0c89ef63749ac0a419 Author: Laurent Balland <laurent.ball...@mailo.fr> AuthorDate: Mon Apr 15 18:43:35 2024 +0200 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Tue Apr 23 10:10:44 2024 +0200 tdf#129701 Follow-up of previous change According to comments in https://gerrit.libreoffice.org/c/core/+/163536 Follow-up of previous change Change-Id: Icd7b6798d6ef35ca9574125cd3d4c4d89044569c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166133 Tested-by: Jenkins Reviewed-by: Eike Rathke <er...@redhat.com> (cherry picked from commit 47187acee758680cda8086b6e295ef7beea3491b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166178 (cherry picked from commit 637312e2aa682ca11543a421a8de0bbbe72bf86b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166215 Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com> Tested-by: Xisco Fauli <xiscofa...@libreoffice.org> Reviewed-by: Laurent Balland <laurent.ball...@mailo.fr> Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx index 8e6315db9419..a61ee53d2526 100644 --- a/sc/source/ui/docshell/impex.cxx +++ b/sc/source/ui/docshell/impex.cxx @@ -1662,7 +1662,7 @@ bool ScImportExport::ExtText2Doc( SvStream& rStrm ) ScDocumentImport aDocImport(rDoc); do { - SCCOL nLastCol = nEndCol; // tdf#129701 preserve value of nEndCol + const SCCOL nLastCol = nEndCol; // tdf#129701 preserve value of nEndCol for( ;; ) { aLine = ReadCsvLine(rStrm, !bFixed, aSeps, cStr, cDetectSep); @@ -1784,15 +1784,15 @@ bool ScImportExport::ExtText2Doc( SvStream& rStrm ) aTransliteration, aCalendar, pEnglishTransliteration.get(), pEnglishCalendar.get()); } + ++nCol; if (bIsLastColEmpty) { bIsLastColEmpty = false; // toggle to stop } else { - ++nCol; // tdf#129701 detect if there is a last empty column when we need it - bIsLastColEmpty = !(*p) && !bSkipEmptyCells && !bDetermineRange && nCol == nLastCol; + bIsLastColEmpty = (nCol == nLastCol) && !(*p) && !bSkipEmptyCells && !bDetermineRange; } }