summaryrefslogtreecommitdiffstats
path: root/sw/inc/expfld.hxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-07-17 15:54:06 +0200
committerMichael Stahl <mstahl@redhat.com>2012-07-25 14:13:46 +0200
commit31dafba4d7360746abedf93e0476f053e318077c (patch)
tree397d81b62a722d1b3aa53b9d1d44cc91544c226a /sw/inc/expfld.hxx
parentConvert SV_DECL_PTRARR_SORT(SwSortTableLines) to o3tl::sorted_vector (diff)
downloadcore-31dafba4d7360746abedf93e0476f053e318077c.tar.gz
core-31dafba4d7360746abedf93e0476f053e318077c.zip
Convert SV_DECL_PTRARR_DEL(_SwSeqFldList) to std::vector
Change-Id: I40802ba1e7b2e2f6f57c59c4d66b544604d01ce5
Diffstat (limited to 'sw/inc/expfld.hxx')
-rw-r--r--sw/inc/expfld.hxx22
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