sc/source/core/data/column4.cxx |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 59f86333f3fce091177d1cfb9363aa81686aa497
Author:     Eike Rathke <[email protected]>
AuthorDate: Tue Oct 13 23:56:28 2020 +0200
Commit:     Eike Rathke <[email protected]>
CommitDate: Wed Oct 14 11:20:20 2020 +0200

    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 <[email protected]>

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;
 
_______________________________________________
Libreoffice-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to