summaryrefslogtreecommitdiff
path: root/sc/source/core/data/documen7.cxx
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2015-07-09 11:24:55 +0200
committerEike Rathke <erack@redhat.com>2015-07-09 12:02:13 +0200
commitf4b189df64cc6f6238a5bdf00390cd5dd5ac9e89 (patch)
treec6e83b76be56986dc177bd58297cb232efa0a7fa /sc/source/core/data/documen7.cxx
parentf1faa887c0c934484fb32a8ec5fbbc9e89f38037 (diff)
simplify the logic a little
Change-Id: I8ff2bc971fd1ab7acf6c416ae85a03152ca2a3d9
Diffstat (limited to 'sc/source/core/data/documen7.cxx')
-rw-r--r--sc/source/core/data/documen7.cxx28
1 files changed, 12 insertions, 16 deletions
diff --git a/sc/source/core/data/documen7.cxx b/sc/source/core/data/documen7.cxx
index b67cce9f6b2e..216bec2cabce 100644
--- a/sc/source/core/data/documen7.cxx
+++ b/sc/source/core/data/documen7.cxx
@@ -424,24 +424,20 @@ void ScDocument::CalcFormulaTree( bool bOnlyForced, bool bProgressBar, bool bSet
while ( pCell )
{
if ( pCell->GetDirty() )
- pCell = pCell->GetNext(); // all clear
- else
+ ; // nothing to do
+ else if ( pCell->GetCode()->IsRecalcModeAlways() )
{
- if ( pCell->GetCode()->IsRecalcModeAlways() )
- {
- // pCell and dependents are to be set dirty again, collect
- // them first and broadcast afterwards to not break the
- // FormulaTree chain here.
- vAlwaysDirty.push_back( pCell);
- pCell = pCell->GetNext();
- }
- else
- { // calculate the other single
- if( bSetAllDirty )
- pCell->SetDirtyVar();
- pCell = pCell->GetNext();
- }
+ // pCell and dependents are to be set dirty again, collect
+ // them first and broadcast afterwards to not break the
+ // FormulaTree chain here.
+ vAlwaysDirty.push_back( pCell);
+ }
+ else if ( bSetAllDirty )
+ {
+ // Force calculating all in tree, without broadcasting.
+ pCell->SetDirtyVar();
}
+ pCell = pCell->GetNext();
}
for (::std::vector<ScFormulaCell*>::iterator it( vAlwaysDirty.begin()), itEnd( vAlwaysDirty.end());
it != itEnd; ++it)