[Libreoffice-commits] core.git: sc/qa

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Mon Sep 28 19:07:07 UTC 2020


 sc/qa/unit/uicalc/uicalc.cxx |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

New commits:
commit 9e17c9ed086c0d7ea7d02877f1cd6e8672cb5925
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Sep 28 13:10:22 2020 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Sep 28 21:06:25 2020 +0200

    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 at redhat.com>

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);


More information about the Libreoffice-commits mailing list