diff options
author | Noel Grandin <noel@peralex.com> | 2012-08-14 15:03:14 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-08-16 15:14:57 +0200 |
commit | 7758eaf702849691dcf24472d864ee7ff6d02345 (patch) | |
tree | 508c82198240f2b8d746702ac73fc0acca624b10 /svx/source/svdraw/svddrgmt.cxx | |
parent | c8a68356b4c8f8f45405da8e76baeb38a930941f (diff) |
Convert SdrUShortCont from Container to std::set
Change-Id: Ic7e929d4f20cd737eb15dacdb5718b6c79c80aaf
Diffstat (limited to 'svx/source/svdraw/svddrgmt.cxx')
-rw-r--r-- | svx/source/svdraw/svddrgmt.cxx | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx index 76361c1ed991..8c7762ffcf24 100644 --- a/svx/source/svdraw/svddrgmt.cxx +++ b/svx/source/svdraw/svddrgmt.cxx @@ -459,7 +459,7 @@ void SdrDragMethod::createSdrDragEntries_PointDrag() { const SdrUShortCont* pPts = pM->GetMarkedPoints(); - if(pPts && pPts->GetCount()) + if(pPts && !pPts->empty()) { const SdrObject* pObj = pM->GetMarkedSdrObj(); const SdrPathObj* pPath = dynamic_cast< const SdrPathObj* >(pObj); @@ -470,12 +470,10 @@ void SdrDragMethod::createSdrDragEntries_PointDrag() if(aPathXPP.count()) { - const sal_uInt32 nPtAnz(pPts->GetCount()); - - for(sal_uInt32 nPtNum(0); nPtNum < nPtAnz; nPtNum++) + for(SdrUShortCont::const_iterator it = pPts->begin(); it != pPts->end(); ++it) { sal_uInt32 nPolyNum, nPointNum; - const sal_uInt16 nObjPt(pPts->GetObject(nPtNum)); + const sal_uInt16 nObjPt = *it; if(sdr::PolyPolygonEditor::GetRelativePolyPoint(aPathXPP, nObjPt, nPolyNum, nPointNum)) { @@ -507,18 +505,16 @@ void SdrDragMethod::createSdrDragEntries_GlueDrag() { const SdrUShortCont* pPts = pM->GetMarkedGluePoints(); - if(pPts && pPts->GetCount()) + if(pPts && !pPts->empty()) { const SdrObject* pObj = pM->GetMarkedSdrObj(); const SdrGluePointList* pGPL = pObj->GetGluePointList(); if(pGPL) { - const sal_uInt32 nPtAnz(pPts->GetCount()); - - for(sal_uInt32 nPtNum(0); nPtNum < nPtAnz; nPtNum++) + for(SdrUShortCont::const_iterator it = pPts->begin(); it != pPts->end(); ++it) { - const sal_uInt16 nObjPt(pPts->GetObject(nPtNum)); + const sal_uInt16 nObjPt = *it; const sal_uInt16 nGlueNum(pGPL->FindGluePoint(nObjPt)); if(SDRGLUEPOINT_NOTFOUND != nGlueNum) @@ -1575,7 +1571,7 @@ void SdrDragMove::MoveSdrDrag(const Point& rNoSnapPnt_) { const SdrMark* pM=rML.GetMark(nMarkNum); const SdrUShortCont* pPts=pM->GetMarkedGluePoints(); - sal_uLong nPtAnz=pPts==NULL ? 0 : pPts->GetCount(); + sal_uLong nPtAnz=pPts==NULL ? 0 : pPts->size(); if (nPtAnz!=0) { @@ -1583,9 +1579,9 @@ void SdrDragMove::MoveSdrDrag(const Point& rNoSnapPnt_) const SdrGluePointList* pGPL=pObj->GetGluePointList(); Rectangle aBound(pObj->GetCurrentBoundRect()); - for (sal_uLong nPtNum=0; nPtNum<nPtAnz; nPtNum++) + for (SdrUShortCont::const_iterator it = pPts->begin(); it != pPts->end(); ++it) { - sal_uInt16 nId=pPts->GetObject(nPtNum); + sal_uInt16 nId = *it; sal_uInt16 nGlueNum=pGPL->FindGluePoint(nId); if (nGlueNum!=SDRGLUEPOINT_NOTFOUND) |