Kaydet (Commit) c3669975 authored tarafından Rafael Dominguez's avatar Rafael Dominguez Kaydeden (comit) Petr Mladek

Replace List for std::vector<ExcRecord*>.

üst f642d233
......@@ -182,15 +182,15 @@ sal_Size ExcEmptyRec::GetLen() const
ExcRecordList::~ExcRecordList()
{
for( ExcRecord* pRec = First(); pRec; pRec = Next() )
delete pRec;
for (iterator pIter = maRecords.begin(); pIter != maRecords.end(); ++pIter)
delete (*pIter);
}
void ExcRecordList::Save( XclExpStream& rStrm )
{
for( ExcRecord* pRec = First(); pRec; pRec = Next() )
pRec->Save( rStrm );
for (iterator pIter = maRecords.begin(); pIter != maRecords.end(); ++pIter)
(*pIter)->Save( rStrm );
}
......
......@@ -53,7 +53,6 @@
class SvStream;
class Font;
class List;
class ScPatternAttr;
class ScTokenArray;
class ScRangeData;
......@@ -101,20 +100,18 @@ public:
//------------------------------------------------------- class ExcRecordList -
class ExcRecordList : protected List, public ExcEmptyRec
class ExcRecordList : public ExcEmptyRec
{
private:
protected:
std::vector<ExcRecord*> maRecords;
public:
virtual ~ExcRecordList();
using List::Count;
typedef std::vector<ExcRecord*>::iterator iterator;
inline ExcRecord* First( void ) { return ( ExcRecord* ) List::First(); }
inline ExcRecord* Next( void ) { return ( ExcRecord* ) List::Next(); }
virtual ~ExcRecordList();
inline void Append( ExcRecord* pNew ) { if( pNew ) List::Insert( pNew, LIST_APPEND ); }
inline const ExcRecord* Get( sal_uInt32 nNum ) const { return ( ExcRecord* ) List::GetObject( nNum ); }
inline void Append( ExcRecord* pNew ) { if( pNew ) maRecords.push_back( pNew ); }
virtual void Save( XclExpStream& rStrm );
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment