diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-05-06 11:07:59 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-05-06 12:54:23 +0200 |
commit | 98b5f1164b11ee7b84bf7efc16256afc5c58fcb8 (patch) | |
tree | 8d3579b6e13ffcf97a42a7039ee24a0c9a4f17fd | |
parent | e1b8ae4b2e5b5d99a51011a5d18f23df0448e379 (diff) |
Use typed ToolBox::SetMenuButtonHdl Link
Change-Id: I00cd35374294ccdcc0ac3223ae81ba8129b9a5d7
-rw-r--r-- | framework/inc/uielement/toolbarmanager.hxx | 2 | ||||
-rw-r--r-- | framework/source/uielement/toolbarmanager.cxx | 6 | ||||
-rw-r--r-- | include/vcl/toolbox.hxx | 2 | ||||
-rw-r--r-- | vcl/inc/toolbox.h | 2 | ||||
-rw-r--r-- | vcl/source/window/toolbox2.cxx | 2 |
5 files changed, 6 insertions, 8 deletions
diff --git a/framework/inc/uielement/toolbarmanager.hxx b/framework/inc/uielement/toolbarmanager.hxx index f8e89326beaa..3acc8c6fe3f2 100644 --- a/framework/inc/uielement/toolbarmanager.hxx +++ b/framework/inc/uielement/toolbarmanager.hxx @@ -138,7 +138,7 @@ class ToolBarManager : public ToolbarManager_Base DECL_LINK_TYPED( DataChanged, DataChangedEvent const *, void ); DECL_LINK( MiscOptionsChanged, void* ); - DECL_LINK( MenuButton, ToolBox * ); + DECL_LINK_TYPED( MenuButton, ToolBox *, void ); DECL_LINK( MenuSelect, Menu * ); DECL_LINK( MenuDeactivate, Menu * ); DECL_LINK_TYPED(AsyncUpdateControllersHdl, Timer *, void); diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx index 52d3081f223c..d175b6edba44 100644 --- a/framework/source/uielement/toolbarmanager.cxx +++ b/framework/source/uielement/toolbarmanager.cxx @@ -1811,18 +1811,16 @@ IMPL_LINK_TYPED( ToolBarManager, Command, CommandEvent const *, pCmdEvt, void ) } } -IMPL_LINK( ToolBarManager, MenuButton, ToolBox*, pToolBar ) +IMPL_LINK_TYPED( ToolBarManager, MenuButton, ToolBox*, pToolBar, void ) { SolarMutexGuard g; if ( m_bDisposed ) - return 1; + return; pToolBar->UpdateCustomMenu(); // remove all entries that do not come from the toolbar itself (fdo#38276) ImplClearPopupMenu( pToolBar ); - - return 0; } IMPL_LINK( ToolBarManager, MenuSelect, Menu*, pMenu ) diff --git a/include/vcl/toolbox.hxx b/include/vcl/toolbox.hxx index ad3e7ccc6339..bff42bf7dba1 100644 --- a/include/vcl/toolbox.hxx +++ b/include/vcl/toolbox.hxx @@ -520,7 +520,7 @@ public: bool IsMenuEnabled() const; PopupMenu* GetMenu() const; void UpdateCustomMenu(); - void SetMenuButtonHdl( const Link<>& rLink ); + void SetMenuButtonHdl( const Link<ToolBox *, void>& rLink ); // open custommenu void ExecuteCustomMenu(); diff --git a/vcl/inc/toolbox.h b/vcl/inc/toolbox.h index 57e3081203c3..e8c7a1fedb9a 100644 --- a/vcl/inc/toolbox.h +++ b/vcl/inc/toolbox.h @@ -141,7 +141,7 @@ struct ImplToolBoxPrivateData ImplSVEvent * mnEventId; // called when menu button is clicked and before the popup menu is executed - Link<> maMenuButtonHdl; + Link<ToolBox *, void> maMenuButtonHdl; // a dummy item representing the custom menu button ImplToolItem maMenubuttonItem; diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx index 0a65b8367d27..cab1a37a7a11 100644 --- a/vcl/source/window/toolbox2.cxx +++ b/vcl/source/window/toolbox2.cxx @@ -1773,7 +1773,7 @@ PopupMenu* ToolBox::GetMenu() const return mpData->mpMenu; } -void ToolBox::SetMenuButtonHdl( const Link<>& rLink ) +void ToolBox::SetMenuButtonHdl( const Link<ToolBox *, void>& rLink ) { mpData->maMenuButtonHdl = rLink; } |