From 4059583469c168c553d0529684caba6b281827d1 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Sat, 12 Sep 2020 20:10:17 +0200 Subject: std::set->o3tl::sorted_vector in svx Change-Id: I86154a8ddf885ea23ff29e4df1b67e7501b9165b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102536 Tested-by: Jenkins Reviewed-by: Noel Grandin --- svx/source/inc/fmvwimp.hxx | 1 + svx/source/svdraw/polypolygoneditor.cxx | 12 ++++++------ svx/source/svdraw/svdglev.cxx | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) (limited to 'svx/source') diff --git a/svx/source/inc/fmvwimp.hxx b/svx/source/inc/fmvwimp.hxx index 1e6a01dab0cb..278c4eda597b 100644 --- a/svx/source/inc/fmvwimp.hxx +++ b/svx/source/inc/fmvwimp.hxx @@ -23,6 +23,7 @@ #include #include +#include #include #include diff --git a/svx/source/svdraw/polypolygoneditor.cxx b/svx/source/svdraw/polypolygoneditor.cxx index 1f82f0436544..b3f6d3bc5175 100644 --- a/svx/source/svdraw/polypolygoneditor.cxx +++ b/svx/source/svdraw/polypolygoneditor.cxx @@ -30,11 +30,11 @@ PolyPolygonEditor::PolyPolygonEditor( const basegfx::B2DPolyPolygon& rPolyPolygo { } -bool PolyPolygonEditor::DeletePoints( const std::set< sal_uInt16 >& rAbsPoints ) +bool PolyPolygonEditor::DeletePoints( const o3tl::sorted_vector< sal_uInt16 >& rAbsPoints ) { bool bPolyPolyChanged = false; - std::set< sal_uInt16 >::const_reverse_iterator aIter( rAbsPoints.rbegin() ); + auto aIter( rAbsPoints.rbegin() ); for( ; aIter != rAbsPoints.rend(); ++aIter ) { sal_uInt32 nPoly, nPnt; @@ -62,11 +62,11 @@ bool PolyPolygonEditor::DeletePoints( const std::set< sal_uInt16 >& rAbsPoints ) return bPolyPolyChanged; } -bool PolyPolygonEditor::SetSegmentsKind(SdrPathSegmentKind eKind, const std::set< sal_uInt16 >& rAbsPoints ) +bool PolyPolygonEditor::SetSegmentsKind(SdrPathSegmentKind eKind, const o3tl::sorted_vector< sal_uInt16 >& rAbsPoints ) { bool bPolyPolyChanged = false; - std::set< sal_uInt16 >::const_reverse_iterator aIter( rAbsPoints.rbegin() ); + auto aIter( rAbsPoints.rbegin() ); for( ; aIter != rAbsPoints.rend(); ++aIter ) { sal_uInt32 nPolyNum, nPntNum; @@ -122,11 +122,11 @@ bool PolyPolygonEditor::SetSegmentsKind(SdrPathSegmentKind eKind, const std::set return bPolyPolyChanged; } -bool PolyPolygonEditor::SetPointsSmooth( basegfx::B2VectorContinuity eFlags, const std::set< sal_uInt16 >& rAbsPoints) +bool PolyPolygonEditor::SetPointsSmooth( basegfx::B2VectorContinuity eFlags, const o3tl::sorted_vector< sal_uInt16 >& rAbsPoints) { bool bPolyPolygonChanged(false); - std::set< sal_uInt16 >::const_reverse_iterator aIter( rAbsPoints.rbegin() ); + auto aIter( rAbsPoints.rbegin() ); for( ; aIter != rAbsPoints.rend(); ++aIter ) { sal_uInt32 nPolyNum, nPntNum; diff --git a/svx/source/svdraw/svdglev.cxx b/svx/source/svdraw/svdglev.cxx index 5f81d38575ab..9d1f19c558cf 100644 --- a/svx/source/svdraw/svdglev.cxx +++ b/svx/source/svdraw/svdglev.cxx @@ -297,7 +297,7 @@ void SdrGlueEditView::ImpCopyMarkedGluePoints() } for(const auto& rId : aIdsToErase) rPts.erase(rId); - rPts.insert(aIdsToInsert.begin(), aIdsToInsert.end()); + rPts.insert(aIdsToInsert); } } if( bUndo ) -- cgit