summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--framework/inc/uielement/toolbarmanager.hxx2
-rw-r--r--framework/source/uielement/toolbarmanager.cxx19
2 files changed, 6 insertions, 15 deletions
diff --git a/framework/inc/uielement/toolbarmanager.hxx b/framework/inc/uielement/toolbarmanager.hxx
index 41e2539174f8..692652e5404a 100644
--- a/framework/inc/uielement/toolbarmanager.hxx
+++ b/framework/inc/uielement/toolbarmanager.hxx
@@ -128,7 +128,7 @@ class ToolBarManager : public ToolbarManager_Base
DECL_LINK_TYPED( MenuButton, ToolBox *, void );
DECL_LINK_TYPED( MenuSelect, Menu *, bool );
- DECL_LINK_TYPED( MenuDeactivate, Menu *, bool );
+ void MenuDeactivated();
DECL_LINK_TYPED(AsyncUpdateControllersHdl, Timer *, void);
DECL_STATIC_LINK_TYPED( ToolBarManager, ExecuteHdl_Impl, void*, void );
diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx
index 4eb687710dd0..0feaabe3b5a5 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -1332,19 +1332,11 @@ void ToolBarManager::ImplClearPopupMenu( ToolBox *pToolBar )
}
}
-IMPL_LINK_TYPED( ToolBarManager, MenuDeactivate, Menu*, pMenu, bool )
+void ToolBarManager::MenuDeactivated()
{
- SolarMutexGuard g;
-
- if ( m_bDisposed )
- return true;
-
- if( pMenu != m_pToolBar->GetMenu() )
- return true;
-
- ImplClearPopupMenu( m_pToolBar );
-
- return false;
+ if (m_bDisposed)
+ return;
+ ImplClearPopupMenu(m_pToolBar);
}
Reference< XModel > ToolBarManager::GetModelFromFrame() const
@@ -1539,7 +1531,6 @@ IMPL_LINK_TYPED( ToolBarManager, Command, CommandEvent const *, pCmdEvt, void )
// when the menu is being used as an overflow menu.
Menu *pManagerMenu = m_pToolBar->GetMenu();
pManagerMenu->SetSelectHdl( LINK( this, ToolBarManager, MenuSelect ) );
- pManagerMenu->SetDeactivateHdl( LINK( this, ToolBarManager, MenuDeactivate ) );
// make sure all disabled entries will be shown
pMenu->SetMenuFlags( pMenu->GetMenuFlags() | MenuFlags::AlwaysShowDisabledEntries );
@@ -1553,7 +1544,7 @@ IMPL_LINK_TYPED( ToolBarManager, Command, CommandEvent const *, pCmdEvt, void )
{
// Unlink our listeners again -- see above for why.
pManagerMenu->SetSelectHdl( Link<Menu*, bool>() );
- pManagerMenu->SetDeactivateHdl( Link<Menu *, bool>() );
+ MenuDeactivated();
}
}
}