summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-04-30 10:20:00 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-04-30 10:20:00 +0200
commit3ead3ad52f9bb2f9d1d6cf8dfc73a0a25e6778ed (patch)
treebdfd28afe5a452060e3d985c5f01b45f4b7bc2cd /sfx2
parent57d254d42b6e1d836bd21e6fb2e968af2b511c7d (diff)
Gradually typed Link
Turn the Link class into a template abstracting over the link's argument and return types, but provide default template arguments that keep the generic, unsafe "void* in, sal_IntPtr out" behvior. That way, individual uses of the Link class can be updated over time. All the related macros are duplicated with ..._TYPED counterparts, that additionally take the RetType (except for LINK_TYPED, which manages to infer the relevant types from the supplied Member). (It would have been attractive to change the "untyped" LinkStubs from taking a void* to a properly typed ArgType parameter, too, but that would cause -fsanitize=function to flag uses of "untyped" Link::Call.) Change-Id: I3b0140378bad99abbf240140ebb4a46a05d2d2f8
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/inc/srchdlg.hxx8
-rw-r--r--sfx2/source/appl/fileobj.cxx6
-rw-r--r--sfx2/source/appl/fileobj.hxx4
-rw-r--r--sfx2/source/appl/helpinterceptor.hxx4
-rw-r--r--sfx2/source/appl/impldde.cxx2
-rw-r--r--sfx2/source/appl/impldde.hxx2
-rw-r--r--sfx2/source/appl/linksrc.cxx2
-rw-r--r--sfx2/source/appl/lnkbase2.cxx6
-rw-r--r--sfx2/source/appl/newhelp.cxx12
-rw-r--r--sfx2/source/appl/newhelp.hxx30
-rw-r--r--sfx2/source/control/dispatch.cxx2
-rw-r--r--sfx2/source/control/itemdel.cxx2
-rw-r--r--sfx2/source/control/shell.cxx4
-rw-r--r--sfx2/source/control/templateabstractview.cxx4
-rw-r--r--sfx2/source/control/templatesearchview.cxx2
-rw-r--r--sfx2/source/control/thumbnailviewitem.cxx2
-rw-r--r--sfx2/source/dialog/backingwindow.cxx2
-rw-r--r--sfx2/source/dialog/dinfdlg.cxx4
-rw-r--r--sfx2/source/dialog/filedlghelper.cxx4
-rw-r--r--sfx2/source/dialog/mgetempl.cxx4
-rw-r--r--sfx2/source/dialog/passwd.cxx2
-rw-r--r--sfx2/source/dialog/tabdlg.cxx4
-rw-r--r--sfx2/source/dialog/titledockwin.cxx2
-rw-r--r--sfx2/source/dialog/versdlg.cxx2
-rw-r--r--sfx2/source/doc/docfile.cxx4
-rw-r--r--sfx2/source/doc/docinsert.cxx2
-rw-r--r--sfx2/source/doc/templatedlg.cxx16
-rw-r--r--sfx2/source/inc/templatesearchview.hxx4
-rw-r--r--sfx2/source/inc/templdgi.hxx8
-rw-r--r--sfx2/source/menu/mnuitem.cxx2
-rw-r--r--sfx2/source/sidebar/AsynchronousCall.cxx2
-rw-r--r--sfx2/source/sidebar/SidebarToolBox.cxx12
-rw-r--r--sfx2/source/view/viewprn.cxx2
33 files changed, 84 insertions, 84 deletions
diff --git a/sfx2/inc/srchdlg.hxx b/sfx2/inc/srchdlg.hxx
index 2b71b76f7d99..782d75a2fe6e 100644
--- a/sfx2/inc/srchdlg.hxx
+++ b/sfx2/inc/srchdlg.hxx
@@ -43,8 +43,8 @@ private:
VclPtr<CheckBox> m_pBackwardsBox;
VclPtr<PushButton> m_pFindBtn;
- Link m_aFindHdl;
- Link m_aCloseHdl;
+ Link<> m_aFindHdl;
+ Link<> m_aCloseHdl;
OUString m_sConfigName;
OString m_sWinState;
@@ -61,8 +61,8 @@ public:
virtual ~SearchDialog();
virtual void dispose() SAL_OVERRIDE;
- void SetFindHdl( const Link& rLink ) { m_aFindHdl = rLink; }
- void SetCloseHdl( const Link& rLink ) { m_aCloseHdl = rLink; }
+ void SetFindHdl( const Link<>& rLink ) { m_aFindHdl = rLink; }
+ void SetCloseHdl( const Link<>& rLink ) { m_aCloseHdl = rLink; }
OUString GetSearchText() const { return m_pSearchEdit->GetText(); }
void SetSearchText( const OUString& _rText ) { m_pSearchEdit->SetText( _rText ); }
diff --git a/sfx2/source/appl/fileobj.cxx b/sfx2/source/appl/fileobj.cxx
index 278034ceee0c..deaedf5876f6 100644
--- a/sfx2/source/appl/fileobj.cxx
+++ b/sfx2/source/appl/fileobj.cxx
@@ -68,7 +68,7 @@ SvFileObject::~SvFileObject()
{
if (xMed.Is())
{
- xMed->SetDoneLink( Link() );
+ xMed->SetDoneLink( Link<>() );
xMed.Clear();
}
if (nPostUserEventId)
@@ -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<>& rEndEditHdl )
{
aEndEditLink = rEndEditHdl;
OUString sFile, sRange, sTmpFilter;
@@ -485,7 +485,7 @@ IMPL_STATIC_LINK( SvFileObject, LoadGrfReady_Impl, void*, EMPTYARG )
pThis->bLoadAgain = true;
if( pThis->xMed.Is() )
{
- pThis->xMed->SetDoneLink( Link() );
+ pThis->xMed->SetDoneLink( Link<>() );
pThis->pDelMed = new SfxMediumRef(pThis->xMed);
pThis->nPostUserEventId = Application::PostUserEvent(
LINK( pThis, SvFileObject, DelMedium_Impl ),
diff --git a/sfx2/source/appl/fileobj.hxx b/sfx2/source/appl/fileobj.hxx
index 5e2a5fddfcc1..7e0c72bb56eb 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<> 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<>& 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/helpinterceptor.hxx b/sfx2/source/appl/helpinterceptor.hxx
index a990518bc7a4..f5ce4bb9d1ac 100644
--- a/sfx2/source/appl/helpinterceptor.hxx
+++ b/sfx2/source/appl/helpinterceptor.hxx
@@ -120,7 +120,7 @@ class HelpListener_Impl : public ::cppu::WeakImplHelper1< ::com::sun::star::fram
{
private:
HelpInterceptor_Impl* pInterceptor;
- Link aChangeLink;
+ Link<> aChangeLink;
OUString aFactory;
public:
@@ -131,7 +131,7 @@ public:
virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& obj )
throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
- void SetChangeHdl( const Link& rLink ) { aChangeLink = rLink; }
+ void SetChangeHdl( const Link<>& rLink ) { aChangeLink = rLink; }
OUString GetFactory() const { return aFactory; }
};
// HelpStatusListener_Impl -----------------------------------------------------
diff --git a/sfx2/source/appl/impldde.cxx b/sfx2/source/appl/impldde.cxx
index 110fe238dc9f..2d375fa22109 100644
--- a/sfx2/source/appl/impldde.cxx
+++ b/sfx2/source/appl/impldde.cxx
@@ -269,7 +269,7 @@ 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<>& rEndEditHdl )
{
ScopedVclPtrInstance< SvDDELinkEditDialog > aDlg(pParent, pBaseLink);
if ( RET_OK == aDlg->Execute() && rEndEditHdl.IsSet() )
diff --git a/sfx2/source/appl/impldde.hxx b/sfx2/source/appl/impldde.hxx
index 3ce245452b94..b6c66eadf966 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<>& 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 ecd06b3bc5b8..fb0dad6ff795 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<>& )
{
}
diff --git a/sfx2/source/appl/lnkbase2.cxx b/sfx2/source/appl/lnkbase2.cxx
index 8834962b8762..3c899b35c91e 100644
--- a/sfx2/source/appl/lnkbase2.cxx
+++ b/sfx2/source/appl/lnkbase2.cxx
@@ -44,7 +44,7 @@ class ImplDdeItem;
struct BaseLink_Impl
{
- Link m_aEndEditLink;
+ Link<> m_aEndEditLink;
LinkManager* m_pLinkMgr;
VclPtr<vcl::Window> m_pParentWin;
FileDialogHelper* m_pFileDlg;
@@ -475,7 +475,7 @@ SvBaseLink::UpdateResult SvBaseLink::DataChanged( const OUString &, const ::com:
return SUCCESS;
}
-void SvBaseLink::Edit( vcl::Window* pParent, const Link& rEndEditHdl )
+void SvBaseLink::Edit( vcl::Window* pParent, const Link<>& rEndEditHdl )
{
pImpl->m_pParentWin = pParent;
pImpl->m_aEndEditLink = rEndEditHdl;
@@ -484,7 +484,7 @@ void SvBaseLink::Edit( vcl::Window* pParent, const Link& rEndEditHdl )
_GetRealObject( xObj.Is() );
bool bAsync = false;
- Link aLink = LINK( this, SvBaseLink, EndEditHdl );
+ Link<> aLink = LINK( this, SvBaseLink, EndEditHdl );
if( OBJECT_CLIENT_SO & nObjType && pImplData->ClientType.bIntrnlLnk )
{
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index 25a45ce97baf..a1e8f4ccdb1e 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -565,7 +565,7 @@ IndexTabPage_Impl::IndexTabPage_Impl(vcl::Window* pParent, SfxHelpIndexWindow_Im
get(m_pOpenBtn, "display");
m_pOpenBtn->SetClickHdl( LINK( this, IndexTabPage_Impl, OpenHdl ) );
- Link aTimeoutLink = LINK( this, IndexTabPage_Impl, TimeoutHdl );
+ Link<> aTimeoutLink = LINK( this, IndexTabPage_Impl, TimeoutHdl );
aFactoryIdle.SetIdleHdl( LINK(this, IndexTabPage_Impl, IdleHdl ));
aFactoryIdle.SetPriority(SchedulerPriority::LOWER);
aKeywordTimer.SetTimeoutHdl( aTimeoutLink );
@@ -774,7 +774,7 @@ Control* IndexTabPage_Impl::GetLastFocusControl()
return m_pOpenBtn;
}
-void IndexTabPage_Impl::SetDoubleClickHdl( const Link& rLink )
+void IndexTabPage_Impl::SetDoubleClickHdl( const Link<>& rLink )
{
m_pIndexCB->SetDoubleClickHdl( rLink );
}
@@ -950,7 +950,7 @@ SearchTabPage_Impl::SearchTabPage_Impl(vcl::Window* pParent, SfxHelpIndexWindow_
m_pResultsLB->set_height_request(aSize.Height());
get(m_pOpenBtn, "display");
- Link aLink = LINK( this, SearchTabPage_Impl, SearchHdl );
+ Link<> aLink = LINK( this, SearchTabPage_Impl, SearchHdl );
m_pSearchED->SetSearchLink( aLink );
m_pSearchBtn->SetClickHdl(aLink);
m_pSearchED->SetModifyHdl( LINK( this, SearchTabPage_Impl, ModifyHdl ) );
@@ -1110,7 +1110,7 @@ Control* SearchTabPage_Impl::GetLastFocusControl()
return m_pOpenBtn;
}
-void SearchTabPage_Impl::SetDoubleClickHdl( const Link& rLink )
+void SearchTabPage_Impl::SetDoubleClickHdl( const Link<>& rLink )
{
m_pResultsLB->SetDoubleClickHdl( rLink );
}
@@ -1356,7 +1356,7 @@ Control* BookmarksTabPage_Impl::GetLastFocusControl()
return m_pBookmarksPB;
}
-void BookmarksTabPage_Impl::SetDoubleClickHdl( const Link& rLink )
+void BookmarksTabPage_Impl::SetDoubleClickHdl( const Link<>& rLink )
{
m_pBookmarksBox->SetDoubleClickHdl(rLink);
}
@@ -1734,7 +1734,7 @@ void SfxHelpIndexWindow_Impl::DataChanged( const DataChangedEvent& rDCEvt )
-void SfxHelpIndexWindow_Impl::SetDoubleClickHdl( const Link& rLink )
+void SfxHelpIndexWindow_Impl::SetDoubleClickHdl( const Link<>& rLink )
{
aPageDoubleClickLink = rLink;
if ( pCPage )
diff --git a/sfx2/source/appl/newhelp.hxx b/sfx2/source/appl/newhelp.hxx
index add82d178f9b..bf87d9226c96 100644
--- a/sfx2/source/appl/newhelp.hxx
+++ b/sfx2/source/appl/newhelp.hxx
@@ -65,7 +65,7 @@ public:
virtual void RequestingChildren( SvTreeListEntry* pParent ) SAL_OVERRIDE;
virtual bool Notify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
- inline void SetOpenHdl( const Link& rLink ) { SetDoubleClickHdl( rLink ); }
+ inline void SetOpenHdl( const Link<>& rLink ) { SetDoubleClickHdl( rLink ); }
OUString GetSelectEntry() const;
};
@@ -102,7 +102,7 @@ public:
virtual void ActivatePage() SAL_OVERRIDE;
virtual Control* GetLastFocusControl() SAL_OVERRIDE;
- void SetOpenHdl( const Link& rLink ) { m_pContentBox->SetOpenHdl( rLink ); }
+ void SetOpenHdl( const Link<>& rLink ) { m_pContentBox->SetOpenHdl( rLink ); }
OUString GetSelectEntry() const { return m_pContentBox->GetSelectEntry(); }
void SetFocusOnBox() { m_pContentBox->GrabFocus(); }
};
@@ -128,7 +128,7 @@ private:
Idle aFactoryIdle;
Timer aKeywordTimer;
- Link aKeywordLink;
+ Link<> aKeywordLink;
OUString sFactory;
OUString sKeyword;
@@ -150,14 +150,14 @@ public:
virtual void ActivatePage() SAL_OVERRIDE;
virtual Control* GetLastFocusControl() SAL_OVERRIDE;
- void SetDoubleClickHdl( const Link& rLink );
+ void SetDoubleClickHdl( const Link<>& rLink );
void SetFactory( const OUString& rFactory );
inline OUString GetFactory() const { return sFactory; }
OUString GetSelectEntry() const;
inline void SetFocusOnBox() { m_pIndexCB->GrabFocus(); }
inline bool HasFocusOnEdit() const { return m_pIndexCB->HasChildPathFocus(); }
- inline void SetKeywordHdl( const Link& rLink ) { aKeywordLink = rLink; }
+ inline void SetKeywordHdl( const Link<>& rLink ) { aKeywordLink = rLink; }
void SetKeyword( const OUString& rKeyword );
bool HasKeyword() const;
bool HasKeywordIgnoreCase();
@@ -171,7 +171,7 @@ public:
class SearchBox_Impl : public ComboBox
{
private:
- Link aSearchLink;
+ Link<> aSearchLink;
public:
SearchBox_Impl(vcl::Window* pParent, WinBits nStyle)
@@ -183,7 +183,7 @@ public:
virtual bool PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
virtual void Select() SAL_OVERRIDE;
- inline void SetSearchLink( const Link& rLink ) { aSearchLink = rLink; }
+ inline void SetSearchLink( const Link<>& rLink ) { aSearchLink = rLink; }
};
class SearchResultsBox_Impl : public ListBox
@@ -227,7 +227,7 @@ public:
virtual void ActivatePage() SAL_OVERRIDE;
virtual Control* GetLastFocusControl() SAL_OVERRIDE;
- void SetDoubleClickHdl( const Link& rLink );
+ void SetDoubleClickHdl( const Link<>& rLink );
inline void SetFactory( const OUString& rFactory ) { aFactory = rFactory; }
OUString GetSelectEntry() const;
void ClearPage();
@@ -269,7 +269,7 @@ public:
virtual void ActivatePage() SAL_OVERRIDE;
virtual Control* GetLastFocusControl() SAL_OVERRIDE;
- void SetDoubleClickHdl( const Link& rLink );
+ void SetDoubleClickHdl( const Link<>& rLink );
OUString GetSelectEntry() const;
void AddBookmarks( const OUString& rTitle, const OUString& rURL );
void SetFocusOnBox() { m_pBookmarksBox->GrabFocus(); }
@@ -287,9 +287,9 @@ private:
Idle aIdle;
- Link aSelectFactoryLink;
- Link aPageDoubleClickLink;
- Link aIndexKeywordLink;
+ Link<> aSelectFactoryLink;
+ Link<> aPageDoubleClickLink;
+ Link<> aIndexKeywordLink;
OUString sKeyword;
VclPtr<SfxHelpWindow_Impl> pParentWin;
@@ -328,8 +328,8 @@ public:
virtual bool PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
virtual void DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE;
- void SetDoubleClickHdl( const Link& rLink );
- inline void SetSelectFactoryHdl( const Link& rLink ) { aSelectFactoryLink = rLink; }
+ void SetDoubleClickHdl( const Link<>& rLink );
+ inline void SetSelectFactoryHdl( const Link<>& rLink ) { aSelectFactoryLink = rLink; }
void SetFactory( const OUString& rFactory, bool bActive );
inline OUString GetFactory() const { return pIPage->GetFactory(); }
OUString GetSelectEntry() const;
@@ -470,7 +470,7 @@ public:
inline ::com::sun::star::uno::Reference < ::com::sun::star::frame::XFrame2 >
getFrame() const { return xFrame; }
- inline void SetSelectHdl( const Link& rLink ) { aToolBox->SetSelectHdl( rLink ); }
+ inline void SetSelectHdl( const Link<>& rLink ) { aToolBox->SetSelectHdl( rLink ); }
void ToggleIndex( bool bOn );
void SelectSearchText( const OUString& rSearchText, bool _bIsFullWordSearch );
void SetPageStyleHeaderOff() const;
diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx
index 51644e7d80ad..2e54af5e9838 100644
--- a/sfx2/source/control/dispatch.cxx
+++ b/sfx2/source/control/dispatch.cxx
@@ -376,7 +376,7 @@ SfxDispatcher::~SfxDispatcher()
// So that no timer by Reschedule in PlugComm strikes the LeaveRegistrations
xImp->aIdle.Stop();
- xImp->xPoster->SetEventHdl( Link() );
+ xImp->xPoster->SetEventHdl( Link<>() );
// Notify the stack varialbles in Call_Impl
if ( xImp->pInCallAliveFlag )
diff --git a/sfx2/source/control/itemdel.cxx b/sfx2/source/control/itemdel.cxx
index 9ba81f7050ca..9166d4b14ff5 100644
--- a/sfx2/source/control/itemdel.cxx
+++ b/sfx2/source/control/itemdel.cxx
@@ -31,7 +31,7 @@
class SfxItemDisruptor_Impl: private boost::noncopyable
{
SfxPoolItem *pItem;
- Link aLink;
+ Link<> aLink;
private:
DECL_LINK( Delete, void* );
diff --git a/sfx2/source/control/shell.cxx b/sfx2/source/control/shell.cxx
index 351dc0704429..520ba71c4fdf 100644
--- a/sfx2/source/control/shell.cxx
+++ b/sfx2/source/control/shell.cxx
@@ -420,7 +420,7 @@ const SfxPoolItem* SfxShell::ExecuteSlot( SfxRequest& rReq, bool bAsync )
{
if( !pImp->pExecuter )
pImp->pExecuter = new svtools::AsynchronLink(
- Link( this, ShellCall_Impl ) );
+ Link<>( this, ShellCall_Impl ) );
pImp->pExecuter->Call( new SfxRequest( rReq ) );
return 0;
}
@@ -686,7 +686,7 @@ void SfxShell::UIFeatureChanged()
// something my get stuck in the bunkered tools. Asynchronous call to
// prevent recursion.
if ( !pImp->pUpdater )
- pImp->pUpdater = new svtools::AsynchronLink( Link( this, DispatcherUpdate_Impl ) );
+ pImp->pUpdater = new svtools::AsynchronLink( Link<>( this, DispatcherUpdate_Impl ) );
// Multiple views allowed
pImp->pUpdater->Call( pFrame->GetDispatcher(), true );
diff --git a/sfx2/source/control/templateabstractview.cxx b/sfx2/source/control/templateabstractview.cxx
index ccf1aa756777..3ffb69c599be 100644
--- a/sfx2/source/control/templateabstractview.cxx
+++ b/sfx2/source/control/templateabstractview.cxx
@@ -218,12 +218,12 @@ void TemplateAbstractView::insertItems(const std::vector<TemplateItemProperties>
-void TemplateAbstractView::setOpenRegionHdl(const Link &rLink)
+void TemplateAbstractView::setOpenRegionHdl(const Link<> &rLink)
{
maOpenRegionHdl = rLink;
}
-void TemplateAbstractView::setOpenTemplateHdl(const Link &rLink)
+void TemplateAbstractView::setOpenTemplateHdl(const Link<> &rLink)
{
maOpenTemplateHdl = rLink;
}
diff --git a/sfx2/source/control/templatesearchview.cxx b/sfx2/source/control/templatesearchview.cxx
index 582dd5ad2c2f..7ba4e8248548 100644
--- a/sfx2/source/control/templatesearchview.cxx
+++ b/sfx2/source/control/templatesearchview.cxx
@@ -22,7 +22,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeTemplateSearchView(vcl
return new TemplateSearchView(pParent);
}
-void TemplateSearchView::setOpenTemplateHdl(const Link &rLink)
+void TemplateSearchView::setOpenTemplateHdl(const Link<> &rLink)
{
maOpenTemplateHdl = rLink;
}
diff --git a/sfx2/source/control/thumbnailviewitem.cxx b/sfx2/source/control/thumbnailviewitem.cxx
index c6543906639c..7d4cbed2dbe2 100644
--- a/sfx2/source/control/thumbnailviewitem.cxx
+++ b/sfx2/source/control/thumbnailviewitem.cxx
@@ -260,7 +260,7 @@ void ThumbnailViewItem::calculateItemsPosition (const long nThumbnailHeight, con
maTextEditMaxArea = Rectangle( aPos, aEditSize );
}
-void ThumbnailViewItem::setSelectClickHdl (const Link &link)
+void ThumbnailViewItem::setSelectClickHdl (const Link<> &link)
{
maClickHdl = link;
}
diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx
index 91878eaa5b48..6c5206d1afe7 100644
--- a/sfx2/source/dialog/backingwindow.cxx
+++ b/sfx2/source/dialog/backingwindow.cxx
@@ -744,7 +744,7 @@ void BackingWindow::dispatchURL( const OUString& i_rURL,
if ( xDispatch.is() )
{
ImplDelayedDispatch* pDisp = new ImplDelayedDispatch( xDispatch, aDispatchURL, i_rArgs );
- if( Application::PostUserEvent( Link( NULL, implDispatchDelayed ), pDisp ) == 0 )
+ if( Application::PostUserEvent( Link<>( NULL, implDispatchDelayed ), pDisp ) == 0 )
delete pDisp; // event could not be posted for unknown reason, at least don't leak
}
}
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 55261037a376..569596180b88 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -2102,7 +2102,7 @@ void CustomPropertiesControl::Init(VclBuilderContainer& rBuilder)
m_pVertScroll->SetRangeMax( 0 );
m_pVertScroll->SetVisibleSize( 0xFFFF );
- Link aScrollLink = LINK( this, CustomPropertiesControl, ScrollHdl );
+ Link<> aScrollLink = LINK( this, CustomPropertiesControl, ScrollHdl );
m_pVertScroll->SetScrollHdl( aScrollLink );
}
@@ -2613,7 +2613,7 @@ CmisPropertiesControl::CmisPropertiesControl(SfxTabPage* pParent)
m_rVertScroll.SetRangeMin(0);
m_rVertScroll.SetVisibleSize( 0xFFFF );
- Link aScrollLink = LINK( this, CmisPropertiesControl, ScrollHdl );
+ Link<> aScrollLink = LINK( this, CmisPropertiesControl, ScrollHdl );
m_rVertScroll.SetScrollHdl( aScrollLink );
}
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index f02af36c770a..95fa7c31c972 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -1123,7 +1123,7 @@ FileDialogHelper_Impl::~FileDialogHelper_Impl()
if ( mbDeleteMatcher )
delete mpMatcher;
- maPreviewIdle.SetIdleHdl( Link() );
+ maPreviewIdle.SetIdleHdl( Link<>() );
::comphelper::disposeComponent( mxFileDlg );
}
@@ -2338,7 +2338,7 @@ ErrCode FileDialogHelper::Execute( SfxItemSet *& rpSet,
return nRet;
}
-void FileDialogHelper::StartExecuteModal( const Link& rEndDialogHdl )
+void FileDialogHelper::StartExecuteModal( const Link<>& rEndDialogHdl )
{
m_aDialogClosedLink = rEndDialogHdl;
m_nError = ERRCODE_NONE;
diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx
index 5bc78c42855b..8b69def6daee 100644
--- a/sfx2/source/dialog/mgetempl.cxx
+++ b/sfx2/source/dialog/mgetempl.cxx
@@ -256,8 +256,8 @@ SfxManageStyleSheetPage::~SfxManageStyleSheetPage()
void SfxManageStyleSheetPage::dispose()
{
- m_pNameRw->SetGetFocusHdl( Link() );
- m_pNameRw->SetLoseFocusHdl( Link() );
+ m_pNameRw->SetGetFocusHdl( Link<>() );
+ m_pNameRw->SetLoseFocusHdl( Link<>() );
delete pFamilies;
pItem = 0;
pStyle = 0;
diff --git a/sfx2/source/dialog/passwd.cxx b/sfx2/source/dialog/passwd.cxx
index e120179324ae..9ae21b08e1ed 100644
--- a/sfx2/source/dialog/passwd.cxx
+++ b/sfx2/source/dialog/passwd.cxx
@@ -109,7 +109,7 @@ SfxPasswordDialog::SfxPasswordDialog(vcl::Window* pParent, const OUString* pGrou
mpPassword1ED->SetAccessibleName(SFX2_RESSTR(STR_PASSWD));
- Link aLink = LINK( this, SfxPasswordDialog, EditModifyHdl );
+ Link<> aLink = LINK( this, SfxPasswordDialog, EditModifyHdl );
mpPassword1ED->SetModifyHdl( aLink );
mpPassword2ED->SetModifyHdl( aLink );
aLink = LINK( this, SfxPasswordDialog, OKHdl );
diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
index af240ce76b44..390afe6b4fe8 100644
--- a/sfx2/source/dialog/tabdlg.cxx
+++ b/sfx2/source/dialog/tabdlg.cxx
@@ -535,7 +535,7 @@ short SfxTabDialog::Execute()
-void SfxTabDialog::StartExecuteModal( const Link& rEndDialogHdl )
+void SfxTabDialog::StartExecuteModal( const Link<>& rEndDialogHdl )
{
if ( !m_pTabCtrl->GetPageCount() )
return;
@@ -559,7 +559,7 @@ void SfxTabDialog::Start( bool bShow )
-void SfxTabDialog::SetApplyHandler(const Link& _rHdl)
+void SfxTabDialog::SetApplyHandler(const Link<>& _rHdl)
{
DBG_ASSERT( m_pApplyBtn, "SfxTabDialog::GetApplyHandler: no apply button enabled!" );
if ( m_pApplyBtn )
diff --git a/sfx2/source/dialog/titledockwin.cxx b/sfx2/source/dialog/titledockwin.cxx
index e4cccd062270..5da01bfa3aab 100644
--- a/sfx2/source/dialog/titledockwin.cxx
+++ b/sfx2/source/dialog/titledockwin.cxx
@@ -225,7 +225,7 @@ namespace sfx2
}
- sal_uInt16 TitledDockingWindow::impl_addDropDownToolBoxItem( const OUString& i_rItemText, const OString& i_nHelpId, const Link& i_rCallback )
+ sal_uInt16 TitledDockingWindow::impl_addDropDownToolBoxItem( const OUString& i_rItemText, const OString& i_nHelpId, const Link<>& i_rCallback )
{
// Add the menu before the closer button.
const sal_uInt16 nItemCount( m_aToolbox->GetItemCount() );
diff --git a/sfx2/source/dialog/versdlg.cxx b/sfx2/source/dialog/versdlg.cxx
index 687a6cdd298e..47ec3a6c6f0b 100644
--- a/sfx2/source/dialog/versdlg.cxx
+++ b/sfx2/source/dialog/versdlg.cxx
@@ -215,7 +215,7 @@ SfxVersionDialog::SfxVersionDialog ( SfxViewFrame* pVwFrame, bool bIsSaveVersion
m_pVersionBox = VclPtr<SfxVersionsTabListBox_Impl>::Create(*pContainer, WB_TABSTOP);
- Link aClickLink = LINK( this, SfxVersionDialog, ButtonHdl_Impl );
+ Link<> aClickLink = LINK( this, SfxVersionDialog, ButtonHdl_Impl );
m_pViewButton->SetClickHdl ( aClickLink );
m_pSaveButton->SetClickHdl ( aClickLink );
m_pDeleteButton->SetClickHdl ( aClickLink );
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index b7a1f6f38d6f..c39452f7a9b1 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -2367,12 +2367,12 @@ const OUString& SfxMedium::GetLongName() const
return pImp->m_aLongName;
}
-void SfxMedium::SetDoneLink( const Link& rLink )
+void SfxMedium::SetDoneLink( const Link<>& rLink )
{
pImp->aDoneLink = rLink;
}
-void SfxMedium::Download( const Link& aLink )
+void SfxMedium::Download( const Link<>& aLink )
{
SetDoneLink( aLink );
GetInStream();
diff --git a/sfx2/source/doc/docinsert.cxx b/sfx2/source/doc/docinsert.cxx
index bd3ba50f01e3..3968db6d66d4 100644
--- a/sfx2/source/doc/docinsert.cxx
+++ b/sfx2/source/doc/docinsert.cxx
@@ -65,7 +65,7 @@ DocumentInserter::~DocumentInserter()
delete m_pFileDlg;
}
-void DocumentInserter::StartExecuteModal( const Link& _rDialogClosedLink )
+void DocumentInserter::StartExecuteModal( const Link<>& _rDialogClosedLink )
{
m_aDialogClosedLink = _rDialogClosedLink;
m_nError = ERRCODE_NONE;
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index 3997e4f5f0e9..53f5a0577aa5 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -311,16 +311,16 @@ void SfxTemplateManagerDlg::dispose()
delete maRepositories[i];
// Ignore view events since we are cleaning the object
- mpLocalView->setItemStateHdl(Link());
- mpLocalView->setOpenRegionHdl(Link());
- mpLocalView->setOpenTemplateHdl(Link());
+ mpLocalView->setItemStateHdl(Link<>());
+ mpLocalView->setOpenRegionHdl(Link<>());
+ mpLocalView->setOpenTemplateHdl(Link<>());
- mpRemoteView->setItemStateHdl(Link());
- mpRemoteView->setOpenRegionHdl(Link());
- mpRemoteView->setOpenTemplateHdl(Link());
+ mpRemoteView->setItemStateHdl(Link<>());
+ mpRemoteView->setOpenRegionHdl(Link<>());
+ mpRemoteView->setOpenTemplateHdl(Link<>());
- mpSearchView->setItemStateHdl(Link());
- mpSearchView->setOpenTemplateHdl(Link());
+ mpSearchView->setItemStateHdl(Link<>());
+ mpSearchView->setOpenTemplateHdl(Link<>());
mpTabControl.clear();
mpSearchEdit.clear();
diff --git a/sfx2/source/inc/templatesearchview.hxx b/sfx2/source/inc/templatesearchview.hxx
index e49ef3f81813..86551f3fd0d9 100644
--- a/sfx2/source/inc/templatesearchview.hxx
+++ b/sfx2/source/inc/templatesearchview.hxx
@@ -18,7 +18,7 @@ public:
TemplateSearchView ( vcl::Window* pParent, WinBits nWinStyle = WB_TABSTOP | WB_VSCROLL);
- void setOpenTemplateHdl (const Link &rLink);
+ void setOpenTemplateHdl (const Link<> &rLink);
void AppendItem(sal_uInt16 nAssocItemId, sal_uInt16 nRegionId, sal_uInt16 nIdx,
const OUString &rTitle, const OUString &rSubtitle,
@@ -28,7 +28,7 @@ protected:
virtual void OnItemDblClicked(ThumbnailViewItem *pItem) SAL_OVERRIDE;
protected:
- Link maOpenTemplateHdl;
+ Link<> maOpenTemplateHdl;
};
#endif // INCLUDED_SFX2_SOURCE_INC_TEMPLATESEARCHVIEW_HXX
diff --git a/sfx2/source/inc/templdgi.hxx b/sfx2/source/inc/templdgi.hxx
index 249a1f32d827..7e272ac90d65 100644
--- a/sfx2/source/inc/templdgi.hxx
+++ b/sfx2/source/inc/templdgi.hxx
@@ -97,8 +97,8 @@ class StyleTreeListBox_Impl : public DropListBox_Impl
{
private:
SvTreeListEntry* pCurEntry;
- Link aDoubleClickLink;
- Link aDropLink;
+ Link<> aDoubleClickLink;
+ Link<> aDropLink;
OUString aParent;
OUString aStyle;
@@ -116,11 +116,11 @@ public:
void Recalc();
- void SetDoubleClickHdl(const Link &rLink)
+ void SetDoubleClickHdl(const Link<> &rLink)
{
aDoubleClickLink = rLink;
}
- void SetDropHdl(const Link &rLink)
+ void SetDropHdl(const Link<> &rLink)
{
aDropLink = rLink;
}
diff --git a/sfx2/source/menu/mnuitem.cxx b/sfx2/source/menu/mnuitem.cxx
index 3b52c6b3f86c..61cf0048daf1 100644
--- a/sfx2/source/menu/mnuitem.cxx
+++ b/sfx2/source/menu/mnuitem.cxx
@@ -315,7 +315,7 @@ SfxAppMenuControl_Impl::SfxAppMenuControl_Impl(
pMenu = aConf.CreateBookmarkMenu( aXFrame, GetId() == SID_NEWDOCDIRECT ? OUString(BOOKMARK_NEWMENU) : OUString(BOOKMARK_WIZARDMENU) );
if( pMenu )
{
- pMenu->SetSelectHdl( Link( &(this->GetBindings()), Select_Impl ) );
+ pMenu->SetSelectHdl( Link<>( &(this->GetBindings()), Select_Impl ) );
pMenu->SetActivateHdl( LINK(this, SfxAppMenuControl_Impl, Activate) );
rMenu.SetPopupMenu( nPos, pMenu );
}
diff --git a/sfx2/source/sidebar/AsynchronousCall.cxx b/sfx2/source/sidebar/AsynchronousCall.cxx
index 5814d2b6acf0..b95dc24ee8a1 100644
--- a/sfx2/source/sidebar/AsynchronousCall.cxx
+++ b/sfx2/source/sidebar/AsynchronousCall.cxx
@@ -42,7 +42,7 @@ void AsynchronousCall::RequestCall()
{
if (mnCallId == 0)
{
- Link aLink (LINK(this, AsynchronousCall, HandleUserCall));
+ Link<> aLink (LINK(this, AsynchronousCall, HandleUserCall));
mnCallId = Application::PostUserEvent(aLink);
}
}
diff --git a/sfx2/source/sidebar/SidebarToolBox.cxx b/sfx2/source/sidebar/SidebarToolBox.cxx
index a29d2aaedf97..24fba7dea6fd 100644
--- a/sfx2/source/sidebar/SidebarToolBox.cxx
+++ b/sfx2/source/sidebar/SidebarToolBox.cxx
@@ -75,12 +75,12 @@ void SidebarToolBox::dispose()
if (mbAreHandlersRegistered)
{
- SetDropdownClickHdl(Link());
- SetClickHdl(Link());
- SetDoubleClickHdl(Link());
- SetSelectHdl(Link());
- SetActivateHdl(Link());
- SetDeactivateHdl(Link());
+ SetDropdownClickHdl(Link<>());
+ SetClickHdl(Link<>());
+ SetDoubleClickHdl(Link<>());
+ SetSelectHdl(Link<>());
+ SetActivateHdl(Link<>());
+ SetDeactivateHdl(Link<>());
mbAreHandlersRegistered = false;
}
diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx
index 1ffc411ffd89..5bfcbc3bc704 100644
--- a/sfx2/source/view/viewprn.cxx
+++ b/sfx2/source/view/viewprn.cxx
@@ -421,7 +421,7 @@ public:
SfxDialogExecutor_Impl( SfxViewShell* pViewSh, PrinterSetupDialog* pParent );
~SfxDialogExecutor_Impl() { delete _pOptions; }
- Link GetLink() const { return LINK(const_cast<SfxDialogExecutor_Impl*>(this), SfxDialogExecutor_Impl, Execute); }
+ Link<> GetLink() const { return LINK(const_cast<SfxDialogExecutor_Impl*>(this), SfxDialogExecutor_Impl, Execute); }
const SfxItemSet* GetOptions() const { return _pOptions; }
void DisableHelp() { _bHelpDisabled = true; }
};