diff options
author | Noel Grandin <noel@peralex.com> | 2015-09-16 14:33:39 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-09-17 08:19:34 +0200 |
commit | 5bda09efbec674fbda24f3adc75be9f0a45517ff (patch) | |
tree | 927c166869f869be56442e77c69c9e6a601e6dff | |
parent | fddd41eb4f87c1a271ed0b40ec1b264148756ff7 (diff) |
convert Link<> to typed
Change-Id: I161636252c47af6f6f8458e41bfa0d0be8461ace
-rw-r--r-- | include/svx/tbcontrl.hxx | 2 | ||||
-rw-r--r-- | svx/source/tbxctrls/colorwindow.hxx | 4 | ||||
-rw-r--r-- | svx/source/tbxctrls/tbcontrl.cxx | 11 |
3 files changed, 8 insertions, 9 deletions
diff --git a/include/svx/tbcontrl.hxx b/include/svx/tbcontrl.hxx index 584b99ed64eb..eb4fe0addd49 100644 --- a/include/svx/tbcontrl.hxx +++ b/include/svx/tbcontrl.hxx @@ -235,7 +235,7 @@ class SVX_DLLPUBLIC SvxColorToolBoxControl : public SfxToolBoxControl BorderColorStatus maBorderColorStatus; bool bSidebarType; ColorSelectFunction maColorSelectFunction; - DECL_LINK(SelectedHdl, Color*); + DECL_LINK_TYPED(SelectedHdl, const Color&, void); public: SFX_DECL_TOOLBOX_CONTROL(); SvxColorToolBoxControl(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rToolBox); diff --git a/svx/source/tbxctrls/colorwindow.hxx b/svx/source/tbxctrls/colorwindow.hxx index 096f95a2e0b3..e68ba9a1adbc 100644 --- a/svx/source/tbxctrls/colorwindow.hxx +++ b/svx/source/tbxctrls/colorwindow.hxx @@ -47,7 +47,7 @@ private: VclPtr<PushButton> mpButtonPicker; VclPtr<FixedLine> mpAutomaticSeparator; OUString maCommand; - Link<> maSelectedLink; + Link<const Color&, void> maSelectedLink; PaletteManager& mrPaletteManager; BorderColorStatus& mrBorderColorStatus; @@ -79,7 +79,7 @@ public: virtual void KeyInput( const KeyEvent& rKEvt ) SAL_OVERRIDE; virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) SAL_OVERRIDE; - void SetSelectedHdl( const Link<>& rLink ) { maSelectedLink = rLink; } + void SetSelectedHdl( const Link<const Color&, void>& rLink ) { maSelectedLink = rLink; } }; #endif diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index 3b65c4842398..eb9a3c88d758 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -1368,7 +1368,7 @@ IMPL_LINK_TYPED(SvxColorWindow_Impl, SelectHdl, ValueSet*, pColorSet, void) EndPopupMode(); if ( maSelectedLink.IsSet() ) - maSelectedLink.Call(&aColor); + maSelectedLink.Call(aColor); maColorSelectFunction(maCommand, aColor); } @@ -1409,7 +1409,7 @@ IMPL_LINK_NOARG_TYPED(SvxColorWindow_Impl, AutoColorClickHdl, Button*, void) EndPopupMode(); if ( maSelectedLink.IsSet() ) - maSelectedLink.Call(&aColor); + maSelectedLink.Call(aColor); maColorSelectFunction(maCommand, aColor); } @@ -2673,11 +2673,10 @@ VclPtr<SfxPopupWindow> SvxColorToolBoxControl::CreatePopupWindow() return pColorWin; } -IMPL_LINK(SvxColorToolBoxControl, SelectedHdl, Color*, pColor) +IMPL_LINK_TYPED(SvxColorToolBoxControl, SelectedHdl, const Color&, rColor, void) { - m_xBtnUpdater->Update( *pColor ); - mPaletteManager.SetLastColor( *pColor ); - return 0; + m_xBtnUpdater->Update( rColor ); + mPaletteManager.SetLastColor( rColor ); } void SvxColorToolBoxControl::StateChanged( |