summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2020-10-13 23:56:28 +0200
committerEike Rathke <erack@redhat.com>2020-10-14 11:20:20 +0200
commit59f86333f3fce091177d1cfb9363aa81686aa497 (patch)
tree26f6e56602e34ccdaf112efa49965b8e3a6784b8
parent18f8a7056ac7b4677f4d99aac24ed2db44010140 (diff)
Resolves: tdf#137248 Fix wrong condition breaking non-group interpret
Regression from commit 4f36f2ccab6286ec09480caea602c0fa19195736 CommitDate: Thu Sep 10 11:15:47 2020 +0200 detect if a cell still needs interpreting after Interpret() The bool return from ScFormulaCell::Interpret() does not indicate if it was succesful but whether a group interpret was done. As both calls here happen in a non-group context bailing out on that if false (no group interpret) is wrong. Instead, ask the cell if it still needs to be interpreted after having been interpreted. Change-Id: I40eeeef65e1da3d729cb3fef550620b1ea0a5741 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104261 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
-rw-r--r--sc/source/core/data/column4.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/sc/source/core/data/column4.cxx b/sc/source/core/data/column4.cxx
index a33c3d4b9175..827b9d76831b 100644
--- a/sc/source/core/data/column4.cxx
+++ b/sc/source/core/data/column4.cxx
@@ -1690,14 +1690,14 @@ static bool lcl_InterpretSpan(sc::formula_block::const_iterator& rSpanIter, SCRO
++itSpanStart;
for (SCROW nIdx = nSpanStart+1; nIdx <= nSpanEnd; ++nIdx, ++itSpanStart)
{
- if( !(*itSpanStart)->Interpret()) // We know for sure that this cell is dirty so directly call Interpret().
+ (*itSpanStart)->Interpret(); // We know for sure that this cell is dirty so directly call Interpret().
+ if ((*itSpanStart)->NeedsInterpret())
{
SAL_WARN("sc.core.formulagroup", "Internal error, cell " << (*itSpanStart)->aPos
<< " failed running Interpret(), not allowing threading");
bAllowThreading = false;
return bAnyDirty;
}
- assert(!(*itSpanStart)->NeedsInterpret());
// Allow early exit like above.
if ((mxParentGroup && mxParentGroup->mbPartOfCycle) || !rRecursionHelper.AreGroupsIndependent())
@@ -1804,14 +1804,14 @@ static void lcl_EvalDirty(sc::CellStoreType& rCells, SCROW nRow1, SCROW nRow2, S
if( (*itCell)->NeedsInterpret())
{
bDirtyFlag = true;
- if(!(*itCell)->Interpret())
+ (*itCell)->Interpret();
+ if ((*itCell)->NeedsInterpret())
{
SAL_WARN("sc.core.formulagroup", "Internal error, cell " << (*itCell)->aPos
<< " failed running Interpret(), not allowing threading");
bAllowThreading = false;
return;
}
- assert(!(*itCell)->NeedsInterpret());
}
bIsDirty = bIsDirty || bDirtyFlag;