sc/source/ui/view/output.cxx | 42 ++++++++++++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 14 deletions(-)
New commits: commit 33c1389a52be0e839584948be174ebed110522c5 Author: Dennis Francis <dennis.fran...@collabora.com> AuthorDate: Wed Mar 27 14:25:03 2019 +0530 Commit: Dennis Francis <dennis.fran...@collabora.com> CommitDate: Tue Apr 2 17:06:35 2019 +0200 tdf#124266 : Paint cell if formula-cell has changed even if... not dirty. Change-Id: Id54811009079438945bb162dd3eb8705ce174781 Reviewed-on: https://gerrit.libreoffice.org/70043 Tested-by: Jenkins Reviewed-by: Dennis Francis <dennis.fran...@collabora.com> diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx index 616e6d2073d7..bd3d0bafd60a 100644 --- a/sc/source/ui/view/output.cxx +++ b/sc/source/ui/view/output.cxx @@ -1803,9 +1803,11 @@ void ScOutputData::FindChanged() for (nArrY=0; nArrY<nArrCount; nArrY++) pRowInfo[nArrY].bChanged = false; - bool bProgress = false; SCCOL nCol1 = MAXCOL, nCol2 = 0; SCROW nRow1 = MAXROW, nRow2 = 0; + bool bAnyDirty = false; + bool bAnyChanged = false; + for (nArrY=0; nArrY<nArrCount; nArrY++) { RowInfo* pThisRowInfo = &pRowInfo[nArrY]; @@ -1817,26 +1819,34 @@ void ScOutputData::FindChanged() continue; ScFormulaCell* pFCell = rCell.mpFormula; - if ( !bProgress && pFCell->GetDirty() ) - { - ScProgress::CreateInterpretProgress(mpDoc); - bProgress = true; - } if (pFCell->IsRunning()) // still being interpreted. Skip it. continue; - ScAddress& rPos(pFCell->aPos); - nCol1 = std::min(rPos.Col(), nCol1); - nCol2 = std::max(rPos.Col(), nCol2); - nRow1 = std::min(rPos.Row(), nRow1); - nRow2 = std::max(rPos.Row(), nRow2); + bool bDirty = pFCell->GetDirty(); + bAnyChanged = bAnyChanged || pFCell->IsChanged(); + + if (bDirty) + { + if (!bAnyDirty) + { + ScProgress::CreateInterpretProgress(mpDoc); + bAnyDirty = true; + } + + ScAddress& rPos(pFCell->aPos); + nCol1 = std::min(rPos.Col(), nCol1); + nCol2 = std::max(rPos.Col(), nCol2); + nRow1 = std::min(rPos.Row(), nRow1); + nRow2 = std::max(rPos.Row(), nRow2); + } } } - if (bProgress) + if (bAnyDirty || bAnyChanged) { - mpDoc->EnsureFormulaCellResults(ScRange(nCol1, nRow1, nTab, nCol2, nRow2, nTab), true); + if (bAnyDirty) + mpDoc->EnsureFormulaCellResults(ScRange(nCol1, nRow1, nTab, nCol2, nRow2, nTab), true); for (nArrY=0; nArrY<nArrCount; nArrY++) { @@ -1849,6 +1859,9 @@ void ScOutputData::FindChanged() continue; ScFormulaCell* pFCell = rCell.mpFormula; + if (pFCell->IsRunning()) + // still being interpreted. Skip it. + continue; if (!pFCell->IsChanged()) // the result hasn't changed. Skip it. @@ -1868,7 +1881,8 @@ void ScOutputData::FindChanged() } } - ScProgress::DeleteInterpretProgress(); + if (bAnyDirty) + ScProgress::DeleteInterpretProgress(); } mpDoc->EnableIdle(bWasIdleEnabled); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits