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 | |
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>
-rw-r--r-- | cui/source/factory/dlgfact.cxx | 8 | ||||
-rw-r--r-- | cui/source/factory/dlgfact.hxx | 10 | ||||
-rw-r--r-- | include/svx/svxdlg.hxx | 4 | ||||
-rw-r--r-- | sc/source/ui/inc/redcom.hxx | 4 | ||||
-rw-r--r-- | sc/source/ui/miscdlgs/redcom.cxx | 16 | ||||
-rw-r--r-- | sw/source/uibase/inc/textsh.hxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/shells/textfld.cxx | 30 |
7 files changed, 33 insertions, 43 deletions
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx index 6810b42a28a0..0961103439f0 100644 --- a/cui/source/factory/dlgfact.cxx +++ b/cui/source/factory/dlgfact.cxx @@ -779,7 +779,7 @@ void AbstractSvxPostItDialog_Impl::HideAuthor() { pDlg->HideAuthor(); } -void AbstractSvxPostItDialog_Impl::SetNextHdl( const Link<>& rLink ) +void AbstractSvxPostItDialog_Impl::SetNextHdl( const Link<AbstractSvxPostItDialog&,void>& rLink ) { aNextHdl = rLink; if( rLink.IsSet() ) @@ -787,7 +787,7 @@ void AbstractSvxPostItDialog_Impl::SetNextHdl( const Link<>& rLink ) else pDlg->SetNextHdl( Link<SvxPostItDialog&,void>() ); } -void AbstractSvxPostItDialog_Impl::SetPrevHdl( const Link<>& rLink ) +void AbstractSvxPostItDialog_Impl::SetPrevHdl( const Link<AbstractSvxPostItDialog&,void>& rLink ) { aPrevHdl = rLink; if( rLink.IsSet() ) @@ -798,12 +798,12 @@ void AbstractSvxPostItDialog_Impl::SetPrevHdl( const Link<>& rLink ) IMPL_LINK_NOARG_TYPED(AbstractSvxPostItDialog_Impl, NextHdl, SvxPostItDialog&, void) { if( aNextHdl.IsSet() ) - aNextHdl.Call(this); + aNextHdl.Call(*this); } IMPL_LINK_NOARG_TYPED(AbstractSvxPostItDialog_Impl, PrevHdl, SvxPostItDialog&, void) { if( aPrevHdl.IsSet() ) - aPrevHdl.Call(this); + aPrevHdl.Call(*this); } vcl::Window * AbstractSvxPostItDialog_Impl::GetWindow() { diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx index af543dcc593a..e4e962196d53 100644 --- a/cui/source/factory/dlgfact.hxx +++ b/cui/source/factory/dlgfact.hxx @@ -448,18 +448,18 @@ class AbstractSvxPostItDialog_Impl :public AbstractSvxPostItDialog DECL_ABSTDLG_BASE( AbstractSvxPostItDialog_Impl, SvxPostItDialog ) virtual void SetText( const OUString& rStr ) SAL_OVERRIDE; //From class Window virtual const SfxItemSet* GetOutputItemSet() const SAL_OVERRIDE; - virtual void SetPrevHdl( const Link<>& rLink ) SAL_OVERRIDE ; - virtual void SetNextHdl( const Link<>& rLink ) SAL_OVERRIDE ; + virtual void SetPrevHdl( const Link<AbstractSvxPostItDialog&,void>& rLink ) SAL_OVERRIDE ; + virtual void SetNextHdl( const Link<AbstractSvxPostItDialog&,void>& rLink ) SAL_OVERRIDE ; virtual void EnableTravel(bool bNext, bool bPrev) SAL_OVERRIDE ; virtual OUString GetNote() SAL_OVERRIDE ; virtual void SetNote(const OUString& rTxt) SAL_OVERRIDE ; virtual void ShowLastAuthor(const OUString& rAuthor, const OUString& rDate) SAL_OVERRIDE ; virtual void DontChangeAuthor() SAL_OVERRIDE ; virtual void HideAuthor() SAL_OVERRIDE ; - virtual vcl::Window * GetWindow() SAL_OVERRIDE; + virtual vcl::Window * GetWindow() SAL_OVERRIDE; private: - Link<> aNextHdl; - Link<> aPrevHdl; + Link<AbstractSvxPostItDialog&,void> aNextHdl; + Link<AbstractSvxPostItDialog&,void> aPrevHdl; DECL_LINK_TYPED(NextHdl, SvxPostItDialog&, void); DECL_LINK_TYPED(PrevHdl, SvxPostItDialog&, void); }; diff --git a/include/svx/svxdlg.hxx b/include/svx/svxdlg.hxx index d97090bac515..1ec6814627c4 100644 --- a/include/svx/svxdlg.hxx +++ b/include/svx/svxdlg.hxx @@ -234,8 +234,8 @@ class AbstractSvxPostItDialog :public VclAbstractDialog public: virtual void SetText( const OUString& rStr ) = 0; //From class Window virtual const SfxItemSet* GetOutputItemSet() const = 0; - virtual void SetPrevHdl( const Link<>& rLink ) = 0; - virtual void SetNextHdl( const Link<>& rLink ) = 0; + virtual void SetPrevHdl( const Link<AbstractSvxPostItDialog&,void>& rLink ) = 0; + virtual void SetNextHdl( const Link<AbstractSvxPostItDialog&,void>& rLink ) = 0; virtual void EnableTravel(bool bNext, bool bPrev) = 0; virtual OUString GetNote() = 0; virtual void SetNote(const OUString& rTxt) = 0; diff --git a/sc/source/ui/inc/redcom.hxx b/sc/source/ui/inc/redcom.hxx index 86e2588f416b..29b15a83529c 100644 --- a/sc/source/ui/inc/redcom.hxx +++ b/sc/source/ui/inc/redcom.hxx @@ -34,8 +34,8 @@ private: OUString aComment; AbstractSvxPostItDialog* pDlg; - DECL_LINK( PrevHdl, AbstractSvxPostItDialog* ); - DECL_LINK( NextHdl, AbstractSvxPostItDialog* ); + DECL_LINK_TYPED( PrevHdl, AbstractSvxPostItDialog&, void ); + DECL_LINK_TYPED( NextHdl, AbstractSvxPostItDialog&, void ); protected: diff --git a/sc/source/ui/miscdlgs/redcom.cxx b/sc/source/ui/miscdlgs/redcom.cxx index 87c8527ec8e4..d8bd6b757d3f 100644 --- a/sc/source/ui/miscdlgs/redcom.cxx +++ b/sc/source/ui/miscdlgs/redcom.cxx @@ -151,26 +151,22 @@ void ScRedComDialog::SelectCell() } } -IMPL_LINK(ScRedComDialog, PrevHdl, AbstractSvxPostItDialog*, pDlgP ) +IMPL_LINK_TYPED(ScRedComDialog, PrevHdl, AbstractSvxPostItDialog&, rDlgP, void ) { - if (pDocShell!=NULL && pDlgP->GetNote() != aComment ) - pDocShell->SetChangeComment( pChangeAction, pDlgP->GetNote()); + if (pDocShell!=NULL && rDlgP.GetNote() != aComment ) + pDocShell->SetChangeComment( pChangeAction, rDlgP.GetNote()); ReInit(FindPrev(pChangeAction)); SelectCell(); - - return 0; } -IMPL_LINK(ScRedComDialog, NextHdl, AbstractSvxPostItDialog*, pDlgP ) +IMPL_LINK_TYPED(ScRedComDialog, NextHdl, AbstractSvxPostItDialog&, rDlgP, void ) { - if ( pDocShell!=NULL && pDlgP->GetNote() != aComment ) - pDocShell->SetChangeComment( pChangeAction, pDlgP->GetNote()); + if ( pDocShell!=NULL && rDlgP.GetNote() != aComment ) + pDocShell->SetChangeComment( pChangeAction, rDlgP.GetNote()); ReInit(FindNext(pChangeAction)); SelectCell(); - - return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ 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: */ |