diff options
-rw-r--r-- | svx/inc/svx/svdglue.hxx | 19 | ||||
-rw-r--r-- | svx/source/svdraw/svdfmtf.hxx | 1 | ||||
-rw-r--r-- | svx/source/svdraw/svdglue.cxx | 4 |
3 files changed, 15 insertions, 9 deletions
diff --git a/svx/inc/svx/svdglue.hxx b/svx/inc/svx/svdglue.hxx index c6a58eb309f8..43fce9f1fb0d 100644 --- a/svx/inc/svx/svdglue.hxx +++ b/svx/inc/svx/svdglue.hxx @@ -34,9 +34,9 @@ class OutputDevice; class SvStream; class SdrObject; -#include <tools/contnr.hxx> #include <tools/gen.hxx> #include "svx/svxdllapi.h" +#include <vector> //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -116,20 +116,25 @@ public: #define SDRGLUEPOINT_NOTFOUND 0xFFFF class SVX_DLLPUBLIC SdrGluePointList { - Container aList; + std::vector<SdrGluePoint*> aList; protected: - SdrGluePoint* GetObject(sal_uInt16 i) const { return (SdrGluePoint*)(aList.GetObject(i)); } + SdrGluePoint* GetObject(sal_uInt16 i) const { return aList[i]; } public: - SdrGluePointList(): aList(1024,4,4) {} - SdrGluePointList(const SdrGluePointList& rSrcList): aList(1024,4,4) { *this=rSrcList; } + SdrGluePointList(): aList() {} + SdrGluePointList(const SdrGluePointList& rSrcList): aList() { *this=rSrcList; } ~SdrGluePointList() { Clear(); } void Clear(); void operator=(const SdrGluePointList& rSrcList); - sal_uInt16 GetCount() const { return sal_uInt16(aList.Count()); } + sal_uInt16 GetCount() const { return sal_uInt16(aList.size()); } // Beim Insert wird dem Objekt (also dem GluePoint) automatisch eine Id zugewiesen. // ReturnCode ist der Index des neuen GluePoints in der Liste sal_uInt16 Insert(const SdrGluePoint& rGP); - void Delete(sal_uInt16 nPos) { delete (SdrGluePoint*)aList.Remove(nPos); } + void Delete(sal_uInt16 nPos) + { + SdrGluePoint* p = aList[nPos]; + aList.erase(aList.begin()+nPos); + delete p; + } SdrGluePoint& operator[](sal_uInt16 nPos) { return *GetObject(nPos); } const SdrGluePoint& operator[](sal_uInt16 nPos) const { return *GetObject(nPos); } sal_uInt16 FindGluePoint(sal_uInt16 nId) const; diff --git a/svx/source/svdraw/svdfmtf.hxx b/svx/source/svdraw/svdfmtf.hxx index 96e12cb3f1df..85bebfbc3343 100644 --- a/svx/source/svdraw/svdfmtf.hxx +++ b/svx/source/svdraw/svdfmtf.hxx @@ -29,6 +29,7 @@ #ifndef _SVDFMTF_HXX #define _SVDFMTF_HXX +#include <tools/contnr.hxx> #include <vcl/metaact.hxx> #include <vcl/virdev.hxx> #include <svx/svdobj.hxx> diff --git a/svx/source/svdraw/svdglue.cxx b/svx/source/svdraw/svdglue.cxx index 1490d377292e..911879dbee1e 100644 --- a/svx/source/svdraw/svdglue.cxx +++ b/svx/source/svdraw/svdglue.cxx @@ -277,7 +277,7 @@ void SdrGluePointList::Clear() for (sal_uInt16 i=0; i<nAnz; i++) { delete GetObject(i); } - aList.Clear(); + aList.clear(); } void SdrGluePointList::operator=(const SdrGluePointList& rSrcList) @@ -320,7 +320,7 @@ sal_uInt16 SdrGluePointList::Insert(const SdrGluePoint& rGP) } pGP->SetId(nId); } - aList.Insert(pGP,nInsPos); + aList.insert(aList.begin()+nInsPos, pGP); return nInsPos; } |