summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2017-04-10 23:05:09 +0200
committerAndras Timar <andras.timar@collabora.com>2017-04-19 16:56:53 +0200
commit0fc37f5a71ff2adeaad3c02429e3fa623e5510d5 (patch)
treec31d0418f66e101fbf2fa976f52e8eab6fce5584
parentfea2599a96a8e532867e08eb38eae3b7aeb19d8e (diff)
call UpdateReference also for single cell copying, tdf#105245
This is a combination of 2 commits. call UpdateReference also for single cell copying, tdf#105245 Reviewed-on: https://gerrit.libreoffice.org/36393 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com> (cherry picked from commit cb57a432ba98ffe197c8fd2528e4b363c3285cc4) only handling copy&paste needed, cut&paste bailed out, tdf#105245 follow-up (cherry picked from commit 840ac578dc5c21731b927bad6113839c4c69c108) 946d9f09e7571d347111ad66326ab375d153e298 Change-Id: I5fed22d2835466cbd07f8dbd917e9f881b7b2832 Reviewed-on: https://gerrit.libreoffice.org/36557 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit bbdaac9c5d03d59c55dc8ec1d9c34df502c11dea)
-rw-r--r--sc/source/core/data/document10.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/sc/source/core/data/document10.cxx b/sc/source/core/data/document10.cxx
index 896499995388..c5bc3118a174 100644
--- a/sc/source/core/data/document10.cxx
+++ b/sc/source/core/data/document10.cxx
@@ -125,6 +125,15 @@ bool ScDocument::CopyOneCellFromClip(
maTabs[i]->CopyOneCellFromClip(rCxt, nCol1, nRow1, nCol2, nRow2, aClipRange.aStart.Row(), pSrcTab);
}
+ sc::RefUpdateContext aRefCxt(*this);
+ aRefCxt.maRange = ScRange(nCol1, nRow1, rCxt.getTabStart(), nCol2, nRow2, nTabEnd);
+ aRefCxt.mnColDelta = nCol1 - aSrcPos.Col();
+ aRefCxt.mnRowDelta = nRow1 - aSrcPos.Row();
+ aRefCxt.mnTabDelta = rCxt.getTabStart() - aSrcPos.Tab();
+ // Only Copy&Paste, for Cut&Paste we already bailed out early.
+ aRefCxt.meMode = URM_COPY;
+ UpdateReference(aRefCxt, rCxt.getUndoDoc(), false);
+
return true;
}