summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorJoseph Powers <jpowers27@cox.net>2011-01-03 20:22:08 -0800
committerJoseph Powers <jpowers27@cox.net>2011-01-03 20:22:08 -0800
commita47051680ae8438d8571bbf4fb40471df8755bc4 (patch)
treef84318c18ee14e5a8bb6623081b176041ed5b739 /svx
parentfed96ce799ca203b58253493b684c791fc276636 (diff)
Remove DECLARE_LIST(DbDataColumns, ::svxform::DataColumn*)
Diffstat (limited to 'svx')
-rw-r--r--svx/inc/svx/gridctrl.hxx11
-rw-r--r--svx/source/fmcomp/gridctrl.cxx8
2 files changed, 10 insertions, 9 deletions
diff --git a/svx/inc/svx/gridctrl.hxx b/svx/inc/svx/gridctrl.hxx
index a685b27314..1428fdc719 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 c4475a4038..ddd24007d4 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();
}
//------------------------------------------------------------------------------