summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Powers <jpowers27@cox.net>2011-08-06 07:09:55 -0700
committerJoseph Powers <jpowers27@cox.net>2011-08-06 07:12:20 -0700
commit7d00dabf077562cad4e1f4b2209c27b13d3d9487 (patch)
treed2af1506f555a6f92ede785f27afce867c1e4355
parent59005c9c8e553b1458430d0a2726d966cf80a0f3 (diff)
Replace List with std::vector< GraphicFilter* >FINAL_MASTERmaster-backup
-rw-r--r--svtools/source/filter/filter.cxx24
1 files changed, 18 insertions, 6 deletions
diff --git a/svtools/source/filter/filter.cxx b/svtools/source/filter/filter.cxx
index 4566c9208f..71d3fd9351 100644
--- a/svtools/source/filter/filter.cxx
+++ b/svtools/source/filter/filter.cxx
@@ -74,6 +74,7 @@
#include <comphelper/processfactory.hxx>
#include <rtl/bootstrap.hxx>
#include <rtl/instance.hxx>
+#include <vector>
#include "SvFilterOptionsDialog.hxx"
@@ -91,7 +92,8 @@
using namespace ::rtl;
using namespace ::com::sun::star;
-static List* pFilterHdlList = NULL;
+typedef ::std::vector< GraphicFilter* > FilterList_impl;
+static FilterList_impl* pFilterHdlList = NULL;
static ::osl::Mutex& getListMutex()
{
@@ -1029,8 +1031,18 @@ GraphicFilter::~GraphicFilter()
{
{
::osl::MutexGuard aGuard( getListMutex() );
- pFilterHdlList->Remove( (void*)this );
- if ( !pFilterHdlList->Count() )
+ for(
+ FilterList_impl::iterator it = pFilterHdlList->begin();
+ it < pFilterHdlList->end();
+ ++it
+ ) {
+ if( *it == this )
+ {
+ pFilterHdlList->erase( it );
+ break;
+ }
+ }
+ if( pFilterHdlList->empty() )
{
delete pFilterHdlList, pFilterHdlList = NULL;
delete pConfig;
@@ -1049,13 +1061,13 @@ void GraphicFilter::ImplInit()
if ( !pFilterHdlList )
{
- pFilterHdlList = new List;
+ pFilterHdlList = new FilterList_impl;
pConfig = new FilterConfigCache( bUseConfig );
}
else
- pConfig = ((GraphicFilter*)pFilterHdlList->First())->pConfig;
+ pConfig = pFilterHdlList->front()->pConfig;
- pFilterHdlList->Insert( (void*)this );
+ pFilterHdlList->push_back( this );
}
if( bUseConfig )