From d52b97175b02745c1d9afab03256419bbebdf48d Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Tue, 21 Feb 2023 14:07:38 +0100 Subject: qa: call ProcessEventsToIdle inside dispatchCommand Change-Id: I909e6f334f4a659282141a97ccb3ffdea6ecc364 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147397 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- sd/qa/unit/tiledrendering/LOKitSearchTest.cxx | 2 -- sd/qa/unit/tiledrendering/tiledrendering.cxx | 33 ------------------- sd/qa/unit/uiimpress.cxx | 46 --------------------------- 3 files changed, 81 deletions(-) (limited to 'sd') diff --git a/sd/qa/unit/tiledrendering/LOKitSearchTest.cxx b/sd/qa/unit/tiledrendering/LOKitSearchTest.cxx index f3beb12b3ce1..2ba0a8f27848 100644 --- a/sd/qa/unit/tiledrendering/LOKitSearchTest.cxx +++ b/sd/qa/unit/tiledrendering/LOKitSearchTest.cxx @@ -131,7 +131,6 @@ void LOKitSearchTest::lcl_search(const OUString& rKey, bool bFindAll, bool bBack })); dispatchCommand(mxComponent, ".uno:ExecuteSearch", aPropertyValues); - Scheduler::ProcessEventsToIdle(); } void LOKitSearchTest::lcl_replace(const OUString& rKey, const OUString& rReplace, bool bAll) @@ -147,7 +146,6 @@ void LOKitSearchTest::lcl_replace(const OUString& rKey, const OUString& rReplace })); dispatchCommand(mxComponent, ".uno:ExecuteSearch", aPropertyValues); - Scheduler::ProcessEventsToIdle(); } namespace diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx b/sd/qa/unit/tiledrendering/tiledrendering.cxx index dfa3ad547b3d..f8ca37932edd 100644 --- a/sd/qa/unit/tiledrendering/tiledrendering.cxx +++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx @@ -573,7 +573,6 @@ void SdTiledRenderingTest::testUndoShells() {"AttributePageSize.Height", uno::Any(static_cast(10000))}, })); dispatchCommand(mxComponent, ".uno:AttributePageSize", aPropertyValues); - Scheduler::ProcessEventsToIdle(); // Assert that view shell ID tracking works for SdUndoAction subclasses. SdDrawDocument* pDocument = pXImpressDocument->GetDoc(); @@ -732,7 +731,6 @@ void SdTiledRenderingTest::testInsertTable() })); dispatchCommand(mxComponent, ".uno:InsertTable", aArgs); - Scheduler::ProcessEventsToIdle(); // get the table sd::ViewShell* pViewShell = pXImpressDocument->GetDocShell()->GetViewShell(); @@ -758,7 +756,6 @@ void SdTiledRenderingTest::testDeleteTable() })); dispatchCommand(mxComponent, ".uno:InsertTable", aArgs); - Scheduler::ProcessEventsToIdle(); sd::ViewShell* pViewShell = pXImpressDocument->GetDocShell()->GetViewShell(); SdrView* pSdrView = pViewShell->GetView(); const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList(); @@ -1663,8 +1660,6 @@ void SdTiledRenderingTest::testTdf104405() uno::Sequence aArgs{ comphelper::makePropertyValue("PersistentCopy", true) }; dispatchCommand(mxComponent, ".uno:FormatPaintbrush", aArgs); - Scheduler::ProcessEventsToIdle(); - // now click on the table pView->MarkObj(pTableObject, pView->GetSdrPageView()); pTableObject->setActiveCell(sdr::table::CellPos(0,0)); @@ -1755,7 +1750,6 @@ void SdTiledRenderingTest::testTdf105502() // Grow font size for the selection. dispatchCommand(mxComponent, ".uno:Grow", {}); - Scheduler::ProcessEventsToIdle(); // Assert that the selected A1 has now a larger font than the unselected // A2. @@ -1805,7 +1799,6 @@ void SdTiledRenderingTest::testCommentCallbacks() {"Text", uno::Any(OUString("Comment"))}, }); dispatchCommand(mxComponent, ".uno:InsertAnnotation", aArgs); - Scheduler::ProcessEventsToIdle(); // We received a LOK_CALLBACK_COMMENT callback with comment 'Add' action CPPUNIT_ASSERT_EQUAL(std::string("Add"), aView1.m_aCommentCallbackResult.get("action")); @@ -1830,7 +1823,6 @@ void SdTiledRenderingTest::testCommentCallbacks() {"Text", uno::Any(OUString("Reply to comment"))}, }); dispatchCommand(mxComponent, ".uno:ReplyToAnnotation", aArgs); - Scheduler::ProcessEventsToIdle(); // We received a LOK_CALLBACK_COMMENT callback with comment 'Modify' action CPPUNIT_ASSERT_EQUAL(std::string("Modify"), aView1.m_aCommentCallbackResult.get("action")); @@ -1855,7 +1847,6 @@ void SdTiledRenderingTest::testCommentCallbacks() {"Text", uno::Any(OUString("Edited comment"))}, }); dispatchCommand(mxComponent, ".uno:EditAnnotation", aArgs); - Scheduler::ProcessEventsToIdle(); // We received a LOK_CALLBACK_COMMENT callback with comment 'Modify' action CPPUNIT_ASSERT_EQUAL(std::string("Modify"), aView1.m_aCommentCallbackResult.get("action")); @@ -1873,7 +1864,6 @@ void SdTiledRenderingTest::testCommentCallbacks() {"Id", uno::Any(OUString::number(nComment1))}, }); dispatchCommand(mxComponent, ".uno:DeleteAnnotation", aArgs); - Scheduler::ProcessEventsToIdle(); // We received a LOK_CALLBACK_COMMENT callback with comment 'Remove' action CPPUNIT_ASSERT_EQUAL(std::string("Remove"), aView1.m_aCommentCallbackResult.get("action")); @@ -1905,7 +1895,6 @@ void SdTiledRenderingTest::testCommentChangeImpress() {"Text", uno::Any(OUString("Comment"))}, }); dispatchCommand(mxComponent, ".uno:InsertAnnotation", aArgs); - Scheduler::ProcessEventsToIdle(); CPPUNIT_ASSERT_EQUAL(std::string("Add"), aView1.m_aCommentCallbackResult.get("action")); @@ -1923,7 +1912,6 @@ void SdTiledRenderingTest::testCommentChangeImpress() {"PositionY", uno::Any(sal_Int32(20))} }); dispatchCommand(mxComponent, ".uno:EditAnnotation", aArgs); - Scheduler::ProcessEventsToIdle(); CPPUNIT_ASSERT_EQUAL(std::string("Modify"), aView1.m_aCommentCallbackResult.get("action")); CPPUNIT_ASSERT_EQUAL(std::string("Comment"), aView1.m_aCommentCallbackResult.get("text")); @@ -1953,7 +1941,6 @@ void SdTiledRenderingTest::testCommentChangeDraw() {"Text", uno::Any(OUString("Comment"))}, }); dispatchCommand(mxComponent, ".uno:InsertAnnotation", aArgs); - Scheduler::ProcessEventsToIdle(); CPPUNIT_ASSERT_EQUAL(std::string("Add"), aView1.m_aCommentCallbackResult.get("action")); @@ -1971,7 +1958,6 @@ void SdTiledRenderingTest::testCommentChangeDraw() {"PositionY", uno::Any(sal_Int32(20))} }); dispatchCommand(mxComponent, ".uno:EditAnnotation", aArgs); - Scheduler::ProcessEventsToIdle(); CPPUNIT_ASSERT_EQUAL(std::string("Modify"), aView1.m_aCommentCallbackResult.get("action")); CPPUNIT_ASSERT_EQUAL(std::string("Comment"), aView1.m_aCommentCallbackResult.get("text")); @@ -2004,7 +1990,6 @@ void SdTiledRenderingTest::testMultiViewInsertDeletePage() // Insert slide in 1st view SfxLokHelper::setView(nView1); dispatchCommand(mxComponent, ".uno:InsertPage", aArgs); - Scheduler::ProcessEventsToIdle(); // See if the current slide number changed in 2nd view too SfxLokHelper::setView(nView2); @@ -2013,7 +1998,6 @@ void SdTiledRenderingTest::testMultiViewInsertDeletePage() // Delete the page in 1st view now SfxLokHelper::setView(nView1); dispatchCommand(mxComponent, ".uno:DeletePage", aArgs); - Scheduler::ProcessEventsToIdle(); // See if current slide number changed in 2nd view too SfxLokHelper::setView(nView2); @@ -2067,7 +2051,6 @@ void SdTiledRenderingTest::testMultiViewInsertDeletePage2() // Insert slide in 1st view SfxLokHelper::setView(nView1); dispatchCommand(mxComponent, ".uno:InsertPage", aArgs); - Scheduler::ProcessEventsToIdle(); // See if the current slide number changed in 2nd view too SfxLokHelper::setView(nView2); @@ -2076,7 +2059,6 @@ void SdTiledRenderingTest::testMultiViewInsertDeletePage2() // Delete the page in 1st view now SfxLokHelper::setView(nView1); dispatchCommand(mxComponent, ".uno:DeletePage", aArgs); - Scheduler::ProcessEventsToIdle(); // See if current slide number changed in 2nd view too SfxLokHelper::setView(nView2); @@ -2251,7 +2233,6 @@ void SdTiledRenderingTest::testLanguageAllText() { "Language", uno::Any(OUString("Default_English (USA)")) }, }); dispatchCommand(mxComponent, ".uno:LanguageStatus", aArgs); - Scheduler::ProcessEventsToIdle(); // Assert that the shape text language was changed. uno::Reference xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); @@ -2344,7 +2325,6 @@ void SdTiledRenderingTest::testTdf115783() { "FontHeight.Height", uno::Any(static_cast(12)) }, }); dispatchCommand(mxComponent, ".uno:FontHeight", aArgs); - Scheduler::ProcessEventsToIdle(); // Create a text selection on the B1 cell. pTableObject->setActiveCell(sdr::table::CellPos(1, 0)); @@ -2357,11 +2337,9 @@ void SdTiledRenderingTest::testTdf115783() // Copy selection, paste at the start of the cell. aArgs = {}; dispatchCommand(mxComponent, ".uno:Copy", aArgs); - Scheduler::ProcessEventsToIdle(); rEditView.SetSelection(ESelection(0, 0, 0, 0)); aArgs = {}; dispatchCommand(mxComponent, ".uno:Paste", aArgs); - Scheduler::ProcessEventsToIdle(); pView->SdrEndTextEdit(); // And now verify that the cell has the correct font size. @@ -2421,7 +2399,6 @@ void SdTiledRenderingTest::testPasteTextOnSlide() // Copy some text dispatchCommand(mxComponent, ".uno:Copy", uno::Sequence()); - Scheduler::ProcessEventsToIdle(); pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, awt::Key::ESCAPE); pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, awt::Key::ESCAPE); @@ -2429,7 +2406,6 @@ void SdTiledRenderingTest::testPasteTextOnSlide() // Paste onto the slide dispatchCommand(mxComponent, ".uno:Paste", uno::Sequence()); - Scheduler::ProcessEventsToIdle(); pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, awt::Key::ESCAPE); pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, awt::Key::ESCAPE); @@ -2528,7 +2504,6 @@ void SdTiledRenderingTest::testCutSelectionChange() // Cut the selected text dispatchCommand(mxComponent, ".uno:Cut", uno::Sequence()); - Scheduler::ProcessEventsToIdle(); // Selection is removed CPPUNIT_ASSERT_EQUAL(static_cast(0), m_aSelection.size()); @@ -2558,7 +2533,6 @@ void SdTiledRenderingTest::testRegenerateDiagram() // regenerate diagram dispatchCommand(mxComponent, ".uno:RegenerateDiagram", uno::Sequence()); - Scheduler::ProcessEventsToIdle(); // diagram content (child shape count) should be the same as in the beginning CPPUNIT_ASSERT_EQUAL(static_cast(4), pActualPage->GetObj(0)->GetSubList()->GetObjCount()); @@ -2575,7 +2549,6 @@ void SdTiledRenderingTest::testInsertDeletePageInvalidation() aView1.m_bTilesInvalidated = false; aView1.m_aInvalidations.clear(); dispatchCommand(mxComponent, ".uno:InsertPage", uno::Sequence()); - Scheduler::ProcessEventsToIdle(); CPPUNIT_ASSERT(aView1.m_bTilesInvalidated); CPPUNIT_ASSERT_EQUAL(9, pXImpressDocument->getParts()); CPPUNIT_ASSERT_EQUAL(size_t(9), aView1.m_aInvalidations.size()); @@ -2584,7 +2557,6 @@ void SdTiledRenderingTest::testInsertDeletePageInvalidation() aView1.m_bTilesInvalidated = false; aView1.m_aInvalidations.clear(); dispatchCommand(mxComponent, ".uno:DeletePage", uno::Sequence()); - Scheduler::ProcessEventsToIdle(); CPPUNIT_ASSERT(aView1.m_bTilesInvalidated); CPPUNIT_ASSERT_EQUAL(8, pXImpressDocument->getParts()); CPPUNIT_ASSERT_EQUAL(size_t(8), aView1.m_aInvalidations.size()); @@ -2633,7 +2605,6 @@ void SdTiledRenderingTest::testSlideDuplicateUndo() // Duplicate the first slide on view 1 and undo it. SfxLokHelper::setView(nView1); dispatchCommand(mxComponent, ".uno:DuplicatePage", {}); - Scheduler::ProcessEventsToIdle(); pXImpressDocument->setPart(0, /*bAllowChangeFocus=*/false); pXImpressDocument->setPart(1, /*bAllowChangeFocus=*/false); SfxLokHelper::setView(nView0); @@ -2699,7 +2670,6 @@ void SdTiledRenderingTest::testMoveShapeHandle() {"NewPosY", uno::Any(y+1)} })); dispatchCommand(mxComponent, ".uno:MoveShapeHandle", aPropertyValues); - Scheduler::ProcessEventsToIdle(); CPPUNIT_ASSERT(!aView1.m_ShapeSelection.isEmpty()); lcl_extractHandleParameters(aView1.m_ShapeSelection, id, x ,y); CPPUNIT_ASSERT_EQUAL(x-1, oldX); @@ -2723,13 +2693,10 @@ void SdTiledRenderingTest::testPasteUndo() ESelection aWordSelection(0, 0, 0, 1); // "w" of "world" rEditView.SetSelection(aWordSelection); dispatchCommand(mxComponent, ".uno:Cut", {}); - Scheduler::ProcessEventsToIdle(); // When undoing a paste: dispatchCommand(mxComponent, ".uno:Paste", {}); - Scheduler::ProcessEventsToIdle(); dispatchCommand(mxComponent, ".uno:Undo", {}); - Scheduler::ProcessEventsToIdle(); // Then make sure the cursor position is still at the beginning: ESelection aSelection = rEditView.GetSelection(); diff --git a/sd/qa/unit/uiimpress.cxx b/sd/qa/unit/uiimpress.cxx index 2c261a99c562..5cf0de0a275f 100644 --- a/sd/qa/unit/uiimpress.cxx +++ b/sd/qa/unit/uiimpress.cxx @@ -162,7 +162,6 @@ void SdUiImpressTest::lcl_search(const OUString& rKey, bool bFindAll, bool bBack })); dispatchCommand(mxComponent, ".uno:ExecuteSearch", aPropertyValues); - Scheduler::ProcessEventsToIdle(); } CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf111522) @@ -265,7 +264,6 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf124708) createSdImpressDoc("tdf124708.ppt"); dispatchCommand(mxComponent, ".uno:NextPage", {}); - Scheduler::ProcessEventsToIdle(); checkCurrentPageNumber(2); @@ -275,16 +273,13 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf124708) CPPUNIT_ASSERT_EQUAL(static_cast(16), pActualPage->GetObjCount()); dispatchCommand(mxComponent, ".uno:SelectAll", {}); - Scheduler::ProcessEventsToIdle(); // Without the fix in place, this test would have crashed here dispatchCommand(mxComponent, ".uno:Delete", {}); - Scheduler::ProcessEventsToIdle(); CPPUNIT_ASSERT_EQUAL(static_cast(0), pActualPage->GetObjCount()); dispatchCommand(mxComponent, ".uno:Undo", {}); - Scheduler::ProcessEventsToIdle(); CPPUNIT_ASSERT_EQUAL(static_cast(16), pActualPage->GetObjCount()); } @@ -389,16 +384,12 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf139996) // 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()); } @@ -443,7 +434,6 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf126605) createSdImpressDoc(); dispatchCommand(mxComponent, ".uno:InsertPage", {}); - Scheduler::ProcessEventsToIdle(); insertStringToObject(0, u"Test", /*bUseEscape*/ false); @@ -470,13 +460,11 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf126605) // Without the fix in place, this test would have crashed here dispatchCommand(mxComponent, ".uno:ParaRightToLeft", {}); - Scheduler::ProcessEventsToIdle(); xPropSet->getPropertyValue("WritingMode") >>= nWritingMode; CPPUNIT_ASSERT_EQUAL(text::WritingMode2::RL_TB, nWritingMode); dispatchCommand(mxComponent, ".uno:ParaLeftToRight", {}); - Scheduler::ProcessEventsToIdle(); xPropSet->getPropertyValue("WritingMode") >>= nWritingMode; CPPUNIT_ASSERT_EQUAL(text::WritingMode2::LR_TB, nWritingMode); @@ -487,15 +475,12 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf100950) createSdImpressDoc(); dispatchCommand(mxComponent, ".uno:InsertPage", {}); - Scheduler::ProcessEventsToIdle(); dispatchCommand(mxComponent, ".uno:InsertPage", {}); - Scheduler::ProcessEventsToIdle(); insertStringToObject(0, u"Test", /*bUseEscape*/ true); dispatchCommand(mxComponent, ".uno:Undo", {}); - Scheduler::ProcessEventsToIdle(); sd::slidesorter::SlideSorterViewShell* pSSVS = getSlideSorterViewShell(); auto& rSSController = pSSVS->GetSlideSorter().GetController(); @@ -510,15 +495,12 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf129346) createSdImpressDoc(); dispatchCommand(mxComponent, ".uno:DiaMode", {}); - Scheduler::ProcessEventsToIdle(); checkCurrentPageNumber(1); dispatchCommand(mxComponent, ".uno:InsertPage", {}); - Scheduler::ProcessEventsToIdle(); checkCurrentPageNumber(2); dispatchCommand(mxComponent, ".uno:Undo", {}); - Scheduler::ProcessEventsToIdle(); checkCurrentPageNumber(1); } @@ -536,7 +518,6 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testmoveSlides) { "IsPageObj", uno::Any(false) } })); dispatchCommand(mxComponent, ".uno:InsertPage", aArgs); - Scheduler::ProcessEventsToIdle(); checkCurrentPageNumber(2); CPPUNIT_ASSERT_EQUAL(OUString("Test 1"), pViewShell->GetActualPage()->GetName()); @@ -547,7 +528,6 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testmoveSlides) { "IsPageObj", uno::Any(false) } }); dispatchCommand(mxComponent, ".uno:InsertPage", aArgs); - Scheduler::ProcessEventsToIdle(); checkCurrentPageNumber(3); CPPUNIT_ASSERT_EQUAL(OUString("Test 2"), pViewShell->GetActualPage()->GetName()); @@ -556,7 +536,6 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testmoveSlides) for (size_t i = 2; i > 0; --i) { dispatchCommand(mxComponent, ".uno:MovePageUp", {}); - Scheduler::ProcessEventsToIdle(); checkCurrentPageNumber(i); CPPUNIT_ASSERT_EQUAL(OUString("Test 2"), pViewShell->GetActualPage()->GetName()); } @@ -565,20 +544,17 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testmoveSlides) for (size_t i = 2; i < 4; ++i) { dispatchCommand(mxComponent, ".uno:MovePageDown", {}); - Scheduler::ProcessEventsToIdle(); checkCurrentPageNumber(i); CPPUNIT_ASSERT_EQUAL(OUString("Test 2"), pViewShell->GetActualPage()->GetName()); } // Move slide 'Test 2' to the top dispatchCommand(mxComponent, ".uno:MovePageFirst", {}); - Scheduler::ProcessEventsToIdle(); checkCurrentPageNumber(1); CPPUNIT_ASSERT_EQUAL(OUString("Test 2"), pViewShell->GetActualPage()->GetName()); // Move slide 'Test 2' to the bottom dispatchCommand(mxComponent, ".uno:MovePageLast", {}); - Scheduler::ProcessEventsToIdle(); checkCurrentPageNumber(3); CPPUNIT_ASSERT_EQUAL(OUString("Test 2"), pViewShell->GetActualPage()->GetName()); } @@ -612,52 +588,42 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf148620) uno::Sequence aArgs( comphelper::InitPropertySequence({ { "KeyModifier", uno::Any(sal_Int32(0)) } })); dispatchCommand(mxComponent, ".uno:OutlineUp", aArgs); - Scheduler::ProcessEventsToIdle(); CPPUNIT_ASSERT_EQUAL(OUString(u"One\nTwo\nThree\nFour\nsix\nFive"), xShape->getString()); dispatchCommand(mxComponent, ".uno:OutlineUp", aArgs); - Scheduler::ProcessEventsToIdle(); CPPUNIT_ASSERT_EQUAL(OUString(u"One\nTwo\nThree\nsix\nFour\nFive"), xShape->getString()); dispatchCommand(mxComponent, ".uno:OutlineUp", aArgs); - Scheduler::ProcessEventsToIdle(); CPPUNIT_ASSERT_EQUAL(OUString(u"One\nTwo\nsix\nThree\nFour\nFive"), xShape->getString()); dispatchCommand(mxComponent, ".uno:OutlineUp", aArgs); - Scheduler::ProcessEventsToIdle(); CPPUNIT_ASSERT_EQUAL(OUString(u"One\nsix\nTwo\nThree\nFour\nFive"), xShape->getString()); dispatchCommand(mxComponent, ".uno:OutlineUp", aArgs); - Scheduler::ProcessEventsToIdle(); CPPUNIT_ASSERT_EQUAL(OUString(u"six\nOne\nTwo\nThree\nFour\nFive"), xShape->getString()); dispatchCommand(mxComponent, ".uno:OutlineDown", aArgs); - Scheduler::ProcessEventsToIdle(); CPPUNIT_ASSERT_EQUAL(OUString(u"One\nsix\nTwo\nThree\nFour\nFive"), xShape->getString()); dispatchCommand(mxComponent, ".uno:OutlineDown", aArgs); - Scheduler::ProcessEventsToIdle(); CPPUNIT_ASSERT_EQUAL(OUString(u"One\nTwo\nsix\nThree\nFour\nFive"), xShape->getString()); dispatchCommand(mxComponent, ".uno:OutlineDown", aArgs); - Scheduler::ProcessEventsToIdle(); CPPUNIT_ASSERT_EQUAL(OUString(u"One\nTwo\nThree\nsix\nFour\nFive"), xShape->getString()); dispatchCommand(mxComponent, ".uno:OutlineDown", aArgs); - Scheduler::ProcessEventsToIdle(); CPPUNIT_ASSERT_EQUAL(OUString(u"One\nTwo\nThree\nFour\nsix\nFive"), xShape->getString()); dispatchCommand(mxComponent, ".uno:OutlineDown", aArgs); - Scheduler::ProcessEventsToIdle(); CPPUNIT_ASSERT_EQUAL(OUString(u"One\nTwo\nThree\nFour\nFive\nsix"), xShape->getString()); } @@ -672,7 +638,6 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf141703) { { "Rows", uno::Any(sal_Int32(2)) }, { "Columns", uno::Any(sal_Int32(2)) } })); dispatchCommand(mxComponent, ".uno:InsertTable", aArgs); - Scheduler::ProcessEventsToIdle(); // Move to A1 using Alt + Tab and write 'A' for (int i = 0; i < 3; i++) @@ -728,12 +693,10 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf127481) { { "Rows", uno::Any(sal_Int32(1)) }, { "Columns", uno::Any(sal_Int32(1)) } })); dispatchCommand(mxComponent, ".uno:InsertTable", aArgs); - Scheduler::ProcessEventsToIdle(); CPPUNIT_ASSERT_EQUAL(static_cast(3), pActualPage->GetObjCount()); dispatchCommand(mxComponent, ".uno:DuplicatePage", aArgs); - Scheduler::ProcessEventsToIdle(); checkCurrentPageNumber(2); @@ -859,7 +822,6 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf38669) uno::Sequence aArgs( comphelper::InitPropertySequence({ { "KeyModifier", uno::Any(KEY_MOD1) } })); dispatchCommand(mxComponent, ".uno:BasicShapes.rectangle", aArgs); - Scheduler::ProcessEventsToIdle(); uno::Reference xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); uno::Reference xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0), @@ -894,7 +856,6 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf151417) // Without the fix in place, this test would have crashed here dispatchCommand(mxComponent, ".uno:Edit", aArgs); - Scheduler::ProcessEventsToIdle(); CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xDrawPage->getCount()); } @@ -909,7 +870,6 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf123841) uno::Sequence aArgs( comphelper::InitPropertySequence({ { "KeyModifier", uno::Any(KEY_MOD1) } })); dispatchCommand(mxComponent, ".uno:Rect_Unfilled", aArgs); - Scheduler::ProcessEventsToIdle(); uno::Reference xDrawPagesSupplier(mxComponent, uno::UNO_QUERY); uno::Reference xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0), @@ -996,13 +956,11 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testCharColorTheme) xController->select(uno::Any(xShape)); Scheduler::ProcessEventsToIdle(); dispatchCommand(mxComponent, ".uno:Text", {}); - Scheduler::ProcessEventsToIdle(); auto pImpressDocument = dynamic_cast(mxComponent.get()); sd::ViewShell* pViewShell = pImpressDocument->GetDocShell()->GetViewShell(); SdrView* pView = pViewShell->GetView(); CPPUNIT_ASSERT(pView->IsTextEdit()); dispatchCommand(mxComponent, ".uno:SelectAll", {}); - Scheduler::ProcessEventsToIdle(); // When picking a theme color on the sidebar: uno::Sequence aColorArgs = { @@ -1012,7 +970,6 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testCharColorTheme) comphelper::makePropertyValue("ColorLumOff", static_cast(8000)), }; dispatchCommand(mxComponent, ".uno:Color", aColorArgs); - Scheduler::ProcessEventsToIdle(); // Then make sure the theme "metadata" is set in the document model: pView->EndTextEditCurrentView(); @@ -1059,7 +1016,6 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testFillColorTheme) comphelper::makePropertyValue("ColorLumOff", static_cast(6000)), }; dispatchCommand(mxComponent, ".uno:FillColor", aColorArgs); - Scheduler::ProcessEventsToIdle(); // Then make sure the theme index is not lost when the sidebar sets it: { @@ -1135,7 +1091,6 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf148810) CPPUNIT_ASSERT_EQUAL(sal_Int16(0), nNumberingLevel); dispatchCommand(mxComponent, ".uno:Undo", {}); - Scheduler::ProcessEventsToIdle(); nNumberingLevel = -1; xPropSet->getPropertyValue("NumberingLevel") >>= nNumberingLevel; @@ -1151,7 +1106,6 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf127696) createSdImpressDoc(); dispatchCommand(mxComponent, ".uno:InsertPage", {}); - Scheduler::ProcessEventsToIdle(); insertStringToObject(0, u"Test", /*bUseEscape*/ false); dispatchCommand(mxComponent, ".uno:SelectAll", {}); -- cgit