summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-09-28 13:10:22 +0100
committerCaolán McNamara <caolanm@redhat.com>2020-09-28 21:06:25 +0200
commit9e17c9ed086c0d7ea7d02877f1cd6e8672cb5925 (patch)
tree4c1fcf28cdc364070d072c56a09eee1a1260ea7a
parent8a48afac3e31a69622c9006c6ae35e26287d37b9 (diff)
avoid touching system clipboard in test
Change-Id: Ie67255f027650676ff3ac7c9c0959cd39f7332b9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103549 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sc/qa/unit/uicalc/uicalc.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/sc/qa/unit/uicalc/uicalc.cxx b/sc/qa/unit/uicalc/uicalc.cxx
index d2c4bc9bb1a2..b7581fdb0c37 100644
--- a/sc/qa/unit/uicalc/uicalc.cxx
+++ b/sc/qa/unit/uicalc/uicalc.cxx
@@ -97,7 +97,11 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf133326)
CPPUNIT_ASSERT(pDoc);
dispatchCommand(mxComponent, ".uno:SelectAll", {});
- dispatchCommand(mxComponent, ".uno:Copy", {});
+
+ // .uno:Copy without touching shared clipboard
+ ScDocument aClipDoc(SCDOCMODE_CLIP);
+ ScDocShell::GetViewData()->GetView()->CopyToClip(&aClipDoc, false, false, false, false);
+
Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(static_cast<SCTAB>(1), pDoc->GetTableCount());
@@ -111,7 +115,8 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf133326)
CPPUNIT_ASSERT_EQUAL(OUString(""), aFormula);
CPPUNIT_ASSERT_EQUAL(static_cast<SCTAB>(2), pDoc->GetTableCount());
- dispatchCommand(mxComponent, ".uno:Paste", {});
+ // .uno:Paste without touching shared clipboard
+ ScDocShell::GetViewData()->GetView()->PasteFromClip(InsertDeleteFlags::ALL, &aClipDoc);
Scheduler::ProcessEventsToIdle();
pDoc->GetFormula(0, 0, 1, aFormula);