diff options
author | Noel Grandin <noel@peralex.com> | 2015-09-15 13:49:49 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-09-16 08:38:54 +0200 |
commit | 50ca487b2f4d7377b3357299025e8c50058ef596 (patch) | |
tree | f0d85ff9c254038a97bfac8ec194acdafff1769b /sfx2 | |
parent | 87004ba29ac513d92da1608679cb065404f51215 (diff) |
convert Link<> to typed
Change-Id: Ic978fd8f03705c341ecb44685d840a6a240fee2d
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/appl/fileobj.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/appl/fileobj.hxx | 4 | ||||
-rw-r--r-- | sfx2/source/appl/impldde.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/appl/impldde.hxx | 2 | ||||
-rw-r--r-- | sfx2/source/appl/linksrc.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/appl/lnkbase2.cxx | 9 |
6 files changed, 12 insertions, 15 deletions
diff --git a/sfx2/source/appl/fileobj.cxx b/sfx2/source/appl/fileobj.cxx index b8c28b8aba09..cb8730262381 100644 --- a/sfx2/source/appl/fileobj.cxx +++ b/sfx2/source/appl/fileobj.cxx @@ -392,7 +392,7 @@ OUString impl_getFilter( const OUString& _rURL ) return sFilter; } -void SvFileObject::Edit( vcl::Window* pParent, sfx2::SvBaseLink* pLink, const Link<>& rEndEditHdl ) +void SvFileObject::Edit( vcl::Window* pParent, sfx2::SvBaseLink* pLink, const Link<const OUString&, void>& rEndEditHdl ) { aEndEditLink = rEndEditHdl; OUString sFile, sRange, sTmpFilter; @@ -419,7 +419,7 @@ void SvFileObject::Edit( vcl::Window* pParent, sfx2::SvBaseLink* pLink, const Li sFile += aDlg.GetCurrentFilter(); if ( aEndEditLink.IsSet() ) - aEndEditLink.Call( &sFile ); + aEndEditLink.Call( sFile ); } else sFile.clear(); @@ -526,7 +526,7 @@ IMPL_LINK_TYPED( SvFileObject, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileD } if ( aEndEditLink.IsSet() ) - aEndEditLink.Call( &sFile ); + aEndEditLink.Call( sFile ); } /* [Description] diff --git a/sfx2/source/appl/fileobj.hxx b/sfx2/source/appl/fileobj.hxx index c90da04e667d..02a8c3edcce9 100644 --- a/sfx2/source/appl/fileobj.hxx +++ b/sfx2/source/appl/fileobj.hxx @@ -31,7 +31,7 @@ class SvFileObject : public sfx2::SvLinkSource OUString sFileNm; OUString sFilter; OUString sReferer; - Link<> aEndEditLink; + Link<const OUString&, void> aEndEditLink; SfxMediumRef xMed; ImplSVEvent* nPostUserEventId; SfxMediumRef* pDelMed; @@ -69,7 +69,7 @@ public: bool bSynchron = false ) SAL_OVERRIDE; virtual bool Connect( sfx2::SvBaseLink* ) SAL_OVERRIDE; - virtual void Edit( vcl::Window *, sfx2::SvBaseLink *, const Link<>& rEndEditHdl ) SAL_OVERRIDE; + virtual void Edit( vcl::Window *, sfx2::SvBaseLink *, const Link<const OUString&, void>& rEndEditHdl ) SAL_OVERRIDE; // Ask whether you can access data directly or whether it has to be triggered virtual bool IsPending() const SAL_OVERRIDE; diff --git a/sfx2/source/appl/impldde.cxx b/sfx2/source/appl/impldde.cxx index d0a270c4d93e..920ebe0be580 100644 --- a/sfx2/source/appl/impldde.cxx +++ b/sfx2/source/appl/impldde.cxx @@ -266,13 +266,13 @@ bool SvDDEObject::Connect( SvBaseLink * pSvLink ) return true; } -void SvDDEObject::Edit( vcl::Window* pParent, sfx2::SvBaseLink* pBaseLink, const Link<>& rEndEditHdl ) +void SvDDEObject::Edit( vcl::Window* pParent, sfx2::SvBaseLink* pBaseLink, const Link<const OUString&, void>& rEndEditHdl ) { ScopedVclPtrInstance< SvDDELinkEditDialog > aDlg(pParent, pBaseLink); if ( RET_OK == aDlg->Execute() && rEndEditHdl.IsSet() ) { OUString sCommand = aDlg->GetCmd(); - rEndEditHdl.Call( &sCommand ); + rEndEditHdl.Call( sCommand ); } } diff --git a/sfx2/source/appl/impldde.hxx b/sfx2/source/appl/impldde.hxx index 0185c0a88b35..d4db1e1a0540 100644 --- a/sfx2/source/appl/impldde.hxx +++ b/sfx2/source/appl/impldde.hxx @@ -59,7 +59,7 @@ public: bool bSynchron = false ) SAL_OVERRIDE; virtual bool Connect( SvBaseLink * ) SAL_OVERRIDE; - virtual void Edit( vcl::Window* pParent, sfx2::SvBaseLink* pBaseLink, const Link<>& rEndEditHdl ) SAL_OVERRIDE; + virtual void Edit( vcl::Window* pParent, sfx2::SvBaseLink* pBaseLink, const Link<const OUString&, void>& rEndEditHdl ) SAL_OVERRIDE; virtual bool IsPending() const SAL_OVERRIDE; virtual bool IsDataComplete() const SAL_OVERRIDE; diff --git a/sfx2/source/appl/linksrc.cxx b/sfx2/source/appl/linksrc.cxx index 1ce7a4434c24..f0c9ff47e81c 100644 --- a/sfx2/source/appl/linksrc.cxx +++ b/sfx2/source/appl/linksrc.cxx @@ -435,7 +435,7 @@ bool SvLinkSource::GetData( ::com::sun::star::uno::Any &, const OUString &, bool return false; } -void SvLinkSource::Edit( vcl::Window *, SvBaseLink *, const Link<>& ) +void SvLinkSource::Edit( vcl::Window *, SvBaseLink *, const Link<const OUString&, void>& ) { } diff --git a/sfx2/source/appl/lnkbase2.cxx b/sfx2/source/appl/lnkbase2.cxx index 87ace2f2003e..a899d9ed0035 100644 --- a/sfx2/source/appl/lnkbase2.cxx +++ b/sfx2/source/appl/lnkbase2.cxx @@ -247,17 +247,14 @@ SvBaseLink::~SvBaseLink() delete pImpl; } -IMPL_LINK( SvBaseLink, EndEditHdl, OUString*, _pNewName ) +IMPL_LINK_TYPED( SvBaseLink, EndEditHdl, const OUString&, _rNewName, void ) { - OUString sNewName; - if ( _pNewName ) - sNewName = *_pNewName; + OUString sNewName = _rNewName; if ( !ExecuteEdit( sNewName ) ) sNewName.clear(); bWasLastEditOK = !sNewName.isEmpty(); if ( pImpl->m_aEndEditLink.IsSet() ) pImpl->m_aEndEditLink.Call( this ); - return 0; } @@ -484,7 +481,7 @@ void SvBaseLink::Edit( vcl::Window* pParent, const Link<>& rEndEditHdl ) _GetRealObject( xObj.Is() ); bool bAsync = false; - Link<> aLink = LINK( this, SvBaseLink, EndEditHdl ); + Link<const OUString&, void> aLink = LINK( this, SvBaseLink, EndEditHdl ); if( OBJECT_CLIENT_SO & nObjType && pImplData->ClientType.bIntrnlLnk ) { |