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

Jan Holesovsky kendy at collabora.com
Mon Mar 12 16:10:50 UTC 2018


 vcl/source/window/floatwin.cxx |   14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

New commits:
commit 08dd970395a72723ceec8dcaeb703542ba7bafd7
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Sun Mar 11 00:58:24 2018 +0100

    lokdialog: For floating menus, ignore the screen size in the LOK case.
    
    Change-Id: I85f6fcbc865eba7aac48a4c2e7d8c4bb82311581
    Reviewed-on: https://gerrit.libreoffice.org/51063
    Reviewed-by: pranavk <pranavk at collabora.co.uk>
    Tested-by: pranavk <pranavk at collabora.co.uk>

diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx
index ccbc580fdc8d..9c08ac1c5732 100644
--- a/vcl/source/window/floatwin.cxx
+++ b/vcl/source/window/floatwin.cxx
@@ -30,6 +30,7 @@
 #include <vcl/floatwin.hxx>
 #include <vcl/settings.hxx>
 
+#include <comphelper/lok.hxx>
 #include <tools/rc.h>
 #include <tools/debug.hxx>
 #include <vcl/IDialogRenderable.hxx>
@@ -300,6 +301,7 @@ Point FloatingWindow::ImplCalcPos( vcl::Window* pWindow,
     }
 
     sal_uInt16 nArrangeIndex = 0;
+    const bool bLOKActive = comphelper::LibreOfficeKit::isActive();
 
     for ( ; nArrangeIndex < 5; nArrangeIndex++ )
     {
@@ -321,7 +323,7 @@ Point FloatingWindow::ImplCalcPos( vcl::Window* pWindow,
                     if ( aPos.X() < aScreenRect.Left() )
                         bBreak = false;
                 }
-                if( bBreak )
+                if (bBreak || bLOKActive)
                 {
                     e1 = devRect.TopLeft();
                     e2 = devRect.BottomLeft();
@@ -345,7 +347,7 @@ Point FloatingWindow::ImplCalcPos( vcl::Window* pWindow,
                     if ( aPos.X()+aSize.Width() > aScreenRect.Right() )
                         bBreak = false;
                 }
-                if( bBreak )
+                if (bBreak || bLOKActive)
                 {
                     e1 = devRect.TopRight();
                     e2 = devRect.BottomRight();
@@ -361,7 +363,7 @@ Point FloatingWindow::ImplCalcPos( vcl::Window* pWindow,
                 aPos.Y() = devRect.Top()-aSize.Height()+1;
                 if ( aPos.Y() < aScreenRect.Top() )
                     bBreak = false;
-                if( bBreak )
+                if (bBreak || bLOKActive)
                 {
                     e1 = devRect.TopLeft();
                     e2 = devRect.TopRight();
@@ -376,7 +378,7 @@ Point FloatingWindow::ImplCalcPos( vcl::Window* pWindow,
                 aPos = devRect.BottomLeft();
                 if ( aPos.Y()+aSize.Height() > aScreenRect.Bottom() )
                     bBreak = false;
-                if( bBreak )
+                if (bBreak || bLOKActive)
                 {
                     e1 = devRect.BottomLeft();
                     e2 = devRect.BottomRight();
@@ -390,6 +392,10 @@ Point FloatingWindow::ImplCalcPos( vcl::Window* pWindow,
             default: break;
         }
 
+        // no further adjustement for LibreOfficeKit
+        if (bLOKActive)
+            break;
+
         // adjust if necessary
         if (bBreak)
         {


More information about the Libreoffice-commits mailing list