diff options
Diffstat (limited to 'sc/source/core/data/formulacell.cxx')
-rw-r--r-- | sc/source/core/data/formulacell.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx index 2f340a7aa602..c0a363c78a5a 100644 --- a/sc/source/core/data/formulacell.cxx +++ b/sc/source/core/data/formulacell.cxx @@ -3172,7 +3172,9 @@ bool ScFormulaCell::UpdateReferenceOnMove( aUndoPos = *pUndoCellPos; ScAddress aOldPos( aPos ); - if (rCxt.maRange.In(aPos)) + bool bCellInMoveTarget = rCxt.maRange.In(aPos); + + if ( bCellInMoveTarget ) { // The cell is being moved or copied to a new position. I guess the // position has been updated prior to this call? Determine @@ -3260,7 +3262,7 @@ bool ScFormulaCell::UpdateReferenceOnMove( (bValChanged && bHasRelName ) || bOnRefMove) bNeedDirty = true; - if (pUndoDoc && (bValChanged || bRefModified || bOnRefMove)) + if (pUndoDoc && !bCellInMoveTarget && (bValChanged || bRefModified || bOnRefMove)) setOldCodeToUndo(pUndoDoc, aUndoPos, pOldCode.get(), eTempGrammar, cMatrixFlag); bValChanged = false; |