[Libreoffice-commits] core.git: cui/source include/svx sc/source sw/source
Noel Grandin
noelgrandin at gmail.com
Fri Sep 25 11:21:06 PDT 2015
cui/source/factory/dlgfact.cxx | 8 ++++----
cui/source/factory/dlgfact.hxx | 10 +++++-----
include/svx/svxdlg.hxx | 4 ++--
sc/source/ui/inc/redcom.hxx | 4 ++--
sc/source/ui/miscdlgs/redcom.cxx | 16 ++++++----------
sw/source/uibase/inc/textsh.hxx | 4 ++--
sw/source/uibase/shells/textfld.cxx | 30 ++++++++++++------------------
7 files changed, 33 insertions(+), 43 deletions(-)
New commits:
commit 1296732028df43160d070d27be6fd961e284fdd6
Author: Noel Grandin <noelgrandin at gmail.com>
Date: Fri Sep 25 09:52:59 2015 +0200
convert Link<> to typed
Change-Id: I0d645d646037d9fbb4f1b97931ace6171a84a267
Reviewed-on: https://gerrit.libreoffice.org/18855
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 6810b42..0961103 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 af543dc..e4e9621 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 d97090b..1ec6814 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 86e2588..29b15a8 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 87c8527..d8bd6b7 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 0e601da..5cf3c0e 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 c290ab3..406ce82 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: */
More information about the Libreoffice-commits
mailing list