[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - sd/qa
merttumer (via logerrit)
logerrit at kemper.freedesktop.org
Tue May 25 04:20:41 UTC 2021
sd/qa/unit/tiledrendering/tiledrendering.cxx | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
New commits:
commit 4a22243d5ea830d99506ac274d072ad998e3aafb
Author: merttumer <mert.tumer at collabora.com>
AuthorDate: Mon May 24 18:56:56 2021 +0300
Commit: Mert Tumer <mert.tumer at collabora.com>
CommitDate: Tue May 25 06:20:10 2021 +0200
sd: Unit test for Table deletion with Delete Key
Change-Id: I9849f55a143007b49bdcaac392dd84e32d610998
Signed-off-by: merttumer <mert.tumer at collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116069
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index ac1380ad2165..99c30b852a40 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -131,6 +131,7 @@ public:
void testSpellOnlineRenderParameter();
void testSlideDuplicateUndo();
void testMoveShapeHandle();
+ void testDeleteTable();
CPPUNIT_TEST_SUITE(SdTiledRenderingTest);
CPPUNIT_TEST(testCreateDestroy);
@@ -187,6 +188,7 @@ public:
CPPUNIT_TEST(testSpellOnlineRenderParameter);
CPPUNIT_TEST(testSlideDuplicateUndo);
CPPUNIT_TEST(testMoveShapeHandle);
+ CPPUNIT_TEST(testDeleteTable);
CPPUNIT_TEST_SUITE_END();
@@ -737,6 +739,30 @@ void SdTiledRenderingTest::testInsertTable()
CPPUNIT_ASSERT(aPos.Y() != 0);
}
+void SdTiledRenderingTest::testDeleteTable()
+{
+ SdXImpressDocument* pXImpressDocument = createDoc("dummy.odp");
+
+ uno::Sequence<beans::PropertyValue> aArgs(comphelper::InitPropertySequence(
+ {
+ { "Rows", uno::makeAny(sal_Int32(3)) },
+ { "Columns", uno::makeAny(sal_Int32(5)) }
+ }));
+
+ comphelper::dispatchCommand(".uno:InsertTable", aArgs);
+ Scheduler::ProcessEventsToIdle();
+ sd::ViewShell* pViewShell = pXImpressDocument->GetDocShell()->GetViewShell();
+ SdrView* pSdrView = pViewShell->GetView();
+ const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList();
+ CPPUNIT_ASSERT(rMarkList.GetMarkCount() == 1);
+ pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_MOD1 | awt::Key::A);
+ pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, KEY_MOD1 | awt::Key::A);
+ pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_DELETE);
+ pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, KEY_DELETE);
+ Scheduler::ProcessEventsToIdle();
+ CPPUNIT_ASSERT(rMarkList.GetMarkCount() == 0);
+}
+
void SdTiledRenderingTest::testPartHash()
{
SdXImpressDocument* pDoc = createDoc("dummy.odp");
More information about the Libreoffice-commits
mailing list