From bdbe60051878bda9e9df11cfef032788c8347ba6 Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Tue, 2 Dec 2014 14:53:02 -0500 Subject: Reduce scope level. Change-Id: Icfa4a81ebab1df943a71869fb8fc6409a8927464 --- sc/source/core/data/formulacell.cxx | 39 +++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 19 deletions(-) (limited to 'sc') 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() -- cgit