[Libreoffice-commits] core.git: Branch 'feature/formula-core-rework' - sc/source

Kohei Yoshida kohei.yoshida at gmail.com
Mon Jul 22 17:36:47 PDT 2013


 sc/source/core/data/formulacell.cxx |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 268d00ef10f0abbd2c40f2b5ecdf2c0aa1f37251
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Mon Jul 22 20:30:29 2013 -0400

    Modified reference shouldn't make the cell dirty.
    
    The 'value changed' flag is there for that purpose. Modified reference
    alone doesn't change the value of the cell.
    
    Change-Id: I9d7b4c7005603cd7bed8d90901f1fab0e0d49008

diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx
index a99041d..63d2c9b 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -2267,18 +2267,18 @@ bool ScFormulaCell::UpdateReferenceOnShift(
         pOldCode.reset(pCode->Clone());
 
     bool bValChanged = false;
-    bool bRangeModified = false;    // any range, not only shared formula
+    bool bRefModified = false;
     bool bRefSizeChanged = false;
 
     if (bHasRefs)
     {
         // Update cell or range references.
         sc::RefUpdateResult aRes = pCode->AdjustReferenceOnShift(rCxt, aOldPos);
-        bRangeModified = aRes.mbReferenceModified;
+        bRefModified = aRes.mbReferenceModified;
         bValChanged = aRes.mbValueChanged;
     }
 
-    if (bValChanged || bRangeModified)
+    if (bValChanged || bRefModified)
         bCellStateChanged = true;
 
     if (bOnRefMove)
@@ -2304,7 +2304,7 @@ bool ScFormulaCell::UpdateReferenceOnShift(
         bHasRelName = HasRelNameReference();
         // Reference changed and new listening needed?
         // Except in Insert/Delete without specialties.
-        bNewListening = (bRangeModified || bColRowNameCompile
+        bNewListening = (bRefModified || bColRowNameCompile
                 || (bValChanged && (bInDeleteUndo || bRefSizeChanged)) || bHasRelName);
 
         if ( bNewListening )
@@ -2312,12 +2312,12 @@ bool ScFormulaCell::UpdateReferenceOnShift(
     }
 
     // NeedDirty for changes except for Copy and Move/Insert without RelNames
-    bool bNeedDirty = (bRangeModified || bValChanged || bColRowNameCompile || bOnRefMove);
+    bool bNeedDirty = (bValChanged || bColRowNameCompile || bOnRefMove);
 
     if (pUndoDoc && (bValChanged || bOnRefMove))
         setOldCodeToUndo(pUndoDoc, aUndoPos, pOldCode.get(), eTempGrammar, cMatrixFlag);
 
-    if ( ( bCompile = (bCompile || bRangeModified || bColRowNameCompile) ) != 0 )
+    if ( (bCompile = (bCompile || bColRowNameCompile)) != 0 )
     {
         CompileTokenArray( bNewListening ); // no Listening
         bNeedDirty = true;


More information about the Libreoffice-commits mailing list