summaryrefslogtreecommitdiffstats
path: root/sc/source/filter
diff options
context:
space:
mode:
authorRafael Dominguez <venccsralph@gmail.com>2011-06-03 18:35:50 -0430
committerPetr Mladek <pmladek@suse.cz>2011-06-09 21:39:38 +0200
commitc366997560732e9bb41a08364a1df9c17cc86602 (patch)
tree70ce8a29509b94a9966717605cd056ff659b6d3f /sc/source/filter
parentReplace List for std::vector<LotusRange*>. (diff)
downloadcore-c366997560732e9bb41a08364a1df9c17cc86602.tar.gz
core-c366997560732e9bb41a08364a1df9c17cc86602.zip
Replace List for std::vector<ExcRecord*>.
Diffstat (limited to 'sc/source/filter')
-rw-r--r--sc/source/filter/excel/excrecds.cxx8
-rw-r--r--sc/source/filter/inc/excrecds.hxx15
2 files changed, 10 insertions, 13 deletions
diff --git a/sc/source/filter/excel/excrecds.cxx b/sc/source/filter/excel/excrecds.cxx
index 98c677c7a819..92e8ea32a43b 100644
--- a/sc/source/filter/excel/excrecds.cxx
+++ b/sc/source/filter/excel/excrecds.cxx
@@ -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 );
}
diff --git a/sc/source/filter/inc/excrecds.hxx b/sc/source/filter/inc/excrecds.hxx
index 781f985fa416..2cd3678b0c2f 100644
--- a/sc/source/filter/inc/excrecds.hxx
+++ b/sc/source/filter/inc/excrecds.hxx
@@ -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 );
};