sc/source/ui/undo/undoblk.cxx | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-)
New commits: commit 99809b246c5dd2be548668032fac4f3c65fb962a Author: Kohei Yoshida <kohei.yosh...@collabora.com> Date: Sat Mar 15 09:37:49 2014 -0400 We should broadcast on reference move only when undoing move, not copy. Change-Id: I8b60969312fd262ee8cd996c861e4d69f9ea3372 diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx index 68bdbe7..d3159b6 100644 --- a/sc/source/ui/undo/undoblk.cxx +++ b/sc/source/ui/undo/undoblk.cxx @@ -1253,13 +1253,16 @@ void ScUndoDragDrop::Undo() BeginUndo(); - // Notify all listeners of the destination range, and have them update their references. - ScDocument* pDoc = pDocShell->GetDocument(); - SCCOL nColDelta = aSrcRange.aStart.Col() - aDestRange.aStart.Col(); - SCROW nRowDelta = aSrcRange.aStart.Row() - aDestRange.aStart.Row(); - SCTAB nTabDelta = aSrcRange.aStart.Tab() - aDestRange.aStart.Tab(); - sc::RefMovedHint aHint(aDestRange, ScAddress(nColDelta, nRowDelta, nTabDelta)); - pDoc->BroadcastRefMoved(aHint); + if (bCut) + { + // Notify all listeners of the destination range, and have them update their references. + ScDocument* pDoc = pDocShell->GetDocument(); + SCCOL nColDelta = aSrcRange.aStart.Col() - aDestRange.aStart.Col(); + SCROW nRowDelta = aSrcRange.aStart.Row() - aDestRange.aStart.Row(); + SCTAB nTabDelta = aSrcRange.aStart.Tab() - aDestRange.aStart.Tab(); + sc::RefMovedHint aHint(aDestRange, ScAddress(nColDelta, nRowDelta, nTabDelta)); + pDoc->BroadcastRefMoved(aHint); + } DoUndo(aDestRange); if (bCut) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits