diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2015-09-25 09:52:59 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-09-25 18:20:34 +0000 |
commit | 1296732028df43160d070d27be6fd961e284fdd6 (patch) | |
tree | f6aa28a89c589b4e073257aec9ab0cb881aae012 /sw | |
parent | 6fd356a08e92c043be612594eeba1521a837e48a (diff) |
convert Link<> to typed
Change-Id: I0d645d646037d9fbb4f1b97931ace6171a84a267
Reviewed-on: https://gerrit.libreoffice.org/18855
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/uibase/inc/textsh.hxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/shells/textfld.cxx | 30 |
2 files changed, 14 insertions, 20 deletions
diff --git a/sw/source/uibase/inc/textsh.hxx b/sw/source/uibase/inc/textsh.hxx index 0e601da66258..5cf3c0e3746a 100644 --- a/sw/source/uibase/inc/textsh.hxx +++ b/sw/source/uibase/inc/textsh.hxx @@ -46,8 +46,8 @@ private: static void InitInterface_Impl(); public: - DECL_LINK( RedlineNextHdl, AbstractSvxPostItDialog * ); - DECL_LINK( RedlinePrevHdl, AbstractSvxPostItDialog * ); + DECL_LINK_TYPED( RedlineNextHdl, AbstractSvxPostItDialog&, void ); + DECL_LINK_TYPED( RedlinePrevHdl, AbstractSvxPostItDialog&, void ); void Execute(SfxRequest &); void GetState(SfxItemSet &); diff --git a/sw/source/uibase/shells/textfld.cxx b/sw/source/uibase/shells/textfld.cxx index c290ab301f6a..406ce8285f46 100644 --- a/sw/source/uibase/shells/textfld.cxx +++ b/sw/source/uibase/shells/textfld.cxx @@ -852,13 +852,12 @@ void SwTextShell::InsertHyperlink(const SvxHyperlinkItem& rHlnkItem) } } -IMPL_LINK( SwTextShell, RedlineNextHdl, AbstractSvxPostItDialog *, pBtn ) +IMPL_LINK_TYPED( SwTextShell, RedlineNextHdl, AbstractSvxPostItDialog&, rDlg, void ) { SwWrtShell* pSh = GetShellPtr(); - AbstractSvxPostItDialog *pDlg = pBtn; // Insert or change a comment. - pSh->SetRedlineComment(pDlg->GetNote()); + pSh->SetRedlineComment(rDlg.GetNote()); const SwRangeRedline *pRedline = pSh->GetCurrRedline(); @@ -883,7 +882,7 @@ IMPL_LINK( SwTextShell, RedlineNextHdl, AbstractSvxPostItDialog *, pBtn ) pSh->EndAction(); } - pDlg->EnableTravel(bEnable, true); + rDlg.EnableTravel(bEnable, true); if( pSh->IsCrsrPtAtEnd() ) pSh->SwapPam(); @@ -891,24 +890,21 @@ IMPL_LINK( SwTextShell, RedlineNextHdl, AbstractSvxPostItDialog *, pBtn ) pRedline = pSh->GetCurrRedline(); OUString sComment = convertLineEnd(pRedline->GetComment(), GetSystemLineEnd()); - pDlg->SetNote(sComment); - pDlg->ShowLastAuthor( pRedline->GetAuthorString(), + rDlg.SetNote(sComment); + rDlg.ShowLastAuthor( pRedline->GetAuthorString(), GetAppLangDateTimeString( pRedline->GetRedlineData().GetTimeStamp() )); - pDlg->SetText(lcl_BuildTitleWithRedline(pRedline)); + rDlg.SetText(lcl_BuildTitleWithRedline(pRedline)); } - - return 0; } -IMPL_LINK( SwTextShell, RedlinePrevHdl, AbstractSvxPostItDialog *, pBtn ) +IMPL_LINK_TYPED( SwTextShell, RedlinePrevHdl, AbstractSvxPostItDialog&, rDlg, void ) { SwWrtShell* pSh = GetShellPtr(); - AbstractSvxPostItDialog *pDlg = pBtn; // Insert or change a comment. - pSh->SetRedlineComment(pDlg->GetNote()); + pSh->SetRedlineComment(rDlg.GetNote()); const SwRangeRedline *pRedline = pSh->GetCurrRedline(); @@ -930,20 +926,18 @@ IMPL_LINK( SwTextShell, RedlinePrevHdl, AbstractSvxPostItDialog *, pBtn ) pSh->EndAction(); } - pDlg->EnableTravel(true, bEnable); + rDlg.EnableTravel(true, bEnable); pRedline = pSh->GetCurrRedline(); OUString sComment = convertLineEnd(pRedline->GetComment(), GetSystemLineEnd()); - pDlg->SetNote(sComment); - pDlg->ShowLastAuthor(pRedline->GetAuthorString(), + rDlg.SetNote(sComment); + rDlg.ShowLastAuthor(pRedline->GetAuthorString(), GetAppLangDateTimeString( pRedline->GetRedlineData().GetTimeStamp() )); - pDlg->SetText(lcl_BuildTitleWithRedline(pRedline)); + rDlg.SetText(lcl_BuildTitleWithRedline(pRedline)); } - - return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |