summaryrefslogtreecommitdiff
path: root/sw/qa/extras/uiwriter/uiwriter4.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/qa/extras/uiwriter/uiwriter4.cxx')
-rw-r--r--sw/qa/extras/uiwriter/uiwriter4.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/sw/qa/extras/uiwriter/uiwriter4.cxx b/sw/qa/extras/uiwriter/uiwriter4.cxx
index b32a19e971b0..64ce10b9d833 100644
--- a/sw/qa/extras/uiwriter/uiwriter4.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter4.cxx
@@ -137,8 +137,10 @@ 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"),
@@ -1284,6 +1286,7 @@ 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).
@@ -1294,6 +1297,7 @@ 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());
@@ -1302,6 +1306,7 @@ 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
@@ -1455,6 +1460,7 @@ 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();
@@ -1763,6 +1769,7 @@ 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
@@ -1779,6 +1786,7 @@ 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)
@@ -1812,6 +1820,7 @@ 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
@@ -1831,6 +1840,7 @@ 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)