diff options
-rw-r--r-- | sc/source/ui/cctrl/checklistmenu.cxx | 5 | ||||
-rw-r--r-- | sc/source/ui/inc/checklistmenu.hxx | 1 | ||||
-rw-r--r-- | sc/source/ui/view/gridwin.cxx | 3 |
3 files changed, 7 insertions, 2 deletions
diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx index 328c51718364..7dfb572d0182 100644 --- a/sc/source/ui/cctrl/checklistmenu.cxx +++ b/sc/source/ui/cctrl/checklistmenu.cxx @@ -290,6 +290,11 @@ tools::Rectangle ScCheckListMenuControl::GetSubMenuParentRect() return mxMenu->get_row_area(*mxScratchIter); } +sal_Int32 ScCheckListMenuControl::ExecuteMenu(weld::Menu& rMenu) +{ + return rMenu.popup_at_rect(mxMenu.get(), GetSubMenuParentRect(), weld::Placement::End).toInt32(); +} + void ScCheckListMenuControl::launchSubMenu(bool bSetMenuPos) { ScCheckListMenuWindow* pSubMenu = maOpenTimer.mpSubMenu; diff --git a/sc/source/ui/inc/checklistmenu.hxx b/sc/source/ui/inc/checklistmenu.hxx index cb78bf226a45..c9ca6466dff7 100644 --- a/sc/source/ui/inc/checklistmenu.hxx +++ b/sc/source/ui/inc/checklistmenu.hxx @@ -182,6 +182,7 @@ public: * argument for Executing a popup */ tools::Rectangle GetSubMenuParentRect(); + sal_Int32 ExecuteMenu(weld::Menu& rMenu); private: std::vector<MenuItemData> maMenuItems; diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index acd2973075c1..33ea3fe045b8 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -976,8 +976,7 @@ void ScGridWindow::UpdateAutoFilterFromMenu(AutoFilterMode eMode) i++; } - tools::Rectangle aRect = rControl.GetSubMenuParentRect(); - sal_Int32 nSelected = xColorMenu->popup_at_rect(pPopupParent, aRect, weld::Placement::End).toInt32(); + sal_Int32 nSelected = rControl.ExecuteMenu(*xColorMenu); xColorMenu.reset(); rControl.terminateAllPopupMenus(); |