summaryrefslogtreecommitdiff
path: root/sc/qa/unit/ucalc.cxx
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-09-26 22:28:20 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-09-27 00:22:32 +0200
commitc8a5f46b6121106d3efc0a4d45922bf910f6f94c (patch)
tree2439e5b34772acf3c4ce5140205fe833a57b4f24 /sc/qa/unit/ucalc.cxx
parentc55873f3e72a05cf94dabd7109c99e4b66c4f5a6 (diff)
OOPS, we were actually testing the wrong method
Change-Id: I29adf81d3da56d7150e5182025d931ee62598e63
Diffstat (limited to 'sc/qa/unit/ucalc.cxx')
-rw-r--r--sc/qa/unit/ucalc.cxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 0db6a1c270be..f103f7d10306 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -34,6 +34,7 @@
#include "dbdata.hxx"
#include "reftokenhelper.hxx"
#include "userdat.hxx"
+#include "clipcontext.hxx"
#include "docsh.hxx"
#include "docfunc.hxx"
@@ -6135,6 +6136,18 @@ void Test::pasteFromClip(ScDocument* pDestDoc, const ScRange& rDestRange, ScDocu
pDestDoc->CopyFromClip(rDestRange, aMark, InsertDeleteFlags::ALL, nullptr, pClipDoc);
}
+void Test::pasteOneCellFromClip(ScDocument* pDestDoc, const ScRange& rDestRange, ScDocument* pClipDoc, InsertDeleteFlags eFlags)
+{
+ ScMarkData aMark;
+ aMark.SetMarkArea(rDestRange);
+ sc::CopyFromClipContext aCxt(*pDestDoc, nullptr, pClipDoc, eFlags, false, false);
+ aCxt.setDestRange(rDestRange.aStart.Col(), rDestRange.aStart.Row(),
+ rDestRange.aEnd.Col(), rDestRange.aEnd.Row());
+ aCxt.setTabRange(rDestRange.aStart.Tab(), rDestRange.aEnd.Tab());
+ pDestDoc->CopyOneCellFromClip(aCxt, rDestRange.aStart.Col(), rDestRange.aStart.Row(),
+ rDestRange.aEnd.Col(), rDestRange.aEnd.Row());
+}
+
ScUndoPaste* Test::createUndoPaste(ScDocShell& rDocSh, const ScRange& rRange, ScDocument* pUndoDoc)
{
ScDocument& rDoc = rDocSh.GetDocument();