vcl/source/window/floatwin.cxx | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-)
New commits: commit 08dd970395a72723ceec8dcaeb703542ba7bafd7 Author: Jan Holesovsky <ke...@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 <pran...@collabora.co.uk> Tested-by: pranavk <pran...@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) { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits