diff --git a/sc/source/core/data/column4.cxx b/sc/source/core/data/column4.cxx index ae3cd16fffa7..f6dac8ae3c65 100644 --- a/sc/source/core/data/column4.cxx +++ b/sc/source/core/data/column4.cxx @@ -1667,6 +1667,10 @@ static bool lcl_InterpretSpan(sc::formula_block::const_iterator& rSpanIter, SCRO // Found a completely dirty sub span [nSpanStart, nSpanEnd] inside the required span [nStartOffset, nEndOffset] bool bGroupInterpreted = pCellStart->Interpret(nSpanStart, nSpanEnd); + if (bGroupInterpreted) + for (SCROW nIdx = nSpanStart; nIdx <= nSpanEnd; ++nIdx, ++itSpanStart) + assert(!(*itSpanStart)->NeedsInterpret()); + ScRecursionHelper& rRecursionHelper = rDoc.GetRecursionHelper(); // child cell's Interpret could result in calling dependency calc // and that could detect a cycle involving mxGroup @@ -1686,7 +1690,15 @@ static bool lcl_InterpretSpan(sc::formula_block::const_iterator& rSpanIter, SCRO ++itSpanStart; for (SCROW nIdx = nSpanStart+1; nIdx <= nSpanEnd; ++nIdx, ++itSpanStart) { - (*itSpanStart)->Interpret(); // We know for sure that this cell is dirty so directly call Interpret(). + if( !(*itSpanStart)->Interpret()) // We know for sure that this cell is dirty so directly call Interpret(). + { + 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()) { @@ -1788,7 +1800,19 @@ static void lcl_EvalDirty(sc::CellStoreType& rCells, SCROW nRow1, SCROW nRow2, S else { // No formula-group here. - bool bDirtyFlag = (*itCell)->MaybeInterpret(); + bool bDirtyFlag = false; + if( (*itCell)->NeedsInterpret()) + { + bDirtyFlag = true; + if(!(*itCell)->Interpret()) + { + 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; // child cell's Interpret could result in calling dependency calc