[Libreoffice-commits] core.git: sd/source
Faisal M. Al-Otaibi
fmalotaibi at kacst.edu.sa
Sun Feb 3 22:24:04 PST 2013
sd/source/ui/toolpanel/LayoutMenu.cxx | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
New commits:
commit 35a45a4508ca4156ebaa4f17df776a971084160d
Author: Faisal M. Al-Otaibi <fmalotaibi at kacst.edu.sa>
Date: Sun Feb 3 08:17:01 2013 +0300
fdo#60213- fix the right-click misbehavior
Change-Id: Iea44c9e70efeb84482aefc70b311f1781241b030
Reviewed-on: https://gerrit.libreoffice.org/1971
Reviewed-by: Norbert Thiebaud <nthiebaud at gmail.com>
Tested-by: Norbert Thiebaud <nthiebaud at gmail.com>
diff --git a/sd/source/ui/toolpanel/LayoutMenu.cxx b/sd/source/ui/toolpanel/LayoutMenu.cxx
index b602b2f..24bcdc1 100644
--- a/sd/source/ui/toolpanel/LayoutMenu.cxx
+++ b/sd/source/ui/toolpanel/LayoutMenu.cxx
@@ -857,13 +857,15 @@ void LayoutMenu::Command (const CommandEvent& rEvent)
{
if (GetShellManager() != NULL)
GetShellManager()->MoveToTop(this);
+ Point aPosition (0,0);
if (rEvent.IsMouseEvent())
{
// Do not show the context menu when the mouse was not
// pressed over an item.
+ // We have to explicitly specify the location of the menu
+ // when the LayoutMenu is undocked
if (GetItemId(rEvent.GetMousePosPixel()) > 0)
- mrBase.GetViewFrame()->GetDispatcher()->ExecutePopup(
- SdResId(RID_TASKPANE_LAYOUTMENU_POPUP));
+ aPosition = rEvent.GetMousePosPixel();
}
else
{
@@ -873,13 +875,13 @@ void LayoutMenu::Command (const CommandEvent& rEvent)
if (GetSelectItemId() != (sal_uInt16)-1)
{
Rectangle aBBox (GetItemRect(GetSelectItemId()));
- Point aPosition (aBBox.Center());
- mrBase.GetViewFrame()->GetDispatcher()->ExecutePopup(
+ aPosition = aBBox.Center();
+ }
+ }
+ mrBase.GetViewFrame()->GetDispatcher()->ExecutePopup(
SdResId(RID_TASKPANE_LAYOUTMENU_POPUP),
this,
&aPosition);
- }
- }
}
break;
More information about the Libreoffice-commits
mailing list