diff options
author | Joseph Powers <jpowers27@cox.net> | 2011-06-16 05:21:08 -0700 |
---|---|---|
committer | Joseph Powers <jpowers27@cox.net> | 2011-06-16 05:26:30 -0700 |
commit | 5e628582811672d3f1bf430502f48767bf84694a (patch) | |
tree | c87ff209f46158c26d7a4ee1b88037ee92cbdd3b /filter | |
parent | Resolves: rhbz#713154 pdf export dialog too tall to fit on netbooks (diff) | |
download | core-5e628582811672d3f1bf430502f48767bf84694a.tar.gz core-5e628582811672d3f1bf430502f48767bf84694a.zip |
Replace List with std::vector< SvxMSDffConnectorRule* >
Diffstat (limited to 'filter')
-rw-r--r-- | filter/inc/filter/msfilter/msdffimp.hxx | 5 | ||||
-rw-r--r-- | filter/source/msfilter/msdffimp.cxx | 15 | ||||
-rw-r--r-- | filter/source/msfilter/svdfppt.cxx | 8 |
3 files changed, 16 insertions, 12 deletions
diff --git a/filter/inc/filter/msfilter/msdffimp.hxx b/filter/inc/filter/msfilter/msdffimp.hxx index 6b87947594b1..0960352b4bbc 100644 --- a/filter/inc/filter/msfilter/msdffimp.hxx +++ b/filter/inc/filter/msfilter/msdffimp.hxx @@ -44,6 +44,7 @@ #include <com/sun/star/beans/XPropertySet.hpp> #include <filter/msfilter/msfilterdllapi.h> #include <sot/storage.hxx> +#include <vector> class Graphic; class SvStream; @@ -227,9 +228,11 @@ struct SvxMSDffConnectorRule friend SvStream& operator>>( SvStream& rIn, SvxMSDffConnectorRule& rAtom ); }; +typedef ::std::vector< SvxMSDffConnectorRule* > SvxMSDffConnectorRuleList; + struct MSFILTER_DLLPUBLIC SvxMSDffSolverContainer { - List aCList; + SvxMSDffConnectorRuleList aCList; SvxMSDffSolverContainer(); ~SvxMSDffSolverContainer(); diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index 0b34fac649a6..a24ee7f8b80d 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -894,9 +894,10 @@ SvxMSDffSolverContainer::SvxMSDffSolverContainer() SvxMSDffSolverContainer::~SvxMSDffSolverContainer() { - for ( SvxMSDffConnectorRule* pPtr = (SvxMSDffConnectorRule*)aCList.First(); - pPtr; pPtr = (SvxMSDffConnectorRule*)aCList.Next() ) - delete pPtr; + for( size_t i = 0, n = aCList.size(); i < n; ++i ) { + delete aCList[ i ]; + } + aCList.clear(); } SvStream& operator>>( SvStream& rIn, SvxMSDffSolverContainer& rContainer ) @@ -913,7 +914,7 @@ SvStream& operator>>( SvStream& rIn, SvxMSDffSolverContainer& rContainer ) { SvxMSDffConnectorRule* pRule = new SvxMSDffConnectorRule; rIn >> *pRule; - rContainer.aCList.Insert( pRule, LIST_APPEND ); + rContainer.aCList.push_back( pRule ); } aCRule.SeekToEndOfRecord( rIn ); } @@ -923,10 +924,10 @@ SvStream& operator>>( SvStream& rIn, SvxMSDffSolverContainer& rContainer ) void SvxMSDffManager::SolveSolver( const SvxMSDffSolverContainer& rSolver ) { - sal_Int32 i, nCnt; - for ( i = 0, nCnt = rSolver.aCList.Count(); i < nCnt; i++ ) + size_t i, nCnt; + for ( i = 0, nCnt = rSolver.aCList.size(); i < nCnt; i++ ) { - SvxMSDffConnectorRule* pPtr = (SvxMSDffConnectorRule*)rSolver.aCList.GetObject( i ); + SvxMSDffConnectorRule* pPtr = rSolver.aCList[ i ]; if ( pPtr->pCObj ) { for ( int nN = 0; nN < 2; nN++ ) diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index b6d54ff2cf90..79e9f62e743e 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -1235,9 +1235,9 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi } if ( rPersistEntry.pSolverContainer ) { - for ( SvxMSDffConnectorRule* pPtr = (SvxMSDffConnectorRule*)rPersistEntry.pSolverContainer->aCList.First(); - pPtr; pPtr = (SvxMSDffConnectorRule*)rPersistEntry.pSolverContainer->aCList.Next() ) + for ( size_t i = 0; i < rPersistEntry.pSolverContainer->aCList.size(); ++i ) { + SvxMSDffConnectorRule* pPtr = rPersistEntry.pSolverContainer->aCList[ i ]; if ( rObjData.nShapeId == pPtr->nShapeC ) pPtr->pCObj = pRet; else @@ -7500,9 +7500,9 @@ SdrObject* SdrPowerPointImport::CreateTable( SdrObject* pGroup, sal_uInt32* pTab // possibly connections to the group object have to be removed. if ( pSolverContainer ) { - for ( SvxMSDffConnectorRule* pPtr = (SvxMSDffConnectorRule*)pSolverContainer->aCList.First(); - pPtr; pPtr = (SvxMSDffConnectorRule*)pSolverContainer->aCList.Next() ) + for ( size_t i = 0; i < pSolverContainer->aCList.size(); ++i ) { + SvxMSDffConnectorRule* pPtr = pSolverContainer->aCList[ i ]; SdrObjListIter aIter( *pGroup, IM_DEEPWITHGROUPS ); while( aIter.IsMore() ) { |