diff options
author | Noel Grandin <noel@peralex.com> | 2015-10-15 08:13:49 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-10-16 09:11:29 +0000 |
commit | 6f1313b3d44ea54e9a331e0fc00871081fa662fe (patch) | |
tree | fa6d9b6da04daedcb63ea2a0bc8c414288ed8bc6 /sd | |
parent | 14bf708ef586b15dffed66ffaf524baf4d8fcbfa (diff) |
convert Link<> to typed
Change-Id: Icbba339dac0be31e30dff021bba06a219f8aecd6
Reviewed-on: https://gerrit.libreoffice.org/19405
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/filter/html/pubdlg.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/animations/CustomAnimationDialog.cxx | 35 | ||||
-rw-r--r-- | sd/source/ui/animations/SlideTransitionPane.cxx | 3 | ||||
-rw-r--r-- | sd/source/ui/animations/SlideTransitionPane.hxx | 2 | ||||
-rw-r--r-- | sd/source/ui/dlg/animobjs.cxx | 8 | ||||
-rw-r--r-- | sd/source/ui/dlg/custsdlg.cxx | 10 | ||||
-rw-r--r-- | sd/source/ui/dlg/dlgass.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/dlg/present.cxx | 5 | ||||
-rw-r--r-- | sd/source/ui/dlg/vectdlg.cxx | 5 | ||||
-rw-r--r-- | sd/source/ui/inc/animobjs.hxx | 4 | ||||
-rw-r--r-- | sd/source/ui/inc/custsdlg.hxx | 3 | ||||
-rw-r--r-- | sd/source/ui/inc/present.hxx | 2 | ||||
-rw-r--r-- | sd/source/ui/inc/vectdlg.hxx | 2 |
13 files changed, 42 insertions, 49 deletions
diff --git a/sd/source/filter/html/pubdlg.cxx b/sd/source/filter/html/pubdlg.cxx index 18b87a1ea5d2..51c9c3fdf37a 100644 --- a/sd/source/filter/html/pubdlg.cxx +++ b/sd/source/filter/html/pubdlg.cxx @@ -355,7 +355,7 @@ public: virtual ~SdDesignNameDlg(); virtual void dispose() override; OUString GetDesignName(); - DECL_LINK(ModifyHdl, void *); + DECL_LINK_TYPED(ModifyHdl, Edit&, void); }; // SdPublishingDlg Methods @@ -1628,11 +1628,9 @@ OUString SdDesignNameDlg::GetDesignName() return m_pEdit->GetText(); } -IMPL_LINK_NOARG(SdDesignNameDlg, ModifyHdl) +IMPL_LINK_NOARG_TYPED(SdDesignNameDlg, ModifyHdl, Edit&, void) { m_pBtnOK->Enable(!m_pEdit->GetText().isEmpty()); - - return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/animations/CustomAnimationDialog.cxx b/sd/source/ui/animations/CustomAnimationDialog.cxx index 83b9c1af69ca..f0d019b87ce6 100644 --- a/sd/source/ui/animations/CustomAnimationDialog.cxx +++ b/sd/source/ui/animations/CustomAnimationDialog.cxx @@ -433,13 +433,15 @@ public: DECL_LINK_TYPED( implMenuSelectHdl, MenuButton*, void ); private: + DECL_LINK_TYPED( EditModifyHdl, Edit&, void ); VclPtr<DropdownMenuBox> mpControl; PopupMenu* mpMenu; VclPtr<MetricField> mpMetric; + Link<> maModifyHdl; }; CharHeightPropertyBox::CharHeightPropertyBox( sal_Int32 nControlType, vcl::Window* pParent, const Any& rValue, const Link<>& rModifyHdl ) -: PropertySubControl( nControlType ) +: PropertySubControl( nControlType ), maModifyHdl(rModifyHdl) { mpMetric.set( VclPtr<MetricField>::Create( pParent, WB_TABSTOP|WB_IGNORETAB| WB_NOBORDER) ); mpMetric->SetUnit( FUNIT_PERCENT ); @@ -449,7 +451,7 @@ CharHeightPropertyBox::CharHeightPropertyBox( sal_Int32 nControlType, vcl::Windo mpMenu = new PopupMenu(SdResId( RID_CUSTOMANIMATION_FONTSIZE_POPUP ) ); mpControl = VclPtr<DropdownMenuBox>::Create( pParent, mpMetric, mpMenu ); mpControl->SetMenuSelectHdl( LINK( this, CharHeightPropertyBox, implMenuSelectHdl )); - mpControl->SetModifyHdl( rModifyHdl ); + mpControl->SetModifyHdl( LINK( this, CharHeightPropertyBox, EditModifyHdl ) ); mpControl->SetHelpId( HID_SD_CUSTOMANIMATIONPANE_CHARHEIGHTPROPERTYBOX ); OUString aPresetId; @@ -461,6 +463,11 @@ CharHeightPropertyBox::~CharHeightPropertyBox() mpControl.disposeAndClear(); } +IMPL_LINK_TYPED( CharHeightPropertyBox, EditModifyHdl, Edit&, rEdit, void ) +{ + maModifyHdl.Call(&rEdit); +} + IMPL_LINK_TYPED( CharHeightPropertyBox, implMenuSelectHdl, MenuButton*, pPb, void ) { long nValue = 100; @@ -507,7 +514,7 @@ public: virtual Control* getControl() override; DECL_LINK_TYPED( implMenuSelectHdl, MenuButton*, void ); - DECL_LINK(implModifyHdl, void *); + DECL_LINK_TYPED( implModifyHdl, Edit&, void ); void updateMenu(); @@ -539,7 +546,7 @@ TransparencyPropertyBox::TransparencyPropertyBox( sal_Int32 nControlType, vcl::W mpControl->SetMenuSelectHdl( LINK( this, TransparencyPropertyBox, implMenuSelectHdl )); mpControl->SetHelpId( HID_SD_CUSTOMANIMATIONPANE_TRANSPARENCYPROPERTYBOX ); - Link<> aLink( LINK( this, TransparencyPropertyBox, implModifyHdl ) ); + Link<Edit&,void> aLink( LINK( this, TransparencyPropertyBox, implModifyHdl ) ); mpControl->SetModifyHdl( aLink ); OUString aPresetId; @@ -558,12 +565,10 @@ void TransparencyPropertyBox::updateMenu() mpMenu->CheckItem( i, nValue == i ); } -IMPL_LINK_NOARG(TransparencyPropertyBox, implModifyHdl) +IMPL_LINK_NOARG_TYPED(TransparencyPropertyBox, implModifyHdl, Edit&, void) { updateMenu(); maModifyHdl.Call(mpMetric.get()); - - return 0; } IMPL_LINK_TYPED( TransparencyPropertyBox, implMenuSelectHdl, MenuButton*, pPb, void ) @@ -609,7 +614,7 @@ public: virtual Control* getControl() override; DECL_LINK_TYPED( implMenuSelectHdl, MenuButton*, void ); - DECL_LINK(implModifyHdl, void *); + DECL_LINK_TYPED( implModifyHdl, Edit&, void ); void updateMenu(); @@ -635,7 +640,7 @@ RotationPropertyBox::RotationPropertyBox( sal_Int32 nControlType, vcl::Window* p mpControl->SetMenuSelectHdl( LINK( this, RotationPropertyBox, implMenuSelectHdl )); mpControl->SetHelpId( HID_SD_CUSTOMANIMATIONPANE_ROTATIONPROPERTYBOX ); - Link<> aLink( LINK( this, RotationPropertyBox, implModifyHdl ) ); + Link<Edit&,void> aLink( LINK( this, RotationPropertyBox, implModifyHdl ) ); mpControl->SetModifyHdl( aLink ); OUString aPresetId; @@ -662,12 +667,10 @@ void RotationPropertyBox::updateMenu() mpMenu->CheckItem( CM_COUNTERCLOCKWISE, !bDirection ); } -IMPL_LINK_NOARG(RotationPropertyBox, implModifyHdl) +IMPL_LINK_NOARG_TYPED(RotationPropertyBox, implModifyHdl, Edit&, void) { updateMenu(); maModifyHdl.Call(mpMetric.get()); - - return 0; } IMPL_LINK_TYPED( RotationPropertyBox, implMenuSelectHdl, MenuButton*, pPb, void ) @@ -732,7 +735,7 @@ public: virtual Control* getControl() override; DECL_LINK_TYPED( implMenuSelectHdl, MenuButton*, void ); - DECL_LINK(implModifyHdl, void *); + DECL_LINK_TYPED( implModifyHdl, Edit&, void ); void updateMenu(); @@ -758,7 +761,7 @@ ScalePropertyBox::ScalePropertyBox( sal_Int32 nControlType, vcl::Window* pParent mpControl->SetMenuSelectHdl( LINK( this, ScalePropertyBox, implMenuSelectHdl )); mpControl->SetHelpId( HID_SD_CUSTOMANIMATIONPANE_SCALEPROPERTYBOX ); - Link<> aLink( LINK( this, ScalePropertyBox, implModifyHdl ) ); + Link<Edit&,void> aLink( LINK( this, ScalePropertyBox, implModifyHdl ) ); mpControl->SetModifyHdl( aLink ); OUString aPresetId; @@ -784,12 +787,10 @@ void ScalePropertyBox::updateMenu() mpMenu->CheckItem( CM_BOTH, mnDirection == 3 ); } -IMPL_LINK_NOARG(ScalePropertyBox, implModifyHdl) +IMPL_LINK_NOARG_TYPED(ScalePropertyBox, implModifyHdl, Edit&, void) { updateMenu(); maModifyHdl.Call(mpMetric.get()); - - return 0; } IMPL_LINK_TYPED( ScalePropertyBox, implMenuSelectHdl, MenuButton*, pPb, void ) diff --git a/sd/source/ui/animations/SlideTransitionPane.cxx b/sd/source/ui/animations/SlideTransitionPane.cxx index 233da3af03f9..5493953033f3 100644 --- a/sd/source/ui/animations/SlideTransitionPane.cxx +++ b/sd/source/ui/animations/SlideTransitionPane.cxx @@ -1009,10 +1009,9 @@ IMPL_LINK_NOARG_TYPED(SlideTransitionPane, AdvanceSlideRadioButtonToggled, Radio applyToSelectedPages(); } -IMPL_LINK_NOARG(SlideTransitionPane, AdvanceTimeModified) +IMPL_LINK_NOARG_TYPED(SlideTransitionPane, AdvanceTimeModified, Edit&, void) { applyToSelectedPages(); - return 0; } IMPL_LINK_NOARG_TYPED(SlideTransitionPane, SpeedListBoxSelected, ListBox&, void) diff --git a/sd/source/ui/animations/SlideTransitionPane.hxx b/sd/source/ui/animations/SlideTransitionPane.hxx index 5d460a7cf17c..41ac9bd4c603 100644 --- a/sd/source/ui/animations/SlideTransitionPane.hxx +++ b/sd/source/ui/animations/SlideTransitionPane.hxx @@ -91,7 +91,7 @@ private: DECL_LINK_TYPED( TransitionSelected, ListBox&, void ); DECL_LINK_TYPED( AdvanceSlideRadioButtonToggled, RadioButton&, void ); - DECL_LINK( AdvanceTimeModified, void * ); + DECL_LINK_TYPED( AdvanceTimeModified, Edit&, void ); DECL_LINK_TYPED( SpeedListBoxSelected, ListBox&, void ); DECL_LINK_TYPED( SoundListBoxSelected, ListBox&, void ); DECL_LINK_TYPED( LoopSoundBoxChecked, Button*, void ); diff --git a/sd/source/ui/dlg/animobjs.cxx b/sd/source/ui/dlg/animobjs.cxx index 4535372b81e6..9c6ea9e18399 100644 --- a/sd/source/ui/dlg/animobjs.cxx +++ b/sd/source/ui/dlg/animobjs.cxx @@ -497,7 +497,7 @@ IMPL_LINK_NOARG_TYPED(AnimationWindow, ClickCreateGroupHdl, Button*, void) SID_ANIMATOR_CREATE, SfxCallMode::SLOT | SfxCallMode::RECORD, &aItem, 0L ); } -IMPL_LINK_NOARG(AnimationWindow, ModifyBitmapHdl) +IMPL_LINK_NOARG_TYPED(AnimationWindow, ModifyBitmapHdl, Edit&, void) { sal_uLong nBmp = static_cast<sal_uLong>(m_pNumFldBitmap->GetValue()); @@ -509,19 +509,15 @@ IMPL_LINK_NOARG(AnimationWindow, ModifyBitmapHdl) m_nCurrentFrame = nBmp - 1; UpdateControl(); - - return 0L; } -IMPL_LINK_NOARG(AnimationWindow, ModifyTimeHdl) +IMPL_LINK_NOARG_TYPED(AnimationWindow, ModifyTimeHdl, Edit&, void) { sal_uLong nPos = static_cast<sal_uLong>(m_pNumFldBitmap->GetValue() - 1); tools::Time *const pTime = m_FrameList[nPos].second; *pTime = m_pTimeField->GetTime(); - - return 0L; } void AnimationWindow::UpdateControl(bool const bDisableCtrls) diff --git a/sd/source/ui/dlg/custsdlg.cxx b/sd/source/ui/dlg/custsdlg.cxx index b926bdf80193..14fff3034c74 100644 --- a/sd/source/ui/dlg/custsdlg.cxx +++ b/sd/source/ui/dlg/custsdlg.cxx @@ -297,7 +297,7 @@ SdDefineCustomShowDlg::SdDefineCustomShowDlg( vcl::Window* pWindow, Link<Button*,void> aLink = LINK( this, SdDefineCustomShowDlg, ClickButtonHdl ); m_pBtnAdd->SetClickHdl( aLink ); m_pBtnRemove->SetClickHdl( aLink ); - m_pEdtName->SetModifyHdl( LINK( this, SdDefineCustomShowDlg, ClickButtonHdl2 ) ); + m_pEdtName->SetModifyHdl( LINK( this, SdDefineCustomShowDlg, ClickButtonEditHdl ) ); m_pLbPages->SetSelectHdl( LINK( this, SdDefineCustomShowDlg, ClickButtonHdl4 ) ); // because of status m_pLbCustomPages->SetSelectHdl( LINK( this, SdDefineCustomShowDlg, ClickButtonHdl3 ) ); // because of status @@ -394,8 +394,12 @@ IMPL_LINK_TYPED( SdDefineCustomShowDlg, ClickButtonHdl4, ListBox&, rListBox, voi { ClickButtonHdl2(&rListBox); } +IMPL_LINK_TYPED( SdDefineCustomShowDlg, ClickButtonEditHdl, Edit&, rEdit, void ) +{ + ClickButtonHdl2(&rEdit); +} // ButtonHdl() -IMPL_LINK( SdDefineCustomShowDlg, ClickButtonHdl2, void *, p ) +void SdDefineCustomShowDlg::ClickButtonHdl2(void* p) { if( p == m_pBtnAdd ) { @@ -441,8 +445,6 @@ IMPL_LINK( SdDefineCustomShowDlg, ClickButtonHdl2, void *, p ) } CheckState(); - - return 0L; } /** diff --git a/sd/source/ui/dlg/dlgass.cxx b/sd/source/ui/dlg/dlgass.cxx index d372d55a92c0..47ba9f569bb6 100644 --- a/sd/source/ui/dlg/dlgass.cxx +++ b/sd/source/ui/dlg/dlgass.cxx @@ -239,7 +239,7 @@ public: DECL_LINK_TYPED( SelectLayoutHdl, ListBox&, void ); DECL_LINK_TYPED( PageSelectHdl, SvTreeListBox*, void ); DECL_LINK_TYPED( PresTypeHdl, Button*, void ); - DECL_LINK( UpdateUserDataHdl, void * ); + DECL_LINK_TYPED( UpdateUserDataHdl, Edit&, void ); DECL_LINK_TYPED( SelectEffectHdl, ListBox&, void); DECL_LINK_TYPED( OpenButtonHdl, Button *, void ); @@ -1235,7 +1235,7 @@ IMPL_LINK_NOARG_TYPED(AssistentDlgImpl, PresTypeHdl, Button*, void) mpPage3LogoCB->Enable(bKiosk); } -IMPL_LINK_NOARG(AssistentDlgImpl, UpdateUserDataHdl) +IMPL_LINK_NOARG_TYPED(AssistentDlgImpl, UpdateUserDataHdl, Edit&, void) { mbUserDataDirty = true; OUString aTopic = mpPage4AskTopicEDT->GetText(); @@ -1244,8 +1244,6 @@ IMPL_LINK_NOARG(AssistentDlgImpl, UpdateUserDataHdl) if (aTopic.isEmpty() && aName.isEmpty() && aInfo.isEmpty()) maDocFile.clear(); - - return 0; } // ******************************************************************** diff --git a/sd/source/ui/dlg/present.cxx b/sd/source/ui/dlg/present.cxx index 7891916a5e53..472f523f821c 100644 --- a/sd/source/ui/dlg/present.cxx +++ b/sd/source/ui/dlg/present.cxx @@ -147,7 +147,7 @@ SdStartPresentationDlg::SdStartPresentationDlg( vcl::Window* pWindow, ChangeRangeHdl( NULL ); ClickWindowPresentationHdl( NULL ); - ChangePauseHdl( NULL ); + ChangePauseHdl( *aTmfPause ); } SdStartPresentationDlg::~SdStartPresentationDlg() @@ -356,10 +356,9 @@ IMPL_LINK_NOARG_TYPED(SdStartPresentationDlg, ClickWindowPresentationHdl, Button /** * Handler: Enabled/Disabled Checkbox "AlwaysOnTop" */ -IMPL_LINK_NOARG(SdStartPresentationDlg, ChangePauseHdl) +IMPL_LINK_NOARG_TYPED(SdStartPresentationDlg, ChangePauseHdl, Edit&, void) { aCbxAutoLogo->Enable( aRbtAuto->IsChecked() && ( aTmfPause->GetTime().GetMSFromTime() > 0 ) ); - return 0L; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/dlg/vectdlg.cxx b/sd/source/ui/dlg/vectdlg.cxx index c856505e005c..3c17bf048c45 100644 --- a/sd/source/ui/dlg/vectdlg.cxx +++ b/sd/source/ui/dlg/vectdlg.cxx @@ -294,13 +294,12 @@ IMPL_LINK_TYPED( SdVectorizeDlg, ToggleHdl, CheckBox&, rCb, void ) m_pMtFillHoles->Disable(); } - ModifyHdl( NULL ); + m_pBtnPreview->Enable(); } -IMPL_LINK_NOARG(SdVectorizeDlg, ModifyHdl) +IMPL_LINK_NOARG_TYPED(SdVectorizeDlg, ModifyHdl, Edit&, void) { m_pBtnPreview->Enable(); - return 0L; } void SdVectorizeDlg::LoadSettings() diff --git a/sd/source/ui/inc/animobjs.hxx b/sd/source/ui/inc/animobjs.hxx index 57901e0519d8..660e739cafa9 100644 --- a/sd/source/ui/inc/animobjs.hxx +++ b/sd/source/ui/inc/animobjs.hxx @@ -141,8 +141,8 @@ private: DECL_LINK_TYPED( ClickRemoveBitmapHdl, Button*, void ); DECL_LINK_TYPED( ClickRbtHdl, Button*, void ); DECL_LINK_TYPED( ClickCreateGroupHdl, Button*, void ); - DECL_LINK( ModifyBitmapHdl, void * ); - DECL_LINK( ModifyTimeHdl, void * ); + DECL_LINK_TYPED( ModifyBitmapHdl, Edit&, void ); + DECL_LINK_TYPED( ModifyTimeHdl, Edit&, void ); void UpdateControl(bool bDisableCtrls = false); void ResetAttrs(); diff --git a/sd/source/ui/inc/custsdlg.hxx b/sd/source/ui/inc/custsdlg.hxx index ce69dc7a75b5..adb694d01c0e 100644 --- a/sd/source/ui/inc/custsdlg.hxx +++ b/sd/source/ui/inc/custsdlg.hxx @@ -85,10 +85,11 @@ private: void CheckCustomShow(); DECL_LINK_TYPED( ClickButtonHdl, Button*, void ); - DECL_LINK( ClickButtonHdl2, void* ); + DECL_LINK_TYPED( ClickButtonEditHdl, Edit&, void ); DECL_LINK_TYPED( ClickButtonHdl3, SvTreeListBox*, void ); DECL_LINK_TYPED( ClickButtonHdl4, ListBox&, void ); DECL_LINK_TYPED( OKHdl, Button*, void ); + void ClickButtonHdl2(void*); public: diff --git a/sd/source/ui/inc/present.hxx b/sd/source/ui/inc/present.hxx index 05d8518743f4..6e6a42cab269 100644 --- a/sd/source/ui/inc/present.hxx +++ b/sd/source/ui/inc/present.hxx @@ -71,7 +71,7 @@ private: DECL_LINK_TYPED( ChangeRangeHdl, Button*, void ); DECL_LINK_TYPED( ClickWindowPresentationHdl, Button*, void ); - DECL_LINK( ChangePauseHdl, void * ); + DECL_LINK_TYPED( ChangePauseHdl, Edit&, void ); void InitMonitorSettings(); enum DisplayType { diff --git a/sd/source/ui/inc/vectdlg.hxx b/sd/source/ui/inc/vectdlg.hxx index a9774ce641af..c711ea71ea80 100644 --- a/sd/source/ui/inc/vectdlg.hxx +++ b/sd/source/ui/inc/vectdlg.hxx @@ -75,7 +75,7 @@ class SdVectorizeDlg : public ModalDialog DECL_LINK_TYPED( ClickPreviewHdl, Button*, void ); DECL_LINK_TYPED( ClickOKHdl, Button*, void ); DECL_LINK_TYPED( ToggleHdl, CheckBox&, void ); - DECL_LINK( ModifyHdl, void* ); + DECL_LINK_TYPED( ModifyHdl, Edit&, void ); public: |