summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2019-09-17 13:24:10 +0200
committerMiklos Vajna <vmiklos@collabora.com>2019-09-17 14:31:20 +0200
commitb9ce783a4b8ea967281ed583842ee3d931d78ac7 (patch)
tree6034fcef89df8cdfefd8cb2ee1f75b1c0078dec6
parentd5f1b512406fa3025c91738fc3ee6bcc3a209111 (diff)
CppunitTest_sw_uiwriter: no need to execute on the dispatcher using strings
This has the benefit that the dispatch happens explicitly on our frame, not somewhere else. Change-Id: Id633bab46c3dd1c3eae29b7d7a5b8669898beedc Reviewed-on: https://gerrit.libreoffice.org/79058 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
-rw-r--r--sw/qa/extras/uiwriter/uiwriter2.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/sw/qa/extras/uiwriter/uiwriter2.cxx b/sw/qa/extras/uiwriter/uiwriter2.cxx
index dce955f9981e..b2567809d968 100644
--- a/sw/qa/extras/uiwriter/uiwriter2.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter2.cxx
@@ -2238,13 +2238,13 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf105330)
SwWrtShell* pWrtShell = pTextDoc->GetDocShell()->GetWrtShell();
pWrtShell->Down(/*bSelect=*/false);
- uno::Sequence<beans::PropertyValue> aTableArgs = {
- comphelper::makePropertyValue("Rows", static_cast<sal_uInt16>(1)),
- comphelper::makePropertyValue("Columns", static_cast<sal_uInt16>(1)),
- };
- lcl_dispatchCommand(mxComponent, ".uno:InsertTable", aTableArgs);
-
SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc();
+ SwView* pView = pDoc->GetDocShell()->GetView();
+ SfxUInt16Item aRows(SID_ATTR_TABLE_ROW, 1);
+ SfxUInt16Item aColumns(SID_ATTR_TABLE_COLUMN, 1);
+ pView->GetViewFrame()->GetDispatcher()->ExecuteList(FN_INSERT_TABLE, SfxCallMode::SYNCHRON,
+ { &aRows, &aColumns });
+
sw::UndoManager& rUndoManager = pDoc->GetUndoManager();
rUndoManager.Undo();