[Libreoffice-commits] core.git: sc/source
Abdulaziz A Alayed
aalayed at kacst.edu.sa
Sat Apr 20 04:56:08 PDT 2013
sc/source/ui/view/gridwin.cxx | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
New commits:
commit 89feda6bfdeacb647d44cb432d5ebc2678c44c89
Author: Abdulaziz A Alayed <aalayed at kacst.edu.sa>
Date: Mon Apr 8 10:59:16 2013 +0300
fdo#55432 fix the context menu position for RTL sheet
Change-Id: I023215646b9aeadb4909c9f90f84f9e8b0dbd173
Reviewed-on: https://gerrit.libreoffice.org/3497
Reviewed-by: David Tardon <dtardon at redhat.com>
Tested-by: David Tardon <dtardon at redhat.com>
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 145b887e..1a66c97 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -2995,6 +2995,9 @@ void ScGridWindow::Command( const CommandEvent& rCEvt )
else if ( !bMouse )
{
// non-edit menu by keyboard -> use lower right of cell cursor position
+ ScDocument* aDoc = pViewData->GetDocument();
+ SCTAB nTabNo = pViewData->GetTabNo();
+ sal_Bool bLayoutIsRTL = aDoc->IsLayoutRTL(nTabNo);
SCCOL nCurX = pViewData->GetCurX();
SCROW nCurY = pViewData->GetCurY();
@@ -3002,7 +3005,8 @@ void ScGridWindow::Command( const CommandEvent& rCEvt )
long nSizeXPix;
long nSizeYPix;
pViewData->GetMergeSizePixel( nCurX, nCurY, nSizeXPix, nSizeYPix );
- aMenuPos.X() += nSizeXPix;
+ // fdo#55432 take the correct position for RTL sheet
+ aMenuPos.X() += bLayoutIsRTL ? -nSizeXPix : nSizeXPix;
aMenuPos.Y() += nSizeYPix;
if (pViewData)
More information about the Libreoffice-commits
mailing list