[Libreoffice-commits] core.git: sc/source

Kohei Yoshida kohei.yoshida at collabora.com
Tue Dec 2 11:57:03 PST 2014


 sc/source/core/data/formulacell.cxx |   39 ++++++++++++++++++------------------
 1 file changed, 20 insertions(+), 19 deletions(-)

New commits:
commit bdbe60051878bda9e9df11cfef032788c8347ba6
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Tue Dec 2 14:53:02 2014 -0500

    Reduce scope level.
    
    Change-Id: Icfa4a81ebab1df943a71869fb8fc6409a8927464

diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx
index eb98809..c026644 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()


More information about the Libreoffice-commits mailing list