diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2012-06-02 12:00:20 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-06-08 22:52:31 +0200 |
commit | c70f358f89ea2aa08bacfc2a8ae56a4e86d84bd3 (patch) | |
tree | fbdc84c10f63d93b07f481b12fa39efbd523688e /svtools | |
parent | 306fe606587153fe619f99bb06e1b4d402cb26f7 (diff) |
Convert SV_DECL_PTRARR(SfxItemDesruptorList_Impl) to std::vector
Change-Id: I790bd9c17139fb03094b1e952e4c4ee61172f22f
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/misc/itemdel.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/svtools/source/misc/itemdel.cxx b/svtools/source/misc/itemdel.cxx index 36b3f0669277..4d6087722456 100644 --- a/svtools/source/misc/itemdel.cxx +++ b/svtools/source/misc/itemdel.cxx @@ -31,6 +31,7 @@ #include <vcl/svapp.hxx> #include <tools/errcode.hxx> #include <limits.h> +#include <vector> #include <svl/svarray.hxx> #include <svl/itempool.hxx> @@ -55,7 +56,7 @@ public: ~SfxItemDesruptor_Impl(); }; -SV_DECL_PTRARR( SfxItemDesruptorList_Impl, SfxItemDesruptor_Impl*, 4 ) +typedef std::vector<SfxItemDesruptor_Impl*> SfxItemDesruptorList_Impl; static SfxItemDesruptorList_Impl *pItemDesruptList = NULL; @@ -76,8 +77,8 @@ SfxItemDesruptor_Impl::SfxItemDesruptor_Impl( SfxPoolItem *pItemToDesrupt ): SfxItemDesruptorList_Impl* &rpList = pItemDesruptList; if ( !rpList ) rpList = new SfxItemDesruptorList_Impl; - const SfxItemDesruptor_Impl *pThis = this; - rpList->Insert( pThis, rpList->Count() ); + SfxItemDesruptor_Impl *pThis = this; + rpList->push_back( pThis ); } // ------------------------------------------------------------------------ @@ -93,7 +94,7 @@ SfxItemDesruptor_Impl::~SfxItemDesruptor_Impl() DBG_ASSERT( rpList, "no DesruptorList" ); const SfxItemDesruptor_Impl *pThis = this; if ( rpList ) HACK(warum?) - rpList->Remove( rpList->GetPos(pThis) ); + rpList->erase( std::find( rpList->begin(), rpList->end(), pThis ) ); // reset RefCount (was set to SFX_ITEMS_SPECIAL before!) pItem->SetRefCount( 0 ); |