diff options
author | Kohei Yoshida <kohei@openoffice.org> | 2009-08-21 19:17:39 +0000 |
---|---|---|
committer | Kohei Yoshida <kohei@openoffice.org> | 2009-08-21 19:17:39 +0000 |
commit | 9dffba7f4b3e7bb139993ab7e94b6c20965ef9ab (patch) | |
tree | ee3b96d32c6ac5cd0e58a44584e9e377048f8012 /sc/source/ui/cctrl/dpcontrol.cxx | |
parent | ed33032301907f6888b49cacb61ec10f78dee9ae (diff) |
When a menu action is fired via accessible object, we need to make sure that all the popup windows get dismissed.
Diffstat (limited to 'sc/source/ui/cctrl/dpcontrol.cxx')
-rw-r--r-- | sc/source/ui/cctrl/dpcontrol.cxx | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/sc/source/ui/cctrl/dpcontrol.cxx b/sc/source/ui/cctrl/dpcontrol.cxx index bcf01317d3de..cd7aca9acc2f 100644 --- a/sc/source/ui/cctrl/dpcontrol.cxx +++ b/sc/source/ui/cctrl/dpcontrol.cxx @@ -289,8 +289,7 @@ ScMenuFloatingWindow::ScMenuFloatingWindow(Window* pParent, ScDocument* pDoc, US mnClickedMenu(MENU_NOT_SELECTED), mpDoc(pDoc), mpParentMenu(dynamic_cast<ScMenuFloatingWindow*>(pParent)), - mpActiveSubMenu(NULL), - mbActionFired(false) + mpActiveSubMenu(NULL) { SetMenuStackLevel(nMenuStackLevel); @@ -508,8 +507,7 @@ void ScMenuFloatingWindow::executeMenuItem(size_t nPos) return; maMenuItems[nPos].mpAction->execute(); - mbActionFired = true; - EndPopupMode(); + terminateAllPopupMenus(); } void ScMenuFloatingWindow::setSelectedMenuItem(size_t nPos, bool bSubMenuTimer, bool bEnsureSubMenu) @@ -910,12 +908,11 @@ void ScMenuFloatingWindow::ensureSubMenuNotVisible() EndPopupMode(); } -IMPL_LINK( ScMenuFloatingWindow, EndPopupHdl, void*, EMPTYARG ) +void ScMenuFloatingWindow::terminateAllPopupMenus() { - if (mbActionFired && mpParentMenu) - mpParentMenu->EndPopupMode(); - - return 0; + EndPopupMode(); + if (mpParentMenu) + mpParentMenu->terminateAllPopupMenus(); } // ============================================================================ |