[Libreoffice-commits] .: 2 commits - sc/source
Kohei Yoshida
kohei at kemper.freedesktop.org
Wed Nov 9 07:15:14 PST 2011
sc/source/ui/view/output.cxx | 62 ++++++++++++++++++++++---------------------
1 file changed, 33 insertions(+), 29 deletions(-)
New commits:
commit 02b368e392c2d0f925601aff792910c628de5476
Author: Kohei Yoshida <kohei.yoshida at suse.com>
Date: Wed Nov 9 10:12:12 2011 -0500
Reduced scoping.
diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index 2fe53a0..f78b956 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 )
commit bee2c41e76330b0b808ff5e06f968716884eba2c
Author: Kohei Yoshida <kohei.yoshida at suse.com>
Date: Wed Nov 9 10:06:55 2011 -0500
sal_Bool to bool.
diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index 35fbedc..2fe53a0 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -1739,12 +1739,12 @@ void ScOutputData::FindChanged()
SCCOL nX;
SCSIZE nArrY;
- sal_Bool bWasIdleDisabled = pDoc->IsIdleDisabled();
- pDoc->DisableIdle( sal_True );
+ bool bWasIdleDisabled = pDoc->IsIdleDisabled();
+ pDoc->DisableIdle(true);
for (nArrY=0; nArrY<nArrCount; nArrY++)
pRowInfo[nArrY].bChanged = false;
- sal_Bool bProgress = false;
+ bool bProgress = false;
for (nArrY=0; nArrY<nArrCount; nArrY++)
{
RowInfo* pThisRowInfo = &pRowInfo[nArrY];
@@ -1757,22 +1757,22 @@ void ScOutputData::FindChanged()
ScFormulaCell* pFCell = (ScFormulaCell*)pCell;
if ( !bProgress && pFCell->GetDirty() )
{
- ScProgress::CreateInterpretProgress( pDoc, sal_True );
- bProgress = sal_True;
+ ScProgress::CreateInterpretProgress(pDoc, true);
+ bProgress = true;
}
if (!pFCell->IsRunning())
{
(void)pFCell->GetValue();
if (pFCell->IsChanged())
{
- pThisRowInfo->bChanged = sal_True;
+ 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 = sal_True;
+ pRowInfo[nOverY].bChanged = true;
++nOverY;
}
}
More information about the Libreoffice-commits
mailing list