sc/source/core/data/formulacell.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
New commits: commit bf5408650e76bf7a285152fa32fea6562403dd31 Author: Dennis Francis <[email protected]> Date: Thu Jul 13 11:35:41 2017 +0530 tdf#108758 : do not write to undo document when... ...updating references during a block move, for formula cells that are in the target range of the move operation. The fix is for formula cells that are not grouped. For the grouped case, it was already doing correctly. Added two unit tests in ucalc_formula.cxx for grouped formula and non-grouped formula cases. Reviewed-on: https://gerrit.libreoffice.org/39883 Tested-by: Jenkins <[email protected]> Reviewed-by: Eike Rathke <[email protected]> (cherry picked from commit 2caaf9bfe8d3f81517467daf36de0bd8ddd6b543) Conflicts: sc/qa/unit/ucalc.hxx sc/qa/unit/ucalc_formula.cxx Backported, excluding conflicting unit tests. Change-Id: I9f4d988f5e154f56670bd1c0cc366ee6704fb858 Reviewed-on: https://gerrit.libreoffice.org/39924 Reviewed-by: Eike Rathke <[email protected]> Reviewed-by: Dennis Francis <[email protected]> Reviewed-by: Markus Mohrhard <[email protected]> Reviewed-by: Christian Lohmaier <[email protected]> Tested-by: Christian Lohmaier <[email protected]> diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx index b19bfba89bc9..381fb173d4b7 100644 --- a/sc/source/core/data/formulacell.cxx +++ b/sc/source/core/data/formulacell.cxx @@ -3201,7 +3201,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 @@ -3290,7 +3292,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; _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
