diff options
Diffstat (limited to 'sc/source/core/data/formulacell.cxx')
-rw-r--r-- | sc/source/core/data/formulacell.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx index b43e908352ed..77b6746a7fcb 100644 --- a/sc/source/core/data/formulacell.cxx +++ b/sc/source/core/data/formulacell.cxx @@ -939,6 +939,9 @@ ScFormulaCell::~ScFormulaCell() if (!mxGroup || !mxGroup->mpCode) // Formula token is not shared. delete pCode; + + if (mxGroup && mxGroup->mpTopCell == this) + mxGroup->mpTopCell = nullptr; } ScFormulaCell* ScFormulaCell::Clone() const @@ -2010,7 +2013,8 @@ void ScFormulaCell::InterpretTail( ScInterpreterContext& rContext, ScInterpretTa // XXX if mbNeedsNumberFormat was set even if the current format // was not General then we'd have to obtain the current format here // and check at least the types. - if (bSetFormat && (bForceNumberFormat || ((nFormatIndex % SV_COUNTRY_LANGUAGE_OFFSET) != 0))) + const bool bSetNumberFormat = bSetFormat && (bForceNumberFormat || ((nFormatIndex % SV_COUNTRY_LANGUAGE_OFFSET) != 0)); + if (bSetNumberFormat && !pDocument->IsInLayoutStrings()) { // set number format explicitly if (!pDocument->IsThreadedGroupCalcInProgress()) |