summaryrefslogtreecommitdiff
path: root/svx/source/svdraw/svdfmtf.hxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-08-15 14:15:40 +0200
committerMichael Stahl <mstahl@redhat.com>2012-08-16 18:44:05 +0200
commitc4984cbfafae189a4675e8619ba836f2ab2adb38 (patch)
tree18137b34888554b33ba036380cf2410edb5e6a08 /svx/source/svdraw/svdfmtf.hxx
parentd3bdadad61d95cc802c869d989ed94326a7066de (diff)
Convert aList in SdrObjRefList class from Container to std::vector
Change-Id: Iee505825f46434b09c73679e1439f99afc631336
Diffstat (limited to 'svx/source/svdraw/svdfmtf.hxx')
-rw-r--r--svx/source/svdraw/svdfmtf.hxx23
1 files changed, 15 insertions, 8 deletions
diff --git a/svx/source/svdraw/svdfmtf.hxx b/svx/source/svdraw/svdfmtf.hxx
index 85bebfbc3343..ceead0de48b0 100644
--- a/svx/source/svdraw/svdfmtf.hxx
+++ b/svx/source/svdraw/svdfmtf.hxx
@@ -51,19 +51,26 @@ class SvdProgressInfo;
class SdrObjRefList
{
- Container aList;
+ std::vector<SdrObject*> aList;
public:
SdrObjRefList()
- : aList(1024,64,64)
+ : aList()
{}
- void Clear() { aList.Clear(); }
- sal_uLong GetObjCount() const { return aList.Count(); }
- SdrObject* GetObj(sal_uLong nNum) const { return (SdrObject*)aList.GetObject(nNum); }
- SdrObject* operator[](sal_uLong nNum) const { return (SdrObject*)aList.GetObject(nNum); }
- void InsertObject(SdrObject* pObj, sal_uLong nPos=CONTAINER_APPEND) { aList.Insert(pObj,nPos); }
- void RemoveObject(sal_uLong nPos) { aList.Remove(nPos); }
+ void Clear() { aList.clear(); }
+ sal_uLong GetObjCount() const { return aList.size(); }
+ SdrObject* GetObj(sal_uLong nNum) const { return aList[nNum]; }
+ SdrObject* operator[](sal_uLong nNum) const { return aList[nNum]; }
+ void InsertObject(SdrObject* pObj) { aList.push_back(pObj); }
+ void InsertObject(SdrObject* pObj, sal_uLong nPos)
+ {
+ if(nPos==CONTAINER_APPEND)
+ aList.push_back(pObj);
+ else
+ aList.insert(aList.begin() + nPos, pObj);
+ }
+ void RemoveObject(sal_uLong nPos) { aList.erase(aList.begin()+nPos); }
};
//************************************************************