summaryrefslogtreecommitdiff
path: root/sc/source/ui
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-05-13 12:35:24 -0400
committerKohei Yoshida <kohei.yoshida@collabora.com>2014-05-13 12:37:14 -0400
commita93bb27aa46c84410c8848a6118d5d63d47be92c (patch)
treef73842e0d78806d9b62980358485b363eb5a3a10 /sc/source/ui
parent49bf3a1f5f38cdf259101b15a19d546b32151463 (diff)
fdo#78402: Adjust references of validity entries as appropriate.
Change-Id: I7fd62153c7267a3d606b86d74bebecf6b8d75250
Diffstat (limited to 'sc/source/ui')
-rw-r--r--sc/source/ui/undo/undoblk.cxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx
index fefa95f1a6ae..dd0577e77305 100644
--- a/sc/source/ui/undo/undoblk.cxx
+++ b/sc/source/ui/undo/undoblk.cxx
@@ -49,6 +49,8 @@
#include "sc.hrc"
#include <rowheightcontext.hxx>
#include <refhint.hxx>
+#include <refupdatecontext.hxx>
+#include <validat.hxx>
#include <set>
#include <boost/scoped_ptr.hpp>
@@ -1264,6 +1266,19 @@ void ScUndoDragDrop::Undo()
SCTAB nTabDelta = aSrcRange.aStart.Tab() - aDestRange.aStart.Tab();
sc::RefMovedHint aHint(aDestRange, ScAddress(nColDelta, nRowDelta, nTabDelta));
pDoc->BroadcastRefMoved(aHint);
+
+ ScValidationDataList* pValidList = pDoc->GetValidationList();
+ if (pValidList)
+ {
+ // Update the references of validation entries.
+ sc::RefUpdateContext aCxt(*pDoc);
+ aCxt.meMode = URM_MOVE;
+ aCxt.maRange = aSrcRange;
+ aCxt.mnColDelta = nColDelta;
+ aCxt.mnRowDelta = nRowDelta;
+ aCxt.mnTabDelta = nTabDelta;
+ pValidList->UpdateReference(aCxt);
+ }
}
DoUndo(aDestRange);