[Libreoffice-commits] core.git: sw/qa

Miklos Vajna (via logerrit) logerrit at kemper.freedesktop.org
Tue Sep 17 12:32:24 UTC 2019


 sw/qa/extras/uiwriter/uiwriter2.cxx |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit b9ce783a4b8ea967281ed583842ee3d931d78ac7
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Tue Sep 17 13:24:10 2019 +0200
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Tue Sep 17 14:31:20 2019 +0200

    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 at collabora.com>
    Tested-by: Jenkins

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();
 


More information about the Libreoffice-commits mailing list