diff options
author | Jan Holesovsky <kendy@collabora.com> | 2018-03-11 00:58:24 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2018-03-13 09:31:52 +0100 |
commit | 194fb89ba76837a93ae2af460a5e592bb7b5f21b (patch) | |
tree | 13f51723e879820d66199a53f2a408c7ed773a78 /vcl/source/window/floatwin.cxx | |
parent | eda8d131c327a2fe360ac28a4b1014a4947a68bc (diff) |
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@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
Reviewed-on: https://gerrit.libreoffice.org/51165
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'vcl/source/window/floatwin.cxx')
-rw-r--r-- | vcl/source/window/floatwin.cxx | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx index 53f88865c2cd..ef3119d2a073 100644 --- a/vcl/source/window/floatwin.cxx +++ b/vcl/source/window/floatwin.cxx @@ -22,6 +22,7 @@ #include <window.h> #include <salframe.hxx> +#include <comphelper/lok.hxx> #include <vcl/layout.hxx> #include <vcl/svapp.hxx> #include <vcl/wrkwin.hxx> @@ -297,6 +298,7 @@ Point FloatingWindow::ImplCalcPos( vcl::Window* pWindow, } sal_uInt16 nArrangeIndex = 0; + const bool bLOKActive = comphelper::LibreOfficeKit::isActive(); for ( ; nArrangeIndex < 5; nArrangeIndex++ ) { @@ -318,7 +320,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(); @@ -342,7 +344,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(); @@ -358,7 +360,7 @@ Point FloatingWindow::ImplCalcPos( vcl::Window* pWindow, aPos.setY( devRect.Top()-aSize.Height()+1 ); if ( aPos.Y() < aScreenRect.Top() ) bBreak = false; - if( bBreak ) + if (bBreak || bLOKActive) { e1 = devRect.TopLeft(); e2 = devRect.TopRight(); @@ -373,7 +375,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(); @@ -387,6 +389,10 @@ Point FloatingWindow::ImplCalcPos( vcl::Window* pWindow, default: break; } + // no further adjustement for LibreOfficeKit + if (bLOKActive) + break; + // adjust if necessary if (bBreak) { |