[Libreoffice-commits] .: Branch 'libreoffice-3-4' - vcl/source
Caolán McNamara
caolan at kemper.freedesktop.org
Thu Jun 23 01:31:43 PDT 2011
vcl/source/window/floatwin.cxx | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
New commits:
commit 5263052d3261c4fff45120d568c947e30987d6df
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Jun 23 09:02:47 2011 +0100
Resolves: fdo#33509 Context menu in spellcheck in RTL UI closes too early
(cherry picked from commit 485b6dc95fe783ef3bb9bbe1ae2f65fe04edc926)
diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx
index 46944f1..3c92b11 100644
--- a/vcl/source/window/floatwin.cxx
+++ b/vcl/source/window/floatwin.cxx
@@ -696,13 +696,22 @@ void FloatingWindow::StartPopupMode( const Rectangle& rRect, sal_uLong nFlags )
// so they can be compared across different frames
// !!! rRect is expected to be in screen coordinates of the parent frame window !!!
maFloatRect = rRect;
- if( GetParent()->ImplHasMirroredGraphics() )
+
+ Window *pReference = GetParent();
+
+ // compare coordinates in absolute screen coordinates
+ // Keep in sync with FloatingWindow::ImplFloatHitTest, e.g. fdo#33509
+ if( pReference->ImplHasMirroredGraphics() )
{
- maFloatRect.SetPos( GetParent()->ScreenToOutputPixel( rRect.TopLeft() ) );
- maFloatRect = GetParent()->ImplOutputToUnmirroredAbsoluteScreenPixel( maFloatRect );
+ if(!pReference->IsRTLEnabled() )
+ // --- RTL --- re-mirror back to get device coordiantes
+ pReference->ImplReMirror(maFloatRect);
+
+ maFloatRect.SetPos(pReference->ScreenToOutputPixel(maFloatRect.TopLeft()));
+ maFloatRect = pReference->ImplOutputToUnmirroredAbsoluteScreenPixel(maFloatRect);
}
else
- maFloatRect.SetPos( GetParent()->OutputToAbsoluteScreenPixel( GetParent()->ScreenToOutputPixel( rRect.TopLeft() ) ) );
+ maFloatRect.SetPos(pReference->OutputToAbsoluteScreenPixel(pReference->ScreenToOutputPixel(rRect.TopLeft())));
maFloatRect.Left() -= 2;
maFloatRect.Top() -= 2;
More information about the Libreoffice-commits
mailing list