[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - 2 commits - svtools/source sw/source

Michael Meeks (via logerrit) logerrit at kemper.freedesktop.org
Sat May 9 14:11:48 UTC 2020


 svtools/source/misc/acceleratorexecute.cxx |   21 +++++++++++++++++++--
 sw/source/uibase/docvw/AnnotationWin2.cxx  |    2 +-
 2 files changed, 20 insertions(+), 3 deletions(-)

New commits:
commit 17bdf11cbb359609f9f8d3ee17fdae2a517200ca
Author:     Michael Meeks <michael.meeks at collabora.com>
AuthorDate: Mon Feb 3 22:47:34 2020 +0100
Commit:     Michael Meeks <michael.meeks at collabora.com>
CommitDate: Sat May 9 15:10:02 2020 +0100

    tdf#130382 - process key-event handlers synchronously for unipoll.
    
    Unipoll tries to simplify behavior of the Kit process by processing
    events in a single thread, more sensibly. We do this for other key
    events, so it's important that key-derived dispatches eg.
    SID_BACKSPACE which we use to simulate composition input are also
    synchronous.
    
    Change-Id: I12dbb104419a0aecd184ec312bfadec3a947d48b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87929
    Tested-by: Jenkins
    Reviewed-by: Michael Meeks <michael.meeks at collabora.com>

diff --git a/svtools/source/misc/acceleratorexecute.cxx b/svtools/source/misc/acceleratorexecute.cxx
index a9e44ba6a9f8..fc42ef7b415d 100644
--- a/svtools/source/misc/acceleratorexecute.cxx
+++ b/svtools/source/misc/acceleratorexecute.cxx
@@ -33,6 +33,10 @@
 #include <cppuhelper/implbase.hxx>
 
 #include <vcl/evntpost.hxx>
+#include <sal/log.hxx>
+#include <vcl/lok.hxx>
+#include <vcl/window.hxx>
+#include <vcl/svapp.hxx>
 #include <osl/mutex.hxx>
 
 namespace svt
@@ -198,8 +202,21 @@ bool AcceleratorExecute::execute(const css::awt::KeyEvent& aAWTKey)
     {
         // Note: Such instance can be used one times only and destroy itself afterwards .-)
         css::uno::Reference<css::lang::XComponent> xFrame(xProvider, css::uno::UNO_QUERY);
-        AsyncAccelExec* pExec = AsyncAccelExec::createOneShotInstance(xFrame, xDispatch, aURL);
-        pExec->execAsync();
+        if (vcl::lok::isUnipoll())
+        { // tdf#130382 - all synchronous really.
+            try {
+                xDispatch->dispatch (aURL, css::uno::Sequence< css::beans::PropertyValue >());
+            }
+            catch(const css::uno::Exception&ev)
+            {
+                SAL_INFO("svtools", "exception on key emission: " << ev.Message);
+            }
+        }
+        else
+        {
+            AsyncAccelExec* pExec = AsyncAccelExec::createOneShotInstance(xFrame, xDispatch, aURL);
+            pExec->execAsync();
+        }
     }
 
     return bRet;
commit acaa39b86549f303af7ff60a3531ca1c7da1fb81
Author:     Michael Meeks <michael.meeks at collabora.com>
AuthorDate: Thu Jan 9 09:58:11 2020 +0000
Commit:     Michael Meeks <michael.meeks at collabora.com>
CommitDate: Sat May 9 15:04:58 2020 +0100

    sw: tolerate null ShadowOverlay object as the rest of the code does.
    
    Change-Id: I552c0f11b22212d36bcaee33432e2a10d4df58ac
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86473
    Tested-by: Jenkins
    Reviewed-by: Michael Meeks <michael.meeks at collabora.com>

diff --git a/sw/source/uibase/docvw/AnnotationWin2.cxx b/sw/source/uibase/docvw/AnnotationWin2.cxx
index e73592f947b9..f723b7e7ac49 100644
--- a/sw/source/uibase/docvw/AnnotationWin2.cxx
+++ b/sw/source/uibase/docvw/AnnotationWin2.cxx
@@ -771,7 +771,7 @@ void SwAnnotationWin::SetPosAndSize()
         }
     }
 
-    if (bChange)
+    if (mpShadow && bChange)
     {
         Point aStart = EditWin().PixelToLogic(GetPosPixel()+Point(0,GetSizePixel().Height()));
         Point aEnd = EditWin().PixelToLogic(GetPosPixel()+Point(GetSizePixel().Width()-1,GetSizePixel().Height()));


More information about the Libreoffice-commits mailing list