summaryrefslogtreecommitdiff
path: root/sc/source/ui/undo
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/undo')
-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);