diff options
author | Noel Grandin <noel@peralex.com> | 2012-08-15 14:15:40 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-08-16 18:44:05 +0200 |
commit | c4984cbfafae189a4675e8619ba836f2ab2adb38 (patch) | |
tree | 18137b34888554b33ba036380cf2410edb5e6a08 /svx | |
parent | Convert pRedoStack in SdrModel class from Container to std::deque (diff) | |
download | core-c4984cbfafae189a4675e8619ba836f2ab2adb38.tar.gz core-c4984cbfafae189a4675e8619ba836f2ab2adb38.zip |
Convert aList in SdrObjRefList class from Container to std::vector
Change-Id: Iee505825f46434b09c73679e1439f99afc631336
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/svdraw/svdfmtf.hxx | 23 |
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); } }; //************************************************************ |