summaryrefslogtreecommitdiff
path: root/sot/source
diff options
context:
space:
mode:
authorRafael Dominguez <venccsralph@gmail.com>2011-05-01 19:01:04 -0700
committerJoseph Powers <jpowers27@cox.net>2011-05-01 19:01:04 -0700
commit4dbde949438c5ba859605af6f1542b1c3b27a958 (patch)
tree90e77cab0d23a60b991dd051a423f2360db7bb85 /sot/source
parente45dc3828b7dd4f70bc14f51ae8d573d7298ed7c (diff)
Remove SV_DECL_REF_LIST(SotObject,SotObject*)
Diffstat (limited to 'sot/source')
-rw-r--r--sot/source/base/factory.cxx25
1 files changed, 10 insertions, 15 deletions
diff --git a/sot/source/base/factory.cxx b/sot/source/base/factory.cxx
index cecd511d0e5b..01d098e62a75 100644
--- a/sot/source/base/factory.cxx
+++ b/sot/source/base/factory.cxx
@@ -48,7 +48,6 @@
*************************************************************************/
SotData_Impl::SotData_Impl()
: nSvObjCount( 0 )
- , pObjectList( NULL )
, pFactoryList( NULL )
, pSotObjectFactory( NULL )
, pSotStorageStreamFactory( NULL )
@@ -96,10 +95,11 @@ void SotFactory::DeInit()
pFactoryList->clear();
delete pFactoryList;
pSotData->pFactoryList = NULL;
+
}
- delete pSotData->pObjectList;
- pSotData->pObjectList = NULL;
+ pSotData->aObjectList.clear();
+
if( pSotData->pDataFlavorList )
{
@@ -222,10 +222,9 @@ void SotFactory::IncSvObjectCount( SotObject * pObj )
{
SotData_Impl * pSotData = SOTDATA();
pSotData->nSvObjCount++;
- if( !pSotData->pObjectList )
- pSotData->pObjectList = new SotObjectList();
+
if( pObj )
- pSotData->pObjectList->Insert( pObj );
+ pSotData->aObjectList.push_back( pObj );
}
@@ -239,7 +238,7 @@ void SotFactory::DecSvObjectCount( SotObject * pObj )
SotData_Impl * pSotData = SOTDATA();
pSotData->nSvObjCount--;
if( pObj )
- pSotData->pObjectList->Remove( pObj );
+ pSotData->aObjectList.remove( pObj );
if( !pSotData->nSvObjCount )
{
//keine internen und externen Referenzen mehr
@@ -256,14 +255,10 @@ void SotFactory::TestInvariant()
{
#ifdef TEST_INVARIANT
SotData_Impl * pSotData = SOTDATA();
- if( pSotData->pObjectList )
- {
- sal_uLong nCount = pSotData->pObjectList->Count();
- for( sal_uLong i = 0; i < nCount ; i++ )
- {
- pSotData->pObjectList->GetObject( i )->TestInvariant( sal_False );
- }
- }
+
+ std::list<SotObject*>::iterator it;
+ for( it = pSotData->aObjectList.begin(); it != pSotData->aObjectList.end(); ++it )
+ (*it)->TestInvariant( sal_False );
#endif
}