diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-05-06 10:17:36 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-05-06 12:54:22 +0200 |
commit | 1e64fe1364dc4aed8d46671e5b7160244b77db76 (patch) | |
tree | f742584211fee60328fe25f7ea5056c660ae851b /framework/source | |
parent | 1a5f1e82a96b5c8c9d523fd58c330498936cd2fe (diff) |
Use typed ToolBox::SetCommandHdl Link
Change-Id: Ieee142ddebb288037647fb77bac6f11b9827c4a8
Diffstat (limited to 'framework/source')
-rw-r--r-- | framework/source/uielement/addonstoolbarmanager.cxx | 11 | ||||
-rw-r--r-- | framework/source/uielement/toolbarmanager.cxx | 10 |
2 files changed, 6 insertions, 15 deletions
diff --git a/framework/source/uielement/addonstoolbarmanager.cxx b/framework/source/uielement/addonstoolbarmanager.cxx index ca56c441624a..b8a9bf8ece78 100644 --- a/framework/source/uielement/addonstoolbarmanager.cxx +++ b/framework/source/uielement/addonstoolbarmanager.cxx @@ -413,15 +413,8 @@ IMPL_LINK_NOARG_TYPED(AddonsToolBarManager, DoubleClick, ToolBox *, void) } } -IMPL_LINK_NOARG(AddonsToolBarManager, Command) -{ - SolarMutexGuard g; - - if ( m_bDisposed ) - return 1; - - return 0; -} +IMPL_LINK_NOARG_TYPED(AddonsToolBarManager, Command, CommandEvent const *, void) +{} IMPL_LINK_NOARG_TYPED(AddonsToolBarManager, Select, ToolBox *, void) { diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx index ca2c94356642..aa163b976799 100644 --- a/framework/source/uielement/toolbarmanager.cxx +++ b/framework/source/uielement/toolbarmanager.cxx @@ -285,7 +285,7 @@ void ToolBarManager::Destroy() m_pToolBar->SetDoubleClickHdl( Link<ToolBox *, void>() ); m_pToolBar->SetStateChangedHdl( aEmpty ); m_pToolBar->SetDataChangedHdl( aEmpty ); - m_pToolBar->SetCommandHdl( aEmpty ); + m_pToolBar->SetCommandHdl( Link<CommandEvent const *, void>() ); m_pToolBar.clear(); @@ -1772,14 +1772,14 @@ bool ToolBarManager::MenuItemAllowed( sal_uInt16 ) const return pMenu; } -IMPL_LINK( ToolBarManager, Command, CommandEvent*, pCmdEvt ) +IMPL_LINK_TYPED( ToolBarManager, Command, CommandEvent const *, pCmdEvt, void ) { SolarMutexGuard g; if ( m_bDisposed ) - return 1; + return; if ( pCmdEvt->GetCommand() != COMMAND_CONTEXTMENU ) - return 0; + return; ::PopupMenu * pMenu = GetToolBarCustomMenu(m_pToolBar); if (pMenu) @@ -1810,8 +1810,6 @@ IMPL_LINK( ToolBarManager, Command, CommandEvent*, pCmdEvt ) pManagerMenu->SetDeactivateHdl( Link<>() ); } } - - return 0; } IMPL_LINK( ToolBarManager, MenuButton, ToolBox*, pToolBar ) |