[Libreoffice-commits] .: svtools/source unusedcode.easy
Caolán McNamara
caolan at kemper.freedesktop.org
Thu Aug 2 01:16:28 PDT 2012
svtools/source/misc/itemdel.cxx | 18 ------------------
unusedcode.easy | 1 -
2 files changed, 19 deletions(-)
New commits:
commit 7480f766e95368fb1418dcfd9470f73b5ef3440e
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Aug 2 09:07:47 2012 +0100
remove now pointless pItemDesruptList
This pItemDesruptList is pointless now. We're registering the delete-when-idle
items in their ctor's and deregistering in their dtor's which get called from
the idle callback. The idea of pItemDesruptList appears to be for use in
deleting any items at exit time whose idle callback didn't get called already.
Which was done by DeleteOnIdleItems which itself was removed a while ago
because nothing was calling it (for years). Some experiments in making it a
simple singleton and/or one that hooks off default component dispose or
XDesktop dispose shows that its crash city, so lets just remove the unused
stuff outright rather than trying to fight to get some 12+ year unused appendix
used.
Change-Id: Ie0256d6987cf89a2a12db297065af09674547b3e
diff --git a/svtools/source/misc/itemdel.cxx b/svtools/source/misc/itemdel.cxx
index 5d4daca..f620a7e 100644
--- a/svtools/source/misc/itemdel.cxx
+++ b/svtools/source/misc/itemdel.cxx
@@ -55,10 +55,6 @@ public:
~SfxItemDesruptor_Impl();
};
-typedef std::vector<SfxItemDesruptor_Impl*> SfxItemDesruptorList_Impl;
-
-static SfxItemDesruptorList_Impl *pItemDesruptList = NULL;
-
// ------------------------------------------------------------------------
SfxItemDesruptor_Impl::SfxItemDesruptor_Impl( SfxPoolItem *pItemToDesrupt ):
pItem(pItemToDesrupt),
@@ -71,13 +67,6 @@ SfxItemDesruptor_Impl::SfxItemDesruptor_Impl( SfxPoolItem *pItemToDesrupt ):
// im Idle abarbeiten
GetpApp()->InsertIdleHdl( aLink, 1 );
-
- // und in Liste eintragen (damit geflusht werden kann)
- SfxItemDesruptorList_Impl* &rpList = pItemDesruptList;
- if ( !rpList )
- rpList = new SfxItemDesruptorList_Impl;
- SfxItemDesruptor_Impl *pThis = this;
- rpList->push_back( pThis );
}
// ------------------------------------------------------------------------
@@ -88,13 +77,6 @@ SfxItemDesruptor_Impl::~SfxItemDesruptor_Impl()
// aus Idle-Handler austragen
GetpApp()->RemoveIdleHdl( aLink );
- // und aus Liste austragen
- SfxItemDesruptorList_Impl* &rpList = pItemDesruptList;
- DBG_ASSERT( rpList, "no DesruptorList" );
- const SfxItemDesruptor_Impl *pThis = this;
- if ( rpList ) HACK(warum?)
- rpList->erase( std::find( rpList->begin(), rpList->end(), pThis ) );
-
// reset RefCount (was set to SFX_ITEMS_SPECIAL before!)
pItem->SetRefCount( 0 );
//DBG_CHKOBJ( pItem, SfxPoolItem, 0 );
diff --git a/unusedcode.easy b/unusedcode.easy
index 25f2c4d..74d4aa0 100755
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -139,5 +139,4 @@ sd::LeftImpressPaneShell::RegisterInterface(SfxModule*)
sd::ToolPanelPaneShell::RegisterInterface(SfxModule*)
sd::ViewShellBase::RegisterFactory(unsigned short)
std::__cxx1998::vector<SfxFilter*, std::allocator<SfxFilter*> >::~vector()
-std::__cxx1998::vector<SfxItemDesruptor_Impl*, std::allocator<SfxItemDesruptor_Impl*> >::~vector()
std::__cxx1998::vector<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >::~vector()
More information about the Libreoffice-commits
mailing list