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

rename SfxItemDesruptor -> SfxItemDisruptor

Change-Id: I7cc9fa3ab6aebc541df4708e29b530f8021b14ba
üst dc0af9ef
...@@ -157,7 +157,7 @@ class SfxItemSet; ...@@ -157,7 +157,7 @@ class SfxItemSet;
class SVL_DLLPUBLIC SfxPoolItem class SVL_DLLPUBLIC SfxPoolItem
{ {
friend class SfxItemPool; friend class SfxItemPool;
friend class SfxItemDesruptor_Impl; friend class SfxItemDisruptor_Impl;
friend class SfxItemPoolCache; friend class SfxItemPoolCache;
friend class SfxItemSet; friend class SfxItemSet;
friend class SfxVoidItem; friend class SfxVoidItem;
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
#include <svl/itempool.hxx> #include <svl/itempool.hxx>
class SfxItemDesruptor_Impl: private boost::noncopyable class SfxItemDisruptor_Impl: private boost::noncopyable
{ {
SfxPoolItem *pItem; SfxPoolItem *pItem;
Link aLink; Link aLink;
...@@ -37,27 +37,27 @@ private: ...@@ -37,27 +37,27 @@ private:
DECL_LINK( Delete, void* ); DECL_LINK( Delete, void* );
public: public:
SfxItemDesruptor_Impl( SfxPoolItem *pItemToDesrupt ); SfxItemDisruptor_Impl( SfxPoolItem *pItemToDesrupt );
void LaunchDeleteOnIdle(); void LaunchDeleteOnIdle();
~SfxItemDesruptor_Impl(); ~SfxItemDisruptor_Impl();
}; };
SfxItemDesruptor_Impl::SfxItemDesruptor_Impl( SfxPoolItem *pItemToDesrupt ): SfxItemDisruptor_Impl::SfxItemDisruptor_Impl( SfxPoolItem *pItemToDesrupt ):
pItem(pItemToDesrupt), pItem(pItemToDesrupt),
aLink( LINK(this, SfxItemDesruptor_Impl, Delete) ) aLink( LINK(this, SfxItemDisruptor_Impl, Delete) )
{ {
DBG_ASSERT( 0 == pItem->GetRefCount(), "disrupting pooled item" ); DBG_ASSERT( 0 == pItem->GetRefCount(), "disrupting pooled item" );
pItem->SetKind( SFX_ITEMS_DELETEONIDLE ); pItem->SetKind( SFX_ITEMS_DELETEONIDLE );
} }
void SfxItemDesruptor_Impl::LaunchDeleteOnIdle() void SfxItemDisruptor_Impl::LaunchDeleteOnIdle()
{ {
// process in Idle // process in Idle
Application::InsertIdleHdl( aLink, 1 ); Application::InsertIdleHdl( aLink, 1 );
} }
SfxItemDesruptor_Impl::~SfxItemDesruptor_Impl() SfxItemDisruptor_Impl::~SfxItemDisruptor_Impl()
{ {
// remove from Idle-Handler // remove from Idle-Handler
...@@ -69,7 +69,7 @@ SfxItemDesruptor_Impl::~SfxItemDesruptor_Impl() ...@@ -69,7 +69,7 @@ SfxItemDesruptor_Impl::~SfxItemDesruptor_Impl()
delete pItem; delete pItem;
} }
IMPL_LINK_NOARG(SfxItemDesruptor_Impl, Delete) IMPL_LINK_NOARG(SfxItemDisruptor_Impl, Delete)
{ {
delete this; delete this;
return 0; return 0;
...@@ -78,7 +78,7 @@ IMPL_LINK_NOARG(SfxItemDesruptor_Impl, Delete) ...@@ -78,7 +78,7 @@ IMPL_LINK_NOARG(SfxItemDesruptor_Impl, Delete)
void DeleteItemOnIdle(SfxPoolItem* pItem) void DeleteItemOnIdle(SfxPoolItem* pItem)
{ {
DBG_ASSERT( 0 == pItem->GetRefCount(), "deleting item in use" ); DBG_ASSERT( 0 == pItem->GetRefCount(), "deleting item in use" );
SfxItemDesruptor_Impl *pDesruptor = new SfxItemDesruptor_Impl(pItem); SfxItemDisruptor_Impl *pDesruptor = new SfxItemDisruptor_Impl(pItem);
pDesruptor->LaunchDeleteOnIdle(); pDesruptor->LaunchDeleteOnIdle();
} }
......
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