diff options
Diffstat (limited to 'svx')
-rw-r--r-- | svx/inc/svx/gridctrl.hxx | 11 | ||||
-rw-r--r-- | svx/source/fmcomp/gridctrl.cxx | 8 |
2 files changed, 10 insertions, 9 deletions
diff --git a/svx/inc/svx/gridctrl.hxx b/svx/inc/svx/gridctrl.hxx index 55875a36ba31..94ac38783402 100644 --- a/svx/inc/svx/gridctrl.hxx +++ b/svx/inc/svx/gridctrl.hxx @@ -47,6 +47,7 @@ #include <comphelper/propmultiplex.hxx> #include <svtools/transfer.hxx> #include "svx/svxdllapi.h" +#include <vector> class DbGridControl; class CursorWrapper; @@ -57,7 +58,7 @@ namespace svxform { class DataColumn; } -DECLARE_LIST(DbDataColumns, ::svxform::DataColumn*) +typedef ::std::vector< ::svxform::DataColumn* > DbDataColumns; enum GridRowStatus { @@ -73,10 +74,10 @@ enum GridRowStatus class DbGridRow : public SvRefBase { - ::com::sun::star::uno::Any m_aBookmark; // ::com::sun::star::text::Bookmark of the row, can be set + ::com::sun::star::uno::Any m_aBookmark; // ::com::sun::star::text::Bookmark of the row, can be set DbDataColumns m_aVariants; GridRowStatus m_eStatus; - sal_Bool m_bIsNew; + sal_Bool m_bIsNew; // row is no longer valid // is removed on the next positioning public: @@ -86,8 +87,8 @@ public: ~DbGridRow(); - sal_Bool HasField(sal_uInt32 nPos) const {return nPos < m_aVariants.Count();} - const ::svxform::DataColumn& GetField(sal_uInt32 nPos) const { return *m_aVariants.GetObject(nPos); } + sal_Bool HasField(sal_uInt32 nPos) const { return nPos < m_aVariants.size(); } + const ::svxform::DataColumn& GetField(sal_uInt32 nPos) const { return *m_aVariants[ nPos ]; } void SetStatus(GridRowStatus _eStat) { m_eStatus = _eStat; } GridRowStatus GetStatus() const { return m_eStatus; } diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx index 6e4f13db4fe9..06beab935de9 100644 --- a/svx/source/fmcomp/gridctrl.cxx +++ b/svx/source/fmcomp/gridctrl.cxx @@ -821,7 +821,7 @@ DbGridRow::DbGridRow(CursorWrapper* pCur, sal_Bool bPaintCursor) Reference< XPropertySet > xColSet; ::cppu::extractInterface(xColSet, xColumns->getByIndex(i)); pColumn = new DataColumn(xColSet); - m_aVariants.Insert(pColumn, LIST_APPEND); + m_aVariants.push_back( pColumn ); } if (pCur->rowDeleted()) @@ -859,9 +859,9 @@ DbGridRow::DbGridRow(CursorWrapper* pCur, sal_Bool bPaintCursor) //------------------------------------------------------------------------------ DbGridRow::~DbGridRow() { - sal_uInt32 nCount = m_aVariants.Count(); - for (sal_uInt32 i = 0; i < nCount; i++) - delete m_aVariants.GetObject(i); + for ( size_t i = 0, n = m_aVariants.size(); i < n; ++i ) + delete m_aVariants[ i ]; + m_aVariants.clear(); } //------------------------------------------------------------------------------ |