summaryrefslogtreecommitdiff
path: root/sc/source/core/data/documen8.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/core/data/documen8.cxx')
-rw-r--r--sc/source/core/data/documen8.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx
index c90353bc207b..af0100f6dde4 100644
--- a/sc/source/core/data/documen8.cxx
+++ b/sc/source/core/data/documen8.cxx
@@ -578,6 +578,7 @@ bool ScDocument::IdleCalcTextWidth() // true = try next again
sal_uInt16 nZoom = getScaleValue(*pStyle, ATTR_PAGE_SCALE);
Fraction aZoomFract(nZoom, 100);
+ aScope.setCol(pTab->ClampToAllocatedColumns(aScope.Col()));
// Start at specified cell position (nCol, nRow, nTab).
ScColumn* pCol = &pTab->aCol[aScope.Col()];
std::unique_ptr<ScColumnTextWidthIterator> pColIter(new ScColumnTextWidthIterator(*pCol, aScope.Row(), MAXROW));
@@ -646,6 +647,8 @@ bool ScDocument::IdleCalcTextWidth() // true = try next again
bNewTab = true;
}
+ aScope.setCol(pTab->ClampToAllocatedColumns(aScope.Col()));
+
if ( nRestart < 2 )
{
if ( bNewTab )