Kaydet (Commit) 5496f2a3 authored tarafından Noel Grandin's avatar Noel Grandin

convert Link<> to typed

Change-Id: I8275f9a100e5ed93f44596fe428a39e902c12dfc
üst 3368bca3
...@@ -872,13 +872,13 @@ public: ...@@ -872,13 +872,13 @@ public:
@return true if the handler was inserted successfully, false if it couldn't be inserted. @return true if the handler was inserted successfully, false if it couldn't be inserted.
*/ */
static bool InsertIdleHdl( const Link<>& rLink, sal_uInt16 nPriority ); static bool InsertIdleHdl( const Link<Application*,void>& rLink, sal_uInt16 nPriority );
/** Remove an idle handler from the application. /** Remove an idle handler from the application.
@param rLink const reference to the idle handler to remove @param rLink const reference to the idle handler to remove
*/ */
static void RemoveIdleHdl( const Link<>& rLink ); static void RemoveIdleHdl( const Link<Application*,void>& rLink );
/*** Get the DisplayConnection. /*** Get the DisplayConnection.
......
...@@ -30,11 +30,11 @@ ...@@ -30,11 +30,11 @@
class SfxItemDisruptor_Impl: private boost::noncopyable class SfxItemDisruptor_Impl: private boost::noncopyable
{ {
SfxPoolItem *pItem; SfxPoolItem * pItem;
Link<> aLink; Link<Application*,void> aLink;
private: private:
DECL_LINK( Delete, void* ); DECL_LINK_TYPED( Delete, Application*, void );
public: public:
SfxItemDisruptor_Impl( SfxPoolItem *pItemToDesrupt ); SfxItemDisruptor_Impl( SfxPoolItem *pItemToDesrupt );
...@@ -69,10 +69,9 @@ SfxItemDisruptor_Impl::~SfxItemDisruptor_Impl() ...@@ -69,10 +69,9 @@ SfxItemDisruptor_Impl::~SfxItemDisruptor_Impl()
delete pItem; delete pItem;
} }
IMPL_LINK_NOARG(SfxItemDisruptor_Impl, Delete) IMPL_LINK_NOARG_TYPED(SfxItemDisruptor_Impl, Delete, Application*, void)
{ {
delete this; delete this;
return 0;
} }
void DeleteItemOnIdle(SfxPoolItem* pItem) void DeleteItemOnIdle(SfxPoolItem* pItem)
......
...@@ -37,8 +37,8 @@ public: ...@@ -37,8 +37,8 @@ public:
ImplIdleMgr(); ImplIdleMgr();
~ImplIdleMgr(); ~ImplIdleMgr();
bool InsertIdleHdl( const Link<>& rLink, sal_uInt16 nPriority ); bool InsertIdleHdl( const Link<Application*,void>& rLink, sal_uInt16 nPriority );
void RemoveIdleHdl( const Link<>& rLink ); void RemoveIdleHdl( const Link<Application*,void>& rLink );
void RestartIdler() void RestartIdler()
{ if ( maTimer.IsActive() ) maTimer.Start(); } { if ( maTimer.IsActive() ) maTimer.Start(); }
......
...@@ -23,9 +23,9 @@ ...@@ -23,9 +23,9 @@
struct ImplIdleData struct ImplIdleData
{ {
Link<> maIdleHdl; Link<Application*,void> maIdleHdl;
sal_uInt16 mnPriority; sal_uInt16 mnPriority;
bool mbTimeout; bool mbTimeout;
}; };
#define IMPL_IDLETIMEOUT 350 #define IMPL_IDLETIMEOUT 350
...@@ -52,7 +52,7 @@ ImplIdleMgr::~ImplIdleMgr() ...@@ -52,7 +52,7 @@ ImplIdleMgr::~ImplIdleMgr()
delete mpIdleList; delete mpIdleList;
} }
bool ImplIdleMgr::InsertIdleHdl( const Link<>& rLink, sal_uInt16 nPriority ) bool ImplIdleMgr::InsertIdleHdl( const Link<Application*,void>& rLink, sal_uInt16 nPriority )
{ {
size_t nPos = (size_t)-1; size_t nPos = (size_t)-1;
size_t n = mpIdleList->size(); size_t n = mpIdleList->size();
...@@ -86,7 +86,7 @@ bool ImplIdleMgr::InsertIdleHdl( const Link<>& rLink, sal_uInt16 nPriority ) ...@@ -86,7 +86,7 @@ bool ImplIdleMgr::InsertIdleHdl( const Link<>& rLink, sal_uInt16 nPriority )
return true; return true;
} }
void ImplIdleMgr::RemoveIdleHdl( const Link<>& rLink ) void ImplIdleMgr::RemoveIdleHdl( const Link<Application*,void>& rLink )
{ {
if (mbInDestruction) if (mbInDestruction)
return; return;
......
...@@ -930,7 +930,7 @@ void Application::RemoveUserEvent( ImplSVEvent * nUserEvent ) ...@@ -930,7 +930,7 @@ void Application::RemoveUserEvent( ImplSVEvent * nUserEvent )
} }
} }
bool Application::InsertIdleHdl( const Link<>& rLink, sal_uInt16 nPrio ) bool Application::InsertIdleHdl( const Link<Application*,void>& rLink, sal_uInt16 nPrio )
{ {
ImplSVData* pSVData = ImplGetSVData(); ImplSVData* pSVData = ImplGetSVData();
...@@ -941,7 +941,7 @@ bool Application::InsertIdleHdl( const Link<>& rLink, sal_uInt16 nPrio ) ...@@ -941,7 +941,7 @@ bool Application::InsertIdleHdl( const Link<>& rLink, sal_uInt16 nPrio )
return pSVData->maAppData.mpIdleMgr->InsertIdleHdl( rLink, nPrio ); return pSVData->maAppData.mpIdleMgr->InsertIdleHdl( rLink, nPrio );
} }
void Application::RemoveIdleHdl( const Link<>& rLink ) void Application::RemoveIdleHdl( const Link<Application*,void>& rLink )
{ {
ImplSVData* pSVData = ImplGetSVData(); ImplSVData* pSVData = ImplGetSVData();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment