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 | e455b74b71be1d3c80c0013fb156bd09addb8fbf (patch) | |
tree | 365cbfd6a9e0e087f18f700718cf89fe251b4dbd /sc/source/ui/cctrl | |
parent | 232846564306676c550c7f5dfb0febb640176310 (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')
-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 20a846d87..02cf49915 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(); } // ============================================================================ |