[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - desktop/qa desktop/source

Pranav Kant pranavk at collabora.co.uk
Thu Nov 30 16:25:23 UTC 2017


 desktop/qa/desktop_lib/test_desktop_lib.cxx |    2 ++
 desktop/source/lib/init.cxx                 |    6 ++++++
 2 files changed, 8 insertions(+)

New commits:
commit e139eb658a20bdcb979afc21b97ba7873c116656
Author: Pranav Kant <pranavk at collabora.co.uk>
Date:   Thu Nov 30 01:22:33 2017 +0530

    lokdialog: Execute all UNO commands asynchronously for LOK
    
    Especially in case of dialogs, Online cannot afford to wait till the
    call to UNO command returns as the same thread is responsible for doing
    many more tasks as well.
    
    And just adding this check doesn't seem to have any repurcussions, so I
    guess we are fine.
    
    Change-Id: Iac7c1413d90e8a264502dcf2bc280e09fd52683b
    Reviewed-on: https://gerrit.libreoffice.org/45597
    Reviewed-by: Jan Holesovsky <kendy at collabora.com>
    Tested-by: Jan Holesovsky <kendy at collabora.com>

diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index eaf5e121b7a0..a387f4ea1d05 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -504,6 +504,7 @@ void DesktopLOKTest::testPasteWriter()
     CPPUNIT_ASSERT(pDocument->pClass->paste(pDocument, "text/plain;charset=utf-8", aText.getStr(), aText.getLength()));
 
     pDocument->pClass->postUnoCommand(pDocument, ".uno:SelectAll", nullptr, false);
+    Scheduler::ProcessEventsToIdle();
     char* pText = pDocument->pClass->getTextSelection(pDocument, "text/plain;charset=utf-8", nullptr);
     CPPUNIT_ASSERT_EQUAL(OString("hello"), OString(pText));
     free(pText);
@@ -857,6 +858,7 @@ void DesktopLOKTest::testSheetOperations()
     pDocument->pClass->postUnoCommand(pDocument, ".uno:Remove",
           "{ \"Index\": { \"type\": \"long\", \"value\": 3 } }", false);
 
+    Scheduler::ProcessEventsToIdle();
     CPPUNIT_ASSERT_EQUAL(pDocument->pClass->getParts(pDocument), 6);
 
     std::vector<OString> aExpected = { "FirstSheet", "Renamed", "Sheet3", "Sheet4", "Sheet5", "LastSheet" };
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 515e148c1f04..b382aa507290 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -2347,6 +2347,12 @@ static void doc_postUnoCommand(LibreOfficeKitDocument* pThis, const char* pComma
     LibLODocument_Impl* pDocument = static_cast<LibLODocument_Impl*>(pThis);
 
     std::vector<beans::PropertyValue> aPropertyValuesVector(jsonToPropertyValuesVector(pArguments));
+
+    beans::PropertyValue aSynchronMode;
+    aSynchronMode.Name = "SynchronMode";
+    aSynchronMode.Value <<= false;
+    aPropertyValuesVector.push_back(aSynchronMode);
+
     int nView = SfxLokHelper::getView();
     if (nView < 0)
         return;


More information about the Libreoffice-commits mailing list