[Libreoffice-commits] core.git: sc/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Tue Jun 30 16:43:23 UTC 2020
sc/source/ui/cctrl/checklistmenu.cxx | 8 ++++----
sc/source/ui/inc/checklistmenu.hxx | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
New commits:
commit 8bfc3b5814c65e2eb1fcdaf23c19db8470b8818c
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Jun 30 10:16:52 2020 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Jun 30 18:42:42 2020 +0200
prefer down for main dropdown and right for subdropdown
Change-Id: I89d689e0cf2aea246b5fa6b545807d7059e076f9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97480
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx
index 97577a0ed881..242750c61b1a 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -278,7 +278,7 @@ void ScCheckListMenuControl::launchSubMenu(bool bSetMenuPos)
tools::Rectangle aRect = mxMenu->get_row_area(*mxScratchIter);
ScCheckListMenuControl& rSubMenuControl = pSubMenu->get_widget();
- rSubMenuControl.StartPopupMode(aRect);
+ rSubMenuControl.StartPopupMode(aRect, FloatWinPopupFlags::Right);
if (bSetMenuPos)
rSubMenuControl.setSelectedMenuItem(0, false); // select menu item after the popup becomes fully visible.
@@ -386,12 +386,12 @@ void ScCheckListMenuControl::EndPopupMode()
mxFrame->EnableDocking(false);
}
-void ScCheckListMenuControl::StartPopupMode(const tools::Rectangle& rRect)
+void ScCheckListMenuControl::StartPopupMode(const tools::Rectangle& rRect, FloatWinPopupFlags eFlags)
{
mxFrame->EnableDocking(true);
DockingManager* pDockingManager = vcl::Window::GetDockingManager();
pDockingManager->SetPopupModeEndHdl(mxFrame, LINK(this, ScCheckListMenuControl, PopupModeEndHdl));
- pDockingManager->StartPopupMode(mxFrame, rRect, (FloatWinPopupFlags::Right | FloatWinPopupFlags::GrabFocus));
+ pDockingManager->StartPopupMode(mxFrame, rRect, (eFlags | FloatWinPopupFlags::GrabFocus));
}
void ScCheckListMenuControl::terminateAllPopupMenus()
@@ -1297,7 +1297,7 @@ void ScCheckListMenuControl::launch(const tools::Rectangle& rRect)
aRect.AdjustLeft(nDiff );
}
- StartPopupMode(aRect);
+ StartPopupMode(aRect, FloatWinPopupFlags::Down);
}
void ScCheckListMenuControl::close(bool bOK)
diff --git a/sc/source/ui/inc/checklistmenu.hxx b/sc/source/ui/inc/checklistmenu.hxx
index 0b2c585d4c76..a6fc2e56fc93 100644
--- a/sc/source/ui/inc/checklistmenu.hxx
+++ b/sc/source/ui/inc/checklistmenu.hxx
@@ -138,7 +138,7 @@ public:
void launch(const tools::Rectangle& rRect);
void close(bool bOK);
- void StartPopupMode(const tools::Rectangle& rRect);
+ void StartPopupMode(const tools::Rectangle& rRect, FloatWinPopupFlags eFlags);
void EndPopupMode();
size_t getSubMenuPos(const ScCheckListMenuControl* pSubMenu);
More information about the Libreoffice-commits
mailing list