diff options
-rw-r--r-- | include/sfx2/linksrc.hxx | 2 | ||||
-rw-r--r-- | include/sfx2/lnkbase.hxx | 2 | ||||
-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 |
8 files changed, 14 insertions, 17 deletions
diff --git a/include/sfx2/linksrc.hxx b/include/sfx2/linksrc.hxx index 0a2fbc163db3..c288e98b4783 100644 --- a/include/sfx2/linksrc.hxx +++ b/include/sfx2/linksrc.hxx @@ -85,7 +85,7 @@ public: virtual bool IsDataComplete() const; // Link impl: DECL_LINK( MyEndEditHdl, sfx2::FileDialogHelper* ); <= param is the dialog - virtual void Edit( vcl::Window *, SvBaseLink *, const Link<>& rEndEditHdl ); + virtual void Edit( vcl::Window *, SvBaseLink *, const Link<const OUString&, void>& rEndEditHdl ); void AddDataAdvise( SvBaseLink *, const rtl::OUString & rMimeType, diff --git a/include/sfx2/lnkbase.hxx b/include/sfx2/lnkbase.hxx index 4ee235b668b6..164b26d40e81 100644 --- a/include/sfx2/lnkbase.hxx +++ b/include/sfx2/lnkbase.hxx @@ -78,7 +78,7 @@ private: bool bUseCache : 1; // for Graphics Links! bool bWasLastEditOK : 1; - DECL_LINK( EndEditHdl, OUString* ); + DECL_LINK_TYPED( EndEditHdl, const OUString&, void ); bool ExecuteEdit( const OUString& _rNewName ); 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 ) { |