convert Link<> to typed

Change-Id: I5c629821b7f30caba4d182d45f3f3cd0159acc5c
This commit is contained in:
Noel Grandin
2015-09-16 13:35:59 +02:00
parent bc9d5eb566
commit fcb5512751
4 changed files with 8 additions and 11 deletions

View File

@@ -1772,13 +1772,10 @@ SfxItemSet Outliner::GetParaAttribs( sal_Int32 nPara )
return pEditEngine->GetParaAttribs( nPara );
}
IMPL_LINK( Outliner, ParaVisibleStateChangedHdl, Paragraph*, pPara )
IMPL_LINK_TYPED( Outliner, ParaVisibleStateChangedHdl, Paragraph&, rPara, void )
{
sal_Int32 nPara = pParaList->GetAbsPos( pPara );
pEditEngine->ShowParagraph( nPara, pPara->IsVisible() );
return 0;
sal_Int32 nPara = pParaList->GetAbsPos( &rPara );
pEditEngine->ShowParagraph( nPara, rPara.IsVisible() );
}
IMPL_LINK_NOARG_TYPED(Outliner, BeginMovingParagraphsHdl, MoveParagraphsInfo&, void)

View File

@@ -222,7 +222,7 @@ void ParagraphList::Expand( Paragraph* pParent )
if ( !( pPara->IsVisible() ) )
{
pPara->bVisible = true;
aVisibleStateChangedHdl.Call( pPara );
aVisibleStateChangedHdl.Call( *pPara );
}
}
}
@@ -238,7 +238,7 @@ void ParagraphList::Collapse( Paragraph* pParent )
if ( pPara->IsVisible() )
{
pPara->bVisible = false;
aVisibleStateChangedHdl.Call( pPara );
aVisibleStateChangedHdl.Call( *pPara );
}
}
}

View File

@@ -66,11 +66,11 @@ public:
void Expand( Paragraph* pParent );
void Collapse( Paragraph* pParent );
void SetVisibleStateChangedHdl( const Link<>& rLink ) { aVisibleStateChangedHdl = rLink; }
void SetVisibleStateChangedHdl( const Link<Paragraph&,void>& rLink ) { aVisibleStateChangedHdl = rLink; }
private:
Link<> aVisibleStateChangedHdl;
Link<Paragraph&,void> aVisibleStateChangedHdl;
std::vector<Paragraph*> maEntries;
};

View File

@@ -617,7 +617,7 @@ class EDITENG_DLLPUBLIC Outliner : public SfxBroadcaster
sal_uLong nDummy;
DECL_LINK( ParaVisibleStateChangedHdl, Paragraph* );
DECL_LINK_TYPED( ParaVisibleStateChangedHdl, Paragraph&, void );
DECL_LINK_TYPED( BeginMovingParagraphsHdl, MoveParagraphsInfo&, void );
DECL_LINK_TYPED( EndMovingParagraphsHdl, MoveParagraphsInfo&, void );
DECL_LINK_TYPED( BeginPasteOrDropHdl, PasteOrDropInfos&, void );