summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2006-10-13 07:32:32 +0000
committerOliver Bolte <obo@openoffice.org>2006-10-13 07:32:32 +0000
commitdcb334b9a5e916cc4514ff0bb8e4ea80cc1d0664 (patch)
tree99e0c2a5030218480db564e8ef759cdb1881d5ee /vcl
parent2363d845d8b9019c423d7976fb8a9bd3026d168c (diff)
INTEGRATION: CWS vcl65 (1.34.78); FILE MERGED
2006/09/06 10:31:16 pl 1.34.78.1: #i57495# fix RTL menus leaving the screen left
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/window/floatwin.cxx17
1 files changed, 8 insertions, 9 deletions
diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx
index d18182f78bba..233c31d941d3 100644
--- a/vcl/source/window/floatwin.cxx
+++ b/vcl/source/window/floatwin.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: floatwin.cxx,v $
*
- * $Revision: 1.35 $
+ * $Revision: 1.36 $
*
- * last change: $Author: obo $ $Date: 2006-09-17 12:18:34 $
+ * last change: $Author: obo $ $Date: 2006-10-13 08:32:32 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -299,8 +299,6 @@ Point FloatingWindow::ImplCalcPos( Window* pWindow,
USHORT nArrangeAry[5];
USHORT nArrangeIndex;
- BOOL bLeft;
- BOOL bTop;
BOOL bBreak;
Point e1,e2; // the common edge between the item rect and the floating window
@@ -343,8 +341,6 @@ Point FloatingWindow::ImplCalcPos( Window* pWindow,
for ( ; nArrangeIndex < 5; nArrangeIndex++ )
{
- bLeft = FALSE;
- bTop = FALSE;
bBreak = TRUE;
switch ( nArrangeAry[nArrangeIndex] )
{
@@ -439,7 +435,6 @@ Point FloatingWindow::ImplCalcPos( Window* pWindow,
{
if ( aPos.Y()+aSize.Height() > aScreenRect.Bottom() )
{
- bTop = TRUE;
aPos.Y() = devRect.Bottom()-aSize.Height()+1;
if ( aPos.Y() < aScreenRect.Top() )
aPos.Y() = aScreenRect.Top();
@@ -447,9 +442,13 @@ Point FloatingWindow::ImplCalcPos( Window* pWindow,
}
else
{
- if ( !bRTL && aPos.X()+aSize.Width() > aScreenRect.Right() )
+ if( bRTL ) // --- RTL --- we're comparing screen coordinates here
+ {
+ if( devRectRTL.Right()-aSize.Width()+1 < aScreenRect.Left() )
+ aPos.X() -= aScreenRect.Left() - devRectRTL.Right() + aSize.Width() - 1;
+ }
+ else if ( aPos.X()+aSize.Width() > aScreenRect.Right() )
{
- bLeft = TRUE;
aPos.X() = devRect.Right()-aSize.Width()+1;
if ( aPos.X() < aScreenRect.Left() )
aPos.X() = aScreenRect.Left();