diff options
author | Noel Grandin <noel@peralex.com> | 2015-09-15 14:10:46 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-09-16 08:38:55 +0200 |
commit | 11c4f58fb12810740cdd8409e4991a92efde6c97 (patch) | |
tree | e90e7054a7bc682953669644bb2b061e7c229977 /cui | |
parent | 34c55149476dbdc369382098eab92874b296310e (diff) |
convert Link<> to typed
Change-Id: I2573b42143078c4e72ab201392c69ee296f4974e
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/dialogs/linkdlg.cxx | 9 | ||||
-rw-r--r-- | cui/source/inc/linkdlg.hxx | 2 |
2 files changed, 5 insertions, 6 deletions
diff --git a/cui/source/dialogs/linkdlg.cxx b/cui/source/dialogs/linkdlg.cxx index 1f02356c7ef6..8fd24a159653 100644 --- a/cui/source/dialogs/linkdlg.cxx +++ b/cui/source/dialogs/linkdlg.cxx @@ -519,12 +519,12 @@ IMPL_LINK_NOARG_TYPED( SvBaseLinksDlg, UpdateWaitingHdl, Idle*, void ) m_pTbLinks->SetUpdateMode(true); } -IMPL_LINK( SvBaseLinksDlg, EndEditHdl, sfx2::SvBaseLink*, _pLink ) +IMPL_LINK_TYPED( SvBaseLinksDlg, EndEditHdl, sfx2::SvBaseLink&, _rLink, void ) { sal_uLong nPos; GetSelEntry( &nPos ); - if( _pLink && _pLink->WasLastEditOK() ) + if( _rLink.WasLastEditOK() ) { // StarImpress/Draw swap the LinkObjects themselves! // So search for the link in the manager; if it does not exist @@ -532,7 +532,7 @@ IMPL_LINK( SvBaseLinksDlg, EndEditHdl, sfx2::SvBaseLink*, _pLink ) // edited link needs to be refreshed. bool bLinkFnd = false; for( size_t n = pLinkMgr->GetLinks().size(); n; ) - if( _pLink == &(*pLinkMgr->GetLinks()[ --n ]) ) + if( &_rLink == &(*pLinkMgr->GetLinks()[ --n ]) ) { bLinkFnd = true; break; @@ -543,7 +543,7 @@ IMPL_LINK( SvBaseLinksDlg, EndEditHdl, sfx2::SvBaseLink*, _pLink ) m_pTbLinks->SetUpdateMode(false); m_pTbLinks->GetModel()->Remove( m_pTbLinks->GetEntry( nPos ) ); SvTreeListEntry* pToUnselect = m_pTbLinks->FirstSelected(); - InsertEntry( *_pLink, nPos, true ); + InsertEntry( _rLink, nPos, true ); if(pToUnselect) m_pTbLinks->Select(pToUnselect, false); m_pTbLinks->SetUpdateMode(true); @@ -557,7 +557,6 @@ IMPL_LINK( SvBaseLinksDlg, EndEditHdl, sfx2::SvBaseLink*, _pLink ) if (pLinkMgr && pLinkMgr->GetPersist()) pLinkMgr->GetPersist()->SetModified(); } - return 0; } OUString SvBaseLinksDlg::ImplGetStateStr( const SvBaseLink& rLnk ) diff --git a/cui/source/inc/linkdlg.hxx b/cui/source/inc/linkdlg.hxx index 22f9a0db326f..429cef04c823 100644 --- a/cui/source/inc/linkdlg.hxx +++ b/cui/source/inc/linkdlg.hxx @@ -72,7 +72,7 @@ class SvBaseLinksDlg : public ModalDialog DECL_LINK_TYPED( ChangeSourceClickHdl, Button *, void ); DECL_LINK_TYPED( BreakLinkClickHdl, Button *, void ); DECL_LINK_TYPED( UpdateWaitingHdl, Idle *, void ); - DECL_LINK( EndEditHdl, sfx2::SvBaseLink* ); + DECL_LINK_TYPED( EndEditHdl, sfx2::SvBaseLink&, void ); sfx2::SvBaseLink* GetSelEntry( sal_uLong* pPos ); OUString ImplGetStateStr( const sfx2::SvBaseLink& ); void SetType( sfx2::SvBaseLink& rLink, sal_uLong nPos, SfxLinkUpdateMode nType ); |