summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/column2.cxx13
1 files changed, 12 insertions, 1 deletions
diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index 7f3a5d1e3d5d..4f5c717cec4e 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -171,7 +171,18 @@ tools::Long ScColumn::GetNeededSize(
if (aCell.getType() == CELLTYPE_FORMULA)
{
ScFormulaCell* pFCell = aCell.getFormula();
- bCellIsValue = pFCell->IsRunning() || pFCell->IsValue();
+ bCellIsValue = pFCell->IsRunning();
+ if (!bCellIsValue)
+ {
+ bCellIsValue = pFCell->IsValue();
+ if (bCellIsValue)
+ {
+ // the pattern may change in IsValue()
+ pPattern = pAttrArray->GetPattern( nRow );
+ if (ppPatternChange)
+ *ppPatternChange = pPattern;
+ }
+ }
}
// #i111387#, tdf#121040: disable automatic line breaks for all number formats