summaryrefslogtreecommitdiff
path: root/chart2/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-09-21 15:30:02 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-09-25 13:57:36 +0200
commitb4fc996520b47a6212661a9de3a1c72ccfc379a4 (patch)
tree2dcb66d687dcdd1d91a75f9e498ca04742a7c564 /chart2/source
parentc30bdfbd22807e3f0c77f13a246ec243153ad7ae (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 'chart2/source')
-rw-r--r--chart2/source/controller/main/SelectionHelper.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/chart2/source/controller/main/SelectionHelper.cxx b/chart2/source/controller/main/SelectionHelper.cxx
index 30fbfdb648cd..083e7e0f71e7 100644
--- a/chart2/source/controller/main/SelectionHelper.cxx
+++ b/chart2/source/controller/main/SelectionHelper.cxx
@@ -29,6 +29,7 @@
#include <vcl/svapp.hxx>
#include <basegfx/point/b2dpoint.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
+#include <o3tl/make_unique.hxx>
namespace chart
{
@@ -595,8 +596,7 @@ bool SelectionHelper::getMarkHandles( SdrHdlList& rHdlList )
for( sal_uInt32 nM = 0; nM < aPolygon.count(); nM++)
{
const ::basegfx::B2DPoint aPoint(aPolygon.getB2DPoint(nM));
- SdrHdl* pHdl = new SdrHdl(Point(basegfx::fround(aPoint.getX()), basegfx::fround(aPoint.getY())), SdrHdlKind::Poly);
- rHdlList.AddHdl(pHdl);
+ rHdlList.AddHdl(o3tl::make_unique<SdrHdl>(Point(basegfx::fround(aPoint.getX()), basegfx::fround(aPoint.getY())), SdrHdlKind::Poly));
}
}
return true;
@@ -641,8 +641,7 @@ bool SelectionHelper::getMarkHandles( SdrHdlList& rHdlList )
}
Point aPos = pSubObj->GetCurrentBoundRect().Center();
- SdrHdl* pHdl = new SdrHdl(aPos,SdrHdlKind::Poly);
- rHdlList.AddHdl(pHdl);
+ rHdlList.AddHdl(o3tl::make_unique<SdrHdl>(aPos,SdrHdlKind::Poly));
}
return true;
}