summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-08-14 15:03:14 +0200
committerMichael Stahl <mstahl@redhat.com>2012-08-16 15:14:57 +0200
commit7758eaf702849691dcf24472d864ee7ff6d02345 (patch)
tree508c82198240f2b8d746702ac73fc0acca624b10 /sd
parentc8a68356b4c8f8f45405da8e76baeb38a930941f (diff)
Convert SdrUShortCont from Container to std::set
Change-Id: Ic7e929d4f20cd737eb15dacdb5718b6c79c80aaf
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/animations/motionpathtag.cxx16
1 files changed, 7 insertions, 9 deletions
diff --git a/sd/source/ui/animations/motionpathtag.cxx b/sd/source/ui/animations/motionpathtag.cxx
index e1c6e1e13458..e48460e48ce7 100644
--- a/sd/source/ui/animations/motionpathtag.cxx
+++ b/sd/source/ui/animations/motionpathtag.cxx
@@ -846,7 +846,7 @@ sal_uLong MotionPathTag::GetMarkedPointCount() const
if( mpMark )
{
const SdrUShortCont* pPts=mpMark->GetMarkedPoints();
- return pPts ? pPts->GetCount() : 0;
+ return pPts ? pPts->size() : 0;
}
else
{
@@ -864,11 +864,9 @@ sal_Bool MotionPathTag::MarkPoint(SdrHdl& rHdl, sal_Bool bUnmark )
SmartHdl* pSmartHdl = dynamic_cast< SmartHdl* >( &rHdl );
if( pSmartHdl && pSmartHdl->getTag().get() == this )
{
- SdrUShortCont* pPts=mpMark->ForceMarkedPoints();
- pPts->ForceSort();
+ mpMark->ForceMarkedPoints();
if (mrView.MarkPointHelper(&rHdl,mpMark,bUnmark))
{
- pPts->ForceSort();
mrView.MarkListHasChanged();
bRet=sal_True;
}
@@ -1002,7 +1000,7 @@ void MotionPathTag::addCustomHandles( SdrHdlList& rHandlerList )
rHandlerList.AddHdl( pSmartHdl );
- const bool bSelected= pMrkPnts && pMrkPnts->Exist(sal::static_int_cast< sal_uInt16 >(nHandle));
+ const bool bSelected= pMrkPnts && pMrkPnts->find( sal_uInt16(nHandle) ) != pMrkPnts->end();
pSmartHdl->SetSelected(bSelected);
if( mrView.IsPlusHandlesAlwaysVisible() || bSelected )
@@ -1102,7 +1100,7 @@ void MotionPathTag::deselect()
SdrUShortCont* pPts = mpMark->GetMarkedPoints();
if( pPts )
- pPts->Clear();
+ pPts->clear();
}
selectionChanged();
@@ -1131,7 +1129,7 @@ void MotionPathTag::DeleteMarkedPoints()
if( pPts )
{
PolyPolygonEditor aEditor( mpPathObj->GetPathPoly(), mpPathObj->IsClosed() );
- if( aEditor.DeletePoints( pPts->getContainer() ) )
+ if( aEditor.DeletePoints( *pPts ) )
{
if( aEditor.GetPolyPolygon().count() )
{
@@ -1186,7 +1184,7 @@ void MotionPathTag::SetMarkedSegmentsKind(SdrPathSegmentKind eKind)
if(pPts)
{
PolyPolygonEditor aEditor( mpPathObj->GetPathPoly(), mpPathObj->IsClosed() );
- if(aEditor.SetSegmentsKind( eKind, pPts->getContainer()) )
+ if(aEditor.SetSegmentsKind( eKind, *pPts ) )
{
mpPathObj->SetPathPoly(aEditor.GetPolyPolygon());
mrView.MarkListHasChanged();
@@ -1239,7 +1237,7 @@ void MotionPathTag::SetMarkedPointsSmooth(SdrPathSmoothKind eKind)
if(pPts)
{
PolyPolygonEditor aEditor( mpPathObj->GetPathPoly(), mpPathObj->IsClosed() );
- if(aEditor.SetPointsSmooth( eFlags, pPts->getContainer() ) )
+ if(aEditor.SetPointsSmooth( eFlags, *pPts ) )
{
mpPathObj->SetPathPoly(aEditor.GetPolyPolygon());
mrView.MarkListHasChanged();