diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-05-05 22:43:11 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-05-06 08:20:55 +0200 |
commit | b515d1f36fdf8c242079da60eb4ecd5fd456583c (patch) | |
tree | f26dd6feb936ddec4799bed60d4966d46acff938 /vcl | |
parent | f593be5bcde09965bb3478e00bcdedbc6bd5bc57 (diff) |
Use various typed ToolBox::Set*Hdl Links
Change-Id: Iddfd36ae0de86fdd2d4febb2c05d1fe0c02801f0
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/toolbox.h | 2 | ||||
-rw-r--r-- | vcl/source/window/menubarwindow.cxx | 7 | ||||
-rw-r--r-- | vcl/source/window/menubarwindow.hxx | 2 | ||||
-rw-r--r-- | vcl/source/window/toolbox.cxx | 6 | ||||
-rw-r--r-- | vcl/source/window/toolbox2.cxx | 7 |
5 files changed, 9 insertions, 15 deletions
diff --git a/vcl/inc/toolbox.h b/vcl/inc/toolbox.h index 71e841eb5491..57e3081203c3 100644 --- a/vcl/inc/toolbox.h +++ b/vcl/inc/toolbox.h @@ -129,7 +129,7 @@ struct ImplToolBoxPrivateData void ImplClearLayoutData() { delete m_pLayoutData; m_pLayoutData = NULL; } // called when dropdown items are clicked - Link<> maDropdownClickHdl; + Link<ToolBox *, void> maDropdownClickHdl; Timer maDropdownTimer; // for opening dropdown items on "long click" // large or small buttons ? diff --git a/vcl/source/window/menubarwindow.cxx b/vcl/source/window/menubarwindow.cxx index 8c21f8423349..9acf9f742e7e 100644 --- a/vcl/source/window/menubarwindow.cxx +++ b/vcl/source/window/menubarwindow.cxx @@ -226,10 +226,10 @@ Size MenuBarWindow::MinCloseButtonSize() return aCloseBtn->getMinSize(); } -IMPL_LINK_NOARG(MenuBarWindow, CloseHdl) +IMPL_LINK_NOARG_TYPED(MenuBarWindow, CloseHdl, ToolBox *, void) { if( ! pMenu ) - return 0; + return; if( aCloseBtn->GetCurItemId() == IID_DOCUMENTCLOSE ) { @@ -247,10 +247,9 @@ IMPL_LINK_NOARG(MenuBarWindow, CloseHdl) aArg.nId = it->first; aArg.bHighlight = (aCloseBtn->GetHighlightItemId() == it->first); aArg.pMenuBar = dynamic_cast<MenuBar*>(pMenu); - return it->second.m_aSelectLink.Call( &aArg ); + it->second.m_aSelectLink.Call( &aArg ); } } - return 0; } IMPL_LINK( MenuBarWindow, ToolboxEventHdl, VclWindowEvent*, pEvent ) diff --git a/vcl/source/window/menubarwindow.hxx b/vcl/source/window/menubarwindow.hxx index 3f10c6303954..5a6f2e92f7ec 100644 --- a/vcl/source/window/menubarwindow.hxx +++ b/vcl/source/window/menubarwindow.hxx @@ -97,7 +97,7 @@ private: void ImplInitStyleSettings(); - DECL_LINK(CloseHdl, void *); + DECL_LINK_TYPED(CloseHdl, ToolBox *, void); DECL_LINK(FloatHdl, void *); DECL_LINK(HideHdl, void *); DECL_LINK( ToolboxEventHdl, VclWindowEvent* ); diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx index 5c0c54116aeb..adc41ecfb9e1 100644 --- a/vcl/source/window/toolbox.cxx +++ b/vcl/source/window/toolbox.cxx @@ -2639,7 +2639,7 @@ IMPL_LINK_NOARG_TYPED(ToolBox, ImplDropdownLongClickHdl, Timer *, void) ) { mpData->mbDropDownByKeyboard = false; - GetDropdownClickHdl().Call( this ); + mpData->maDropdownClickHdl.Call( this ); // do not reset data if the dropdown handler opened a floating window // see ImplFloatControl() @@ -3869,7 +3869,7 @@ void ToolBox::MouseButtonDown( const MouseEvent& rMEvt ) // the drop down arrow should not trigger the item action mpData->mbDropDownByKeyboard = false; - GetDropdownClickHdl().Call( this ); + mpData->maDropdownClickHdl.Call( this ); // do not reset data if the dropdown handler opened a floating window // see ImplFloatControl() @@ -5024,7 +5024,7 @@ bool ToolBox::ImplOpenItem( vcl::KeyCode aKeyCode ) Activate(); mpData->mbDropDownByKeyboard = true; - GetDropdownClickHdl().Call( this ); + mpData->maDropdownClickHdl.Call( this ); mbIsKeyEvent = false; mbIsShift = false; diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx index a743f6c1b31f..4d3c80186d49 100644 --- a/vcl/source/window/toolbox2.cxx +++ b/vcl/source/window/toolbox2.cxx @@ -1717,16 +1717,11 @@ long ToolBox::GetIndexForPoint( const Point& rPoint, sal_uInt16& rItemID ) const return nIndex; } -void ToolBox::SetDropdownClickHdl( const Link<>& rLink ) +void ToolBox::SetDropdownClickHdl( const Link<ToolBox *, void>& rLink ) { mpData->maDropdownClickHdl = rLink; } -const Link<>& ToolBox::GetDropdownClickHdl() const -{ - return mpData->maDropdownClickHdl; -} - void ToolBox::SetMenuType( sal_uInt16 aType ) { if( aType != mpData->maMenuType ) |