diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-09-21 15:30:02 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-09-25 13:57:36 +0200 |
commit | b4fc996520b47a6212661a9de3a1c72ccfc379a4 (patch) | |
tree | 2dcb66d687dcdd1d91a75f9e498ca04742a7c564 /svx/source/svdraw/svdograf.cxx | |
parent | c30bdfbd22807e3f0c77f13a246ec243153ad7ae (diff) |
loplugin:useuniqueptr in SdrHdlList
Change-Id: I83241bd2ed172594704f4b115b584dc39b234086
Reviewed-on: https://gerrit.libreoffice.org/60959
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/svdraw/svdograf.cxx')
-rw-r--r-- | svx/source/svdraw/svdograf.cxx | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx index b22cdfac5412..87e93a1914c1 100644 --- a/svx/source/svdraw/svdograf.cxx +++ b/svx/source/svdraw/svdograf.cxx @@ -755,7 +755,7 @@ void SdrGrafObj::AddToHdlList(SdrHdlList& rHdlList) const { SdrHdlList tempList(nullptr); SdrRectObj::AddToHdlList( tempList ); - delete tempList.RemoveHdl(0); + tempList.RemoveHdl(0); tempList.MoveTo(rHdlList); } @@ -1227,7 +1227,7 @@ void SdrGrafObj::addCropHandles(SdrHdlList& rTarget) const } rTarget.AddHdl( - new SdrCropViewHdl( + o3tl::make_unique<SdrCropViewHdl>( aMatrixForCropViewHdl, GetGraphicObject().GetGraphic(), fCropLeft, @@ -1240,21 +1240,21 @@ void SdrGrafObj::addCropHandles(SdrHdlList& rTarget) const basegfx::B2DPoint aPos; aPos = aMatrix * basegfx::B2DPoint(0.0, 0.0); - rTarget.AddHdl(new SdrCropHdl(Point(basegfx::fround(aPos.getX()), basegfx::fround(aPos.getY())), SdrHdlKind::UpperLeft, fShearX, fRotate)); + rTarget.AddHdl(o3tl::make_unique<SdrCropHdl>(Point(basegfx::fround(aPos.getX()), basegfx::fround(aPos.getY())), SdrHdlKind::UpperLeft, fShearX, fRotate)); aPos = aMatrix * basegfx::B2DPoint(0.5, 0.0); - rTarget.AddHdl(new SdrCropHdl(Point(basegfx::fround(aPos.getX()), basegfx::fround(aPos.getY())), SdrHdlKind::Upper, fShearX, fRotate)); + rTarget.AddHdl(o3tl::make_unique<SdrCropHdl>(Point(basegfx::fround(aPos.getX()), basegfx::fround(aPos.getY())), SdrHdlKind::Upper, fShearX, fRotate)); aPos = aMatrix * basegfx::B2DPoint(1.0, 0.0); - rTarget.AddHdl(new SdrCropHdl(Point(basegfx::fround(aPos.getX()), basegfx::fround(aPos.getY())), SdrHdlKind::UpperRight, fShearX, fRotate)); + rTarget.AddHdl(o3tl::make_unique<SdrCropHdl>(Point(basegfx::fround(aPos.getX()), basegfx::fround(aPos.getY())), SdrHdlKind::UpperRight, fShearX, fRotate)); aPos = aMatrix * basegfx::B2DPoint(0.0, 0.5); - rTarget.AddHdl(new SdrCropHdl(Point(basegfx::fround(aPos.getX()), basegfx::fround(aPos.getY())), SdrHdlKind::Left , fShearX, fRotate)); + rTarget.AddHdl(o3tl::make_unique<SdrCropHdl>(Point(basegfx::fround(aPos.getX()), basegfx::fround(aPos.getY())), SdrHdlKind::Left , fShearX, fRotate)); aPos = aMatrix * basegfx::B2DPoint(1.0, 0.5); - rTarget.AddHdl(new SdrCropHdl(Point(basegfx::fround(aPos.getX()), basegfx::fround(aPos.getY())), SdrHdlKind::Right, fShearX, fRotate)); + rTarget.AddHdl(o3tl::make_unique<SdrCropHdl>(Point(basegfx::fround(aPos.getX()), basegfx::fround(aPos.getY())), SdrHdlKind::Right, fShearX, fRotate)); aPos = aMatrix * basegfx::B2DPoint(0.0, 1.0); - rTarget.AddHdl(new SdrCropHdl(Point(basegfx::fround(aPos.getX()), basegfx::fround(aPos.getY())), SdrHdlKind::LowerLeft, fShearX, fRotate)); + rTarget.AddHdl(o3tl::make_unique<SdrCropHdl>(Point(basegfx::fround(aPos.getX()), basegfx::fround(aPos.getY())), SdrHdlKind::LowerLeft, fShearX, fRotate)); aPos = aMatrix * basegfx::B2DPoint(0.5, 1.0); - rTarget.AddHdl(new SdrCropHdl(Point(basegfx::fround(aPos.getX()), basegfx::fround(aPos.getY())), SdrHdlKind::Lower, fShearX, fRotate)); + rTarget.AddHdl(o3tl::make_unique<SdrCropHdl>(Point(basegfx::fround(aPos.getX()), basegfx::fround(aPos.getY())), SdrHdlKind::Lower, fShearX, fRotate)); aPos = aMatrix * basegfx::B2DPoint(1.0, 1.0); - rTarget.AddHdl(new SdrCropHdl(Point(basegfx::fround(aPos.getX()), basegfx::fround(aPos.getY())), SdrHdlKind::LowerRight, fShearX, fRotate)); + rTarget.AddHdl(o3tl::make_unique<SdrCropHdl>(Point(basegfx::fround(aPos.getX()), basegfx::fround(aPos.getY())), SdrHdlKind::LowerRight, fShearX, fRotate)); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |