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 /cui/source/dialogs | |
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 'cui/source/dialogs')
-rw-r--r-- | cui/source/dialogs/SpellDialog.cxx | 5 | ||||
-rw-r--r-- | cui/source/dialogs/colorpicker.cxx | 28 | ||||
-rw-r--r-- | cui/source/dialogs/cuifmsearch.cxx | 5 | ||||
-rw-r--r-- | cui/source/dialogs/cuigrfflt.cxx | 36 | ||||
-rw-r--r-- | cui/source/dialogs/dlgname.cxx | 11 | ||||
-rw-r--r-- | cui/source/dialogs/hangulhanjadlg.cxx | 36 | ||||
-rw-r--r-- | cui/source/dialogs/hldoctp.cxx | 14 | ||||
-rw-r--r-- | cui/source/dialogs/hlinettp.cxx | 8 | ||||
-rw-r--r-- | cui/source/dialogs/hlmailtp.cxx | 4 | ||||
-rw-r--r-- | cui/source/dialogs/zoom.cxx | 15 |
10 files changed, 82 insertions, 80 deletions
diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index 54de68e7197f..c263b7e9a2f0 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -954,9 +954,9 @@ int SpellDialog::AddToDictionaryExecute( sal_uInt16 nItemId, PopupMenu *pMenu ) } -IMPL_LINK(SpellDialog, ModifyHdl, SentenceEditWindow_Impl*, pEd) +IMPL_LINK_TYPED(SpellDialog, ModifyHdl, Edit&, rEd, void) { - if (m_pSentenceED == pEd) + if (m_pSentenceED == &rEd) { bModified = true; m_pSuggestionLB->SetNoSelection(); @@ -976,7 +976,6 @@ IMPL_LINK(SpellDialog, ModifyHdl, SentenceEditWindow_Impl*, pEd) } m_pSentenceED->AddUndoAction(pSpellAction); } - return 0; }; diff --git a/cui/source/dialogs/colorpicker.cxx b/cui/source/dialogs/colorpicker.cxx index d783e887405b..81d274aefc0e 100644 --- a/cui/source/dialogs/colorpicker.cxx +++ b/cui/source/dialogs/colorpicker.cxx @@ -990,6 +990,7 @@ public: void update_color(sal_uInt16 n = UPDATE_ALL); DECL_LINK(ColorModifyHdl, void*); + DECL_LINK_TYPED(ColorModifyEditHdl, Edit&, void); DECL_LINK_TYPED(ModeModifyHdl, RadioButton&, void); sal_Int32 GetColor() const; @@ -1074,20 +1075,21 @@ ColorPickerDialog::ColorPickerDialog( vcl::Window* pParent, sal_Int32 nColor, sa mpColorField->SetModifyHdl( aLink ); mpColorSlider->SetModifyHdl( aLink ); - mpMFRed->SetModifyHdl( aLink ); - mpMFGreen->SetModifyHdl( aLink ); - mpMFBlue->SetModifyHdl( aLink ); + Link<Edit&,void> aLink3( LINK( this, ColorPickerDialog, ColorModifyEditHdl ) ); + mpMFRed->SetModifyHdl( aLink3 ); + mpMFGreen->SetModifyHdl( aLink3 ); + mpMFBlue->SetModifyHdl( aLink3 ); - mpMFCyan->SetModifyHdl( aLink ); - mpMFMagenta->SetModifyHdl( aLink ); - mpMFYellow->SetModifyHdl( aLink ); - mpMFKey->SetModifyHdl( aLink ); + mpMFCyan->SetModifyHdl( aLink3 ); + mpMFMagenta->SetModifyHdl( aLink3 ); + mpMFYellow->SetModifyHdl( aLink3 ); + mpMFKey->SetModifyHdl( aLink3 ); - mpMFHue->SetModifyHdl( aLink ); - mpMFSaturation->SetModifyHdl( aLink ); - mpMFBrightness->SetModifyHdl( aLink ); + mpMFHue->SetModifyHdl( aLink3 ); + mpMFSaturation->SetModifyHdl( aLink3 ); + mpMFBrightness->SetModifyHdl( aLink3 ); - mpEDHex->SetModifyHdl( aLink ); + mpEDHex->SetModifyHdl( aLink3 ); Link<RadioButton&,void> aLink2 = LINK( this, ColorPickerDialog, ModeModifyHdl ); mpRBRed->SetToggleHdl( aLink2 ); @@ -1278,6 +1280,10 @@ void ColorPickerDialog::update_color( sal_uInt16 n ) mpColorPreview->SetColor(aColor); } +IMPL_LINK_TYPED(ColorPickerDialog, ColorModifyEditHdl, Edit&, rEdit, void) +{ + ColorModifyHdl(&rEdit); +} IMPL_LINK(ColorPickerDialog, ColorModifyHdl, void *, p) { sal_uInt16 n = 0; diff --git a/cui/source/dialogs/cuifmsearch.cxx b/cui/source/dialogs/cuifmsearch.cxx index e5fd633788f3..268dbe98b054 100644 --- a/cui/source/dialogs/cuifmsearch.cxx +++ b/cui/source/dialogs/cuifmsearch.cxx @@ -264,7 +264,7 @@ void FmSearchDialog::Init(const OUString& strVisibleFields, const OUString& sIni OUString sRealSetText = m_pcmbSearchText->GetText(); if (!sRealSetText.equals(sInitialText)) m_pcmbSearchText->SetText(OUString()); - LINK(this, FmSearchDialog, OnSearchTextModified).Call(m_pcmbSearchText); + LINK(this, FmSearchDialog, OnSearchTextModified).Call(*m_pcmbSearchText); // initial m_aDelayedPaint.SetTimeoutHdl(LINK(this, FmSearchDialog, OnDelayedPaint)); @@ -393,7 +393,7 @@ IMPL_LINK_TYPED(FmSearchDialog, OnClickedSpecialSettings, Button*, pButton, void } } -IMPL_LINK_NOARG(FmSearchDialog, OnSearchTextModified) +IMPL_LINK_NOARG_TYPED(FmSearchDialog, OnSearchTextModified, Edit&, void) { if ((!m_pcmbSearchText->GetText().isEmpty()) || !m_prbSearchForText->IsChecked()) m_pbSearchAgain->Enable(); @@ -401,7 +401,6 @@ IMPL_LINK_NOARG(FmSearchDialog, OnSearchTextModified) m_pbSearchAgain->Disable(); m_pSearchEngine->InvalidatePreviousLoc(); - return 0; } IMPL_LINK_NOARG_TYPED(FmSearchDialog, OnFocusGrabbed, Control&, void) diff --git a/cui/source/dialogs/cuigrfflt.cxx b/cui/source/dialogs/cuigrfflt.cxx index 73bb4c3d6a70..bdf4c9377d59 100644 --- a/cui/source/dialogs/cuigrfflt.cxx +++ b/cui/source/dialogs/cuigrfflt.cxx @@ -196,11 +196,11 @@ GraphicFilterMosaic::GraphicFilterMosaic( vcl::Window* pParent, const Graphic& r mpMtrWidth->SetValue( nTileWidth ); mpMtrWidth->SetLast( GetGraphicSizePixel().Width() ); - mpMtrWidth->SetModifyHdl( GetModifyHdl() ); + mpMtrWidth->SetModifyHdl( LINK(this, GraphicFilterMosaic, EditModifyHdl) ); mpMtrHeight->SetValue( nTileHeight ); mpMtrHeight->SetLast( GetGraphicSizePixel().Height() ); - mpMtrHeight->SetModifyHdl( GetModifyHdl() ); + mpMtrHeight->SetModifyHdl( LINK(this, GraphicFilterMosaic, EditModifyHdl) ); mpCbxEdges->Check( bEnhanceEdges ); mpCbxEdges->SetToggleHdl( LINK(this, GraphicFilterMosaic, CheckBoxModifyHdl) ); @@ -213,6 +213,11 @@ IMPL_LINK_TYPED(GraphicFilterMosaic, CheckBoxModifyHdl, CheckBox&, rCheckBox, vo GetModifyHdl().Call(&rCheckBox); } +IMPL_LINK_TYPED(GraphicFilterMosaic, EditModifyHdl, Edit&, rEdit, void) +{ + GetModifyHdl().Call(&rEdit); +} + GraphicFilterMosaic::~GraphicFilterMosaic() { disposeOnce(); @@ -273,10 +278,15 @@ GraphicFilterSmooth::GraphicFilterSmooth( vcl::Window* pParent, const Graphic& r get(mpMtrRadius, "radius"); mpMtrRadius->SetValue( nRadius* 10 ); - mpMtrRadius->SetModifyHdl( GetModifyHdl() ); + mpMtrRadius->SetModifyHdl( LINK(this, GraphicFilterSmooth, EditModifyHdl) ); mpMtrRadius->GrabFocus(); } +IMPL_LINK_TYPED(GraphicFilterSmooth, EditModifyHdl, Edit&, rEdit, void) +{ + GetModifyHdl().Call(&rEdit); +} + GraphicFilterSmooth::~GraphicFilterSmooth() { disposeOnce(); @@ -329,7 +339,7 @@ GraphicFilterSolarize::GraphicFilterSolarize( vcl::Window* pParent, const Graphi get(mpCbxInvert, "invert"); mpMtrThreshold->SetValue( FRound( cGreyThreshold / 2.55 ) ); - mpMtrThreshold->SetModifyHdl( GetModifyHdl() ); + mpMtrThreshold->SetModifyHdl( LINK(this, GraphicFilterSolarize, EditModifyHdl) ); mpCbxInvert->Check( bInvert ); mpCbxInvert->SetToggleHdl( LINK(this, GraphicFilterSolarize, CheckBoxModifyHdl) ); @@ -339,6 +349,10 @@ IMPL_LINK_TYPED(GraphicFilterSolarize, CheckBoxModifyHdl, CheckBox&, rCheckBox, { GetModifyHdl().Call(&rCheckBox); } +IMPL_LINK_TYPED(GraphicFilterSolarize, EditModifyHdl, Edit&, rEdit, void) +{ + GetModifyHdl().Call(&rEdit); +} GraphicFilterSolarize::~GraphicFilterSolarize() { @@ -399,7 +413,12 @@ GraphicFilterSepia::GraphicFilterSepia( vcl::Window* pParent, const Graphic& rGr get(mpMtrSepia, "value"); mpMtrSepia->SetValue( nSepiaPercent ); - mpMtrSepia->SetModifyHdl( GetModifyHdl() ); + mpMtrSepia->SetModifyHdl( LINK(this, GraphicFilterSepia, EditModifyHdl) ); +} + +IMPL_LINK_TYPED(GraphicFilterSepia, EditModifyHdl, Edit&, rEdit, void) +{ + GetModifyHdl().Call(&rEdit); } GraphicFilterSepia::~GraphicFilterSepia() @@ -452,7 +471,12 @@ GraphicFilterPoster::GraphicFilterPoster(vcl::Window* pParent, const Graphic& rG mpNumPoster->SetFirst( 2 ); mpNumPoster->SetLast( rGraphic.GetBitmapEx().GetBitCount() ); mpNumPoster->SetValue( nPosterCount ); - mpNumPoster->SetModifyHdl( GetModifyHdl() ); + mpNumPoster->SetModifyHdl( LINK(this, GraphicFilterPoster, EditModifyHdl) ); +} + +IMPL_LINK_TYPED(GraphicFilterPoster, EditModifyHdl, Edit&, rEdit, void) +{ + GetModifyHdl().Call(&rEdit); } GraphicFilterPoster::~GraphicFilterPoster() diff --git a/cui/source/dialogs/dlgname.cxx b/cui/source/dialogs/dlgname.cxx index 4a064ebe0135..0ab18c3f19d5 100644 --- a/cui/source/dialogs/dlgname.cxx +++ b/cui/source/dialogs/dlgname.cxx @@ -41,7 +41,7 @@ SvxNameDialog::SvxNameDialog( vcl::Window* pWindow, const OUString& rName, const pFtDescription->SetText( rDesc ); pEdtName->SetText( rName ); pEdtName->SetSelection(Selection(SELECTION_MIN, SELECTION_MAX)); - ModifyHdl(pEdtName.get()); + ModifyHdl(*pEdtName.get()); pEdtName->SetModifyHdl(LINK(this, SvxNameDialog, ModifyHdl)); } @@ -58,11 +58,10 @@ void SvxNameDialog::dispose() ModalDialog::dispose(); } -IMPL_LINK_NOARG(SvxNameDialog, ModifyHdl) +IMPL_LINK_NOARG_TYPED(SvxNameDialog, ModifyHdl, Edit&, void) { if(aCheckNameHdl.IsSet()) pBtnOK->Enable(aCheckNameHdl.Call(*this)); - return 0; } @@ -82,7 +81,7 @@ SvxObjectNameDialog::SvxObjectNameDialog( // activate name pEdtName->SetSelection(Selection(SELECTION_MIN, SELECTION_MAX)); - ModifyHdl(pEdtName.get()); + ModifyHdl(*pEdtName.get()); pEdtName->SetModifyHdl(LINK(this, SvxObjectNameDialog, ModifyHdl)); } @@ -99,14 +98,12 @@ void SvxObjectNameDialog::dispose() } -IMPL_LINK_NOARG(SvxObjectNameDialog, ModifyHdl) +IMPL_LINK_NOARG_TYPED(SvxObjectNameDialog, ModifyHdl, Edit&, void) { if(aCheckNameHdl.IsSet()) { pBtnOK->Enable(aCheckNameHdl.Call(*this)); } - - return 0; } diff --git a/cui/source/dialogs/hangulhanjadlg.cxx b/cui/source/dialogs/hangulhanjadlg.cxx index c11cd43bbf31..c8a1a8d9624e 100644 --- a/cui/source/dialogs/hangulhanjadlg.cxx +++ b/cui/source/dialogs/hangulhanjadlg.cxx @@ -657,7 +657,7 @@ namespace svx } m_pWordInput->SetText( sFirstSuggestion ); m_pWordInput->SaveValue(); - OnSuggestionModified( m_pWordInput ); + OnSuggestionModified( *m_pWordInput ); } @@ -718,19 +718,17 @@ namespace svx IMPL_LINK_NOARG_TYPED( HangulHanjaConversionDialog, OnSuggestionSelected, SuggestionDisplay&, void ) { m_pWordInput->SetText( m_pSuggestions->GetSelectEntry() ); - OnSuggestionModified( NULL ); + OnSuggestionModified( *m_pWordInput ); } - IMPL_LINK_NOARG( HangulHanjaConversionDialog, OnSuggestionModified ) + IMPL_LINK_NOARG_TYPED( HangulHanjaConversionDialog, OnSuggestionModified, Edit&, void ) { m_pFind->Enable( m_pWordInput->IsValueChangedFromSaved() ); bool bSameLen = m_pWordInput->GetText().getLength() == m_pOriginalWord->GetText().getLength(); m_pReplace->Enable( m_bDocumentMode && bSameLen ); m_pReplaceAll->Enable( m_bDocumentMode && bSameLen ); - - return 0L; } @@ -1197,13 +1195,11 @@ namespace svx EndDialog( RET_OK ); } - IMPL_LINK_NOARG(HangulHanjaNewDictDialog, ModifyHdl) + IMPL_LINK_NOARG_TYPED(HangulHanjaNewDictDialog, ModifyHdl, Edit&, void) { OUString aName(comphelper::string::stripEnd(m_pDictNameED->GetText(), ' ')); m_pOkBtn->Enable( !aName.isEmpty() ); - - return 0; } HangulHanjaNewDictDialog::HangulHanjaNewDictDialog(vcl::Window* pParent) @@ -1502,39 +1498,33 @@ namespace svx UpdateScrollbar(); } - IMPL_LINK_NOARG( HangulHanjaEditDictDialog, OriginalModifyHdl ) + IMPL_LINK_NOARG_TYPED( HangulHanjaEditDictDialog, OriginalModifyHdl, Edit&, void ) { m_bModifiedOriginal = true; m_aOriginal = comphelper::string::stripEnd( m_aOriginalLB->GetText(), ' ' ); UpdateSuggestions(); UpdateButtonStates(); - - return 0; } - IMPL_LINK( HangulHanjaEditDictDialog, EditModifyHdl1, Edit*, pEdit ) + IMPL_LINK_TYPED( HangulHanjaEditDictDialog, EditModifyHdl1, Edit&, rEdit, void ) { - EditModify( pEdit, 0 ); - return 0; + EditModify( &rEdit, 0 ); } - IMPL_LINK( HangulHanjaEditDictDialog, EditModifyHdl2, Edit*, pEdit ) + IMPL_LINK_TYPED( HangulHanjaEditDictDialog, EditModifyHdl2, Edit&, rEdit, void ) { - EditModify( pEdit, 1 ); - return 0; + EditModify( &rEdit, 1 ); } - IMPL_LINK( HangulHanjaEditDictDialog, EditModifyHdl3, Edit*, pEdit ) + IMPL_LINK_TYPED( HangulHanjaEditDictDialog, EditModifyHdl3, Edit&, rEdit, void ) { - EditModify( pEdit, 2 ); - return 0; + EditModify( &rEdit, 2 ); } - IMPL_LINK( HangulHanjaEditDictDialog, EditModifyHdl4, Edit*, pEdit ) + IMPL_LINK_TYPED( HangulHanjaEditDictDialog, EditModifyHdl4, Edit&, rEdit, void ) { - EditModify( pEdit, 3 ); - return 0; + EditModify( &rEdit, 3 ); } IMPL_LINK_NOARG_TYPED( HangulHanjaEditDictDialog, BookLBSelectHdl, ListBox&, void ) diff --git a/cui/source/dialogs/hldoctp.cxx b/cui/source/dialogs/hldoctp.cxx index f7c27b39e36b..5fc269e2f450 100644 --- a/cui/source/dialogs/hldoctp.cxx +++ b/cui/source/dialogs/hldoctp.cxx @@ -104,7 +104,7 @@ void SvxHyperlinkDocTp::FillDlgFields(const OUString& rStrURL) aStrMark = rStrURL.copy( nPos+1 ); m_pEdTarget->SetText ( aStrMark ); - ModifiedPathHdl_Impl ( NULL ); + ModifiedPathHdl_Impl ( *m_pCbbPath ); } /************************************************************************* @@ -216,7 +216,7 @@ IMPL_LINK_NOARG_TYPED(SvxHyperlinkDocTp, ClickFileopenHdl_Impl, Button*, void) m_pCbbPath->SetText( aPath ); if ( aOldURL != GetCurrentURL() ) - ModifiedPathHdl_Impl (NULL); + ModifiedPathHdl_Impl(*m_pCbbPath); } } @@ -256,7 +256,7 @@ IMPL_LINK_NOARG_TYPED(SvxHyperlinkDocTp, ClickTargetHdl_Impl, Button*, void) |* |************************************************************************/ -IMPL_LINK_NOARG(SvxHyperlinkDocTp, ModifiedPathHdl_Impl) +IMPL_LINK_NOARG_TYPED(SvxHyperlinkDocTp, ModifiedPathHdl_Impl, Edit&, void) { maStrURL = GetCurrentURL(); @@ -264,8 +264,6 @@ IMPL_LINK_NOARG(SvxHyperlinkDocTp, ModifiedPathHdl_Impl) maTimer.Start(); m_pFtFullURL->SetText( maStrURL ); - - return 0L; } /************************************************************************* @@ -297,7 +295,7 @@ IMPL_LINK_NOARG_TYPED(SvxHyperlinkDocTp, TimeoutHdl_Impl, Timer *, void) |* |************************************************************************/ -IMPL_LINK_NOARG(SvxHyperlinkDocTp, ModifiedTargetHdl_Impl) +IMPL_LINK_NOARG_TYPED(SvxHyperlinkDocTp, ModifiedTargetHdl_Impl, Edit&, void) { maStrURL = GetCurrentURL(); @@ -305,8 +303,6 @@ IMPL_LINK_NOARG(SvxHyperlinkDocTp, ModifiedTargetHdl_Impl) mpMarkWnd->SelectEntry ( m_pEdTarget->GetText() ); m_pFtFullURL->SetText( maStrURL ); - - return 0L; } /************************************************************************* @@ -332,7 +328,7 @@ void SvxHyperlinkDocTp::SetMarkStr ( const OUString& aStrMark ) { m_pEdTarget->SetText ( aStrMark ); - ModifiedTargetHdl_Impl ( NULL ); + ModifiedTargetHdl_Impl ( *m_pEdTarget ); } /************************************************************************* diff --git a/cui/source/dialogs/hlinettp.cxx b/cui/source/dialogs/hlinettp.cxx index 094f05e41e61..f73027328ce3 100644 --- a/cui/source/dialogs/hlinettp.cxx +++ b/cui/source/dialogs/hlinettp.cxx @@ -224,7 +224,7 @@ void SvxHyperlinkInternetTp::SetInitFocus() |* |************************************************************************/ -IMPL_LINK_NOARG(SvxHyperlinkInternetTp, ModifiedTargetHdl_Impl) +IMPL_LINK_NOARG_TYPED(SvxHyperlinkInternetTp, ModifiedTargetHdl_Impl, Edit&, void) { OUString aScheme = GetSchemeFromURL( m_pCbbTarget->GetText() ); if( !aScheme.isEmpty() ) @@ -233,8 +233,6 @@ IMPL_LINK_NOARG(SvxHyperlinkInternetTp, ModifiedTargetHdl_Impl) // start timer maTimer.SetTimeout( 2500 ); maTimer.Start(); - - return 0L; } /************************************************************************* @@ -254,7 +252,7 @@ IMPL_LINK_NOARG_TYPED(SvxHyperlinkInternetTp, TimeoutHdl_Impl, Timer *, void) |* |************************************************************************/ -IMPL_LINK_NOARG(SvxHyperlinkInternetTp, ModifiedLoginHdl_Impl) +IMPL_LINK_NOARG_TYPED(SvxHyperlinkInternetTp, ModifiedLoginHdl_Impl, Edit&, void) { OUString aStrLogin ( m_pEdLogin->GetText() ); if ( aStrLogin.equalsIgnoreAsciiCase( sAnonymous ) ) @@ -262,8 +260,6 @@ IMPL_LINK_NOARG(SvxHyperlinkInternetTp, ModifiedLoginHdl_Impl) m_pCbAnonymous->Check(); ClickAnonymousHdl_Impl(NULL); } - - return 0L; } void SvxHyperlinkInternetTp::SetScheme(const OUString& rScheme) diff --git a/cui/source/dialogs/hlmailtp.cxx b/cui/source/dialogs/hlmailtp.cxx index 26febba904ea..567a47801ba4 100644 --- a/cui/source/dialogs/hlmailtp.cxx +++ b/cui/source/dialogs/hlmailtp.cxx @@ -229,13 +229,11 @@ void SvxHyperlinkMailTp::RemoveImproperProtocol(const OUString& aProperScheme) |* |************************************************************************/ -IMPL_LINK_NOARG(SvxHyperlinkMailTp, ModifiedReceiverHdl_Impl) +IMPL_LINK_NOARG_TYPED(SvxHyperlinkMailTp, ModifiedReceiverHdl_Impl, Edit&, void) { OUString aScheme = GetSchemeFromURL( m_pCbbReceiver->GetText() ); if(!aScheme.isEmpty()) SetScheme( aScheme ); - - return 0L; } /************************************************************************* diff --git a/cui/source/dialogs/zoom.cxx b/cui/source/dialogs/zoom.cxx index 42c77ea01624..8adf79265833 100644 --- a/cui/source/dialogs/zoom.cxx +++ b/cui/source/dialogs/zoom.cxx @@ -163,7 +163,7 @@ SvxZoomDialog::SvxZoomDialog( vcl::Window* pParent, const SfxItemSet& rCoreSet ) m_pSingleBtn->SetClickHdl(aViewLayoutLink); m_pColumnsBtn->SetClickHdl(aViewLayoutLink); - Link<> aViewLayoutSpinLink = LINK(this, SvxZoomDialog, ViewLayoutSpinHdl); + Link<Edit&,void> aViewLayoutSpinLink = LINK(this, SvxZoomDialog, ViewLayoutSpinHdl); m_pColumnsEdit->SetModifyHdl(aViewLayoutSpinLink); Link<Button*,void> aViewLayoutCheckLink = LINK(this, SvxZoomDialog, ViewLayoutCheckHdl); @@ -328,13 +328,12 @@ IMPL_LINK_TYPED(SvxZoomDialog, UserHdl, Button *, pButton, void) } } -IMPL_LINK_NOARG(SvxZoomDialog, SpinHdl) +IMPL_LINK_NOARG_TYPED(SvxZoomDialog, SpinHdl, Edit&, void) { if (!m_pUserBtn->IsChecked()) - return 0; + return; mbModified = true; - return 0; } IMPL_LINK_TYPED(SvxZoomDialog, ViewLayoutUserHdl, Button*, pButton, void) @@ -364,10 +363,10 @@ IMPL_LINK_TYPED(SvxZoomDialog, ViewLayoutUserHdl, Button*, pButton, void) } } -IMPL_LINK(SvxZoomDialog, ViewLayoutSpinHdl, NumericField*, pEdit) +IMPL_LINK_TYPED(SvxZoomDialog, ViewLayoutSpinHdl, Edit&, rEdit, void) { - if (pEdit == m_pColumnsEdit && !m_pColumnsBtn->IsChecked()) - return 0; + if (&rEdit == m_pColumnsEdit && !m_pColumnsBtn->IsChecked()) + return; if (m_pColumnsEdit->GetValue() % 2 == 0) { @@ -380,8 +379,6 @@ IMPL_LINK(SvxZoomDialog, ViewLayoutSpinHdl, NumericField*, pEdit) } mbModified = true; - - return 0; } IMPL_LINK_TYPED(SvxZoomDialog, ViewLayoutCheckHdl, Button*, pCheckBox, void) |