summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2023-02-21 14:07:38 +0100
committerXisco Fauli <xiscofauli@libreoffice.org>2023-03-10 17:53:29 +0000
commit1029afe2fa49a3a326ca529a68e99e2a7239a395 (patch)
tree445318ac818dbd85bca0fd1828d8261349e233a0
parent0259e87c95df275645ce6fe1f03669a0fb93b4fa (diff)
qa: call ProcessEventsToIdle inside dispatchCommand
Change-Id: I909e6f334f4a659282141a97ccb3ffdea6ecc364 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147397 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148643
-rw-r--r--chart2/qa/extras/uichart.cxx6
-rw-r--r--desktop/qa/desktop_lib/test_desktop_lib.cxx2
-rw-r--r--sc/qa/unit/jumbosheets-test.cxx4
-rw-r--r--sc/qa/unit/tiledrendering/tiledrendering.cxx37
-rw-r--r--sc/qa/unit/uicalc/uicalc.cxx81
-rw-r--r--sd/qa/unit/tiledrendering/LOKitSearchTest.cxx2
-rw-r--r--sd/qa/unit/tiledrendering/tiledrendering.cxx33
-rw-r--r--sd/qa/unit/uiimpress.cxx45
-rw-r--r--sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx2
-rw-r--r--sw/qa/extras/layout/layout.cxx2
-rw-r--r--sw/qa/extras/tiledrendering/tiledrendering.cxx4
-rw-r--r--sw/qa/extras/uiwriter/uiwriter.cxx2
-rw-r--r--sw/qa/extras/uiwriter/uiwriter2.cxx16
-rw-r--r--sw/qa/extras/uiwriter/uiwriter3.cxx99
-rw-r--r--sw/qa/extras/uiwriter/uiwriter4.cxx10
-rw-r--r--sw/qa/extras/uiwriter/uiwriter5.cxx14
-rw-r--r--sw/qa/extras/uiwriter/uiwriter6.cxx16
-rw-r--r--sw/qa/extras/uiwriter/uiwriter7.cxx3
-rw-r--r--sw/qa/extras/uiwriter/uiwriter8.cxx85
-rw-r--r--unotest/Library_unotest.mk1
-rw-r--r--unotest/source/cpp/macros_test.cxx6
21 files changed, 6 insertions, 464 deletions
diff --git a/chart2/qa/extras/uichart.cxx b/chart2/qa/extras/uichart.cxx
index ec250f80bb27..4b5db209a742 100644
--- a/chart2/qa/extras/uichart.cxx
+++ b/chart2/qa/extras/uichart.cxx
@@ -47,16 +47,13 @@ void Chart2UiChartTest::testCopyPasteToNewSheet(uno::Reference<chart::XChartDocu
comphelper::makePropertyValue("ToObject", aObjectName),
};
dispatchCommand(mxComponent, ".uno:GoToObject", aPropertyValues);
- Scheduler::ProcessEventsToIdle();
dispatchCommand(mxComponent, ".uno:Copy", {});
- Scheduler::ProcessEventsToIdle();
// create a new document
load("private:factory/scalc");
dispatchCommand(mxComponent, ".uno:Paste", {});
- Scheduler::ProcessEventsToIdle();
uno::Reference<chart2::XChartDocument> xChartDoc2 = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT(xChartDoc2.is());
@@ -140,16 +137,13 @@ CPPUNIT_TEST_FIXTURE(Chart2UiChartTest, testTdf151091)
comphelper::makePropertyValue("ToObject", OUString("Object 1")),
};
dispatchCommand(mxComponent, ".uno:GoToObject", aPropertyValues);
- Scheduler::ProcessEventsToIdle();
dispatchCommand(mxComponent, ".uno:Copy", {});
- Scheduler::ProcessEventsToIdle();
// create a new writer document
load("private:factory/swriter");
dispatchCommand(mxComponent, ".uno:Paste", {});
- Scheduler::ProcessEventsToIdle();
aSeriesList = getWriterChartColumnDescriptions(mxComponent);
diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index 5af044e67523..d7108977aae2 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -606,7 +606,6 @@ void DesktopLOKTest::testSearchCalc()
{"SearchItem.Command", uno::Any(static_cast<sal_uInt16>(SvxSearchCmd::FIND_ALL))},
}));
dispatchCommand(mxComponent, ".uno:ExecuteSearch", aPropertyValues);
- Scheduler::ProcessEventsToIdle();
std::vector<OString> aSelections;
sal_Int32 nIndex = 0;
@@ -637,7 +636,6 @@ void DesktopLOKTest::testSearchAllNotificationsCalc()
{"SearchItem.Command", uno::Any(static_cast<sal_uInt16>(SvxSearchCmd::FIND_ALL))},
}));
dispatchCommand(mxComponent, ".uno:ExecuteSearch", aPropertyValues);
- Scheduler::ProcessEventsToIdle();
// This was 1, make sure that we get no notifications about selection changes during search.
CPPUNIT_ASSERT_EQUAL(0, m_nSelectionBeforeSearchResult);
diff --git a/sc/qa/unit/jumbosheets-test.cxx b/sc/qa/unit/jumbosheets-test.cxx
index 05b2c2248650..0dec10967751 100644
--- a/sc/qa/unit/jumbosheets-test.cxx
+++ b/sc/qa/unit/jumbosheets-test.cxx
@@ -272,12 +272,10 @@ void ScJumboSheetsTest::testTdf134553()
pViewShell->SelectObject(u"Diagram 1");
dispatchCommand(mxComponent, ".uno:Cut", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(0), pPage->GetObjCount());
dispatchCommand(mxComponent, ".uno:Paste", {});
- Scheduler::ProcessEventsToIdle();
pOleObj = pPage->GetObj(0);
CPPUNIT_ASSERT(pOleObj);
@@ -317,10 +315,8 @@ void ScJumboSheetsTest::testTdf147509()
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), ScDocShell::GetViewData()->GetCurY());
dispatchCommand(mxComponent, ".uno:SelectColumn", {});
- Scheduler::ProcessEventsToIdle();
dispatchCommand(mxComponent, ".uno:InsertColumnsAfter", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(OUString("A"), pDoc->GetString(ScAddress(0, 0, 0)));
diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx b/sc/qa/unit/tiledrendering/tiledrendering.cxx
index fb8af68bdd7e..b7dd40111a90 100644
--- a/sc/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx
@@ -768,7 +768,6 @@ void ScTiledRenderingTest::testTextViewSelection()
// Create a selection on two cells in the second view, that's a text selection in LOK terms.
aView1.m_bTextViewSelectionInvalidated = false;
dispatchCommand(mxComponent, ".uno:GoRightSel", {});
- Scheduler::ProcessEventsToIdle();
// Make sure the first view got its notification.
CPPUNIT_ASSERT(aView1.m_bTextViewSelectionInvalidated);
}
@@ -785,7 +784,6 @@ void ScTiledRenderingTest::testDocumentSizeChanged()
comphelper::makePropertyValue("ToPoint", OUString("$A$30")),
};
dispatchCommand(mxComponent, ".uno:GoToCell", aPropertyValues);
- Scheduler::ProcessEventsToIdle();
// Assert that the size in the payload is not 0.
CPPUNIT_ASSERT(m_aDocumentSize.getWidth() > 0);
CPPUNIT_ASSERT(m_aDocumentSize.getHeight() > 0);
@@ -858,7 +856,6 @@ void ScTiledRenderingTest::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);
@@ -1081,7 +1078,6 @@ void ScTiledRenderingTest::testAutoSum()
uno::Sequence<beans::PropertyValue> aArgs;
dispatchCommand(mxComponent, ".uno:AutoSum", aArgs);
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT(aView.m_sCellFormula.startsWith("=SUM("));
}
@@ -1101,7 +1097,6 @@ void ScTiledRenderingTest::testHideColRow()
}));
dispatchCommand(mxComponent, ".uno:SelectColumn", aArgs2);
- Scheduler::ProcessEventsToIdle();
}
SCCOL nOldCurX = ScDocShell::GetViewData()->GetCurX();
@@ -1109,7 +1104,6 @@ void ScTiledRenderingTest::testHideColRow()
{
uno::Sequence<beans::PropertyValue> aArgs;
dispatchCommand(mxComponent, ".uno:HideColumn", aArgs);
- Scheduler::ProcessEventsToIdle();
}
SCCOL nNewCurX = ScDocShell::GetViewData()->GetCurX();
@@ -1128,7 +1122,6 @@ void ScTiledRenderingTest::testHideColRow()
{ "Modifier", uno::Any(sal_uInt16(0)) }
}));
dispatchCommand(mxComponent, ".uno:SelectRow", aArgs2);
- Scheduler::ProcessEventsToIdle();
}
nOldCurX = ScDocShell::GetViewData()->GetCurX();
@@ -1136,7 +1129,6 @@ void ScTiledRenderingTest::testHideColRow()
{
uno::Sequence<beans::PropertyValue> aArgs;
dispatchCommand(mxComponent, ".uno:HideRow", aArgs);
- Scheduler::ProcessEventsToIdle();
}
nNewCurX = ScDocShell::GetViewData()->GetCurX();
nNewCurY = ScDocShell::GetViewData()->GetCurY();
@@ -1175,7 +1167,6 @@ void ScTiledRenderingTest::testInvalidateOnCopyPasteCells()
// paste cells
aView.m_bInvalidateTiles = false;
dispatchCommand(mxComponent, ".uno:Paste", aArgs);
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT(aView.m_bInvalidateTiles);
}
@@ -1200,7 +1191,6 @@ void ScTiledRenderingTest::testInvalidateOnInserRowCol()
aView.m_bInvalidateTiles = false;
aView.m_aInvalidations.clear();
dispatchCommand(mxComponent, ".uno:InsertRows", aArgs);
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT(aView.m_bInvalidateTiles);
CPPUNIT_ASSERT_EQUAL(size_t(2), aView.m_aInvalidations.size());
CPPUNIT_ASSERT_EQUAL(tools::Rectangle(-75, 51240, 32212230, 63990), aView.m_aInvalidations[0]);
@@ -1217,7 +1207,6 @@ void ScTiledRenderingTest::testInvalidateOnInserRowCol()
aView.m_bInvalidateTiles = false;
aView.m_aInvalidations.clear();
dispatchCommand(mxComponent, ".uno:InsertColumns", aArgs);
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT(aView.m_bInvalidateTiles);
CPPUNIT_ASSERT_EQUAL(size_t(2), aView.m_aInvalidations.size());
CPPUNIT_ASSERT_EQUAL(tools::Rectangle(254925, -15, 32212230, 63990), aView.m_aInvalidations[0]);
@@ -1247,7 +1236,6 @@ void ScTiledRenderingTest::testCommentCallback()
{"Author", uno::Any(OUString("LOK User1"))},
}));
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<std::string>("action"));
@@ -1278,7 +1266,6 @@ void ScTiledRenderingTest::testCommentCallback()
{"Author", uno::Any(OUString("LOK User2"))},
});
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<std::string>("action"));
@@ -1300,7 +1287,6 @@ void ScTiledRenderingTest::testCommentCallback()
{"Id", uno::Any(OUString::createFromAscii(aCommentId.c_str()))}
});
dispatchCommand(mxComponent, ".uno:DeleteNote", aArgs);
- Scheduler::ProcessEventsToIdle();
// We received a LOK_CALLBACK_COMMENT callback with comment 'Remove' action
CPPUNIT_ASSERT_EQUAL(std::string("Remove"), aView1.m_aCommentCallbackResult.get<std::string>("action"));
@@ -1344,14 +1330,12 @@ void ScTiledRenderingTest::testUndoLimiting()
// try to execute undo in view #2
SfxLokHelper::setView(nView2);
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
// check that undo has not been executed on view #2
CPPUNIT_ASSERT_EQUAL(std::size_t(1), pUndoManager->GetUndoActionCount());
// try to execute undo in view #1
SfxLokHelper::setView(nView1);
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
// check that undo has been executed on view #1
CPPUNIT_ASSERT_EQUAL(std::size_t(0), pUndoManager->GetUndoActionCount());
@@ -1361,14 +1345,12 @@ void ScTiledRenderingTest::testUndoLimiting()
// try to execute redo in view #2
SfxLokHelper::setView(nView2);
dispatchCommand(mxComponent, ".uno:Redo", {});
- Scheduler::ProcessEventsToIdle();
// check that redo has not been executed on view #2
CPPUNIT_ASSERT_EQUAL(std::size_t(1), pUndoManager->GetRedoActionCount());
// try to execute redo in view #1
SfxLokHelper::setView(nView1);
dispatchCommand(mxComponent, ".uno:Redo", {});
- Scheduler::ProcessEventsToIdle();
// check that redo has been executed on view #1
CPPUNIT_ASSERT_EQUAL(std::size_t(0), pUndoManager->GetRedoActionCount());
}
@@ -1406,7 +1388,6 @@ void ScTiledRenderingTest::testUndoRepairDispatch()
// try to execute undo in view #2
SfxLokHelper::setView(nView2);
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
// check that undo has not been executed on view #2
CPPUNIT_ASSERT_EQUAL(std::size_t(1), pUndoManager->GetUndoActionCount());
@@ -1417,7 +1398,6 @@ void ScTiledRenderingTest::testUndoRepairDispatch()
{"Repair", uno::Any(true)}
}));
dispatchCommand(mxComponent, ".uno:Undo", aPropertyValues);
- Scheduler::ProcessEventsToIdle();
// check that undo has been executed on view #2 in repair mode
CPPUNIT_ASSERT_EQUAL(std::size_t(0), pUndoManager->GetUndoActionCount());
}
@@ -1447,14 +1427,12 @@ void ScTiledRenderingTest::testInsertGraphicInvalidations()
{ "FileName", uno::Any(createFileURL(u"smile.png")) }
}));
dispatchCommand(mxComponent, ".uno:InsertGraphic", aArgs);
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT(aView.m_bInvalidateTiles);
// undo image insertion in view and see if both views are invalidated
aView.m_bInvalidateTiles = false;
uno::Sequence<beans::PropertyValue> aArgs2;
dispatchCommand(mxComponent, ".uno:Undo", aArgs2);
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT(aView.m_bInvalidateTiles);
}
@@ -1952,7 +1930,6 @@ void ScTiledRenderingTest::testInsertDeletePageInvalidation()
{ "Index", uno::Any(sal_Int32(1)) }
}));
dispatchCommand(mxComponent, ".uno:Insert", aArgs);
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT(aView1.m_bInvalidateTiles);
CPPUNIT_ASSERT_EQUAL(size_t(6), aView1.m_aInvalidations.size());
CPPUNIT_ASSERT_EQUAL(tools::Rectangle(0, 0, 1000000000, 1000000000), aView1.m_aInvalidations[0]);
@@ -1965,7 +1942,6 @@ void ScTiledRenderingTest::testInsertDeletePageInvalidation()
{ "Index", uno::Any(sal_Int32(1)) }
}));
dispatchCommand(mxComponent, ".uno:Remove", aArgs2);
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT(aView1.m_bInvalidateTiles);
CPPUNIT_ASSERT_EQUAL(size_t(5), aView1.m_aInvalidations.size());
CPPUNIT_ASSERT_EQUAL(tools::Rectangle(0, 0, 1000000000, 1000000000), aView1.m_aInvalidations[0]);
@@ -2779,7 +2755,6 @@ void ScTiledRenderingTest::testSheetViewDataCrash()
{ "Index", uno::Any(sal_Int32(2)) }
}));
dispatchCommand(mxComponent, ".uno:Insert", aArgs);
- Scheduler::ProcessEventsToIdle();
pModelObj->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, awt::Key::PAGEDOWN | KEY_MOD1);
pModelObj->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, awt::Key::PAGEDOWN | KEY_MOD1);
Scheduler::ProcessEventsToIdle();
@@ -2814,7 +2789,6 @@ void ScTiledRenderingTest::testTextBoxInsert()
{ "CreateDirectly", uno::Any(true) }
}));
dispatchCommand(mxComponent, ".uno:DrawText", aArgs);
- Scheduler::ProcessEventsToIdle();
// check if we have textbox selected
CPPUNIT_ASSERT(!aView1.m_ShapeSelection.isEmpty());
@@ -2852,7 +2826,6 @@ void ScTiledRenderingTest::testCommentCellCopyPaste()
{"Author", uno::Any(OUString("LOK Client"))},
}));
dispatchCommand(mxComponent, ".uno:InsertAnnotation", aArgs);
- Scheduler::ProcessEventsToIdle();
// We received a LOK_CALLBACK_COMMENT callback with comment 'Add' action
CPPUNIT_ASSERT_EQUAL(std::string("Add"), aView.m_aCommentCallbackResult.get<std::string>("action"));
@@ -2869,12 +2842,10 @@ void ScTiledRenderingTest::testCommentCellCopyPaste()
// Single cell(with comment) copy paste test
{
dispatchCommand(mxComponent, ".uno:Copy", aCopyPasteArgs);
- Scheduler::ProcessEventsToIdle();
pTabViewShell->SetCursor(1, 49);
Scheduler::ProcessEventsToIdle();
dispatchCommand(mxComponent, ".uno:Paste", aCopyPasteArgs); // Paste to cell B50
- Scheduler::ProcessEventsToIdle();
// We received a LOK_CALLBACK_COMMENT callback with comment 'Add' action
CPPUNIT_ASSERT_EQUAL(std::string("Add"), aView.m_aCommentCallbackResult.get<std::string>("action"));
@@ -2901,12 +2872,10 @@ void ScTiledRenderingTest::testCommentCellCopyPaste()
Scheduler::ProcessEventsToIdle();
dispatchCommand(mxComponent, ".uno:Copy", aCopyPasteArgs);
- Scheduler::ProcessEventsToIdle();
pTabViewShell->SetCursor(3, 49);
Scheduler::ProcessEventsToIdle();
dispatchCommand(mxComponent, ".uno:Paste", aCopyPasteArgs); // Paste to cell D50
- Scheduler::ProcessEventsToIdle();
// We received a LOK_CALLBACK_COMMENT callback with comment 'Add' action
CPPUNIT_ASSERT_EQUAL(std::string("Add"), aView.m_aCommentCallbackResult.get<std::string>("action"));
@@ -2946,7 +2915,6 @@ void ScTiledRenderingTest::testInvalidEntrySave()
uno::Sequence<beans::PropertyValue> aArgs;
dispatchCommand(mxComponent, ".uno:Save", aArgs);
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_MESSAGE("Should not be marked modified after save", !pDocSh->IsModified());
@@ -3010,14 +2978,12 @@ void ScTiledRenderingTest::testUndoReordering()
// try to execute undo in view #1
SfxLokHelper::setView(nView1);
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
// check that undo has been executed on view #1
CPPUNIT_ASSERT_EQUAL(std::size_t(1), pUndoManager->GetUndoActionCount());
// try to execute undo in view #2
SfxLokHelper::setView(nView2);
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
// check that undo has been executed on view #2
CPPUNIT_ASSERT_EQUAL(std::size_t(0), pUndoManager->GetUndoActionCount());
}
@@ -3087,7 +3053,6 @@ void ScTiledRenderingTest::testUndoReorderingRedo()
// View 1 presses undo, and the second cell is erased
SfxLokHelper::setView(nView1);
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(std::size_t(2), pUndoManager->GetUndoActionCount());
CPPUNIT_ASSERT_EQUAL(OUString("xx"), pDoc->GetString(ScAddress(0, 0, 0)));
CPPUNIT_ASSERT_EQUAL(OUString(""), pDoc->GetString(ScAddress(0, 1, 0)));
@@ -3107,7 +3072,6 @@ void ScTiledRenderingTest::testUndoReorderingRedo()
// View 1 presses undo again, and the first cell is erased
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(std::size_t(1), pUndoManager->GetUndoActionCount());
CPPUNIT_ASSERT_EQUAL(OUString(""), pDoc->GetString(ScAddress(0, 0, 0)));
CPPUNIT_ASSERT_EQUAL(OUString(""), pDoc->GetString(ScAddress(0, 1, 0)));
@@ -3177,7 +3141,6 @@ void ScTiledRenderingTest::testUndoReorderingMulti()
// View 1 presses undo
SfxLokHelper::setView(nView1);
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(std::size_t(2), pUndoManager->GetUndoActionCount());
CPPUNIT_ASSERT_EQUAL(OUString(""), pDoc->GetString(ScAddress(0, 0, 0)));
CPPUNIT_ASSERT_EQUAL(OUString("CC"), pDoc->GetString(ScAddress(0, 2, 0)));
diff --git a/sc/qa/unit/uicalc/uicalc.cxx b/sc/qa/unit/uicalc/uicalc.cxx
index 4976c19c17f0..42d0168aa833 100644
--- a/sc/qa/unit/uicalc/uicalc.cxx
+++ b/sc/qa/unit/uicalc/uicalc.cxx
@@ -298,12 +298,10 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf103994)
goToCell("A1");
dispatchCommand(mxComponent, ".uno:Cut", {});
- Scheduler::ProcessEventsToIdle();
goToCell("B1");
dispatchCommand(mxComponent, ".uno:Paste", {});
- Scheduler::ProcessEventsToIdle();
// Without the fix in place, this test would have failed with
// - Expected: ='file:///tmp/lu124171irlmb.tmp'#$Sheet1.A1
@@ -388,11 +386,9 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf107869)
goToCell("A1");
dispatchCommand(mxComponent, ".uno:InsertAnnotation", aArgs);
- Scheduler::ProcessEventsToIdle();
goToCell("A2");
dispatchCommand(mxComponent, ".uno:InsertAnnotation", aArgs);
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_MESSAGE("There should be a note on A1", pDoc->HasNote(ScAddress(0, 0, 0)));
CPPUNIT_ASSERT_MESSAGE("There should be a note on A2", pDoc->HasNote(ScAddress(0, 1, 0)));
@@ -400,10 +396,8 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf107869)
goToCell("A1");
dispatchCommand(mxComponent, ".uno:SelectRow", {});
- Scheduler::ProcessEventsToIdle();
dispatchCommand(mxComponent, ".uno:DeleteRows", {});
- Scheduler::ProcessEventsToIdle();
for (size_t i = 0; i < 10; ++i)
{
@@ -412,7 +406,6 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf107869)
CPPUNIT_ASSERT_MESSAGE("There should be no note on A2", !pDoc->HasNote(ScAddress(0, 1, 0)));
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(OUString("A"), pDoc->GetString(ScAddress(0, 0, 0)));
CPPUNIT_ASSERT_EQUAL(OUString("B"), pDoc->GetString(ScAddress(0, 1, 0)));
@@ -420,19 +413,15 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf107869)
CPPUNIT_ASSERT_MESSAGE("There should be a note on A2", pDoc->HasNote(ScAddress(0, 1, 0)));
dispatchCommand(mxComponent, ".uno:Redo", {});
- Scheduler::ProcessEventsToIdle();
}
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
goToCell("A1:A2");
dispatchCommand(mxComponent, ".uno:SelectRow", {});
- Scheduler::ProcessEventsToIdle();
dispatchCommand(mxComponent, ".uno:DeleteRows", {});
- Scheduler::ProcessEventsToIdle();
for (size_t i = 0; i < 10; ++i)
{
@@ -442,7 +431,6 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf107869)
CPPUNIT_ASSERT_MESSAGE("There should be no note on A2", !pDoc->HasNote(ScAddress(0, 1, 0)));
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(OUString("A"), pDoc->GetString(ScAddress(0, 0, 0)));
CPPUNIT_ASSERT_EQUAL(OUString("B"), pDoc->GetString(ScAddress(0, 1, 0)));
@@ -450,7 +438,6 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf107869)
CPPUNIT_ASSERT_MESSAGE("There should be a note on A2", pDoc->HasNote(ScAddress(0, 1, 0)));
dispatchCommand(mxComponent, ".uno:Redo", {});
- Scheduler::ProcessEventsToIdle();
}
}
@@ -497,7 +484,6 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf63805)
CPPUNIT_ASSERT_EQUAL(OUString("2014-05-31"), pDoc->GetString(ScAddress(0, 19, 0)));
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(OUString("2012-10-31"), pDoc->GetString(ScAddress(0, 0, 0)));
CPPUNIT_ASSERT_EQUAL(OUString(""), pDoc->GetString(ScAddress(0, 1, 0)));
@@ -544,16 +530,13 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf94208)
goToCell("A3:A8");
dispatchCommand(mxComponent, ".uno:SelectRow", {});
- Scheduler::ProcessEventsToIdle();
//type Control-D/Fill Down
dispatchCommand(mxComponent, ".uno:FillDown", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(0.0, pDoc->GetValue(ScAddress(0, 0, 0)));
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
// Without the fix in place, this test would have failed with
// - Expected: 1
@@ -678,13 +661,11 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf119162)
// Without the fix in place, this test would have hung here
dispatchCommand(mxComponent, ".uno:ChangeCaseRotateCase", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(OUString(u"Test" + OUStringChar(u'\xA')),
pDoc->GetString(ScAddress(0, 0, 0)));
dispatchCommand(mxComponent, ".uno:ChangeCaseToLower", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(OUString(u"test" + OUStringChar(u'\xA')),
pDoc->GetString(ScAddress(0, 0, 0)));
@@ -708,7 +689,6 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf90579)
goToCell("C1:C2");
dispatchCommand(mxComponent, ".uno:ConvertFormulaToValue", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(OUString("2310"), pDoc->GetString(ScAddress(2, 0, 0)));
CPPUNIT_ASSERT_EQUAL(OUString("LibreOffice"), pDoc->GetString(ScAddress(2, 1, 0)));
@@ -716,7 +696,6 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf90579)
CPPUNIT_ASSERT_EQUAL(OUString(""), pDoc->GetFormula(2, 1, 0));
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(OUString("2310"), pDoc->GetString(ScAddress(2, 0, 0)));
CPPUNIT_ASSERT_EQUAL(OUString("LibreOffice"), pDoc->GetString(ScAddress(2, 1, 0)));
@@ -732,7 +711,6 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf124820)
goToCell("B2");
dispatchCommand(mxComponent, ".uno:Strikeout", {});
- Scheduler::ProcessEventsToIdle();
saveAndReload("Calc Office Open XML");
pDoc = getScDoc();
@@ -755,7 +733,6 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf119155)
// Without the fix in place, this test would have hung here
dispatchCommand(mxComponent, ".uno:ChangeCaseToTitleCase", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(OUString("Collagene Expert Targeted Wrinkle Corrector Unboxed 10 Ml"),
pDoc->GetString(ScAddress(2, 1, 0)));
@@ -778,7 +755,6 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf146795)
goToCell("B2");
dispatchCommand(mxComponent, ".uno:Copy", {});
- Scheduler::ProcessEventsToIdle();
// Move to B3
ScModelObj* pModelObj = dynamic_cast<ScModelObj*>(mxComponent.get());
@@ -793,7 +769,6 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf146795)
// Without the fix in place, this test would have crashed here
dispatchCommand(mxComponent, ".uno:Paste", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(OUString("a"), pDoc->GetString(ScAddress(1, 1, 0)));
CPPUNIT_ASSERT_EQUAL(OUString("a"), pDoc->GetString(ScAddress(1, 2, 0)));
@@ -824,7 +799,6 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf147744)
goToCell("A2");
dispatchCommand(mxComponent, ".uno:Copy", {});
- Scheduler::ProcessEventsToIdle();
// Move to A3
ScModelObj* pModelObj = dynamic_cast<ScModelObj*>(mxComponent.get());
@@ -837,7 +811,6 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf147744)
// Without the fix in place, this test would have crashed here
dispatchCommand(mxComponent, ".uno:Paste", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(1.0, pDoc->GetValue(ScAddress(0, 1, 0)));
CPPUNIT_ASSERT_EQUAL(0.0, pDoc->GetValue(ScAddress(0, 2, 0)));
@@ -872,14 +845,12 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf138432)
goToCell("A1");
dispatchCommand(mxComponent, ".uno:Copy", {});
- Scheduler::ProcessEventsToIdle();
goToCell("A2");
typeString(u"=");
dispatchCommand(mxComponent, ".uno:Paste", {});
- Scheduler::ProcessEventsToIdle();
ScModelObj* pModelObj = dynamic_cast<ScModelObj*>(mxComponent.get());
pModelObj->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, awt::Key::RETURN);
@@ -1032,7 +1003,6 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf145640)
goToCell("A2:F17");
dispatchCommand(mxComponent, ".uno:SortDescending", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(OUString("=SUM(A15:B15:C15:D15:E15:F15)"), pDoc->GetFormula(6, 3, 0));
@@ -1042,7 +1012,6 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf145640)
CPPUNIT_ASSERT_EQUAL(10.0, pDoc->GetValue(ScAddress(6, 3, 0)));
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(OUString("=SUM(A4:B4:C4:D4:E4:F4)"), pDoc->GetFormula(6, 3, 0));
CPPUNIT_ASSERT_EQUAL(10.0, pDoc->GetValue(ScAddress(6, 3, 0)));
@@ -1070,12 +1039,10 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf97215)
// Without the fix in place, this test would have hung here
dispatchCommand(mxComponent, ".uno:SortAscending", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(OUString("Inserted at bottom"), pDoc->GetString(ScAddress(0, 0, 0)));
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(OUString("Inserted at bottom"), pDoc->GetString(ScAddress(0, 23, 0)));
@@ -1339,18 +1306,15 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf117706)
// Use Adding Selection
dispatchCommand(mxComponent, ".uno:StatusSelectionModeExp", {});
- Scheduler::ProcessEventsToIdle();
goToCell("A1");
dispatchCommand(mxComponent, ".uno:SelectRow", {});
- Scheduler::ProcessEventsToIdle();
dispatchCommand(mxComponent, ".uno:GoDown", {});
dispatchCommand(mxComponent, ".uno:GoDown", {});
lcl_AssertCurrentCursorPosition(*pDocSh, u"A3");
dispatchCommand(mxComponent, ".uno:SelectRow", {});
- Scheduler::ProcessEventsToIdle();
dispatchCommand(mxComponent, ".uno:Copy", {});
@@ -1406,14 +1370,11 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf149503)
ScDocument* pDoc = getScDoc();
dispatchCommand(mxComponent, ".uno:SelectAll", {});
- Scheduler::ProcessEventsToIdle();
dispatchCommand(mxComponent, ".uno:Cut", {});
- Scheduler::ProcessEventsToIdle();
// Without the fix in place, this test would have crashed here
dispatchCommand(mxComponent, ".uno:Paste", {});
- Scheduler::ProcessEventsToIdle();
ScDPCollection* pDPs = pDoc->GetDPCollection();
CPPUNIT_ASSERT_EQUAL(size_t(1), pDPs->GetCount());
@@ -1425,10 +1386,8 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf108292)
ScDocument* pDoc = getScDoc();
dispatchCommand(mxComponent, ".uno:SelectAll", {});
- Scheduler::ProcessEventsToIdle();
dispatchCommand(mxComponent, ".uno:Copy", {});
- Scheduler::ProcessEventsToIdle();
// Open a new document
createScDoc();
@@ -1436,7 +1395,6 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf108292)
// Without the fix in place, this test would have crashed
dispatchCommand(mxComponent, ".uno:Paste", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(OUString("2D"), pDoc->GetString(ScAddress(26, 0, 0)));
}
@@ -1452,18 +1410,15 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testMultiRangeCol)
// Use Adding Selection
dispatchCommand(mxComponent, ".uno:StatusSelectionModeExp", {});
- Scheduler::ProcessEventsToIdle();
goToCell("A1");
dispatchCommand(mxComponent, ".uno:SelectColumn", {});
- Scheduler::ProcessEventsToIdle();
dispatchCommand(mxComponent, ".uno:GoRight", {});
dispatchCommand(mxComponent, ".uno:GoRight", {});
lcl_AssertCurrentCursorPosition(*pDocSh, u"C1");
dispatchCommand(mxComponent, ".uno:SelectColumn", {});
- Scheduler::ProcessEventsToIdle();
dispatchCommand(mxComponent, ".uno:Copy", {});
@@ -1769,14 +1724,12 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf108654)
CPPUNIT_ASSERT_EQUAL(OUString("=VLOOKUP(C127,#REF!,D$1,0)"), aFormula);
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
aFormula = pDoc->GetFormula(3, 126, 1);
CPPUNIT_ASSERT_EQUAL(OUString(""), aFormula);
CPPUNIT_ASSERT_EQUAL(static_cast<SCTAB>(2), pDoc->GetTableCount());
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(static_cast<SCTAB>(1), pDoc->GetTableCount());
}
@@ -1838,19 +1791,16 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf133326)
CPPUNIT_ASSERT_EQUAL(static_cast<SCTAB>(2), pDoc->GetTableCount());
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
aFormula = pDoc->GetFormula(0, 0, 1);
CPPUNIT_ASSERT_EQUAL(OUString(""), aFormula);
CPPUNIT_ASSERT_EQUAL(static_cast<SCTAB>(2), pDoc->GetTableCount());
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(static_cast<SCTAB>(1), pDoc->GetTableCount());
dispatchCommand(mxComponent, ".uno:Redo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(static_cast<SCTAB>(2), pDoc->GetTableCount());
aFormula = pDoc->GetFormula(0, 0, 1);
@@ -1858,7 +1808,6 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf133326)
// Without the fix in place, it would have crashed here
dispatchCommand(mxComponent, ".uno:Redo", {});
- Scheduler::ProcessEventsToIdle();
aFormula = pDoc->GetFormula(0, 0, 1);
CPPUNIT_ASSERT_EQUAL(OUString("=RAND()*1000000"), aFormula);
@@ -1872,7 +1821,6 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf126685)
ScDocument* pDoc = getScDoc();
dispatchCommand(mxComponent, ".uno:SelectAll", {}); // test should crash here without the fix
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(
OUString("Control Height will change from 0.65 to 0.61 cm with 120dpi ..."),
@@ -1910,13 +1858,11 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf119793)
Scheduler::ProcessEventsToIdle();
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(5084), xShape->getPosition().X);
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1381), xShape->getPosition().Y);
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
// Without the fix in place, this test would have failed with
// - Expected: 4984
@@ -2007,15 +1953,12 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf124818)
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), pPage->GetObjCount());
dispatchCommand(mxComponent, ".uno:SelectAll", {});
- Scheduler::ProcessEventsToIdle();
dispatchCommand(mxComponent, ".uno:Cut", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(0), pPage->GetObjCount());
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), pPage->GetObjCount());
}
@@ -2177,14 +2120,12 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf124822)
CPPUNIT_ASSERT_EQUAL(OUString("X"), pDoc->GetString(ScAddress(0, 0, 2)));
dispatchCommand(mxComponent, ".uno:SelectAll", {});
- Scheduler::ProcessEventsToIdle();
dispatchCommand(mxComponent, ".uno:Cut", {});
CPPUNIT_ASSERT_EQUAL(OUString(""), pDoc->GetString(ScAddress(0, 0, 2)));
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(OUString("X"), pDoc->GetString(ScAddress(0, 0, 2)));
}
@@ -2216,7 +2157,6 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf118189)
// Without the fix in place, this test would have crashed here
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
aFormula = pDoc->GetFormula(0, 77, 0);
CPPUNIT_ASSERT_EQUAL(OUString("=FALSE()"), aFormula);
@@ -2260,13 +2200,11 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf118207)
CPPUNIT_ASSERT_EQUAL(OUString("=FALSE()"), aFormula);
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
aFormula = pDoc->GetFormula(1, 77, 0);
CPPUNIT_ASSERT_EQUAL(OUString("=FALSE()"), aFormula);
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
aFormula = pDoc->GetFormula(1, 77, 0);
CPPUNIT_ASSERT_EQUAL(OUString(""), aFormula);
@@ -2274,7 +2212,6 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf118207)
CPPUNIT_ASSERT_EQUAL(OUString(""), aFormula);
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
aFormula = pDoc->GetFormula(0, 77, 0);
CPPUNIT_ASSERT_EQUAL(OUString("=FALSE()"), aFormula);
@@ -2303,7 +2240,6 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf124778)
uno::Sequence<beans::PropertyValue> aArgs
= comphelper::InitPropertySequence({ { "Text", uno::Any(OUString("Comment")) } });
dispatchCommand(mxComponent, ".uno:InsertAnnotation", aArgs);
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_MESSAGE("There should be a note on A1", pDoc->HasNote(ScAddress(0, 0, 0)));
@@ -2328,7 +2264,6 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf138428)
uno::Sequence<beans::PropertyValue> aArgs
= comphelper::InitPropertySequence({ { "Text", uno::Any(OUString("Comment")) } });
dispatchCommand(mxComponent, ".uno:InsertAnnotation", aArgs);
- Scheduler::ProcessEventsToIdle();
ScDocument* pDoc = getScDoc();
CPPUNIT_ASSERT_MESSAGE("There should be a note on A1", pDoc->HasNote(ScAddress(0, 0, 0)));
@@ -2346,25 +2281,21 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf138428)
// Without the fix in place, this test would have crashed here
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_MESSAGE("There should be a note on A1", pDoc->HasNote(ScAddress(0, 0, 0)));
CPPUNIT_ASSERT_MESSAGE("There shouldn't be a note on B1", !pDoc->HasNote(ScAddress(1, 0, 0)));
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_MESSAGE("There shouldn't be a note on A1", !pDoc->HasNote(ScAddress(0, 0, 0)));
CPPUNIT_ASSERT_MESSAGE("There shouldn't be a note on B1", !pDoc->HasNote(ScAddress(1, 0, 0)));
dispatchCommand(mxComponent, ".uno:Redo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_MESSAGE("There should be a note on A1", pDoc->HasNote(ScAddress(0, 0, 0)));
CPPUNIT_ASSERT_MESSAGE("There shouldn't be a note on B1", !pDoc->HasNote(ScAddress(1, 0, 0)));
dispatchCommand(mxComponent, ".uno:Redo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_MESSAGE("There should be a note on A1", pDoc->HasNote(ScAddress(0, 0, 0)));
CPPUNIT_ASSERT_MESSAGE("There should be a note on B1", pDoc->HasNote(ScAddress(1, 0, 0)));
@@ -2406,7 +2337,6 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf130614)
lcl_SelectObjectByName(*getViewShell(), u"Object 1");
dispatchCommand(mxComponent, ".uno:Copy", {});
- Scheduler::ProcessEventsToIdle();
// Open a new document
createScDoc();
@@ -2414,7 +2344,6 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf130614)
// Without the fix in place, this test would have crashed here
dispatchCommand(mxComponent, ".uno:Paste", {});
- Scheduler::ProcessEventsToIdle();
ScDrawLayer* pDrawLayer = pDoc->GetDrawLayer();
SdrPage* pPage = pDrawLayer->GetPage(0);
@@ -2672,13 +2601,11 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf134675)
goToCell("A:A");
dispatchCommand(mxComponent, ".uno:Copy", {});
- Scheduler::ProcessEventsToIdle();
// Select column B to Z
goToCell("B:Z");
dispatchCommand(mxComponent, ".uno:Paste", {});
- Scheduler::ProcessEventsToIdle();
for (size_t i = 1; i < 24; ++i)
{
@@ -2777,7 +2704,6 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf107952)
goToCell("D10");
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
// Without the fix in place, this test would have failed with
// - Expected: 1
@@ -2788,7 +2714,6 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf107952)
goToCell("D10");
dispatchCommand(mxComponent, ".uno:Redo", {});
- Scheduler::ProcessEventsToIdle();
lcl_AssertCurrentCursorPosition(*pDocSh, u"B1");
}
@@ -2825,13 +2750,11 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf144022)
goToCell("A5:B79");
dispatchCommand(mxComponent, ".uno:Copy", {});
- Scheduler::ProcessEventsToIdle();
goToCell("D5");
//Without the fix in place, this test would have crashed
dispatchCommand(mxComponent, ".uno:PasteTransposed", {});
- Scheduler::ProcessEventsToIdle();
for (size_t i = 3; i < 76; ++i)
{
@@ -2851,12 +2774,10 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf99386)
goToCell("A1:B1");
dispatchCommand(mxComponent, ".uno:ToggleMergeCells", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(OUString("0"), pDoc->GetString(ScAddress(1, 1, 0)));
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(OUString("This"), pDoc->GetString(ScAddress(1, 0, 0)));
@@ -2916,7 +2837,6 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf152014)
goToCell("A1");
dispatchCommand(mxComponent, ".uno:Copy", {});
- Scheduler::ProcessEventsToIdle();
// Create a second document
mxComponent2 = loadFromDesktop("private:factory/scalc");
@@ -2925,7 +2845,6 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf152014)
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2), xFrames->getCount());
dispatchCommand(mxComponent2, ".uno:Paste", {});
- Scheduler::ProcessEventsToIdle();
ScModelObj* pModelObj2 = dynamic_cast<ScModelObj*>(mxComponent2.get());
CPPUNIT_ASSERT(pModelObj2);
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 67f81fa7be04..ad1c2564419b 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<sal_Int32>(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<std::string>("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<std::string>("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<std::string>("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<std::string>("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<std::string>("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<std::string>("action"));
CPPUNIT_ASSERT_EQUAL(std::string("Comment"), aView1.m_aCommentCallbackResult.get<std::string>("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<std::string>("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<std::string>("action"));
CPPUNIT_ASSERT_EQUAL(std::string("Comment"), aView1.m_aCommentCallbackResult.get<std::string>("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<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
@@ -2344,7 +2325,6 @@ void SdTiledRenderingTest::testTdf115783()
{ "FontHeight.Height", uno::Any(static_cast<float>(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<beans::PropertyValue>());
- 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<beans::PropertyValue>());
- 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<beans::PropertyValue>());
- Scheduler::ProcessEventsToIdle();
// Selection is removed
CPPUNIT_ASSERT_EQUAL(static_cast<std::size_t>(0), m_aSelection.size());
@@ -2558,7 +2533,6 @@ void SdTiledRenderingTest::testRegenerateDiagram()
// regenerate diagram
dispatchCommand(mxComponent, ".uno:RegenerateDiagram", uno::Sequence<beans::PropertyValue>());
- Scheduler::ProcessEventsToIdle();
// diagram content (child shape count) should be the same as in the beginning
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(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<beans::PropertyValue>());
- 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<beans::PropertyValue>());
- 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 f85c977ee514..d193e45d0280 100644
--- a/sd/qa/unit/uiimpress.cxx
+++ b/sd/qa/unit/uiimpress.cxx
@@ -160,7 +160,6 @@ void SdUiImpressTest::lcl_search(const OUString& rKey, bool bFindAll, bool bBack
}));
dispatchCommand(mxComponent, ".uno:ExecuteSearch", aPropertyValues);
- Scheduler::ProcessEventsToIdle();
}
CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf111522)
@@ -263,7 +262,6 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf124708)
createSdImpressDoc("tdf124708.ppt");
dispatchCommand(mxComponent, ".uno:NextPage", {});
- Scheduler::ProcessEventsToIdle();
checkCurrentPageNumber(2);
@@ -273,16 +271,13 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf124708)
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(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<size_t>(0), pActualPage->GetObjCount());
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(16), pActualPage->GetObjCount());
}
@@ -387,16 +382,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());
}
@@ -441,7 +432,6 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf126605)
createSdImpressDoc();
dispatchCommand(mxComponent, ".uno:InsertPage", {});
- Scheduler::ProcessEventsToIdle();
insertStringToObject(0, u"Test", /*bUseEscape*/ false);
@@ -468,13 +458,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);
@@ -485,15 +473,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();
@@ -508,15 +493,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);
}
@@ -534,7 +516,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());
@@ -545,7 +526,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());
@@ -554,7 +534,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());
}
@@ -563,20 +542,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());
}
@@ -610,52 +586,42 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf148620)
uno::Sequence<beans::PropertyValue> 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());
}
@@ -670,7 +636,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++)
@@ -726,12 +691,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<size_t>(3), pActualPage->GetObjCount());
dispatchCommand(mxComponent, ".uno:DuplicatePage", aArgs);
- Scheduler::ProcessEventsToIdle();
checkCurrentPageNumber(2);
@@ -858,7 +821,6 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf38669)
uno::Sequence<beans::PropertyValue> aArgs(
comphelper::InitPropertySequence({ { "KeyModifier", uno::Any(KEY_MOD1) } }));
dispatchCommand(mxComponent, ".uno:BasicShapes.rectangle", aArgs);
- Scheduler::ProcessEventsToIdle();
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
@@ -893,7 +855,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());
}
@@ -908,7 +869,6 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf123841)
uno::Sequence<beans::PropertyValue> aArgs(
comphelper::InitPropertySequence({ { "KeyModifier", uno::Any(KEY_MOD1) } }));
dispatchCommand(mxComponent, ".uno:Rect_Unfilled", aArgs);
- Scheduler::ProcessEventsToIdle();
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
@@ -995,13 +955,11 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testCharColorTheme)
xController->select(uno::Any(xShape));
Scheduler::ProcessEventsToIdle();
dispatchCommand(mxComponent, ".uno:Text", {});
- Scheduler::ProcessEventsToIdle();
auto pImpressDocument = dynamic_cast<SdXImpressDocument*>(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<beans::PropertyValue> aColorArgs = {
@@ -1011,7 +969,6 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testCharColorTheme)
comphelper::makePropertyValue("ColorLumOff", static_cast<sal_Int16>(8000)),
};
dispatchCommand(mxComponent, ".uno:Color", aColorArgs);
- Scheduler::ProcessEventsToIdle();
// Then make sure the theme "metadata" is set in the document model:
pView->EndTextEditCurrentView();
@@ -1057,7 +1014,6 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testFillColorTheme)
comphelper::makePropertyValue("ColorLumOff", static_cast<sal_Int16>(6000)),
};
dispatchCommand(mxComponent, ".uno:FillColor", aColorArgs);
- Scheduler::ProcessEventsToIdle();
// Then make sure the theme index is not lost when the sidebar sets it:
sal_Int16 nFillColorTheme{};
@@ -1100,7 +1056,6 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf127696)
createSdImpressDoc();
dispatchCommand(mxComponent, ".uno:InsertPage", {});
- Scheduler::ProcessEventsToIdle();
insertStringToObject(0, u"Test", /*bUseEscape*/ false);
dispatchCommand(mxComponent, ".uno:SelectAll", {});
diff --git a/sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx b/sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx
index e412c8249a65..235a5ccaf757 100644
--- a/sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx
+++ b/sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx
@@ -334,7 +334,6 @@ CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, testOnlineNodeSplitAppend)
// Undo second change
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(OUString("He heard quiet steps behind him. "),
getParagraph(1)->getString());
CPPUNIT_ASSERT_EQUAL(OUString("That didn't bode well. Who could be following him this late at "
@@ -351,7 +350,6 @@ CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, testOnlineNodeSplitAppend)
// Undo first change
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(sal_Int32(2),
pDoc->getOnlineAccessibilityCheck()->getNumberOfAccessibilityIssues());
CPPUNIT_ASSERT_EQUAL(
diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx
index 587fa4d4294e..e926194560d5 100644
--- a/sw/qa/extras/layout/layout.cxx
+++ b/sw/qa/extras/layout/layout.cxx
@@ -3691,7 +3691,6 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testKeepWithNextPlusFlyFollowTextFlow)
}
dispatchCommand(mxComponent, ".uno:Fieldnames", {});
- Scheduler::ProcessEventsToIdle();
{
xmlDocUniquePtr pXmlDoc = parseLayoutDump();
@@ -3709,7 +3708,6 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testKeepWithNextPlusFlyFollowTextFlow)
}
dispatchCommand(mxComponent, ".uno:Fieldnames", {});
- Scheduler::ProcessEventsToIdle();
{
xmlDocUniquePtr pXmlDoc = parseLayoutDump();
diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx b/sw/qa/extras/tiledrendering/tiledrendering.cxx
index e39dc418f8a2..40d8316b857b 100644
--- a/sw/qa/extras/tiledrendering/tiledrendering.cxx
+++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx
@@ -1210,7 +1210,6 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, testUndoReordering)
// When view 1 presses undo:
SfxLokHelper::setView(nView1);
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
// Then make sure view 1's last undo action is invoked, out of order:
// Without the accompanying fix in place, this test would have failed with:
@@ -1260,11 +1259,9 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, testUndoReorderingRedo)
// When view 1 presses undo, twice:
SfxLokHelper::setView(nView1);
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
// First just s(econd) is erased:
CPPUNIT_ASSERT_EQUAL(OUString("f"), pTextNode1->GetText());
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
// Then make sure view 1's undo actions are invoked, out of order:
// Without the accompanying fix in place, this test would have failed with:
@@ -1314,7 +1311,6 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, testUndoReorderingMulti)
// When view 1 presses undo:
SfxLokHelper::setView(nView1);
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
// Then make sure view 1's undo action is invoked, out of order:
// Without the accompanying fix in place, this test would have failed with:
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index 5b35941729a1..be0cb790990a 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -1488,7 +1488,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testTdf137532)
CPPUNIT_ASSERT_EQUAL(awt::FontWeight::BOLD, getProperty<float>(xCursor, "CharWeight"));
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
xCursor.set(xText->createTextCursorByRange(getRun(getParagraph(1), 1)));
CPPUNIT_ASSERT(xCursor.is());
@@ -1500,7 +1499,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testTdf137532)
CPPUNIT_ASSERT_EQUAL(awt::FontWeight::BOLD, getProperty<float>(xCursor, "CharWeight"));
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
xCursor.set(xText->createTextCursorByRange(getRun(getParagraph(1), 1)));
CPPUNIT_ASSERT(xCursor.is());
diff --git a/sw/qa/extras/uiwriter/uiwriter2.cxx b/sw/qa/extras/uiwriter/uiwriter2.cxx
index 0959e88efcee..622512119faf 100644
--- a/sw/qa/extras/uiwriter/uiwriter2.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter2.cxx
@@ -457,7 +457,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf134250)
// this would crash in 2 different ways
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTables->getCount());
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xSections->getCount());
@@ -467,13 +466,11 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf134250)
xTextContent->getAnchor()->getString());
dispatchCommand(mxComponent, ".uno:Redo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTables->getCount());
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xSections->getCount());
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTables->getCount());
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xSections->getCount());
@@ -481,7 +478,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf134250)
xTextContent->getAnchor()->getString());
dispatchCommand(mxComponent, ".uno:Redo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTables->getCount());
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xSections->getCount());
@@ -517,14 +513,12 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf134436)
// first, the section doesn't get deleted
dispatchCommand(mxComponent, ".uno:Delete", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xTables->getCount());
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xSections->getCount());
CPPUNIT_ASSERT_EQUAL(OUString(""), pWrtShell->GetCursor()->GetText());
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTables->getCount());
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xSections->getCount());
@@ -532,14 +526,12 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf134436)
// second, the section does get deleted because point is at the end
dispatchCommand(mxComponent, ".uno:Delete", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xTables->getCount());
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xSections->getCount());
CPPUNIT_ASSERT_EQUAL(OUString(""), pWrtShell->GetCursor()->GetText());
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTables->getCount());
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xSections->getCount());
@@ -547,21 +539,18 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf134436)
// the problem was that the section was not deleted on Redo
dispatchCommand(mxComponent, ".uno:Redo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xTables->getCount());
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xSections->getCount());
CPPUNIT_ASSERT_EQUAL(OUString(""), pWrtShell->GetCursor()->GetText());
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTables->getCount());
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xSections->getCount());
CPPUNIT_ASSERT_EQUAL(OUString("a\nb\n"), pWrtShell->GetCursor()->GetText());
dispatchCommand(mxComponent, ".uno:Redo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xTables->getCount());
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xSections->getCount());
@@ -592,7 +581,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf134252)
xCursor->getString());
dispatchCommand(mxComponent, ".uno:Delete", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xTables->getCount());
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xSections->getCount());
@@ -600,7 +588,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf134252)
// this would crash
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTables->getCount());
CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xSections->getCount());
@@ -608,14 +595,12 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf134252)
xCursor->getString());
dispatchCommand(mxComponent, ".uno:Redo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xTables->getCount());
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xSections->getCount());
CPPUNIT_ASSERT_EQUAL(OUString(""), xCursor->getString());
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTables->getCount());
CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xSections->getCount());
@@ -623,7 +608,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf134252)
xCursor->getString());
dispatchCommand(mxComponent, ".uno:Redo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xTables->getCount());
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xSections->getCount());
diff --git a/sw/qa/extras/uiwriter/uiwriter3.cxx b/sw/qa/extras/uiwriter/uiwriter3.cxx
index 4cc56c2342ba..d8ce0a3c7be8 100644
--- a/sw/qa/extras/uiwriter/uiwriter3.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter3.cxx
@@ -47,17 +47,14 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf145731)
CPPUNIT_ASSERT_EQUAL(1, getPages());
dispatchCommand(mxComponent, ".uno:SelectAll", {});
- Scheduler::ProcessEventsToIdle();
dispatchCommand(mxComponent, ".uno:Cut", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(0, getShapes());
CPPUNIT_ASSERT_EQUAL(1, getPages());
// Without the fix in place, this test would have crashed here
dispatchCommand(mxComponent, ".uno:Paste", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(9, getShapes());
CPPUNIT_ASSERT_EQUAL(1, getPages());
@@ -70,36 +67,29 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf147199)
CPPUNIT_ASSERT_EQUAL(7, getShapes());
dispatchCommand(mxComponent, ".uno:SelectAll", {});
- Scheduler::ProcessEventsToIdle();
dispatchCommand(mxComponent, ".uno:Cut", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(0, getShapes());
dispatchCommand(mxComponent, ".uno:Paste", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(7, getShapes());
dispatchCommand(mxComponent, ".uno:Paste", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(14, getShapes());
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(7, getShapes());
// Without the fix in place, this test would have crashed here
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(0, getShapes());
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(7, getShapes());
}
@@ -111,16 +101,13 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf139843)
int nPages = getPages();
dispatchCommand(mxComponent, ".uno:SelectAll", {});
- Scheduler::ProcessEventsToIdle();
dispatchCommand(mxComponent, ".uno:Cut", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(1, getPages());
// Without the fix in place, this test would have crashed here
dispatchCommand(mxComponent, ".uno:Paste", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(nPages, getPages());
}
@@ -131,10 +118,8 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf146848)
createSwDoc("tdf77014.odt");
dispatchCommand(mxComponent, ".uno:SelectAll", {});
- Scheduler::ProcessEventsToIdle();
dispatchCommand(mxComponent, ".uno:Cut", {});
- Scheduler::ProcessEventsToIdle();
uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XEnumerationAccess> xFieldsAccess(
@@ -144,7 +129,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf146848)
// Without the fix in place, this test would have crashed here
dispatchCommand(mxComponent, ".uno:Paste", {});
- Scheduler::ProcessEventsToIdle();
xFields = xFieldsAccess->createEnumeration();
@@ -165,29 +149,24 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf149507)
CPPUNIT_ASSERT_EQUAL(1, getPages());
dispatchCommand(mxComponent, ".uno:SelectAll", {});
- Scheduler::ProcessEventsToIdle();
dispatchCommand(mxComponent, ".uno:Cut", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(0, getShapes());
CPPUNIT_ASSERT_EQUAL(1, getPages());
dispatchCommand(mxComponent, ".uno:Paste", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(1, getShapes());
CPPUNIT_ASSERT_EQUAL(1, getPages());
// Without the fix in place, this test would have crashed here
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(0, getShapes());
CPPUNIT_ASSERT_EQUAL(1, getPages());
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(1, getShapes());
CPPUNIT_ASSERT_EQUAL(1, getPages());
@@ -198,7 +177,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf114973)
createSwDoc("tdf114973.fodt");
dispatchCommand(mxComponent, ".uno:SelectAll", {});
- Scheduler::ProcessEventsToIdle();
SwDoc* const pDoc = getSwDoc();
SwWrtShell* const pWrtShell = pDoc->GetDocShell()->GetWrtShell();
@@ -206,18 +184,15 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf114973)
CPPUNIT_ASSERT(!pWrtShell->IsInHeaderFooter());
dispatchCommand(mxComponent, ".uno:Copy", {});
- Scheduler::ProcessEventsToIdle();
// check that hidden paragraphs at start and end are deleted
dispatchCommand(mxComponent, ".uno:Delete", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(int(1), getParagraphs());
CPPUNIT_ASSERT_EQUAL(OUString(), getParagraph(1)->getString());
// check that hidden paragraphs at start and end are copied
dispatchCommand(mxComponent, ".uno:Paste", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(int(3), getParagraphs());
CPPUNIT_ASSERT_EQUAL(OUString("hidden first paragraph"), getParagraph(1)->getString());
@@ -235,17 +210,14 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf145321)
CPPUNIT_ASSERT_EQUAL(3, getPages());
dispatchCommand(mxComponent, ".uno:SelectAll", {});
- Scheduler::ProcessEventsToIdle();
dispatchCommand(mxComponent, ".uno:Cut", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(0, getShapes());
CPPUNIT_ASSERT_EQUAL(1, getPages());
// Without the fix in place, this test would have crashed here
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(3, getShapes());
CPPUNIT_ASSERT_EQUAL(3, getPages());
@@ -696,15 +668,12 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf138482)
CPPUNIT_ASSERT_EQUAL(2, getShapes());
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(0, getShapes());
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(2, getShapes());
}
@@ -720,16 +689,13 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf134965)
for (sal_Int32 i = 0; i < 10; ++i)
{
dispatchCommand(mxComponent, ".uno:SelectAll", {});
- Scheduler::ProcessEventsToIdle();
dispatchCommand(mxComponent, ".uno:Cut", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xIndexAccess->getCount());
// Without the fix in place, this test would have crashed here
dispatchCommand(mxComponent, ".uno:Paste", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xIndexAccess->getCount());
}
@@ -747,11 +713,9 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf128375)
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
dispatchCommand(mxComponent, ".uno:SelectAll", {});
- Scheduler::ProcessEventsToIdle();
// Without the fix in place, this test would have crashed cutting the second document
dispatchCommand(mxComponent, ".uno:Cut", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xIndexAccess->getCount());
}
@@ -768,15 +732,12 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf135061)
CPPUNIT_ASSERT_EQUAL(4, getShapes());
dispatchCommand(mxComponent, ".uno:SelectAll", {});
- Scheduler::ProcessEventsToIdle();
dispatchCommand(mxComponent, ".uno:Copy", {});
- Scheduler::ProcessEventsToIdle();
for (sal_Int32 i = 0; i < 5; ++i)
{
dispatchCommand(mxComponent, ".uno:Paste", {});
- Scheduler::ProcessEventsToIdle();
}
CPPUNIT_ASSERT_EQUAL(sal_Int32(6), xIndexAccess->getCount());
@@ -786,7 +747,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf135061)
{
// Without the fix in place, this test would have crashed here
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
}
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
@@ -828,12 +788,10 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf132911)
CPPUNIT_ASSERT_EQUAL(8, getShapes());
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
CPPUNIT_ASSERT_EQUAL(4, getShapes());
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xIndexAccess->getCount());
CPPUNIT_ASSERT_EQUAL(0, getShapes());
@@ -848,18 +806,15 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf132911)
CPPUNIT_ASSERT_EQUAL(8, getShapes());
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
CPPUNIT_ASSERT_EQUAL(4, getShapes());
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xIndexAccess->getCount());
CPPUNIT_ASSERT_EQUAL(0, getShapes());
//tdf#135247: Without the fix in place, this would have crashed
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
CPPUNIT_ASSERT_EQUAL(4, getShapes());
}
@@ -911,7 +866,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf124904)
// remove the first word "Heading" (with change tracking) to update the referenced text
dispatchCommand(mxComponent, ".uno:DelToEndOfWord", {});
- Scheduler::ProcessEventsToIdle();
// This was "Reference to Heading of document file"
CPPUNIT_ASSERT_EQUAL(OUString("Reference to of example document "),
@@ -919,7 +873,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf124904)
// don't hide the wholly deleted referenced text
dispatchCommand(mxComponent, ".uno:DelToEndOfLine", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(OUString("Reference to Heading of example document file"),
getParagraph(2)->getString());
}
@@ -952,22 +905,18 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf134404)
CPPUNIT_ASSERT_EQUAL(1, getPages());
dispatchCommand(mxComponent, ".uno:GoToEndOfPage", {});
- Scheduler::ProcessEventsToIdle();
dispatchCommand(mxComponent, ".uno:InsertPagebreak", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(1, getShapes());
CPPUNIT_ASSERT_EQUAL(2, getPages());
dispatchCommand(mxComponent, ".uno:SwBackspace", {});
- Scheduler::ProcessEventsToIdle();
// Without the fix in place, the image would have been deleted
CPPUNIT_ASSERT_EQUAL(1, getShapes());
CPPUNIT_ASSERT_EQUAL(1, getPages());
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(1, getShapes());
CPPUNIT_ASSERT_EQUAL(2, getPages());
}
@@ -996,15 +945,12 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf132321)
CPPUNIT_ASSERT_EQUAL(1, getShapes());
dispatchCommand(mxComponent, ".uno:GoToEndOfPage", {});
- Scheduler::ProcessEventsToIdle();
dispatchCommand(mxComponent, ".uno:SwBackspace", {});
- Scheduler::ProcessEventsToIdle();
// Without the fix in place, the button form would have also been deleted
CPPUNIT_ASSERT_EQUAL(1, getShapes());
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(1, getShapes());
}
@@ -1048,11 +994,9 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf132597)
{ { "SelectedFormat", uno::Any(static_cast<sal_uInt32>(SotClipboardFormatId::RTF)) } });
dispatchCommand(mxComponent, ".uno:ClipboardFormatItems", aPropertyValues);
- Scheduler::ProcessEventsToIdle();
// Without the fix in place, this test would have crashed here
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(1, getShapes());
CPPUNIT_ASSERT_EQUAL(1, getPages());
@@ -1076,11 +1020,9 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf139737)
{ { "SelectedFormat", uno::Any(static_cast<sal_uInt32>(SotClipboardFormatId::RTF)) } });
dispatchCommand(mxComponent, ".uno:ClipboardFormatItems", aPropertyValues);
- Scheduler::ProcessEventsToIdle();
// Without the fix in place, this test would have crashed here
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
}
CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf150845)
@@ -1092,7 +1034,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf150845)
uno::Sequence<beans::PropertyValue> aArgs(
comphelper::InitPropertySequence({ { "KeyModifier", uno::Any(KEY_MOD1) } }));
dispatchCommand(mxComponent, ".uno:Edit", aArgs);
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(1, getShapes());
}
@@ -1213,7 +1154,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf144840)
{ { "SelectedFormat", uno::Any(static_cast<sal_uInt32>(SotClipboardFormatId::RTF)) } });
dispatchCommand(mxComponent, ".uno:ClipboardFormatItems", aPropertyValues);
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
@@ -1248,7 +1188,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf131963)
{ { "SelectedFormat", uno::Any(static_cast<sal_uInt32>(SotClipboardFormatId::RTF)) } });
dispatchCommand(mxComponent, ".uno:ClipboardFormatItems", aPropertyValues);
- Scheduler::ProcessEventsToIdle();
// Without the fix in place, this test would have crashed here
@@ -1274,11 +1213,9 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf132596)
{ { "SelectedFormat", uno::Any(static_cast<sal_uInt32>(SotClipboardFormatId::RTF)) } });
dispatchCommand(mxComponent, ".uno:ClipboardFormatItems", aPropertyValues);
- Scheduler::ProcessEventsToIdle();
// Without the fix in place, this test would have crashed here
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(2, getPages());
}
@@ -1322,15 +1259,12 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf133967)
dispatchCommand(mxComponent, ".uno:SelectAll", {});
dispatchCommand(mxComponent, ".uno:Cut", {});
- Scheduler::ProcessEventsToIdle();
for (sal_Int32 i = 0; i < 10; ++i)
{
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
dispatchCommand(mxComponent, ".uno:Redo", {});
- Scheduler::ProcessEventsToIdle();
}
// Without the fix in place, this test would have failed with:
@@ -1383,27 +1317,22 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf130094)
pWrtShell->Down(/*bSelect=*/true);
dispatchCommand(mxComponent, ".uno:Copy", {});
- Scheduler::ProcessEventsToIdle();
dispatchCommand(mxComponent, ".uno:SelectAll", {});
- Scheduler::ProcessEventsToIdle();
dispatchCommand(mxComponent, ".uno:Paste", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(OUString("First"), getParagraph(1)->getString());
CPPUNIT_ASSERT_EQUAL(OUString("Second"), getParagraph(2)->getString());
CPPUNIT_ASSERT_EQUAL(OUString(""), getParagraph(3)->getString());
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(OUString("First"), getParagraph(1)->getString());
CPPUNIT_ASSERT_EQUAL(OUString("Second"), getParagraph(2)->getString());
CPPUNIT_ASSERT_EQUAL(OUString("Third"), getParagraph(3)->getString());
dispatchCommand(mxComponent, ".uno:Paste", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(OUString("First"), getParagraph(1)->getString());
CPPUNIT_ASSERT_EQUAL(OUString("Second"), getParagraph(2)->getString());
@@ -1660,17 +1589,14 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf141175)
dispatchCommand(mxComponent, ".uno:SelectAll", {});
dispatchCommand(mxComponent, ".uno:SelectAll", {});
dispatchCommand(mxComponent, ".uno:SelectAll", {});
- Scheduler::ProcessEventsToIdle();
//Without the fix in place, this test would have crashed here
dispatchCommand(mxComponent, ".uno:Cut", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
CPPUNIT_ASSERT_EQUAL(1, getPages());
dispatchCommand(mxComponent, ".uno:Paste", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xIndexAccess->getCount());
CPPUNIT_ASSERT_EQUAL(1, getPages());
@@ -1720,7 +1646,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf126504)
xTransfer->Copy();
dispatchCommand(mxComponent, ".uno:GoToEndOfPage", {});
- Scheduler::ProcessEventsToIdle();
TransferableDataHelper aHelper(xTransfer);
SwTransferable::Paste(*pWrtShell, aHelper);
@@ -1730,20 +1655,17 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf126504)
CPPUNIT_ASSERT_EQUAL(1, getPages());
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xIndexAccess->getCount());
CPPUNIT_ASSERT_EQUAL(1, getPages());
dispatchCommand(mxComponent, ".uno:Redo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(sal_Int32(4), xIndexAccess->getCount());
CPPUNIT_ASSERT_EQUAL(1, getPages());
//Without the fix in place, it would have crashed here
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xIndexAccess->getCount());
CPPUNIT_ASSERT_EQUAL(1, getPages());
@@ -1799,7 +1721,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf134253)
//Without the fix in place, it would have crashed here
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xIndexAccess->getCount());
CPPUNIT_ASSERT_EQUAL(6, getPages());
@@ -1863,9 +1784,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf140975)
// Set the Anchor of the shape to As_Char
dispatchCommand(mxComponent, ".uno:JumpToNextFrame", {});
- Scheduler::ProcessEventsToIdle();
dispatchCommand(mxComponent, ".uno:SetAnchorToChar", {});
- Scheduler::ProcessEventsToIdle();
// Get the layout of the textbox
auto pExportDump = parseLayoutDump();
@@ -1967,10 +1886,8 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf140828)
uno::Reference<beans::XPropertySet> ShpProps(xShp, uno::UNO_QUERY_THROW);
dispatchCommand(mxComponent, ".uno:JumpToNextFrame", {});
- Scheduler::ProcessEventsToIdle();
dispatchCommand(mxComponent, ".uno:SetAnchorAtChar", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(
text::TextContentAnchorType::TextContentAnchorType_AT_CHARACTER,
@@ -1995,11 +1912,9 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf132725)
CPPUNIT_ASSERT_EQUAL(OUString("AA"), getParagraph(1)->getString());
dispatchCommand(mxComponent, ".uno:GoToEndOfPara", {});
- Scheduler::ProcessEventsToIdle();
dispatchCommand(mxComponent, ".uno:SwBackspace", {});
dispatchCommand(mxComponent, ".uno:SwBackspace", {});
- Scheduler::ProcessEventsToIdle();
// tdf#137587 fly is no longer deleted by backspace
CPPUNIT_ASSERT_EQUAL(1, getShapes());
@@ -2007,14 +1922,12 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf132725)
dispatchCommand(mxComponent, ".uno:Undo", {});
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(1, getShapes());
CPPUNIT_ASSERT_EQUAL(OUString("AA"), getParagraph(1)->getString());
dispatchCommand(mxComponent, ".uno:Redo", {});
dispatchCommand(mxComponent, ".uno:Redo", {});
- Scheduler::ProcessEventsToIdle();
// tdf#137587 fly is no longer deleted by backspace
CPPUNIT_ASSERT_EQUAL(1, getShapes());
@@ -2022,7 +1935,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf132725)
//Without the fix in place, it would crash here
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(1, getShapes());
CPPUNIT_ASSERT_EQUAL(OUString("A"), getParagraph(1)->getString());
@@ -2202,13 +2114,11 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf134021)
dispatchCommand(mxComponent, ".uno:JumpToNextTable", {});
dispatchCommand(mxComponent, ".uno:DeleteTable", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xIndexAccess->getCount());
CPPUNIT_ASSERT_EQUAL(1, getPages());
// Without the fix in place, it would have crashed here
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
CPPUNIT_ASSERT_EQUAL(12, getPages());
@@ -2227,13 +2137,11 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf136778)
dispatchCommand(mxComponent, ".uno:JumpToNextTable", {});
dispatchCommand(mxComponent, ".uno:DeleteTable", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xIndexAccess->getCount());
CPPUNIT_ASSERT_EQUAL(1, getPages());
// Without the fix in place, it would have crashed here
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
CPPUNIT_ASSERT_EQUAL(1, getPages());
@@ -2250,7 +2158,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf123285)
". Here is a short sentence demonstrating this very peculiar bug."));
dispatchCommand(mxComponent, ".uno:GoToEndOfPage", {});
- Scheduler::ProcessEventsToIdle();
pTextDoc->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_RETURN);
Scheduler::ProcessEventsToIdle();
@@ -2342,11 +2249,9 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf130685)
dispatchCommand(mxComponent, ".uno:Undo", {});
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(1, getPages());
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(2, getPages());
}
@@ -2358,11 +2263,9 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf132944)
dispatchCommand(mxComponent, ".uno:SelectAll", {});
dispatchCommand(mxComponent, ".uno:Delete", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(1, getPages());
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
// Without the fix in place, the document would have had 2 pages
CPPUNIT_ASSERT_EQUAL(1, getPages());
@@ -2376,12 +2279,10 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf104649)
dispatchCommand(mxComponent, ".uno:SelectAll", {});
dispatchCommand(mxComponent, ".uno:Delete", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(1, getPages());
// Without the fix in place, this test would have crashed here
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(OUString("Test"), getParagraph(1)->getString());
}
diff --git a/sw/qa/extras/uiwriter/uiwriter4.cxx b/sw/qa/extras/uiwriter/uiwriter4.cxx
index 77b42667ee87..281ad33fd9e5 100644
--- a/sw/qa/extras/uiwriter/uiwriter4.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter4.cxx
@@ -137,10 +137,8 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testTdf146449)
CPPUNIT_ASSERT(pShell->SelectObj(Point(), 0, pObject));
dispatchCommand(mxComponent, ".uno:Cut", {});
- Scheduler::ProcessEventsToIdle();
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
uno::Reference<beans::XPropertySet> xShapeProps(xTextBox, uno::UNO_QUERY);
uno::Reference<beans::XPropertySet> xFrameProps(xShapeProps->getPropertyValue("TextBoxContent"),
@@ -1286,7 +1284,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testRedlineParam)
uno::Sequence<beans::PropertyValue> aPropertyValues(comphelper::InitPropertySequence(
{ { "NextTrackedChange", uno::Any(o3tl::narrowing<sal_uInt16>(rTable[0]->GetId())) } }));
dispatchCommand(mxComponent, ".uno:NextTrackedChange", aPropertyValues);
- Scheduler::ProcessEventsToIdle();
SwShellCursor* pShellCursor = pWrtShell->getShellCursor(false);
// This failed: the parameter wasn't handled so the next change (zzz) was
// selected, not the first one (aaa).
@@ -1297,7 +1294,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testRedlineParam)
aPropertyValues = comphelper::InitPropertySequence(
{ { "NextTrackedChange", uno::Any(o3tl::narrowing<sal_uInt16>(rTable[1]->GetId())) } });
dispatchCommand(mxComponent, ".uno:NextTrackedChange", aPropertyValues);
- Scheduler::ProcessEventsToIdle();
pShellCursor = pWrtShell->getShellCursor(false);
CPPUNIT_ASSERT_EQUAL(OUString("zzz"), pShellCursor->GetText());
@@ -1306,7 +1302,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testRedlineParam)
aPropertyValues = comphelper::InitPropertySequence(
{ { "RejectTrackedChange", uno::Any(o3tl::narrowing<sal_uInt16>(rTable[1]->GetId())) } });
dispatchCommand(mxComponent, ".uno:RejectTrackedChange", aPropertyValues);
- Scheduler::ProcessEventsToIdle();
pShellCursor = pWrtShell->getShellCursor(false);
// This was 'middlezzz', the uno command rejected the redline under the
@@ -1460,7 +1455,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testLandscape)
uno::Sequence<beans::PropertyValue> aPropertyValues(
comphelper::InitPropertySequence({ { "AttributePage.Landscape", uno::Any(true) } }));
dispatchCommand(mxComponent, ".uno:AttributePage", aPropertyValues);
- Scheduler::ProcessEventsToIdle();
// Assert that the document model was modified.
SwDocShell* pDocShell = pDoc->GetDocShell();
@@ -1674,7 +1668,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testTableRemoveHasTextChangesOnly2)
pWrtShell->Right(SwCursorSkipMode::Chars, /*bSelect=*/false, 1, /*bBasicCall=*/false);
Scheduler::ProcessEventsToIdle();
dispatchCommand(mxComponent, ".uno:AcceptTrackedChange", {});
- Scheduler::ProcessEventsToIdle();
discardDumpedLayout();
pXmlDoc = parseLayoutDump();
// Accepting tracked insertion results still 4 rows, but less redlines
@@ -1691,7 +1684,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testTableRemoveHasTextChangesOnly2)
// To check Undo of HasTextChangesOnly reject the same row results 3 rows
dispatchCommand(mxComponent, ".uno:Escape", {});
dispatchCommand(mxComponent, ".uno:RejectTrackedChange", {});
- Scheduler::ProcessEventsToIdle();
discardDumpedLayout();
pXmlDoc = parseLayoutDump();
// This was 4 (lost HasTextChangesOnly)
@@ -1725,7 +1717,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testTdf147182_AcceptAllChangesInTableSelec
dispatchCommand(mxComponent, ".uno:SelectAll", {});
dispatchCommand(mxComponent, ".uno:SelectAll", {});
dispatchCommand(mxComponent, ".uno:AcceptTrackedChange", {});
- Scheduler::ProcessEventsToIdle();
discardDumpedLayout();
pXmlDoc = parseLayoutDump();
// Accepting tracked changes in the selected table results 3 rows
@@ -1745,7 +1736,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testTdf147182_AcceptAllChangesInTableSelec
dispatchCommand(mxComponent, ".uno:SelectAll", {});
dispatchCommand(mxComponent, ".uno:SelectAll", {});
dispatchCommand(mxComponent, ".uno:RejectTrackedChange", {});
- Scheduler::ProcessEventsToIdle();
discardDumpedLayout();
pXmlDoc = parseLayoutDump();
// This was 4 (only text changes of the first selected cell were rejected)
diff --git a/sw/qa/extras/uiwriter/uiwriter5.cxx b/sw/qa/extras/uiwriter/uiwriter5.cxx
index 0ffd8213f06e..57c3d724887b 100644
--- a/sw/qa/extras/uiwriter/uiwriter5.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter5.cxx
@@ -1987,7 +1987,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf151657)
// accept all tracked changes
dispatchCommand(mxComponent, ".uno:AcceptAllTrackedChanges", {});
- Scheduler::ProcessEventsToIdle();
discardDumpedLayout();
pXmlDoc = parseLayoutDump();
@@ -2009,10 +2008,8 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testSelectRowWithNestedTable)
// select table row
dispatchCommand(mxComponent, ".uno:EntireRow", {});
- Scheduler::ProcessEventsToIdle();
// convert selected text content to uppercase
dispatchCommand(mxComponent, ".uno:ChangeCaseToUpper", {});
- Scheduler::ProcessEventsToIdle();
discardDumpedLayout();
pXmlDoc = parseLayoutDump();
@@ -2044,7 +2041,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf47979_row)
// convert selected text content to uppercase
dispatchCommand(mxComponent, ".uno:ChangeCaseToUpper", {});
- Scheduler::ProcessEventsToIdle();
xmlDocUniquePtr pXmlDoc = parseLayoutDump();
assertXPathContent(pXmlDoc, "//page[1]//body/tab/row[1]/cell[1]/txt[1]", "a1");
@@ -2081,7 +2077,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf47979_column)
// convert selected text content to uppercase
dispatchCommand(mxComponent, ".uno:ChangeCaseToUpper", {});
- Scheduler::ProcessEventsToIdle();
xmlDocUniquePtr pXmlDoc = parseLayoutDump();
@@ -3117,7 +3112,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf93747)
{ { "Rows", uno::Any(sal_Int32(2)) }, { "Columns", uno::Any(sal_Int32(2)) } }));
dispatchCommand(mxComponent, ".uno:InsertTable", aArgs);
- Scheduler::ProcessEventsToIdle();
pWrtSh->Insert("Col1");
@@ -3177,7 +3171,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf93747)
getProperty<OUString>(getParagraphOfText(1, xCellB1->getText()), "ParaStyleName"));
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(
OUString("Table Contents"),
@@ -3188,7 +3181,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf93747)
getProperty<OUString>(getParagraphOfText(1, xCellB1->getText()), "ParaStyleName"));
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(
OUString("Table Contents"),
@@ -3209,7 +3201,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf145151)
{ { "Rows", uno::Any(sal_Int32(2)) }, { "Columns", uno::Any(sal_Int32(2)) } }));
dispatchCommand(mxComponent, ".uno:InsertTable", aArgs);
- Scheduler::ProcessEventsToIdle();
pWrtSh->Insert("Col1");
@@ -3239,7 +3230,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf145151)
pWrtSh->Right(SwCursorSkipMode::Chars, /*bSelect=*/true, 1, /*bBasicCall=*/false);
dispatchCommand(mxComponent, ".uno:DefaultNumbering", {});
- Scheduler::ProcessEventsToIdle();
// B1 should now have a numbering style, but A1 should not be affected.
OUString sNumStyleB1
@@ -3252,7 +3242,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf145151)
// Toggle it back off
dispatchCommand(mxComponent, ".uno:DefaultNumbering", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_MESSAGE(
"Cell B1 must be able to toggle numbering on and off.",
@@ -3265,7 +3254,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf145151)
// Toggle on bullet numbering
dispatchCommand(mxComponent, ".uno:DefaultBullet", {});
- Scheduler::ProcessEventsToIdle();
// sanity check - both cells have bullets turned on.
OUString sNumStyleA1
@@ -3281,7 +3269,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf145151)
// Toggle off bullet numbering
dispatchCommand(mxComponent, ".uno:DefaultBullet", {});
- Scheduler::ProcessEventsToIdle();
// B1 should now have removed all numbering, while A1 should still have the bullet.
CPPUNIT_ASSERT(
@@ -3294,7 +3281,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf145151)
// Toggle it back on
dispatchCommand(mxComponent, ".uno:DefaultBullet", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT(
!getProperty<OUString>(getParagraphOfText(1, xCellB1->getText()), "NumberingStyleName")
diff --git a/sw/qa/extras/uiwriter/uiwriter6.cxx b/sw/qa/extras/uiwriter/uiwriter6.cxx
index 8aa7d156c660..62ddb4b2463e 100644
--- a/sw/qa/extras/uiwriter/uiwriter6.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter6.cxx
@@ -118,7 +118,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf116640)
comphelper::InitPropertySequence({ { "Columns", uno::Any(sal_Int32(2)) } }));
dispatchCommand(mxComponent, ".uno:InsertSection", aArgs);
- Scheduler::ProcessEventsToIdle();
uno::Reference<text::XTextSectionsSupplier> xTextSectionsSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xSections(xTextSectionsSupplier->getTextSections(),
@@ -132,17 +131,14 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf116640)
CPPUNIT_ASSERT_EQUAL(sal_Int16(2), xTextColumns->getColumnCount());
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xSections->getCount());
dispatchCommand(mxComponent, ".uno:Redo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xSections->getCount());
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xSections->getCount());
}
@@ -917,7 +913,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf147181_TrackedMovingOfMultipleTable
// accept changes results 1 table (removing moved table)
dispatchCommand(mxComponent, ".uno:AcceptAllTrackedChanges", {});
- Scheduler::ProcessEventsToIdle();
uno::Reference<container::XIndexAccess> xTables2(xTablesSupplier->getTextTables(),
uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTables2->getCount());
@@ -2246,15 +2241,12 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testNestedGroupTextBoxCopyCrash)
createSwDoc("tdf149550.docx");
dispatchCommand(mxComponent, ".uno:SelectAll", {});
- Scheduler::ProcessEventsToIdle();
dispatchCommand(mxComponent, ".uno:Copy", {});
- Scheduler::ProcessEventsToIdle();
// This crashed here before the fix.
SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
pTextDoc->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_ESCAPE);
Scheduler::ProcessEventsToIdle();
dispatchCommand(mxComponent, ".uno:Paste", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_MESSAGE("Where is the doc, it crashed, isn't it?!", mxComponent);
@@ -2287,13 +2279,11 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testCrashOnExit)
// Remove the textbox
dispatchCommand(mxComponent, ".uno:RemoveTextBox", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(false, xProperties->getPropertyValue("TextBox").get<bool>());
// Readd the textbox (to run the textboxhelper::create() method)
dispatchCommand(mxComponent, ".uno:AddTextBox", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(true, xProperties->getPropertyValue("TextBox").get<bool>());
@@ -2333,7 +2323,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf151828_Comment2)
uno::Sequence<beans::PropertyValue> aArgs(
comphelper::InitPropertySequence({ { "KeyModifier", uno::Any(KEY_MOD1) } }));
dispatchCommand(mxComponent, ".uno:BasicShapes", aArgs);
- Scheduler::ProcessEventsToIdle();
auto xBasicShape = getShape(1);
auto pObject = SdrObject::getSdrObjectFromXShape(xBasicShape);
@@ -2345,12 +2334,10 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf151828_Comment2)
// cut and paste it
dispatchCommand(mxComponent, ".uno:Cut", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(0, getShapes());
dispatchCommand(mxComponent, ".uno:Paste", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(1, getShapes());
@@ -2383,11 +2370,8 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf151828)
// cut and paste the table
dispatchCommand(mxComponent, ".uno:SelectTable", {});
- Scheduler::ProcessEventsToIdle();
dispatchCommand(mxComponent, ".uno:Cut", {});
- Scheduler::ProcessEventsToIdle();
dispatchCommand(mxComponent, ".uno:Paste", {});
- Scheduler::ProcessEventsToIdle();
// move cursor into the pasted table
CPPUNIT_ASSERT(pWrtShell->MoveTable(GotoPrevTable, fnTableStart));
diff --git a/sw/qa/extras/uiwriter/uiwriter7.cxx b/sw/qa/extras/uiwriter/uiwriter7.cxx
index 8c14e7184f44..08fe6596f478 100644
--- a/sw/qa/extras/uiwriter/uiwriter7.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter7.cxx
@@ -2466,7 +2466,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf138873)
CPPUNIT_ASSERT_EQUAL(OUString("A DDD C"), getParagraph(1)->getString());
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(OUString("A B C"), getParagraph(1)->getString());
@@ -2474,10 +2473,8 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf138873)
pWrtShell->Right(SwCursorSkipMode::Chars, /*bSelect=*/true, 2, /*bBasicCall=*/false);
dispatchCommand(mxComponent, ".uno:Copy", {});
- Scheduler::ProcessEventsToIdle();
dispatchCommand(mxComponent, ".uno:Paste", {});
- Scheduler::ProcessEventsToIdle();
// Without the fix in place, this test would have failed with
// - Expected: A B C
diff --git a/sw/qa/extras/uiwriter/uiwriter8.cxx b/sw/qa/extras/uiwriter/uiwriter8.cxx
index d40b33646bbd..6043e2d606df 100644
--- a/sw/qa/extras/uiwriter/uiwriter8.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter8.cxx
@@ -111,14 +111,11 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf132420)
CPPUNIT_ASSERT_EQUAL(12, getShapes());
dispatchCommand(mxComponent, ".uno:SelectAll", {});
- Scheduler::ProcessEventsToIdle();
dispatchCommand(mxComponent, ".uno:Cut", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(0, getShapes());
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
//Without the fix in place, 1 frame and 1 image would be gone and getShapes would return 10
CPPUNIT_ASSERT_EQUAL(12, getShapes());
@@ -140,7 +137,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf132744)
CPPUNIT_ASSERT_EQUAL(1, getShapes());
dispatchCommand(mxComponent, ".uno:SelectAll", {});
- Scheduler::ProcessEventsToIdle();
rtl::Reference<SwTransferable> xTransfer = new SwTransferable(*pWrtShell);
xTransfer->Cut();
@@ -183,14 +179,12 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf146622)
dispatchCommand(mxComponent, ".uno:SelectAll", {});
dispatchCommand(mxComponent, ".uno:SelectAll", {});
- Scheduler::ProcessEventsToIdle();
dispatchCommand(mxComponent, ".uno:DeleteRows", {});
CPPUNIT_ASSERT_EQUAL(sal_Int32(4), xTable1->getRows()->getCount());
dispatchCommand(mxComponent, ".uno:SelectAll", {});
dispatchCommand(mxComponent, ".uno:SelectAll", {});
- Scheduler::ProcessEventsToIdle();
dispatchCommand(mxComponent, ".uno:DeleteRows", {});
// This was 2 (deleting the already deleted table with change tracking)
@@ -414,7 +408,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf141391)
// remove the selection and positionate the cursor at beginning of A2
pWrtShell->Left(SwCursorSkipMode::Chars, /*bSelect=*/false, 1, /*bBasicCall=*/false);
dispatchCommand(mxComponent, ".uno:Paste", {});
- Scheduler::ProcessEventsToIdle();
xmlDocUniquePtr pXmlDoc = parseLayoutDump();
// 3-row, overwriting cells of the second row and inserting a new row
@@ -450,7 +443,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf141391)
// insert the table, as a nested one in cell "A2"
dispatchCommand(mxComponent, ".uno:Paste", {});
- Scheduler::ProcessEventsToIdle();
discardDumpedLayout();
pXmlDoc = parseLayoutDump();
assertXPath(pXmlDoc, "/root/page[1]/body/tab/row", 2);
@@ -460,7 +452,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf141391)
// Undo
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
discardDumpedLayout();
pXmlDoc = parseLayoutDump();
// 2 rows again, no copied text content
@@ -474,7 +465,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf141391)
pWrtShell->Left(SwCursorSkipMode::Chars, /*bSelect=*/false, 1, /*bBasicCall=*/false);
pWrtShell->Insert("and some text again in the first paragraph to be sure...");
dispatchCommand(mxComponent, ".uno:Paste", {});
- Scheduler::ProcessEventsToIdle();
discardDumpedLayout();
pXmlDoc = parseLayoutDump();
@@ -508,7 +498,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf148791)
pWrtShell->Left(SwCursorSkipMode::Chars, /*bSelect=*/false, 1, /*bBasicCall=*/false);
pWrtShell->Up(/*bSelect=*/false);
dispatchCommand(mxComponent, ".uno:PasteRowsBefore", {});
- Scheduler::ProcessEventsToIdle();
xmlDocUniquePtr pXmlDoc = parseLayoutDump();
// Paste as Rows Above results 4-row table with default table alignment
@@ -546,7 +535,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf148791)
pWrtShell->Up(/*bSelect=*/false);
pWrtShell->Up(/*bSelect=*/false);
dispatchCommand(mxComponent, ".uno:PasteRowsBefore", {});
- Scheduler::ProcessEventsToIdle();
discardDumpedLayout();
pXmlDoc = parseLayoutDump();
@@ -574,7 +562,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf148791)
for (int i = 0; i < 7 + 4; ++i)
pWrtShell->Up(/*bSelect=*/false);
dispatchCommand(mxComponent, ".uno:PasteRowsBefore", {});
- Scheduler::ProcessEventsToIdle();
discardDumpedLayout();
pXmlDoc = parseLayoutDump();
@@ -599,7 +586,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf148791)
for (int i = 0; i < 15 + 4 * 2; ++i)
pWrtShell->Up(/*bSelect=*/false);
dispatchCommand(mxComponent, ".uno:PasteRowsBefore", {});
- Scheduler::ProcessEventsToIdle();
discardDumpedLayout();
pXmlDoc = parseLayoutDump();
@@ -618,7 +604,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf135014)
// Toggle Numbering List
dispatchCommand(mxComponent, ".uno:DefaultBullet", aArgs);
- Scheduler::ProcessEventsToIdle();
uno::Sequence<beans::PropertyValue> aArgs2(comphelper::InitPropertySequence(
{ { "Param", uno::Any(OUString("NewNumberingStyle")) },
@@ -626,7 +611,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf135014)
// New Style from selection
dispatchCommand(mxComponent, ".uno:StyleNewByExample", aArgs2);
- Scheduler::ProcessEventsToIdle();
// Without the fix in place, this test would have failed here
reload("Office Open XML Text", "tdf135014.docx");
@@ -644,7 +628,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf130629)
comphelper::InitPropertySequence({ { "KeyModifier", uno::Any(KEY_MOD1) } }));
dispatchCommand(mxComponent, ".uno:BasicShapes.diamond", aArgs);
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(1, getShapes());
@@ -660,7 +643,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf130629)
// Without the fix in place, this test would have crashed here
dispatchCommand(mxComponent, ".uno:BasicShapes.diamond", aArgs);
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(1, getShapes());
}
@@ -725,32 +707,25 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf140731)
for (sal_Int32 i = 0; i < 8; ++i)
{
dispatchCommand(mxComponent, ".uno:SelectAll", {});
- Scheduler::ProcessEventsToIdle();
dispatchCommand(mxComponent, ".uno:Copy", {});
- Scheduler::ProcessEventsToIdle();
dispatchCommand(mxComponent, ".uno:Paste", {});
- Scheduler::ProcessEventsToIdle();
dispatchCommand(mxComponent, ".uno:Paste", {});
- Scheduler::ProcessEventsToIdle();
}
dispatchCommand(mxComponent, ".uno:GoToStartOfDoc", {});
- Scheduler::ProcessEventsToIdle();
// Format->Text operations on small selections (which would generate <~500 redlines)
// changetracking still working
dispatchCommand(mxComponent, ".uno:TrackChanges", {});
- Scheduler::ProcessEventsToIdle();
SwCursorShell* pShell(pDoc->GetEditShell());
pShell->SelectTextModel(1, 500);
dispatchCommand(mxComponent, ".uno:ChangeCaseToTitleCase", {});
- Scheduler::ProcessEventsToIdle();
SwEditShell* const pEditShell(pDoc->GetEditShell());
CPPUNIT_ASSERT_EQUAL(static_cast<SwRedlineTable::size_type>(120),
@@ -758,15 +733,12 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf140731)
//Removing all the redlines.
dispatchCommand(mxComponent, ".uno:RejectAllTrackedChanges", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(static_cast<SwRedlineTable::size_type>(0), pEditShell->GetRedlineCount());
dispatchCommand(mxComponent, ".uno:SelectAll", {});
- Scheduler::ProcessEventsToIdle();
dispatchCommand(mxComponent, ".uno:ChangeCaseToTitleCase", {});
- Scheduler::ProcessEventsToIdle();
// Without the fix in place, on big selections writer would freeze. Now it ignores change tracking.
CPPUNIT_ASSERT_EQUAL(static_cast<SwRedlineTable::size_type>(0), pEditShell->GetRedlineCount());
@@ -775,7 +747,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf140731)
CPPUNIT_ASSERT(getParagraph(1)->getString().startsWith("Lorem Ipsum Dolor Sit Amet"));
dispatchCommand(mxComponent, ".uno:ChangeCaseToUpper", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT(getParagraph(1)->getString().startsWith("LOREM IPSUM DOLOR SIT AMET"));
}
@@ -957,7 +928,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf131771)
{ { "Rows", uno::Any(sal_Int32(2)) }, { "Columns", uno::Any(sal_Int32(2)) } }));
dispatchCommand(mxComponent, ".uno:InsertTable", aArgs);
- Scheduler::ProcessEventsToIdle();
uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xIndexAccess(xTextTablesSupplier->getTextTables(),
@@ -1000,7 +970,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf80663)
{ { "Rows", uno::Any(sal_Int32(2)) }, { "Columns", uno::Any(sal_Int32(2)) } }));
dispatchCommand(mxComponent, ".uno:InsertTable", aArgs);
- Scheduler::ProcessEventsToIdle();
uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xIndexAccess(xTextTablesSupplier->getTextTables(),
@@ -1011,14 +980,12 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf80663)
CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTextTable->getColumns()->getCount());
dispatchCommand(mxComponent, ".uno:DeleteRows", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTextTable->getRows()->getCount());
CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTextTable->getColumns()->getCount());
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTextTable->getRows()->getCount());
@@ -1084,7 +1051,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf121031)
{ { "Rows", uno::Any(sal_Int32(3)) }, { "Columns", uno::Any(sal_Int32(3)) } }));
dispatchCommand(mxComponent, ".uno:InsertTable", aArgs);
- Scheduler::ProcessEventsToIdle();
uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xIndexAccess(xTextTablesSupplier->getTextTables(),
@@ -1092,11 +1058,9 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf121031)
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
dispatchCommand(mxComponent, ".uno:DeleteTable", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xIndexAccess->getCount());
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
// Without the fix in place, the table would be hidden
@@ -1137,10 +1101,8 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf121546)
CPPUNIT_ASSERT_EQUAL(OUString("xxxxxxxxxxxxxxxxxxxx"), getParagraph(2)->getString());
dispatchCommand(mxComponent, ".uno:SelectAll", {});
- Scheduler::ProcessEventsToIdle();
dispatchCommand(mxComponent, ".uno:Cut", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(1, getParagraphs());
@@ -1148,25 +1110,20 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf121546)
createSwDoc();
dispatchCommand(mxComponent, ".uno:Paste", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(OUString("xxxxxxxxxxxxxxxxxxxx"), getParagraph(2)->getString());
dispatchCommand(mxComponent, ".uno:SelectAll", {});
- Scheduler::ProcessEventsToIdle();
dispatchCommand(mxComponent, ".uno:Cut", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(1, getParagraphs());
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(OUString("xxxxxxxxxxxxxxxxxxxx"), getParagraph(2)->getString());
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
@@ -1230,12 +1187,10 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf134626)
CPPUNIT_ASSERT_EQUAL(OUString("AppleApple"), getParagraph(1)->getString());
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(OUString("Apple"), getParagraph(1)->getString());
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(OUString(""), getParagraph(1)->getString());
}
@@ -1251,7 +1206,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf139566)
{ { "Rows", uno::Any(sal_Int32(1)) }, { "Columns", uno::Any(sal_Int32(1)) } }));
dispatchCommand(mxComponent, ".uno:InsertTable", aArgs);
- Scheduler::ProcessEventsToIdle();
// Move the cursor outside the table
pWrtSh->Down(/*bSelect=*/false);
@@ -1261,19 +1215,16 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf139566)
CPPUNIT_ASSERT_EQUAL(OUString("Test"), getParagraph(2)->getString());
dispatchCommand(mxComponent, ".uno:SelectAll", {});
- Scheduler::ProcessEventsToIdle();
uno::Reference<frame::XFrames> xFrames = mxDesktop->getFrames();
sal_Int32 nFrames = xFrames->getCount();
// Create a second window so the first window looses focus
dispatchCommand(mxComponent, ".uno:NewWindow", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(nFrames + 1, xFrames->getCount());
dispatchCommand(mxComponent, ".uno:CloseWin", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(nFrames, xFrames->getCount());
@@ -1293,7 +1244,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf96067)
{ { "Rows", uno::Any(sal_Int32(3)) }, { "Columns", uno::Any(sal_Int32(3)) } }));
dispatchCommand(mxComponent, ".uno:InsertTable", aArgs);
- Scheduler::ProcessEventsToIdle();
uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xIndexAccess(xTextTablesSupplier->getTextTables(),
@@ -1305,14 +1255,12 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf96067)
dispatchCommand(mxComponent, ".uno:SelectTable", {});
dispatchCommand(mxComponent, ".uno:InsertRowsBefore", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
CPPUNIT_ASSERT_EQUAL(sal_Int32(6), xTextTable->getRows()->getCount());
CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xTextTable->getColumns()->getCount());
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xTextTable->getRows()->getCount());
@@ -1344,7 +1292,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf87199)
dispatchCommand(mxComponent, ".uno:EntireColumn", {});
dispatchCommand(mxComponent, ".uno:MergeCells", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTextTable->getRows()->getCount());
@@ -1353,7 +1300,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf87199)
CPPUNIT_ASSERT(xCellA1->getString().endsWith("test2"));
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTextTable->getRows()->getCount());
@@ -1405,7 +1351,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf146573)
// remove redlines, add a footnote, and change the value
// of the cell with the footnote
dispatchCommand(mxComponent, ".uno:AcceptAllTrackedChanges", {});
- Scheduler::ProcessEventsToIdle();
pWrtShell->Right(SwCursorSkipMode::Cells, /*bSelect=*/false, /*nCount=*/1,
/*bBasicCall=*/false);
dispatchCommand(mxComponent, ".uno:InsertFootnote", {});
@@ -1584,7 +1529,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf150576)
// restore deleted rows
dispatchCommand(mxComponent, ".uno:Undo", {});
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
SwNode& rNode5 = pWrtShell->GetCursor()->GetPoint()->GetNode();
CPPUNIT_ASSERT_EQUAL(OUString("Row 2"), rNode5.GetTextNode()->GetText());
@@ -1611,14 +1555,11 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf132603)
= comphelper::InitPropertySequence({ { "Text", uno::Any(OUString("Comment")) } });
dispatchCommand(mxComponent, ".uno:InsertAnnotation", aPropertyValues);
- Scheduler::ProcessEventsToIdle();
dispatchCommand(mxComponent, ".uno:SelectAll", {});
- Scheduler::ProcessEventsToIdle();
// Without the fix in place, it would crash here
dispatchCommand(mxComponent, ".uno:Copy", {});
- Scheduler::ProcessEventsToIdle();
tools::JsonWriter aJsonWriter;
pTextDoc->getPostIts(aJsonWriter);
@@ -1644,7 +1585,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf117601)
{ { "Rows", uno::Any(sal_Int32(5)) }, { "Columns", uno::Any(sal_Int32(3)) } }));
dispatchCommand(mxComponent, ".uno:InsertTable", aArgs);
- Scheduler::ProcessEventsToIdle();
uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xIndexAccess(xTextTablesSupplier->getTextTables(),
@@ -1667,7 +1607,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf117601)
dispatchCommand(mxComponent, ".uno:EntireColumn", {});
dispatchCommand(mxComponent, ".uno:MergeCells", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
CPPUNIT_ASSERT_EQUAL(sal_Int32(5), xTextTable->getRows()->getCount());
@@ -1676,7 +1615,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf117601)
CPPUNIT_ASSERT(xCellB1->getString().endsWith("test2"));
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
CPPUNIT_ASSERT_EQUAL(sal_Int32(5), xTextTable->getRows()->getCount());
@@ -1696,18 +1634,15 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf138130)
//select shape and change the anchor
dispatchCommand(mxComponent, ".uno:JumpToNextFrame", {});
- Scheduler::ProcessEventsToIdle();
// Without the fix in place, this test would have crashed here
dispatchCommand(mxComponent, ".uno:SetAnchorToPage", {});
- Scheduler::ProcessEventsToIdle();
//position has changed
CPPUNIT_ASSERT(aPos.X < xShape->getPosition().X);
CPPUNIT_ASSERT(aPos.Y < xShape->getPosition().Y);
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(aPos.X, xShape->getPosition().X);
CPPUNIT_ASSERT_EQUAL(aPos.Y, xShape->getPosition().Y);
@@ -1724,17 +1659,14 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf136385)
//select shape and change the anchor
dispatchCommand(mxComponent, ".uno:JumpToNextFrame", {});
- Scheduler::ProcessEventsToIdle();
dispatchCommand(mxComponent, ".uno:SetAnchorToPage", {});
- Scheduler::ProcessEventsToIdle();
//position has changed
CPPUNIT_ASSERT(aPos.X < xShape->getPosition().X);
CPPUNIT_ASSERT(aPos.Y < xShape->getPosition().Y);
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
//Without the fix in place, this test would have failed with
//- Expected: 2447
@@ -1753,7 +1685,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf145207)
//select one shape and use the TAB key to iterate over the different shapes
dispatchCommand(mxComponent, ".uno:JumpToNextFrame", {});
- Scheduler::ProcessEventsToIdle();
for (sal_Int32 i = 0; i < 10; ++i)
{
@@ -1779,7 +1710,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf128782)
//select shape 2 and move it down
dispatchCommand(mxComponent, ".uno:JumpToNextFrame", {});
dispatchCommand(mxComponent, ".uno:JumpToNextFrame", {});
- Scheduler::ProcessEventsToIdle();
pTextDoc->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_DOWN);
Scheduler::ProcessEventsToIdle();
@@ -1791,7 +1721,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf128782)
CPPUNIT_ASSERT(aPos[1].Y < xShape2->getPosition().Y);
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(aPos[0].X, xShape1->getPosition().X);
CPPUNIT_ASSERT_EQUAL(aPos[0].Y, xShape1->getPosition().Y);
@@ -1818,7 +1747,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf135623)
//select shape 1 and move it down
dispatchCommand(mxComponent, ".uno:JumpToNextFrame", {});
- Scheduler::ProcessEventsToIdle();
pTextDoc->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_DOWN);
Scheduler::ProcessEventsToIdle();
@@ -1830,7 +1758,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf135623)
CPPUNIT_ASSERT_EQUAL(aPos[1].Y, xShape2->getPosition().Y);
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(aPos[0].X, xShape1->getPosition().X);
CPPUNIT_ASSERT_EQUAL(aPos[0].Y, xShape1->getPosition().Y);
@@ -1882,7 +1809,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf133490)
//select shape 2 and move it to the right
dispatchCommand(mxComponent, ".uno:JumpToNextFrame", {});
dispatchCommand(mxComponent, ".uno:JumpToNextFrame", {});
- Scheduler::ProcessEventsToIdle();
for (sal_Int32 i = 0; i < 5; ++i)
{
@@ -1899,7 +1825,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf133490)
for (sal_Int32 i = 0; i < 4; ++i)
{
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
// Without the fix in place, undo action would have changed shape1's position
// and this test would have failed with
@@ -1912,7 +1837,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf133490)
}
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(aPos[0].X, xShape1->getPosition().X);
CPPUNIT_ASSERT_EQUAL(aPos[0].Y, xShape1->getPosition().Y);
@@ -1921,17 +1845,14 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf133490)
CPPUNIT_ASSERT_EQUAL(aPos[1].Y, xShape2->getPosition().Y);
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(1, getShapes());
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(0, getShapes());
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(1, getShapes());
}
@@ -2156,7 +2077,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf143244)
for (sal_Int32 i = 0; i < 5; ++i)
{
dispatchCommand(mxComponent, ".uno:Undo", {});
- Scheduler::ProcessEventsToIdle();
}
xTextTable.set(xIndexAccess->getByIndex(0), uno::UNO_QUERY);
@@ -2166,7 +2086,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf143244)
for (sal_Int32 i = 0; i < 5; ++i)
{
dispatchCommand(mxComponent, ".uno:Redo", {});
- Scheduler::ProcessEventsToIdle();
}
xTextTable.set(xIndexAccess->getByIndex(0), uno::UNO_QUERY);
@@ -2307,7 +2226,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf138897)
dispatchCommand(mxComponent, ".uno:Redo", {});
dispatchCommand(mxComponent, ".uno:Undo", {});
dispatchCommand(mxComponent, ".uno:Redo", {});
- Scheduler::ProcessEventsToIdle();
}
CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf136740)
@@ -2343,7 +2261,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf136740)
{ { "SelectedFormat",
css::uno::Any(static_cast<sal_uInt32>(SotClipboardFormatId::RTF)) } });
dispatchCommand(mxComponent, ".uno:ClipboardFormatItems", aPropertyValues);
- Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(1, getParagraphs());
CPPUNIT_ASSERT_EQUAL(OUString("FooFoo"), xParagraph->getString());
@@ -2363,7 +2280,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf128106)
const auto aPropertyValues
= comphelper::InitPropertySequence({ { "FileName", css::uno::Any(maTempFile.GetURL()) } });
dispatchCommand(mxComponent, ".uno:NewGlobalDoc", aPropertyValues);
- Scheduler::ProcessEventsToIdle();
mxComponent = loadFromDesktop(maTempFile.GetURL());
@@ -2498,7 +2414,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf151462)
createSwDoc("tdf151462.odt");
// xmlDocUniquePtr pLayout = parseLayoutDump();
dispatchCommand(mxComponent, ".uno:UpdateAllIndexes", {});
- Scheduler::ProcessEventsToIdle();
xmlDocUniquePtr pLayout = parseLayoutDump();
// tdf#151462 - without the fix in place, there would be just the first index entry
diff --git a/unotest/Library_unotest.mk b/unotest/Library_unotest.mk
index 1a7f8ba5ab5f..a10342d46d7b 100644
--- a/unotest/Library_unotest.mk
+++ b/unotest/Library_unotest.mk
@@ -24,6 +24,7 @@ $(eval $(call gb_Library_use_libraries,unotest,\
sb \
tl \
utl \
+ vcl \
))
$(eval $(call gb_Library_use_externals,unotest,\
diff --git a/unotest/source/cpp/macros_test.cxx b/unotest/source/cpp/macros_test.cxx
index 36438b2e50ec..3bb2a22a5da4 100644
--- a/unotest/source/cpp/macros_test.cxx
+++ b/unotest/source/cpp/macros_test.cxx
@@ -30,6 +30,7 @@
#include <tools/datetime.hxx>
#include <unotools/tempfile.hxx>
#include <unotools/ucbstreamhelper.hxx>
+#include <vcl/scheduler.hxx>
using namespace css;
@@ -90,7 +91,10 @@ MacrosTest::dispatchCommand(const uno::Reference<lang::XComponent>& xComponent,
uno::Reference<frame::XDispatchHelper> xDispatchHelper(frame::DispatchHelper::create(xContext));
CPPUNIT_ASSERT(xDispatchHelper.is());
- return xDispatchHelper->executeDispatch(xFrame, rCommand, OUString(), 0, rPropertyValues);
+ auto ret = xDispatchHelper->executeDispatch(xFrame, rCommand, OUString(), 0, rPropertyValues);
+ Scheduler::ProcessEventsToIdle();
+
+ return ret;
}
std::unique_ptr<SvStream> MacrosTest::parseExportStream(const OUString& url,