diff options
author | Noel Grandin <noel@peralex.com> | 2012-07-17 15:54:06 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-07-25 14:13:46 +0200 |
commit | 31dafba4d7360746abedf93e0476f053e318077c (patch) | |
tree | 397d81b62a722d1b3aa53b9d1d44cc91544c226a /sw/inc | |
parent | 5da921cc53d69ed3f026542af05805decd28553c (diff) |
Convert SV_DECL_PTRARR_DEL(_SwSeqFldList) to std::vector
Change-Id: I40802ba1e7b2e2f6f57c59c4d66b544604d01ce5
Diffstat (limited to 'sw/inc')
-rw-r--r-- | sw/inc/expfld.hxx | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/sw/inc/expfld.hxx b/sw/inc/expfld.hxx index 0663ef5856cc..ed7e9d5e4c05 100644 --- a/sw/inc/expfld.hxx +++ b/sw/inc/expfld.hxx @@ -32,6 +32,7 @@ #include <fldbas.hxx> #include <cellfml.hxx> #include <set> +#include <vector> class SfxPoolItem; class SwTxtNode; @@ -58,15 +59,24 @@ struct _SeqFldLstElem : sDlgEntry( rStr ), nSeqNo( nNo ) {} }; -SV_DECL_PTRARR_DEL( _SwSeqFldList, _SeqFldLstElem*, 10 ) -class SW_DLLPUBLIC SwSeqFldList : public _SwSeqFldList +class SW_DLLPUBLIC SwSeqFldList { + std::vector<_SeqFldLstElem*> maData; public: - SwSeqFldList() : _SwSeqFldList( 10 ) {} - - sal_Bool InsertSort( _SeqFldLstElem* ); - sal_Bool SeekEntry( const _SeqFldLstElem& , sal_uInt16* pPos = 0 ); + ~SwSeqFldList() + { + for( std::vector<_SeqFldLstElem*>::const_iterator it = maData.begin(); it != maData.end(); ++it ) + delete *it; + } + + bool InsertSort(_SeqFldLstElem* pNew); + bool SeekEntry(const _SeqFldLstElem& rNew, sal_uInt16* pPos) const; + + sal_uInt16 Count() { return maData.size(); } + _SeqFldLstElem* operator[](sal_uInt16 nIndex) { return maData[nIndex]; } + const _SeqFldLstElem* operator[](sal_uInt16 nIndex) const { return maData[nIndex]; } + void Clear() { maData.clear(); } }; class SwGetExpFieldType : public SwValueFieldType |