summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCédric Bosdonnat <cedric.bosdonnat@free.fr>2011-12-15 12:02:29 +0100
committerCédric Bosdonnat <cedric.bosdonnat@free.fr>2011-12-16 17:36:01 +0100
commit588857a86bcbc85e21b70ca95a9ab0c0b782a996 (patch)
tree179c2c1d1c22761513a6cf932ce43001adb8f4f0 /vcl
parent44ec593f74ed215fa0795b2ea1cd97951158b726 (diff)
fdo#43790: RTL PopupMenu position fixes
Fixed the Writer PageBreak and Header/Footer indicator position. It also fixed the popup menu position in RTL UI for all PopupButton instances.
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/control/menubtn.cxx2
-rw-r--r--vcl/source/window/floatwin.cxx8
2 files changed, 4 insertions, 6 deletions
diff --git a/vcl/source/control/menubtn.cxx b/vcl/source/control/menubtn.cxx
index 2fa3a072808b..3350d1476aa6 100644
--- a/vcl/source/control/menubtn.cxx
+++ b/vcl/source/control/menubtn.cxx
@@ -33,6 +33,7 @@
#include <vcl/menu.hxx>
#include <vcl/timer.hxx>
#include <vcl/menubtn.hxx>
+#include <vcl/svapp.hxx>
@@ -62,6 +63,7 @@ void MenuButton::ImplInit( Window* pParent, WinBits nStyle )
nStyle |= WB_TABSTOP;
PushButton::ImplInit( pParent, nStyle );
+ EnableRTL( Application::GetSettings().GetLayoutRTL() );
}
// -----------------------------------------------------------------------
diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx
index 894021e2bd67..d4e1b1fcfcaa 100644
--- a/vcl/source/window/floatwin.cxx
+++ b/vcl/source/window/floatwin.cxx
@@ -424,11 +424,6 @@ Point FloatingWindow::ImplCalcPos( Window* pWindow,
{
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() )
- {
- aPos.X() -= aSize.Width()-2; // popup to left instead
- aPos.Y() -= 2;
- }
}
else if ( aPos.X()+aSize.Width() > aScreenRect.Right() )
{
@@ -688,7 +683,8 @@ void FloatingWindow::StartPopupMode( const Rectangle& rRect, sal_uLong nFlags )
// compute window position according to flags and arrangement
sal_uInt16 nArrangeIndex;
- SetPosPixel( ImplCalcPos( this, rRect, nFlags, nArrangeIndex ) );
+ Point aPos = ImplCalcPos( this, rRect, nFlags, nArrangeIndex );
+ SetPosPixel( aPos );
// set data and display window
// convert maFloatRect to absolute device coordinates