summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-12-02 14:53:02 -0500
committerKohei Yoshida <kohei.yoshida@collabora.com>2014-12-02 14:55:46 -0500
commitbdbe60051878bda9e9df11cfef032788c8347ba6 (patch)
tree6e632a5002979066191abfbb0c820a18442bd190 /sc
parentbbfa317b9cfdbb0c44140e3414d4c2dfba9bcef4 (diff)
Reduce scope level.
Change-Id: Icfa4a81ebab1df943a71869fb8fc6409a8927464
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/formulacell.cxx39
1 files changed, 20 insertions, 19 deletions
diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx
index eb9880914f47..c026644c9b44 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -2115,28 +2115,29 @@ void ScFormulaCell::Query( SvtListener::QueryBase& rQuery ) const
void ScFormulaCell::SetDirty( bool bDirtyFlag )
{
- if ( !IsInChangeTrack() )
+ if (IsInChangeTrack())
+ return;
+
+ if ( pDocument->GetHardRecalcState() )
{
- if ( pDocument->GetHardRecalcState() )
- SetDirtyVar();
- else
- {
- // Avoid multiple formula tracking in Load() and in CompileAll()
- // after CopyScenario() and CopyBlockFromClip().
- // If unconditional formula tracking is needed, set bDirty=false
- // before calling SetDirty(), for example in CompileTokenArray().
- if ( !bDirty || mbPostponedDirty || !pDocument->IsInFormulaTree( this ) )
- {
- if( bDirtyFlag )
- SetDirtyVar();
- pDocument->AppendToFormulaTrack( this );
- pDocument->TrackFormulas();
- }
- }
+ SetDirtyVar();
+ pDocument->SetStreamValid(aPos.Tab(), false);
+ return;
+ }
- if (pDocument->IsStreamValid(aPos.Tab()))
- pDocument->SetStreamValid(aPos.Tab(), false);
+ // Avoid multiple formula tracking in Load() and in CompileAll()
+ // after CopyScenario() and CopyBlockFromClip().
+ // If unconditional formula tracking is needed, set bDirty=false
+ // before calling SetDirty(), for example in CompileTokenArray().
+ if ( !bDirty || mbPostponedDirty || !pDocument->IsInFormulaTree( this ) )
+ {
+ if( bDirtyFlag )
+ SetDirtyVar();
+ pDocument->AppendToFormulaTrack( this );
+ pDocument->TrackFormulas();
}
+
+ pDocument->SetStreamValid(aPos.Tab(), false);
}
void ScFormulaCell::SetDirtyVar()