diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2018-07-07 09:29:38 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-07-07 12:42:37 +0200 |
commit | 363146254bd44ab82d657f2ca0293d03bd111280 (patch) | |
tree | 41e76c63ca1887e8171f9a4e15d7f138bf48bccc /svx/source/engine3d | |
parent | d4b1f51f99fcb2a6d550f667df14e99983ab9d8c (diff) |
use std::unique_ptr fo CreateObjectSpecificProperties
Change-Id: Ica82eca48719f12535757c81e95d788fe0aaa48e
Reviewed-on: https://gerrit.libreoffice.org/57110
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/engine3d')
-rw-r--r-- | svx/source/engine3d/extrud3d.cxx | 4 | ||||
-rw-r--r-- | svx/source/engine3d/lathe3d.cxx | 4 | ||||
-rw-r--r-- | svx/source/engine3d/obj3d.cxx | 9 | ||||
-rw-r--r-- | svx/source/engine3d/scene3d.cxx | 4 | ||||
-rw-r--r-- | svx/source/engine3d/sphere3d.cxx | 4 |
5 files changed, 13 insertions, 12 deletions
diff --git a/svx/source/engine3d/extrud3d.cxx b/svx/source/engine3d/extrud3d.cxx index 6ab1ae7440a3..38b94e629e47 100644 --- a/svx/source/engine3d/extrud3d.cxx +++ b/svx/source/engine3d/extrud3d.cxx @@ -45,9 +45,9 @@ std::unique_ptr<sdr::contact::ViewContact> E3dExtrudeObj::CreateObjectSpecificVi return o3tl::make_unique<sdr::contact::ViewContactOfE3dExtrude>(*this); } -sdr::properties::BaseProperties* E3dExtrudeObj::CreateObjectSpecificProperties() +std::unique_ptr<sdr::properties::BaseProperties> E3dExtrudeObj::CreateObjectSpecificProperties() { - return new sdr::properties::E3dExtrudeProperties(*this); + return o3tl::make_unique<sdr::properties::E3dExtrudeProperties>(*this); } // Constructor creates a two cover surface tools::PolyPolygon and (point-count 1) side diff --git a/svx/source/engine3d/lathe3d.cxx b/svx/source/engine3d/lathe3d.cxx index 629ecfb85127..5068defb7d1b 100644 --- a/svx/source/engine3d/lathe3d.cxx +++ b/svx/source/engine3d/lathe3d.cxx @@ -43,9 +43,9 @@ std::unique_ptr<sdr::contact::ViewContact> E3dLatheObj::CreateObjectSpecificView return o3tl::make_unique<sdr::contact::ViewContactOfE3dLathe>(*this); } -sdr::properties::BaseProperties* E3dLatheObj::CreateObjectSpecificProperties() +std::unique_ptr<sdr::properties::BaseProperties> E3dLatheObj::CreateObjectSpecificProperties() { - return new sdr::properties::E3dLatheProperties(*this); + return o3tl::make_unique<sdr::properties::E3dLatheProperties>(*this); } // Constructor from 3D polygon, scale is the conversion factor for the coordinates diff --git a/svx/source/engine3d/obj3d.cxx b/svx/source/engine3d/obj3d.cxx index 01d57b94d3d6..d3cf4bf8fbe5 100644 --- a/svx/source/engine3d/obj3d.cxx +++ b/svx/source/engine3d/obj3d.cxx @@ -75,12 +75,13 @@ #include <com/sun/star/uno/Sequence.h> #include <svx/sdr/contact/viewcontactofe3dscene.hxx> #include <svx/e3dsceneupdater.hxx> +#include <o3tl/make_unique.hxx> using namespace com::sun::star; -sdr::properties::BaseProperties* E3dObject::CreateObjectSpecificProperties() +std::unique_ptr<sdr::properties::BaseProperties> E3dObject::CreateObjectSpecificProperties() { - return new sdr::properties::E3dProperties(*this); + return o3tl::make_unique<sdr::properties::E3dProperties>(*this); } E3dObject::E3dObject(SdrModel& rSdrModel) @@ -486,9 +487,9 @@ void E3dObject::NbcRotate(const Point& rRef, long nAngle, double sn, double cs) SetGlueReallyAbsolute(false); // from now they are again relative to BoundRect (that is defined as aOutRect) } -sdr::properties::BaseProperties* E3dCompoundObject::CreateObjectSpecificProperties() +std::unique_ptr<sdr::properties::BaseProperties> E3dCompoundObject::CreateObjectSpecificProperties() { - return new sdr::properties::E3dCompoundProperties(*this); + return o3tl::make_unique<sdr::properties::E3dCompoundProperties>(*this); } E3dCompoundObject::E3dCompoundObject(SdrModel& rSdrModel) diff --git a/svx/source/engine3d/scene3d.cxx b/svx/source/engine3d/scene3d.cxx index a6cf651fa9b9..4e3d06bea40a 100644 --- a/svx/source/engine3d/scene3d.cxx +++ b/svx/source/engine3d/scene3d.cxx @@ -157,9 +157,9 @@ sal_uInt32 Imp3DDepthRemapper::RemapOrdNum(sal_uInt32 nOrdNum) const // BaseProperties section -sdr::properties::BaseProperties* E3dScene::CreateObjectSpecificProperties() +std::unique_ptr<sdr::properties::BaseProperties> E3dScene::CreateObjectSpecificProperties() { - return new sdr::properties::E3dSceneProperties(*this); + return o3tl::make_unique<sdr::properties::E3dSceneProperties>(*this); } diff --git a/svx/source/engine3d/sphere3d.cxx b/svx/source/engine3d/sphere3d.cxx index c528d47e5713..4b2ee554aa10 100644 --- a/svx/source/engine3d/sphere3d.cxx +++ b/svx/source/engine3d/sphere3d.cxx @@ -40,9 +40,9 @@ std::unique_ptr<sdr::contact::ViewContact> E3dSphereObj::CreateObjectSpecificVie return o3tl::make_unique<sdr::contact::ViewContactOfE3dSphere>(*this); } -sdr::properties::BaseProperties* E3dSphereObj::CreateObjectSpecificProperties() +std::unique_ptr<sdr::properties::BaseProperties> E3dSphereObj::CreateObjectSpecificProperties() { - return new sdr::properties::E3dSphereProperties(*this); + return o3tl::make_unique<sdr::properties::E3dSphereProperties>(*this); } // Build Sphere from polygon facets in latitude and longitude |