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

Ashod Nakashian ashod.nakashian at collabora.co.uk
Sun May 15 20:13:32 UTC 2016


 sw/source/uibase/docvw/SidebarTxtControl.cxx |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit 0b223bac012fae1af2d2bf1fe9c038cbe88846ed
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date:   Sat May 14 20:12:11 2016 -0400

    LOK: ensure KeyInput is handled with the correct MapMode
    
    The MapMode is set explicitly to make sure the coordinates
    of the comment widget is in absolute terms. However
    PostItMgr::MakeVisible invalidates it. This is to
    ensure that the MapMode is restored after MakeVisible
    is called when LOK is active.
    
    Change-Id: I2adf749488e6eb46d29a0b29c4dfd644606c92ab
    Reviewed-on: https://gerrit.libreoffice.org/25015
    Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
    Tested-by: Ashod Nakashian <ashnakash at gmail.com>

diff --git a/sw/source/uibase/docvw/SidebarTxtControl.cxx b/sw/source/uibase/docvw/SidebarTxtControl.cxx
index 8da86c3..67a2252 100644
--- a/sw/source/uibase/docvw/SidebarTxtControl.cxx
+++ b/sw/source/uibase/docvw/SidebarTxtControl.cxx
@@ -50,6 +50,7 @@
 #include <editeng/editview.hxx>
 #include <editeng/flditem.hxx>
 #include <LibreOfficeKit/LibreOfficeKitEnums.h>
+#include <comphelper/lok.hxx>
 
 #include <uitool.hxx>
 #include <view.hxx>
@@ -251,8 +252,12 @@ void SidebarTextControl::KeyInput( const KeyEvent& rKeyEvt )
     }
     else
     {
+        // MakeVisible can lose our MapMode, save it.
+        auto oldMapMode = GetMapMode();
         //let's make sure we see our note
         mrPostItMgr.MakeVisible(&mrSidebarWin);
+        if (comphelper::LibreOfficeKit::isActive())
+            SetMapMode(oldMapMode);
 
         long aOldHeight = mrSidebarWin.GetPostItTextHeight();
         bool bDone = false;


More information about the Libreoffice-commits mailing list