diff options
author | Kohei Yoshida <kohei.yoshida@suse.com> | 2011-11-09 10:12:12 -0500 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@suse.com> | 2011-11-09 10:12:50 -0500 |
commit | 02b368e392c2d0f925601aff792910c628de5476 (patch) | |
tree | 07e96c1045c54831f02de778b250c9920eafa488 /sc | |
parent | bee2c41e76330b0b808ff5e06f968716884eba2c (diff) |
Reduced scoping.
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/view/output.cxx | 56 |
1 files changed, 30 insertions, 26 deletions
diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx index 2fe53a0b753e..f78b956ff9de 100644 --- a/sc/source/ui/view/output.cxx +++ b/sc/source/ui/view/output.cxx @@ -1751,34 +1751,38 @@ void ScOutputData::FindChanged() for (nX=nX1; nX<=nX2; nX++) { ScBaseCell* pCell = pThisRowInfo->pCellInfo[nX+1].pCell; - if (pCell) - if (pCell->GetCellType() == CELLTYPE_FORMULA) + if (!pCell) + continue; + + if (pCell->GetCellType() != CELLTYPE_FORMULA) + continue; + + ScFormulaCell* pFCell = (ScFormulaCell*)pCell; + if ( !bProgress && pFCell->GetDirty() ) + { + ScProgress::CreateInterpretProgress(pDoc, true); + bProgress = true; + } + if (pFCell->IsRunning()) + // still being interpreted. Skip it. + continue; + + (void)pFCell->GetValue(); + if (!pFCell->IsChanged()) + // the result hasn't changed. Skip it. + continue; + + pThisRowInfo->bChanged = true; + if ( pThisRowInfo->pCellInfo[nX+1].bMerged ) + { + SCSIZE nOverY = nArrY + 1; + while ( nOverY<nArrCount && + pRowInfo[nOverY].pCellInfo[nX+1].bVOverlapped ) { - ScFormulaCell* pFCell = (ScFormulaCell*)pCell; - if ( !bProgress && pFCell->GetDirty() ) - { - ScProgress::CreateInterpretProgress(pDoc, true); - bProgress = true; - } - if (!pFCell->IsRunning()) - { - (void)pFCell->GetValue(); - if (pFCell->IsChanged()) - { - pThisRowInfo->bChanged = true; - if ( pThisRowInfo->pCellInfo[nX+1].bMerged ) - { - SCSIZE nOverY = nArrY + 1; - while ( nOverY<nArrCount && - pRowInfo[nOverY].pCellInfo[nX+1].bVOverlapped ) - { - pRowInfo[nOverY].bChanged = true; - ++nOverY; - } - } - } - } + pRowInfo[nOverY].bChanged = true; + ++nOverY; } + } } } if ( bProgress ) |