[Libreoffice-commits] core.git: vcl/source
Jan Holesovsky
kendy at collabora.com
Tue Mar 13 08:32:23 UTC 2018
vcl/source/window/floatwin.cxx | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
New commits:
commit 194fb89ba76837a93ae2af460a5e592bb7b5f21b
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>
Reviewed-on: https://gerrit.libreoffice.org/51165
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
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)
{
More information about the Libreoffice-commits
mailing list