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 /svx | |
parent | fddd41eb4f87c1a271ed0b40ec1b264148756ff7 (diff) |
convert Link<> to typed
Change-Id: I161636252c47af6f6f8458e41bfa0d0be8461ace
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/tbxctrls/colorwindow.hxx | 4 | ||||
-rw-r--r-- | svx/source/tbxctrls/tbcontrl.cxx | 11 |
2 files changed, 7 insertions, 8 deletions
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( |