summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2013-07-22 20:30:29 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2013-07-24 23:29:37 -0400
commit3911a42566e6d5e015debd5b59dcae538760294e (patch)
treea55fbe804bd7853fdfcc3997e6a772c000945783
parentc9511b92dcd8405ccfbdf2f5628a3a2eaaa9cbdd (diff)
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
-rw-r--r--sc/source/core/data/formulacell.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx
index a99041db7381..63d2c9b2c77b 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;