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 /svx | |
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 'svx')
38 files changed, 169 insertions, 231 deletions
diff --git a/svx/inc/tbunosearchcontrollers.hxx b/svx/inc/tbunosearchcontrollers.hxx index 4a22a96ac409..c180023d28a3 100644 --- a/svx/inc/tbunosearchcontrollers.hxx +++ b/svx/inc/tbunosearchcontrollers.hxx @@ -113,7 +113,7 @@ public: // XStatusListener virtual void SAL_CALL statusChanged( const css::frame::FeatureStateEvent& Event ) throw ( css::uno::RuntimeException, std::exception ) override; - DECL_LINK(EditModifyHdl, void*); + DECL_LINK_TYPED(EditModifyHdl, Edit&, void); private: diff --git a/svx/source/dialog/compressgraphicdialog.cxx b/svx/source/dialog/compressgraphicdialog.cxx index 05a379ebd11b..b28055bc173a 100644 --- a/svx/source/dialog/compressgraphicdialog.cxx +++ b/svx/source/dialog/compressgraphicdialog.cxx @@ -286,37 +286,31 @@ void CompressGraphicsDialog::Compress(SvStream& aStream) rFilter.ExportGraphic( aScaledGraphic, OUString( "none" ), aStream, nFilterFormat, &aFilterData ); } -IMPL_LINK_NOARG( CompressGraphicsDialog, NewWidthModifiedHdl ) +IMPL_LINK_NOARG_TYPED( CompressGraphicsDialog, NewWidthModifiedHdl, Edit&, void ) { m_dResolution = m_pMFNewWidth->GetValue() / GetViewWidthInch(); UpdateNewHeightMF(); UpdateResolutionLB(); Update(); - - return 0L; } -IMPL_LINK_NOARG( CompressGraphicsDialog, NewHeightModifiedHdl ) +IMPL_LINK_NOARG_TYPED( CompressGraphicsDialog, NewHeightModifiedHdl, Edit&, void ) { m_dResolution = m_pMFNewHeight->GetValue() / GetViewHeightInch(); UpdateNewWidthMF(); UpdateResolutionLB(); Update(); - - return 0L; } -IMPL_LINK_NOARG( CompressGraphicsDialog, ResolutionModifiedHdl ) +IMPL_LINK_NOARG_TYPED( CompressGraphicsDialog, ResolutionModifiedHdl, Edit&, void ) { m_dResolution = (double) m_pResolutionLB->GetText().toInt32(); UpdateNewWidthMF(); UpdateNewHeightMF(); Update(); - - return 0L; } IMPL_LINK_NOARG_TYPED( CompressGraphicsDialog, ToggleCompressionRB, RadioButton&, void ) diff --git a/svx/source/dialog/ctredlin.cxx b/svx/source/dialog/ctredlin.cxx index 81c344b22784..6eedfa8e315c 100644 --- a/svx/source/dialog/ctredlin.cxx +++ b/svx/source/dialog/ctredlin.cxx @@ -577,13 +577,13 @@ SvxTPFilter::SvxTPFilter( vcl::Window * pParent) m_pCbAction->SetClickHdl(aLink); m_pCbComment->SetClickHdl(aLink); - Link<> a2Link=LINK( this, SvxTPFilter, ModifyDate); + Link<Edit&,void> a2Link=LINK( this, SvxTPFilter, ModifyDate); m_pDfDate->SetModifyHdl(a2Link); m_pTfDate->SetModifyHdl(a2Link); m_pDfDate2->SetModifyHdl(a2Link); m_pTfDate2->SetModifyHdl(a2Link); - Link<> a3Link=LINK( this, SvxTPFilter, ModifyHdl); + Link<Edit&,void> a3Link=LINK( this, SvxTPFilter, ModifyHdl); m_pEdRange->SetModifyHdl(a3Link); m_pEdComment->SetModifyHdl(a3Link); m_pLbAction->SetSelectHdl(LINK( this, SvxTPFilter, ModifyListBoxHdl)); @@ -907,10 +907,10 @@ void SvxTPFilter::ShowAction(bool bShow) } -IMPL_LINK_TYPED( SvxTPFilter, SelDateHdl, ListBox&, rLb, void ) +IMPL_LINK_NOARG_TYPED( SvxTPFilter, SelDateHdl, ListBox&, void ) { ShowDateFields(static_cast<SvxRedlinDateMode>(m_pLbDate->GetSelectEntryPos())); - ModifyHdl(&rLb); + bModified=true; } IMPL_LINK_TYPED( SvxTPFilter, RowEnableHdl, Button*, pButton, void ) @@ -945,7 +945,8 @@ IMPL_LINK_TYPED( SvxTPFilter, RowEnableHdl, Button*, pButton, void ) m_pEdComment->Invalidate(); } - ModifyHdl(pCB); + if(pCB!=NULL) + bModified=true; } IMPL_LINK_TYPED( SvxTPFilter, TimeHdl, Button*, pButton, void ) @@ -963,22 +964,16 @@ IMPL_LINK_TYPED( SvxTPFilter, TimeHdl, Button*, pButton, void ) m_pDfDate2->SetDate(aDate); m_pTfDate2->SetTime(aTime); } - ModifyHdl(m_pDfDate); + bModified=true; } - -IMPL_LINK( SvxTPFilter, ModifyHdl, void*, pCtr) +IMPL_LINK_NOARG_TYPED( SvxTPFilter, ModifyHdl, Edit&, void) { - if(pCtr!=NULL) - { - bModified=true; - } - return 0; + bModified=true; } IMPL_LINK_NOARG_TYPED( SvxTPFilter, ModifyListBoxHdl, ListBox&, void) { bModified=true; } - void SvxTPFilter::DeactivatePage() { if(bModified) @@ -1026,12 +1021,11 @@ void SvxTPFilter::Disable( bool bChild) Enable( false, bChild ); } -IMPL_LINK( SvxTPFilter, ModifyDate, void*,pTF) +IMPL_LINK_TYPED( SvxTPFilter, ModifyDate, Edit&, rTF, void) { - Date aDate( Date::SYSTEM ); tools::Time aTime(0); - if (m_pDfDate==pTF) + if (m_pDfDate==&rTF) { if(m_pDfDate->GetText().isEmpty()) m_pDfDate->SetDate(aDate); @@ -1039,7 +1033,7 @@ IMPL_LINK( SvxTPFilter, ModifyDate, void*,pTF) if(pRedlinTable!=nullptr) pRedlinTable->SetFirstDate(m_pDfDate->GetDate()); } - else if (m_pDfDate2==pTF) + else if (m_pDfDate2==&rTF) { if(m_pDfDate2->GetText().isEmpty()) m_pDfDate2->SetDate(aDate); @@ -1047,7 +1041,7 @@ IMPL_LINK( SvxTPFilter, ModifyDate, void*,pTF) if(pRedlinTable!=nullptr) pRedlinTable->SetLastDate(m_pDfDate2->GetDate()); } - else if (m_pTfDate==pTF) + else if (m_pTfDate==&rTF) { if(m_pTfDate->GetText().isEmpty()) m_pTfDate->SetTime(aTime); @@ -1055,7 +1049,7 @@ IMPL_LINK( SvxTPFilter, ModifyDate, void*,pTF) if(pRedlinTable!=nullptr) pRedlinTable->SetFirstTime(m_pTfDate->GetTime()); } - else if (m_pTfDate2==pTF) + else if (m_pTfDate2==&rTF) { if(m_pTfDate2->GetText().isEmpty()) m_pTfDate2->SetTime(aTime); @@ -1064,8 +1058,7 @@ IMPL_LINK( SvxTPFilter, ModifyDate, void*,pTF) pRedlinTable->SetLastTime(m_pTfDate2->GetTime()); } - ModifyHdl(m_pDfDate); - return 0; + ModifyHdl(*m_pDfDate); } IMPL_LINK_TYPED( SvxTPFilter, RefHandle, Button*, pRef, void ) diff --git a/svx/source/dialog/dialcontrol.cxx b/svx/source/dialog/dialcontrol.cxx index 4b2169c02603..e0834a7d873f 100644 --- a/svx/source/dialog/dialcontrol.cxx +++ b/svx/source/dialog/dialcontrol.cxx @@ -393,17 +393,52 @@ void DialControl::SetLinkedField( NumericField* pField, sal_Int32 nDecimalPlaces mpImpl->mnLinkedFieldValueMultiplyer = 100 / std::pow(10.0, double(nDecimalPlaces)); // remove modify handler from old linked field - ImplSetFieldLink( Link<>() ); if( mpImpl->mpLinkField ) - mpImpl->mpLinkField->SetLoseFocusHdl( Link<Control&,void>() ); + { + NumericField& rField = *mpImpl->mpLinkField; + rField.SetModifyHdl( Link<Edit&,void>() ); + rField.SetUpHdl( Link<SpinField&,void>() ); + rField.SetDownHdl( Link<SpinField&,void>() ); + rField.SetFirstHdl( Link<SpinField&,void>() ); + rField.SetLastHdl( Link<SpinField&,void>() ); + rField.SetLoseFocusHdl( Link<Control&,void>() ); + } // remember the new linked field mpImpl->mpLinkField = pField; // set modify handler at new linked field - ImplSetFieldLink( LINK( this, DialControl, LinkedFieldModifyHdl ) ); if( mpImpl->mpLinkField ) - mpImpl->mpLinkField->SetLoseFocusHdl( LINK( this, DialControl, LinkedFieldFocusHdl ) ); + { + NumericField& rField = *mpImpl->mpLinkField; + rField.SetModifyHdl( LINK( this, DialControl, LinkedFieldModifyHdl ) ); + rField.SetUpHdl( LINK(this, DialControl, SpinFieldHdl) ); + rField.SetDownHdl( LINK(this, DialControl, SpinFieldHdl) ); + rField.SetFirstHdl( LINK(this, DialControl, SpinFieldHdl) ); + rField.SetLastHdl( LINK(this, DialControl, SpinFieldHdl) ); + rField.SetLoseFocusHdl( LINK( this, DialControl, LinkedFieldFocusHdl ) ); + } +} +IMPL_LINK_NOARG_TYPED( DialControl, LinkedFieldModifyHdl, Edit&, void ) +{ + LinkedFieldModifyHdl(); +} +IMPL_LINK_NOARG_TYPED( DialControl, LinkedFieldFocusHdl, Control&, void ) +{ + LinkedFieldModifyHdl(); +} +IMPL_LINK_NOARG_TYPED(DialControl, SpinFieldHdl, SpinField&, void) +{ + LinkedFieldModifyHdl(); +} + +void DialControl::LinkedFieldModifyHdl() +{ + if( mpImpl->mpLinkField ) + SetRotation( static_cast< sal_Int32 >( mpImpl->mpLinkField->GetValue() * mpImpl->mnLinkedFieldValueMultiplyer ), false ); } + + + void DialControl::SaveValue() { mpImpl->mnInitialAngle = mpImpl->mnAngle; @@ -466,28 +501,6 @@ void DialControl::SetRotation( sal_Int32 nAngle, bool bBroadcast ) } } -void DialControl::ImplSetFieldLink( const Link<>& rLink ) -{ - if( mpImpl->mpLinkField ) - { - NumericField& rField = *mpImpl->mpLinkField; - rField.SetModifyHdl( rLink ); - rField.SetUpHdl( LINK(this, DialControl, SpinFieldHdl) ); - rField.SetDownHdl( LINK(this, DialControl, SpinFieldHdl) ); - rField.SetFirstHdl( LINK(this, DialControl, SpinFieldHdl) ); - rField.SetLastHdl( LINK(this, DialControl, SpinFieldHdl) ); - } -} - -IMPL_LINK_NOARG_TYPED(DialControl, SpinFieldHdl, SpinField&, void) -{ - if( mpImpl->mpLinkField ) - { - NumericField& rField = *mpImpl->mpLinkField; - rField.GetModifyHdl().Call(&rField); - } -} - void DialControl::HandleMouseEvent( const Point& rPos, bool bInitial ) { long nX = rPos.X() - mpImpl->mnCenterX; @@ -518,22 +531,6 @@ void DialControl::HandleEscapeEvent() } } -IMPL_LINK( DialControl, LinkedFieldModifyHdl, NumericField*, /*pField*/ ) -{ - LinkedFieldModifyHdl(); - return 0; -} -IMPL_LINK_NOARG_TYPED( DialControl, LinkedFieldFocusHdl, Control&, void ) -{ - LinkedFieldModifyHdl(); -} -void DialControl::LinkedFieldModifyHdl() -{ - if( mpImpl->mpLinkField ) - SetRotation( static_cast< sal_Int32 >( mpImpl->mpLinkField->GetValue() * mpImpl->mnLinkedFieldValueMultiplyer ), false ); -} - - DialControlWrapper::DialControlWrapper( DialControl& rDial ) : SingleControlWrapperType( rDial ) diff --git a/svx/source/dialog/fontwork.cxx b/svx/source/dialog/fontwork.cxx index 28fefa6a8c59..c355e67648b5 100644 --- a/svx/source/dialog/fontwork.cxx +++ b/svx/source/dialog/fontwork.cxx @@ -251,7 +251,7 @@ SvxFontWorkDialog::SvxFontWorkDialog(SfxBindings *pBindinx, m_pTbxShadow->SetSizePixel(aSize); m_pTbxShadow->SetSelectHdl( LINK(this, SvxFontWorkDialog, SelectShadowHdl_Impl) ); - Link<> aLink = LINK(this, SvxFontWorkDialog, ModifyInputHdl_Impl); + Link<Edit&,void> aLink = LINK(this, SvxFontWorkDialog, ModifyInputHdl_Impl); m_pMtrFldDistance->SetModifyHdl( aLink ); m_pMtrFldTextStart->SetModifyHdl( aLink ); m_pMtrFldShadowX->SetModifyHdl( aLink ); @@ -735,10 +735,9 @@ IMPL_LINK_NOARG_TYPED(SvxFontWorkDialog, SelectShadowHdl_Impl, ToolBox *, void) } } -IMPL_LINK_NOARG(SvxFontWorkDialog, ModifyInputHdl_Impl) +IMPL_LINK_NOARG_TYPED(SvxFontWorkDialog, ModifyInputHdl_Impl, Edit&, void) { aInputIdle.Start(); - return 0; } IMPL_LINK_NOARG_TYPED(SvxFontWorkDialog, InputTimoutHdl_Impl, Idle *, void) diff --git a/svx/source/dialog/hdft.cxx b/svx/source/dialog/hdft.cxx index 4362446bea18..0108bf66dbbe 100644 --- a/svx/source/dialog/hdft.cxx +++ b/svx/source/dialog/hdft.cxx @@ -566,23 +566,19 @@ IMPL_LINK_TYPED( SvxHFPage, TurnOnHdl, Button *, pButton, void ) UpdateExample(); } -IMPL_LINK_NOARG(SvxHFPage, DistModify) +IMPL_LINK_NOARG_TYPED(SvxHFPage, DistModify, Edit&, void) { UpdateExample(); - return 0; } -IMPL_LINK_NOARG(SvxHFPage, HeightModify) +IMPL_LINK_NOARG_TYPED(SvxHFPage, HeightModify, Edit&, void) { UpdateExample(); - - return 0; } -IMPL_LINK_NOARG(SvxHFPage, BorderModify) +IMPL_LINK_NOARG_TYPED(SvxHFPage, BorderModify, Edit&, void) { UpdateExample(); - return 0; } IMPL_LINK_NOARG_TYPED(SvxHFPage, BackgroundHdl, Button*, void) diff --git a/svx/source/dialog/imapdlg.cxx b/svx/source/dialog/imapdlg.cxx index 9a6f1030d4ca..b689285554f4 100644 --- a/svx/source/dialog/imapdlg.cxx +++ b/svx/source/dialog/imapdlg.cxx @@ -685,9 +685,9 @@ IMPL_LINK_TYPED( SvxIMapDlg, GraphSizeHdl, GraphCtrl*, pWnd, void ) IMPL_LINK_NOARG_TYPED(SvxIMapDlg, URLModifyComboBoxHdl, ComboBox&, void) { - URLModifyHdl(nullptr); + URLModifyHdl(*m_pURLBox); } -IMPL_LINK_NOARG(SvxIMapDlg, URLModifyHdl) +IMPL_LINK_NOARG_TYPED(SvxIMapDlg, URLModifyHdl, Edit&, void) { NotifyInfo aNewInfo; @@ -696,8 +696,6 @@ IMPL_LINK_NOARG(SvxIMapDlg, URLModifyHdl) aNewInfo.aMarkTarget = m_pCbbTarget->GetText(); pIMapWnd->ReplaceActualIMapInfo( aNewInfo ); - - return 0; } IMPL_LINK_NOARG_TYPED(SvxIMapDlg, URLLoseFocusHdl, Control&, void) diff --git a/svx/source/dialog/langbox.cxx b/svx/source/dialog/langbox.cxx index ff47bc16f991..27d0b536f187 100644 --- a/svx/source/dialog/langbox.cxx +++ b/svx/source/dialog/langbox.cxx @@ -679,7 +679,7 @@ sal_Int32 SvxLanguageComboBox::ImplGetSavedValue() const } -IMPL_LINK( SvxLanguageComboBox, EditModifyHdl, SvxLanguageComboBox*, /*pEd*/ ) +IMPL_LINK_NOARG_TYPED( SvxLanguageComboBox, EditModifyHdl, Edit&, void ) { EditedAndValid eOldState = meEditedAndValid; OUString aStr( vcl::I18nHelper::filterFormattingChars( GetText())); @@ -755,7 +755,6 @@ IMPL_LINK( SvxLanguageComboBox, EditModifyHdl, SvxLanguageComboBox*, /*pEd*/ ) SetControlBackground(); } } - return 0; } diff --git a/svx/source/dialog/optgrid.cxx b/svx/source/dialog/optgrid.cxx index 8340c0c51d29..d40d3b01de23 100644 --- a/svx/source/dialog/optgrid.cxx +++ b/svx/source/dialog/optgrid.cxx @@ -312,17 +312,16 @@ SfxTabPage::sfxpg SvxGridTabPage::DeactivatePage( SfxItemSet* _pSet ) return LEAVE_PAGE; } -IMPL_LINK( SvxGridTabPage, ChangeDrawHdl_Impl, MetricField *, pField ) +IMPL_LINK_TYPED( SvxGridTabPage, ChangeDrawHdl_Impl, Edit&, rField, void ) { bAttrModified = true; if( pCbxSynchronize->IsChecked() ) { - if(pField == pMtrFldDrawX) + if(&rField == pMtrFldDrawX) pMtrFldDrawY->SetValue( pMtrFldDrawX->GetValue() ); else pMtrFldDrawX->SetValue( pMtrFldDrawY->GetValue() ); } - return 0; } @@ -336,17 +335,16 @@ IMPL_LINK_NOARG_TYPED(SvxGridTabPage, ClickRotateHdl_Impl, Button*, void) -IMPL_LINK( SvxGridTabPage, ChangeDivisionHdl_Impl, NumericField *, pField ) +IMPL_LINK_TYPED( SvxGridTabPage, ChangeDivisionHdl_Impl, Edit&, rField, void ) { bAttrModified = true; if( pCbxSynchronize->IsChecked() ) { - if(pNumFldDivisionX == pField) + if(pNumFldDivisionX == &rField) pNumFldDivisionY->SetValue( pNumFldDivisionX->GetValue() ); else pNumFldDivisionX->SetValue( pNumFldDivisionY->GetValue() ); } - return 0; } diff --git a/svx/source/dialog/passwd.cxx b/svx/source/dialog/passwd.cxx index bca9ea1bc39c..8455f7fcdb92 100644 --- a/svx/source/dialog/passwd.cxx +++ b/svx/source/dialog/passwd.cxx @@ -51,7 +51,7 @@ IMPL_LINK_NOARG_TYPED(SvxPasswordDialog, ButtonHdl, Button*, void) -IMPL_LINK_NOARG(SvxPasswordDialog, EditModifyHdl) +IMPL_LINK_NOARG_TYPED(SvxPasswordDialog, EditModifyHdl, Edit&, void) { if ( !bEmpty ) { @@ -63,7 +63,6 @@ IMPL_LINK_NOARG(SvxPasswordDialog, EditModifyHdl) } else if ( !m_pOKBtn->IsEnabled() ) m_pOKBtn->Enable(); - return 0; } @@ -83,7 +82,7 @@ SvxPasswordDialog::SvxPasswordDialog(vcl::Window* pParent, bool bAllowEmptyPassw m_pOKBtn->SetClickHdl( LINK( this, SvxPasswordDialog, ButtonHdl ) ); m_pRepeatPasswdED->SetModifyHdl( LINK( this, SvxPasswordDialog, EditModifyHdl ) ); - EditModifyHdl( 0 ); + EditModifyHdl( *m_pRepeatPasswdED ); if ( bDisableOldPassword ) { diff --git a/svx/source/dialog/rubydialog.cxx b/svx/source/dialog/rubydialog.cxx index b3b3272d9ca6..70ecd3a60bc6 100644 --- a/svx/source/dialog/rubydialog.cxx +++ b/svx/source/dialog/rubydialog.cxx @@ -248,7 +248,7 @@ SvxRubyDialog::SvxRubyDialog(SfxBindings* pBind, SfxChildWindow* pCW, vcl::Windo m_pScrollSB->SetScrollHdl(aScrLk); m_pScrollSB->SetEndScrollHdl(aScrLk); - Link<> aEditLk(LINK(this, SvxRubyDialog, EditModifyHdl_Impl)); + Link<Edit&,void> aEditLk(LINK(this, SvxRubyDialog, EditModifyHdl_Impl)); Link<sal_Int32,bool> aScrollLk(LINK(this, SvxRubyDialog, EditScrollHdl_Impl)); Link<sal_Int32,void> aJumpLk(LINK(this, SvxRubyDialog, EditJumpHdl_Impl)); for (sal_uInt16 i = 0; i < 8; i++) @@ -669,18 +669,17 @@ IMPL_LINK_NOARG_TYPED(SvxRubyDialog, CharStyleHdl_Impl, ListBox&, void) } } -IMPL_LINK(SvxRubyDialog, EditModifyHdl_Impl, Edit*, pEdit) +IMPL_LINK_TYPED(SvxRubyDialog, EditModifyHdl_Impl, Edit&, rEdit, void) { for (sal_uInt16 i = 0; i < 8; i++) { - if (pEdit == aEditArr[i]) + if (&rEdit == aEditArr[i]) { nCurrentEdit = i / 2; break; } } m_pPreviewWin->Invalidate(); - return 0; } IMPL_LINK_TYPED(SvxRubyDialog, EditScrollHdl_Impl, sal_Int32, nParam, bool) @@ -923,7 +922,7 @@ Size RubyPreview::GetOptimalSize() const void RubyEdit::GetFocus() { - GetModifyHdl().Call(this); + GetModifyHdl().Call(*this); Edit::GetFocus(); } diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx index 726987297703..d378eaf18ccc 100644 --- a/svx/source/dialog/srchdlg.cxx +++ b/svx/source/dialog/srchdlg.cxx @@ -1165,7 +1165,7 @@ void SvxSearchDialog::ClickHdl_Impl(void* pCtrl) else { EnableControl_Impl(m_pLayoutBtn); - ModifyHdl_Impl(m_pSearchLB); + ModifyHdl_Impl(*m_pSearchLB); } } else @@ -1209,14 +1209,14 @@ void SvxSearchDialog::ClickHdl_Impl(void* pCtrl) // Search-string in place? then enable Buttons bSet = true; - ModifyHdl_Impl(m_pSearchLB); + ModifyHdl_Impl(*m_pSearchLB); } } if (pCtrl == m_pAllSheetsCB) { bSet = true; - ModifyHdl_Impl(m_pSearchLB); + ModifyHdl_Impl(*m_pSearchLB); } if (pCtrl == m_pJapOptionsCB) @@ -1396,17 +1396,17 @@ IMPL_LINK_TYPED( SvxSearchDialog, CommandHdl_Impl, Button *, pBtn, void ) -IMPL_LINK( SvxSearchDialog, ModifyHdl_Impl, ComboBox *, pEd ) +IMPL_LINK_TYPED( SvxSearchDialog, ModifyHdl_Impl, Edit&, rEd, void ) { if ( !bSet ) - SetModifyFlag_Impl( pEd ); + SetModifyFlag_Impl( &rEd ); else bSet = false; // Calc allows searching for empty cells. bool bAllowEmptySearch = (pSearchItem->GetAppFlag() == SvxSearchApp::CALC); - if ( pEd == m_pSearchLB || pEd == m_pReplaceLB ) + if ( &rEd == m_pSearchLB || &rEd == m_pReplaceLB ) { sal_Int32 nSrchTxtLen = m_pSearchLB->GetText().getLength(); sal_Int32 nReplTxtLen = 0; @@ -1433,7 +1433,6 @@ IMPL_LINK( SvxSearchDialog, ModifyHdl_Impl, ComboBox *, pEd ) m_pReplaceAllBtn->Disable(); } } - return 0; } @@ -1846,7 +1845,7 @@ IMPL_LINK_TYPED( SvxSearchDialog, FocusHdl_Impl, Control&, rControl, void ) static_cast<ComboBox*>(pCtrl)->SetSelection( Selection( SELECTION_MIN, SELECTION_MAX ) ); - ModifyHdl_Impl( static_cast<ComboBox*>(pCtrl) ); + ModifyHdl_Impl( static_cast<Edit&>(*pCtrl) ); if (bFormat && nTxtLen) m_pLayoutBtn->SetText(aLayoutStr); diff --git a/svx/source/engine3d/float3d.cxx b/svx/source/engine3d/float3d.cxx index 549e4fc6330a..d22ed7d48b42 100644 --- a/svx/source/engine3d/float3d.cxx +++ b/svx/source/engine3d/float3d.cxx @@ -290,7 +290,7 @@ Svx3DWin::Svx3DWin(SfxBindings* pInBindings, SfxChildWindow *pCW, vcl::Window* p m_pLbAmbientlight->SetSelectHdl( aLink2 ); m_pLbShademode->SetSelectHdl( aLink2 ); - Link<> aLink3 = LINK( this, Svx3DWin, ModifyHdl ); + Link<Edit&,void> aLink3 = LINK( this, Svx3DWin, ModifyHdl ); m_pMtrMatSpecularIntensity->SetModifyHdl( aLink3 ); m_pNumHorizontal->SetModifyHdl( aLink3 ); m_pNumVertical->SetModifyHdl( aLink3 ); @@ -2567,34 +2567,30 @@ IMPL_LINK_TYPED( Svx3DWin, SelectHdl, ListBox&, rListBox, void ) } -IMPL_LINK( Svx3DWin, ModifyHdl, void*, pField ) +IMPL_LINK_TYPED( Svx3DWin, ModifyHdl, Edit&, rField, void ) { - if( pField ) - { - bool bUpdatePreview = false; - - // Material - if( pField == m_pMtrMatSpecularIntensity ) - { - bUpdatePreview = true; - } - else if (pField == m_pNumHorizontal) - { - bUpdatePreview = true; - } - else if (pField == m_pNumVertical) - { - bUpdatePreview = true; - } - else if (pField == m_pMtrSlant) - { - bUpdatePreview = true; - } + bool bUpdatePreview = false; - if( bUpdatePreview ) - UpdatePreview(); + // Material + if( &rField == m_pMtrMatSpecularIntensity ) + { + bUpdatePreview = true; + } + else if (&rField == m_pNumHorizontal) + { + bUpdatePreview = true; + } + else if (&rField == m_pNumVertical) + { + bUpdatePreview = true; + } + else if (&rField == m_pMtrSlant) + { + bUpdatePreview = true; } - return 0L; + + if( bUpdatePreview ) + UpdatePreview(); } diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx index 9ab92b114d78..52caf084f1dc 100644 --- a/svx/source/fmcomp/gridcell.cxx +++ b/svx/source/fmcomp/gridcell.cxx @@ -3621,7 +3621,7 @@ void FmXEditCell::disposing() m_aTextListeners.disposeAndClear(aEvt); m_aChangeListeners.disposeAndClear(aEvt); - m_pEditImplementation->SetModifyHdl( Link<>() ); + m_pEditImplementation->SetModifyHdl( Link<Edit&,void>() ); if ( m_bOwnEditImplementation ) delete m_pEditImplementation; m_pEditImplementation = NULL; diff --git a/svx/source/form/databaselocationinput.cxx b/svx/source/form/databaselocationinput.cxx index ede20e829949..08c766c22d79 100644 --- a/svx/source/form/databaselocationinput.cxx +++ b/svx/source/form/databaselocationinput.cxx @@ -245,7 +245,7 @@ namespace svx { ::svt::OFileNotation aFileNotation( aURL.GetMainURL( INetURLObject::NO_DECODE ) ); m_rLocationInput.SetText( aFileNotation.get( ::svt::OFileNotation::N_SYSTEM ) ); - m_rLocationInput.GetModifyHdl().Call( &m_rLocationInput ); + m_rLocationInput.GetModifyHdl().Call( m_rLocationInput ); // the dialog already checked for the file's existence, so we don't need to, again m_bNeedExistenceCheck = false; } diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx index f3f000109106..b675f7e5ae26 100644 --- a/svx/source/form/datanavi.cxx +++ b/svx/source/form/datanavi.cxx @@ -2871,10 +2871,9 @@ namespace svxform } - IMPL_LINK_NOARG(AddConditionDialog, ModifyHdl) + IMPL_LINK_NOARG_TYPED(AddConditionDialog, ModifyHdl, Edit&, void) { m_aResultIdle.Start(); - return 0; } diff --git a/svx/source/inc/datanavi.hxx b/svx/source/inc/datanavi.hxx index 15626163fa8d..3cc54053b00b 100644 --- a/svx/source/inc/datanavi.hxx +++ b/svx/source/inc/datanavi.hxx @@ -493,7 +493,7 @@ namespace svxform XFormsUIHelper1_ref m_xUIHelper; XPropertySet_ref m_xBinding; - DECL_LINK(ModifyHdl, void *); + DECL_LINK_TYPED(ModifyHdl, Edit&, void); DECL_LINK_TYPED(ResultHdl, Idle *, void); DECL_LINK_TYPED(EditHdl, Button*, void); DECL_LINK_TYPED(OKHdl, Button*, void); diff --git a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx index 05c68c49778c..4b5b127fe11a 100644 --- a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx +++ b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx @@ -1249,7 +1249,7 @@ IMPL_LINK_NOARG_TYPED(AreaPropertyPanelBase, ChangeTrgrTypeHdl_Impl, ListBox&, v setFillFloatTransparence(aGradientItem); } -IMPL_LINK_NOARG(AreaPropertyPanelBase, ModifyTransparentHdl_Impl) +IMPL_LINK_NOARG_TYPED(AreaPropertyPanelBase, ModifyTransparentHdl_Impl, Edit&, void) { const sal_uInt16 nTrans = (sal_uInt16)mpMTRTransparent->GetValue(); mnLastTransSolid = nTrans; @@ -1262,8 +1262,6 @@ IMPL_LINK_NOARG(AreaPropertyPanelBase, ModifyTransparentHdl_Impl) const XFillTransparenceItem aLinearItem(nTrans); setFillTransparence(aLinearItem); - - return 0L; } XGradient AreaPropertyPanelBase::GetGradient (const css::awt::GradientStyle eStyle) const diff --git a/svx/source/sidebar/area/AreaTransparencyGradientControl.cxx b/svx/source/sidebar/area/AreaTransparencyGradientControl.cxx index 76b2b28869ba..0a5aa89ed37d 100644 --- a/svx/source/sidebar/area/AreaTransparencyGradientControl.cxx +++ b/svx/source/sidebar/area/AreaTransparencyGradientControl.cxx @@ -71,7 +71,7 @@ AreaTransparencyGradientControl::AreaTransparencyGradientControl ( maRotRight( SVX_RES(IMG_ROT_RIGHT)), mrAreaPropertyPanel(rPanel) { - Link<> aLink = LINK( this, AreaTransparencyGradientControl, ModifiedTrgrHdl_Impl); + Link<Edit&,void> aLink = LINK( this, AreaTransparencyGradientControl, ModifiedTrgrHdl_Impl); maMtrTrgrCenterX->SetModifyHdl( aLink ); maMtrTrgrCenterY->SetModifyHdl( aLink ); maMtrTrgrAngle->SetModifyHdl( aLink ); @@ -291,12 +291,11 @@ void AreaTransparencyGradientControl::ExecuteValueModify( sal_uInt8 nStartCol, s mrAreaPropertyPanel.setFillFloatTransparence(aGradientItem); } -IMPL_LINK_NOARG(AreaTransparencyGradientControl, ModifiedTrgrHdl_Impl) +IMPL_LINK_NOARG_TYPED(AreaTransparencyGradientControl, ModifiedTrgrHdl_Impl, Edit&, void) { sal_uInt8 nStartCol = (sal_uInt8)(((sal_uInt16)maMtrTrgrStartValue->GetValue() * 255) / 100); sal_uInt8 nEndCol = (sal_uInt8)(((sal_uInt16)maMtrTrgrEndValue->GetValue() * 255) / 100); ExecuteValueModify( nStartCol, nEndCol ); - return 0L; } IMPL_LINK_NOARG_TYPED(AreaTransparencyGradientControl, Left_Click45_Impl, ToolBox *, void) diff --git a/svx/source/sidebar/area/AreaTransparencyGradientControl.hxx b/svx/source/sidebar/area/AreaTransparencyGradientControl.hxx index 0f3af873d695..bf900d9ae56d 100644 --- a/svx/source/sidebar/area/AreaTransparencyGradientControl.hxx +++ b/svx/source/sidebar/area/AreaTransparencyGradientControl.hxx @@ -67,7 +67,7 @@ private: Image maRotRight; AreaPropertyPanelBase& mrAreaPropertyPanel; - DECL_LINK( ModifiedTrgrHdl_Impl, void* ); + DECL_LINK_TYPED( ModifiedTrgrHdl_Impl, Edit&, void ); DECL_LINK_TYPED( Left_Click45_Impl, ToolBox*, void ); DECL_LINK_TYPED( Right_Click45_Impl, ToolBox*, void ); }; diff --git a/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx b/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx index 8c64a3677ae4..50f3d308fa5d 100644 --- a/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx +++ b/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx @@ -149,32 +149,29 @@ void GraphicPropertyPanel::Initialize() -IMPL_LINK_NOARG( GraphicPropertyPanel, ModifyBrightnessHdl ) +IMPL_LINK_NOARG_TYPED( GraphicPropertyPanel, ModifyBrightnessHdl, Edit&, void ) { const sal_Int16 nBright = mpMtrBrightness->GetValue(); const SfxInt16Item aBrightItem( SID_ATTR_GRAF_LUMINANCE, nBright ); GetBindings()->GetDispatcher()->Execute(SID_ATTR_GRAF_LUMINANCE, SfxCallMode::RECORD, &aBrightItem, 0L); - return 0L; } -IMPL_LINK_NOARG( GraphicPropertyPanel, ModifyContrastHdl ) +IMPL_LINK_NOARG_TYPED( GraphicPropertyPanel, ModifyContrastHdl, Edit&, void ) { const sal_Int16 nContrast = mpMtrContrast->GetValue(); const SfxInt16Item aContrastItem( SID_ATTR_GRAF_CONTRAST, nContrast ); GetBindings()->GetDispatcher()->Execute(SID_ATTR_GRAF_CONTRAST, SfxCallMode::RECORD, &aContrastItem, 0L); - return 0L; } -IMPL_LINK_NOARG( GraphicPropertyPanel, ModifyTransHdl ) +IMPL_LINK_NOARG_TYPED( GraphicPropertyPanel, ModifyTransHdl, Edit&, void ) { const sal_Int16 nTrans = mpMtrTrans->GetValue(); const SfxInt16Item aTransItem( SID_ATTR_GRAF_TRANSPARENCE, nTrans ); GetBindings()->GetDispatcher()->Execute(SID_ATTR_GRAF_TRANSPARENCE, SfxCallMode::RECORD, &aTransItem, 0L); - return 0L; } @@ -188,42 +185,38 @@ IMPL_LINK_NOARG_TYPED( GraphicPropertyPanel, ClickColorModeHdl, ListBox&, void ) -IMPL_LINK_NOARG( GraphicPropertyPanel, RedHdl ) +IMPL_LINK_NOARG_TYPED( GraphicPropertyPanel, RedHdl, Edit&, void ) { const sal_Int16 nRed = mpMtrRed->GetValue(); const SfxInt16Item aRedItem( SID_ATTR_GRAF_RED, nRed ); GetBindings()->GetDispatcher()->Execute(SID_ATTR_GRAF_RED, SfxCallMode::RECORD, &aRedItem, 0L); - return 0L; } -IMPL_LINK_NOARG( GraphicPropertyPanel, GreenHdl ) +IMPL_LINK_NOARG_TYPED( GraphicPropertyPanel, GreenHdl, Edit&, void ) { const sal_Int16 nGreen = mpMtrGreen->GetValue(); const SfxInt16Item aGreenItem( SID_ATTR_GRAF_GREEN, nGreen ); GetBindings()->GetDispatcher()->Execute(SID_ATTR_GRAF_GREEN, SfxCallMode::RECORD, &aGreenItem, 0L); - return 0L; } -IMPL_LINK_NOARG(GraphicPropertyPanel, BlueHdl) +IMPL_LINK_NOARG_TYPED(GraphicPropertyPanel, BlueHdl, Edit&, void) { const sal_Int16 nBlue = mpMtrBlue->GetValue(); const SfxInt16Item aBlueItem( SID_ATTR_GRAF_BLUE, nBlue ); GetBindings()->GetDispatcher()->Execute(SID_ATTR_GRAF_BLUE, SfxCallMode::RECORD, &aBlueItem, 0L); - return 0L; } -IMPL_LINK_NOARG(GraphicPropertyPanel, GammaHdl) +IMPL_LINK_NOARG_TYPED(GraphicPropertyPanel, GammaHdl, Edit&, void) { const sal_Int32 nGamma = mpMtrGamma->GetValue(); const SfxInt32Item nGammaItem( SID_ATTR_GRAF_GAMMA, nGamma ); GetBindings()->GetDispatcher()->Execute(SID_ATTR_GRAF_GAMMA, SfxCallMode::RECORD, &nGammaItem, 0L); - return 0L; } diff --git a/svx/source/sidebar/graphic/GraphicPropertyPanel.hxx b/svx/source/sidebar/graphic/GraphicPropertyPanel.hxx index a079ccb05953..8a86d4f36ba3 100644 --- a/svx/source/sidebar/graphic/GraphicPropertyPanel.hxx +++ b/svx/source/sidebar/graphic/GraphicPropertyPanel.hxx @@ -86,14 +86,14 @@ private: css::uno::Reference<css::frame::XFrame> mxFrame; SfxBindings* mpBindings; - DECL_LINK( ModifyBrightnessHdl, void * ); - DECL_LINK( ModifyContrastHdl, void * ); - DECL_LINK( ModifyTransHdl, void * ); + DECL_LINK_TYPED( ModifyBrightnessHdl, Edit&, void ); + DECL_LINK_TYPED( ModifyContrastHdl, Edit&, void ); + DECL_LINK_TYPED( ModifyTransHdl, Edit&, void ); DECL_LINK_TYPED( ClickColorModeHdl, ListBox&, void ); - DECL_LINK( RedHdl, void*); - DECL_LINK( GreenHdl, void*); - DECL_LINK( BlueHdl, void*); - DECL_LINK( GammaHdl, void*); + DECL_LINK_TYPED( RedHdl, Edit&, void ); + DECL_LINK_TYPED( GreenHdl, Edit&, void ); + DECL_LINK_TYPED( BlueHdl, Edit&, void ); + DECL_LINK_TYPED( GammaHdl, Edit&, void ); void Initialize(); }; diff --git a/svx/source/sidebar/line/LinePropertyPanelBase.cxx b/svx/source/sidebar/line/LinePropertyPanelBase.cxx index b288da9e2b10..3e09d8c93e06 100644 --- a/svx/source/sidebar/line/LinePropertyPanelBase.cxx +++ b/svx/source/sidebar/line/LinePropertyPanelBase.cxx @@ -260,8 +260,7 @@ void LinePropertyPanelBase::Initialize() mpLBEnd->SetAccessibleName(OUString("Ending Style")); //wj acc mpLBEnd->AdaptDropDownLineCountToMaximum(); - Link<> aLink = LINK(this, LinePropertyPanelBase, ChangeTransparentHdl); - mpMFTransparent->SetModifyHdl(aLink); + mpMFTransparent->SetModifyHdl(LINK(this, LinePropertyPanelBase, ChangeTransparentHdl)); mpMFTransparent->SetAccessibleName(OUString("Transparency")); //wj acc mpTBWidth->SetAccessibleRelationLabeledBy(mpFTWidth); @@ -696,13 +695,12 @@ IMPL_LINK_TYPED(LinePropertyPanelBase, ToolboxWidthSelectHdl,ToolBox*, pToolBox, } } -IMPL_LINK_NOARG( LinePropertyPanelBase, ChangeTransparentHdl ) +IMPL_LINK_NOARG_TYPED( LinePropertyPanelBase, ChangeTransparentHdl, Edit&, void ) { sal_uInt16 nVal = (sal_uInt16)mpMFTransparent->GetValue(); XLineTransparenceItem aItem( nVal ); setLineTransparency(aItem); - return 0L; } VclPtr<PopupControl> LinePropertyPanelBase::CreateLineWidthPopupControl (PopupContainer* pParent) diff --git a/svx/source/sidebar/line/LineWidthControl.cxx b/svx/source/sidebar/line/LineWidthControl.cxx index 26685269c7b5..685ed7abe726 100644 --- a/svx/source/sidebar/line/LineWidthControl.cxx +++ b/svx/source/sidebar/line/LineWidthControl.cxx @@ -170,8 +170,7 @@ void LineWidthControl::Initialize() maVSWidth->SetSelItem(0); maVSWidth->SetSelectHdl(LINK( this, LineWidthControl, VSSelectHdl )); - Link<> aLink = LINK(this, LineWidthControl, MFModifyHdl); - maMFWidth->SetModifyHdl(aLink); + maMFWidth->SetModifyHdl(LINK(this, LineWidthControl, MFModifyHdl)); maVSWidth->StartSelection(); maVSWidth->Show(); @@ -296,9 +295,9 @@ IMPL_LINK_TYPED(LineWidthControl, VSSelectHdl, ValueSet*, pControl, void) } } -IMPL_LINK(LineWidthControl, MFModifyHdl, void *, pControl) +IMPL_LINK_TYPED(LineWidthControl, MFModifyHdl, Edit&, rControl, void) { - if (pControl == maMFWidth.get()) + if (&rControl == maMFWidth.get()) { if(maVSWidth->GetSelItem()) { @@ -317,7 +316,6 @@ IMPL_LINK(LineWidthControl, MFModifyHdl, void *, pControl) mbCloseByEdit = true; mnTmpCustomWidth = nTmp; } - return 0L; } } } // end of namespace svx::sidebar diff --git a/svx/source/sidebar/line/LineWidthControl.hxx b/svx/source/sidebar/line/LineWidthControl.hxx index 27be0aa6ec34..faad9d751d31 100644 --- a/svx/source/sidebar/line/LineWidthControl.hxx +++ b/svx/source/sidebar/line/LineWidthControl.hxx @@ -72,7 +72,7 @@ private: void Initialize(); DECL_LINK_TYPED(VSSelectHdl, ValueSet*, void); - DECL_LINK(MFModifyHdl, void *); + DECL_LINK_TYPED(MFModifyHdl, Edit&, void); }; } } // end of namespace svx::sidebar diff --git a/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx b/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx index ab4f82bae9dd..12128d72f463 100644 --- a/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx +++ b/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx @@ -76,7 +76,7 @@ ParaLineSpacingControl::ParaLineSpacingControl(sal_uInt16 nId) mpLineDist->SetSelectHdl(aLink3); SelectEntryPos(LLINESPACE_1); - Link<> aLink2 = LINK( this, ParaLineSpacingControl, LineSPDistAtHdl_Impl ); + Link<Edit&,void> aLink2 = LINK( this, ParaLineSpacingControl, LineSPDistAtHdl_Impl ); mpLineDistAtPercentBox->SetModifyHdl( aLink2 ); mpLineDistAtMetricBox->SetModifyHdl( aLink2 ); @@ -327,10 +327,9 @@ IMPL_LINK_NOARG_TYPED(ParaLineSpacingControl, LineSPDistHdl_Impl, ListBox&, void ExecuteLineSpace(); } -IMPL_LINK_NOARG( ParaLineSpacingControl, LineSPDistAtHdl_Impl ) +IMPL_LINK_NOARG_TYPED( ParaLineSpacingControl, LineSPDistAtHdl_Impl, Edit&, void ) { ExecuteLineSpace(); - return 0L; } void ParaLineSpacingControl::ExecuteLineSpace() diff --git a/svx/source/sidebar/paragraph/ParaLineSpacingControl.hxx b/svx/source/sidebar/paragraph/ParaLineSpacingControl.hxx index e9f21788858c..1d27c40c69d1 100644 --- a/svx/source/sidebar/paragraph/ParaLineSpacingControl.hxx +++ b/svx/source/sidebar/paragraph/ParaLineSpacingControl.hxx @@ -70,7 +70,7 @@ private: void SelectEntryPos(sal_Int32 nPos); DECL_LINK_TYPED(LineSPDistHdl_Impl, ListBox&, void); - DECL_LINK(LineSPDistAtHdl_Impl, void*); + DECL_LINK_TYPED(LineSPDistAtHdl_Impl, Edit&, void); DECL_LINK_TYPED(PredefinedValuesHandler, Button*, void); }; diff --git a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx index eb44e60cae7e..aed071486bcd 100644 --- a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx +++ b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx @@ -168,7 +168,7 @@ void ParaPropertyPanel::ReSize(bool /* bSize */) void ParaPropertyPanel::InitToolBoxIndent() { - Link<> aLink = LINK( this, ParaPropertyPanel, ModifyIndentHdl_Impl ); + Link<Edit&,void> aLink = LINK( this, ParaPropertyPanel, ModifyIndentHdl_Impl ); mpLeftIndent->SetModifyHdl( aLink ); mpRightIndent->SetModifyHdl( aLink ); mpFLineIndent->SetModifyHdl( aLink ); @@ -191,7 +191,7 @@ void ParaPropertyPanel::InitToolBoxIndent() void ParaPropertyPanel::InitToolBoxSpacing() { - Link<> aLink = LINK( this, ParaPropertyPanel, ULSpaceHdl_Impl ); + Link<Edit&,void> aLink = LINK( this, ParaPropertyPanel, ULSpaceHdl_Impl ); mpTopDist->SetModifyHdl(aLink); mpBottomDist->SetModifyHdl( aLink ); @@ -208,7 +208,7 @@ void ParaPropertyPanel::initial() } // for Paragraph Indent -IMPL_LINK_NOARG( ParaPropertyPanel, ModifyIndentHdl_Impl) +IMPL_LINK_NOARG_TYPED( ParaPropertyPanel, ModifyIndentHdl_Impl, Edit&, void) { SvxLRSpaceItem aMargin( SID_ATTR_PARA_LRSPACE ); aMargin.SetTextLeft( (const long)GetCoreValue( *mpLeftIndent, m_eLRSpaceUnit ) ); @@ -217,7 +217,6 @@ IMPL_LINK_NOARG( ParaPropertyPanel, ModifyIndentHdl_Impl) GetBindings()->GetDispatcher()->Execute( SID_ATTR_PARA_LRSPACE, SfxCallMode::RECORD, &aMargin, 0L); - return 0; } IMPL_LINK_TYPED(ParaPropertyPanel, ClickIndent_IncDec_Hdl_Impl, ToolBox *, pControl, void) @@ -300,7 +299,7 @@ IMPL_LINK_TYPED(ParaPropertyPanel, ClickIndent_IncDec_Hdl_Impl, ToolBox *, pCont } // for Paragraph Spacing -IMPL_LINK_NOARG( ParaPropertyPanel, ULSpaceHdl_Impl) +IMPL_LINK_NOARG_TYPED( ParaPropertyPanel, ULSpaceHdl_Impl, Edit&, void) { SvxULSpaceItem aMargin( SID_ATTR_PARA_ULSPACE ); aMargin.SetUpper( (sal_uInt16)GetCoreValue( *mpTopDist, m_eULSpaceUnit ) ); @@ -308,7 +307,6 @@ IMPL_LINK_NOARG( ParaPropertyPanel, ULSpaceHdl_Impl) GetBindings()->GetDispatcher()->Execute( SID_ATTR_PARA_ULSPACE, SfxCallMode::RECORD, &aMargin, 0L); - return 0L; } // for Paragraph State change diff --git a/svx/source/sidebar/paragraph/ParaPropertyPanel.hxx b/svx/source/sidebar/paragraph/ParaPropertyPanel.hxx index 4182ac883c21..70a2c20fa0f6 100644 --- a/svx/source/sidebar/paragraph/ParaPropertyPanel.hxx +++ b/svx/source/sidebar/paragraph/ParaPropertyPanel.hxx @@ -113,9 +113,9 @@ private: SfxBindings* mpBindings; css::uno::Reference<css::ui::XSidebar> mxSidebar; - DECL_LINK(ModifyIndentHdl_Impl, void*); + DECL_LINK_TYPED(ModifyIndentHdl_Impl, Edit&, void); DECL_LINK_TYPED(ClickIndent_IncDec_Hdl_Impl, ToolBox*, void); - DECL_LINK(ULSpaceHdl_Impl, void*); + DECL_LINK_TYPED(ULSpaceHdl_Impl, Edit&, void); void StateChangedIndentImpl( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ); void StateChangedULImpl( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ); diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx index 10b95b2bea98..5bb2310a834b 100644 --- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx +++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx @@ -408,7 +408,7 @@ void PosSizePropertyPanel::HandleContextChange( -IMPL_LINK_NOARG( PosSizePropertyPanel, ChangeWidthHdl ) +IMPL_LINK_NOARG_TYPED( PosSizePropertyPanel, ChangeWidthHdl, Edit&, void ) { if( mpCbxScale->IsChecked() && mpCbxScale->IsEnabled() ) @@ -427,12 +427,11 @@ IMPL_LINK_NOARG( PosSizePropertyPanel, ChangeWidthHdl ) } } executeSize(); - return 0; } -IMPL_LINK_NOARG( PosSizePropertyPanel, ChangeHeightHdl ) +IMPL_LINK_NOARG_TYPED( PosSizePropertyPanel, ChangeHeightHdl, Edit&, void ) { if( mpCbxScale->IsChecked() && mpCbxScale->IsEnabled() ) @@ -451,23 +450,20 @@ IMPL_LINK_NOARG( PosSizePropertyPanel, ChangeHeightHdl ) } } executeSize(); - return 0; } -IMPL_LINK_NOARG( PosSizePropertyPanel, ChangePosXHdl ) +IMPL_LINK_NOARG_TYPED( PosSizePropertyPanel, ChangePosXHdl, Edit&, void ) { executePosX(); - return 0; } -IMPL_LINK_NOARG( PosSizePropertyPanel, ChangePosYHdl ) +IMPL_LINK_NOARG_TYPED( PosSizePropertyPanel, ChangePosYHdl, Edit&, void ) { executePosY(); - return 0; } @@ -487,21 +483,21 @@ IMPL_LINK_NOARG_TYPED( PosSizePropertyPanel, ClickAutoHdl, Button*, void ) -IMPL_LINK_NOARG( PosSizePropertyPanel, AngleModifiedHdl ) +IMPL_LINK_NOARG_TYPED( PosSizePropertyPanel, AngleModifiedHdl, Edit&, void ) { OUString sTmp = mpMtrAngle->GetText(); if (sTmp.isEmpty()) - return 0; + return; sal_Unicode nChar = sTmp[0]; if( nChar == '-' ) { if (sTmp.getLength() < 2) - return 0; + return; nChar = sTmp[1]; } if( (nChar < '0') || (nChar > '9') ) - return 0; + return; const LocaleDataWrapper& rLocaleWrapper( Application::GetSettings().GetLocaleDataWrapper() ); const sal_Unicode cSep = rLocaleWrapper.getNumDecimalSep()[0]; @@ -514,7 +510,7 @@ IMPL_LINK_NOARG( PosSizePropertyPanel, AngleModifiedHdl ) rtl_math_ConversionStatus eStatus; double fTmp = rtl::math::stringToDouble( sTmp, cSep, 0, &eStatus); if (eStatus != rtl_math_ConversionStatus_Ok) - return 0; + return; while (fTmp < 0) fTmp += 360; @@ -529,8 +525,6 @@ IMPL_LINK_NOARG( PosSizePropertyPanel, AngleModifiedHdl ) GetBindings()->GetDispatcher()->Execute( SID_ATTR_TRANSFORM, SfxCallMode::RECORD, &aAngleItem, &aRotXItem, &aRotYItem, 0L ); - - return 0; } diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.hxx b/svx/source/sidebar/possize/PosSizePropertyPanel.hxx index 2c1791cb7be4..34a646d10ffc 100644 --- a/svx/source/sidebar/possize/PosSizePropertyPanel.hxx +++ b/svx/source/sidebar/possize/PosSizePropertyPanel.hxx @@ -36,6 +36,7 @@ class FixedText; class MetricField; class CheckBox; class MetricBox; +class Edit; namespace svx { class DialControl; @@ -150,12 +151,12 @@ private: css::uno::Reference<css::ui::XSidebar> mxSidebar; - DECL_LINK( ChangePosXHdl, void * ); - DECL_LINK( ChangePosYHdl, void * ); - DECL_LINK( ChangeWidthHdl, void * ); - DECL_LINK( ChangeHeightHdl, void * ); + DECL_LINK_TYPED( ChangePosXHdl, Edit&, void ); + DECL_LINK_TYPED( ChangePosYHdl, Edit&, void ); + DECL_LINK_TYPED( ChangeWidthHdl, Edit&, void ); + DECL_LINK_TYPED( ChangeHeightHdl, Edit&, void ); DECL_LINK_TYPED( ClickAutoHdl, Button*, void ); - DECL_LINK( AngleModifiedHdl, void * ); + DECL_LINK_TYPED( AngleModifiedHdl, Edit&, void ); DECL_LINK_TYPED( RotationHdl, svx::DialControl*, void ); DECL_LINK_TYPED( FlipHdl, ToolBox *, void ); diff --git a/svx/source/sidebar/shadow/ShadowPropertyPanel.cxx b/svx/source/sidebar/shadow/ShadowPropertyPanel.cxx index e606b8b6ee65..36dfb519b9e2 100644 --- a/svx/source/sidebar/shadow/ShadowPropertyPanel.cxx +++ b/svx/source/sidebar/shadow/ShadowPropertyPanel.cxx @@ -155,13 +155,12 @@ IMPL_LINK_NOARG_TYPED(ShadowPropertyPanel, ModifyShadowColorHdl, ListBox&, void) GetBindings()->GetDispatcher()->Execute(SID_ATTR_SHADOW_COLOR, SfxCallMode::RECORD, &aItem, 0L); } -IMPL_LINK_NOARG(ShadowPropertyPanel, ModifyShadowTransMetricHdl) +IMPL_LINK_NOARG_TYPED(ShadowPropertyPanel, ModifyShadowTransMetricHdl, Edit&, void) { sal_uInt16 nVal = mpShadowTransMetric->GetValue(); SetTransparencyValue(nVal); SdrPercentItem aItem( makeSdrShadowTransparenceItem(nVal) ); GetBindings()->GetDispatcher()->Execute(SID_ATTR_SHADOW_TRANSPARENCE, SfxCallMode::RECORD, &aItem , 0L); - return 0; } IMPL_LINK_NOARG_TYPED(ShadowPropertyPanel, ModifyShadowTransSliderHdl, Slider*, void) @@ -172,7 +171,7 @@ IMPL_LINK_NOARG_TYPED(ShadowPropertyPanel, ModifyShadowTransSliderHdl, Slider*, GetBindings()->GetDispatcher()->Execute(SID_ATTR_SHADOW_TRANSPARENCE, SfxCallMode::RECORD, &aItem, 0L); } -IMPL_LINK_NOARG(ShadowPropertyPanel, ModifyShadowDistanceHdl) +IMPL_LINK_NOARG_TYPED(ShadowPropertyPanel, ModifyShadowDistanceHdl, Edit&, void) { OUString sAngle = mpShadowAngle->GetText(); nXY = mpShadowDistance->GetValue(FUNIT_100TH_MM); @@ -191,7 +190,6 @@ IMPL_LINK_NOARG(ShadowPropertyPanel, ModifyShadowDistanceHdl) SdrMetricItem aYItem(makeSdrShadowYDistItem(nY)); GetBindings()->GetDispatcher()->Execute(SID_ATTR_SHADOW_XDISTANCE, SfxCallMode::RECORD, &aXItem, 0L); GetBindings()->GetDispatcher()->Execute(SID_ATTR_SHADOW_YDISTANCE, SfxCallMode::RECORD, &aYItem, 0L); - return 0; } void ShadowPropertyPanel::UpdateControls() diff --git a/svx/source/sidebar/shadow/ShadowPropertyPanel.hxx b/svx/source/sidebar/shadow/ShadowPropertyPanel.hxx index 22c008601602..689a9bdfb95b 100644 --- a/svx/source/sidebar/shadow/ShadowPropertyPanel.hxx +++ b/svx/source/sidebar/shadow/ShadowPropertyPanel.hxx @@ -82,8 +82,8 @@ private: void UpdateControls(); DECL_LINK_TYPED(ClickShadowHdl, Button*, void); DECL_LINK_TYPED(ModifyShadowColorHdl, ListBox&, void); - DECL_LINK(ModifyShadowTransMetricHdl, void*); - DECL_LINK(ModifyShadowDistanceHdl, void*); + DECL_LINK_TYPED(ModifyShadowTransMetricHdl, Edit&, void); + DECL_LINK_TYPED(ModifyShadowDistanceHdl, Edit&, void); DECL_LINK_TYPED(ModifyShadowTransSliderHdl, Slider*, void); }; } diff --git a/svx/source/sidebar/text/TextCharacterSpacingControl.cxx b/svx/source/sidebar/text/TextCharacterSpacingControl.cxx index 0d2fe06d1161..e903a8c38073 100644 --- a/svx/source/sidebar/text/TextCharacterSpacingControl.cxx +++ b/svx/source/sidebar/text/TextCharacterSpacingControl.cxx @@ -400,10 +400,10 @@ IMPL_LINK_NOARG_TYPED(TextCharacterSpacingControl, KerningSelectHdl, ListBox&, v Invalidate(); maVSSpacing->StartSelection(); } - KerningModifyHdl( NULL ); + KerningModifyHdl( *maEditKerning ); } -IMPL_LINK(TextCharacterSpacingControl, KerningModifyHdl, MetricField*,) +IMPL_LINK_NOARG_TYPED(TextCharacterSpacingControl, KerningModifyHdl, Edit&, void) { if ( maVSSpacing->GetSelectItemId() > 0 ) { @@ -450,7 +450,6 @@ IMPL_LINK(TextCharacterSpacingControl, KerningModifyHdl, MetricField*,) } SvxKerningItem aKernItem(nKern, SID_ATTR_CHAR_KERNING); mpBindings->GetDispatcher()->Execute(SID_ATTR_CHAR_KERNING, SfxCallMode::RECORD, &aKernItem, 0L); - return 0; } }} // end of namespace sidebar diff --git a/svx/source/sidebar/text/TextCharacterSpacingControl.hxx b/svx/source/sidebar/text/TextCharacterSpacingControl.hxx index c932fa9f2f3c..b52d2d0d8250 100644 --- a/svx/source/sidebar/text/TextCharacterSpacingControl.hxx +++ b/svx/source/sidebar/text/TextCharacterSpacingControl.hxx @@ -88,7 +88,7 @@ private: void initial(); DECL_LINK_TYPED(VSSelHdl, ValueSet*, void); DECL_LINK_TYPED(KerningSelectHdl, ListBox&, void); - DECL_LINK(KerningModifyHdl, MetricField*); + DECL_LINK_TYPED(KerningModifyHdl, Edit&, void); }; }} diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.cxx b/svx/source/tbxctrls/tbunosearchcontrollers.cxx index 0d7e707d5f53..b7e71b5bee98 100644 --- a/svx/source/tbxctrls/tbunosearchcontrollers.cxx +++ b/svx/source/tbxctrls/tbunosearchcontrollers.cxx @@ -179,7 +179,7 @@ void FindTextFieldControl::SetTextToSelected_Impl() { // If something is selected in the document, prepopulate with this SetText( aString ); - GetModifyHdl().Call(this); // FIXME why SetText doesn't trigger this? + GetModifyHdl().Call(*this); // FIXME why SetText doesn't trigger this? } else if (GetEntryCount() > 0) { @@ -489,7 +489,7 @@ void SAL_CALL FindTextToolbarController::statusChanged( const css::frame::Featur } } -IMPL_LINK_NOARG(FindTextToolbarController, EditModifyHdl) +IMPL_LINK_NOARG_TYPED(FindTextToolbarController, EditModifyHdl, Edit&, void) { // enable or disable item DownSearch/UpSearch of findbar vcl::Window* pWindow = VCLUnoHelper::GetWindow( getParent() ); @@ -511,8 +511,6 @@ IMPL_LINK_NOARG(FindTextToolbarController, EditModifyHdl) pToolBox->EnableItem(m_nUpSearchId, false); } } - - return 0; } UpDownSearchToolboxController::UpDownSearchToolboxController( const css::uno::Reference< css::uno::XComponentContext > & rxContext, Type eType ) diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx index 882c6921d0e1..7d9ab48f50ce 100644 --- a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx +++ b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx @@ -624,10 +624,9 @@ IMPL_LINK_NOARG_TYPED(ChineseDictionaryDialog, EditFieldsListBoxHdl, ListBox&, v { updateButtons(); } -IMPL_LINK_NOARG(ChineseDictionaryDialog, EditFieldsHdl) +IMPL_LINK_NOARG_TYPED(ChineseDictionaryDialog, EditFieldsHdl, Edit&, void) { updateButtons(); - return 0; } IMPL_LINK_NOARG_TYPED(ChineseDictionaryDialog, MappingSelectHdl, SvTreeListBox*, void) { diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx index 1a4c80aa5b63..4c048f8c302c 100644 --- a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx +++ b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx @@ -124,8 +124,8 @@ public: private: DECL_LINK_TYPED( DirectionHdl, Button*, void ); - DECL_LINK(EditFieldsHdl, void *); - DECL_LINK_TYPED(EditFieldsListBoxHdl, ListBox&, void); + DECL_LINK_TYPED( EditFieldsHdl, Edit&, void ); + DECL_LINK_TYPED( EditFieldsListBoxHdl, ListBox&, void ); DECL_LINK_TYPED( MappingSelectHdl, SvTreeListBox*, void ); DECL_LINK_TYPED( AddHdl, Button*, void ); DECL_LINK_TYPED( ModifyHdl, Button*, void ); |