diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-02-01 14:13:30 +0100 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-02-01 23:32:17 +0100 |
commit | 58814d047be09d6bd31da5dfd0efe3bae593c4d5 (patch) | |
tree | 91a4b2761bcca3e0e09bbb21055ae1eb1041ead3 /sd/qa | |
parent | 0108ed5cefdf259f5374d6c6aaf7ae14fea16181 (diff) |
tdf#139996: sd_uiimpress: Add unittest
Change-Id: If4a8e415fadb1d004166b2a7428aff775bc37634
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110254
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sd/qa')
-rw-r--r-- | sd/qa/unit/uiimpress.cxx | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/sd/qa/unit/uiimpress.cxx b/sd/qa/unit/uiimpress.cxx index 83eb2a39cd13..8b444d7f3674 100644 --- a/sd/qa/unit/uiimpress.cxx +++ b/sd/qa/unit/uiimpress.cxx @@ -235,6 +235,39 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf126197) pViewShell2->GetViewFrame()->GetDispatcher()->Execute(SID_DELETE, SfxCallMode::SYNCHRON); } +CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf139996) +{ + mxComponent = loadFromDesktop("private:factory/simpress", + "com.sun.star.presentation.PresentationDocument"); + + CPPUNIT_ASSERT(mxComponent.is()); + + sd::slidesorter::SlideSorterViewShell* pSSVS = getSlideSorterViewShell(); + auto& rSSController = pSSVS->GetSlideSorter().GetController(); + auto& rPageSelector = rSSController.GetPageSelector(); + + CPPUNIT_ASSERT_EQUAL(1, rPageSelector.GetSelectedPageCount()); + + rPageSelector.DeselectAllPages(); + + CPPUNIT_ASSERT_EQUAL(0, rPageSelector.GetSelectedPageCount()); + + // Without the fix in place, this test would have crashed here + dispatchCommand(mxComponent, ".uno:MovePageUp", {}); + Scheduler::ProcessEventsToIdle(); + + dispatchCommand(mxComponent, ".uno:MovePageDown", {}); + Scheduler::ProcessEventsToIdle(); + + dispatchCommand(mxComponent, ".uno:MovePageTop", {}); + Scheduler::ProcessEventsToIdle(); + + dispatchCommand(mxComponent, ".uno:MovePageBottom", {}); + Scheduler::ProcessEventsToIdle(); + + CPPUNIT_ASSERT_EQUAL(0, rPageSelector.GetSelectedPageCount()); +} + CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf128651) { // Error was, that undo and redo changes size of the shape. Affected actions were e.g. |