From 97ac77f067910fa5e8206d75160fa63546a9358d Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 4 May 2024 07:03:24 +0200 Subject: Merging upstream version 4:24.2.3. Signed-off-by: Daniel Baumann --- sc/source/ui/docshell/impex.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sc/source/ui/docshell') diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx index 8e6315db94..a61ee53d25 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; } } -- cgit v1.2.3