summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-12-06 15:25:02 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-12-06 18:05:49 +0000
commitcd90f9d0dcf0b6fc71161417deefb501929f67ce (patch)
tree29ba703855cd2e5a8c84bd1998e8464966ad3c6b /sc
parentb9aa52f918f6246c685ac593cb3e7fcfa0e41b2c (diff)
crashtesting forum-en-4598.ods
the pattern object may be replaced inside the IsValue() call because it might trigger interpreter logic Change-Id: I99cee16333f3ab0585d94de98946ea77938e14ae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143734 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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