summaryrefslogtreecommitdiffstats
path: root/sc/source/ui/docshell
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/docshell')
-rw-r--r--sc/source/ui/docshell/impex.cxx6
1 files changed, 3 insertions, 3 deletions
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;
}
}