summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2018-07-01 22:04:20 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-07-03 08:18:19 +0200
commitdbdf5ef32e2fc041183b762d9a1561430c96470b (patch)
treeb2ce4ec15fdbb3712a7d81ab9b779acbfd44fe9f /svx
parent24218c21712bc900a6641bd1844878f07b173df7 (diff)
use std::unique_ptr for CreateObjectSpecificViewContact
Change-Id: I0fed54d345a43fe0bc21ebbe424e6fdc7eac9523 Reviewed-on: https://gerrit.libreoffice.org/56823 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/engine3d/cube3d.cxx5
-rw-r--r--svx/source/engine3d/extrud3d.cxx5
-rw-r--r--svx/source/engine3d/lathe3d.cxx5
-rw-r--r--svx/source/engine3d/polygn3d.cxx5
-rw-r--r--svx/source/engine3d/scene3d.cxx5
-rw-r--r--svx/source/engine3d/sphere3d.cxx5
-rw-r--r--svx/source/svdraw/svdoashp.cxx5
-rw-r--r--svx/source/svdraw/svdobj.cxx9
-rw-r--r--svx/source/svdraw/svdocapt.cxx5
-rw-r--r--svx/source/svdraw/svdocirc.cxx5
-rw-r--r--svx/source/svdraw/svdoedge.cxx5
-rw-r--r--svx/source/svdraw/svdograf.cxx5
-rw-r--r--svx/source/svdraw/svdogrp.cxx5
-rw-r--r--svx/source/svdraw/svdomeas.cxx5
-rw-r--r--svx/source/svdraw/svdomedia.cxx5
-rw-r--r--svx/source/svdraw/svdoole2.cxx4
-rw-r--r--svx/source/svdraw/svdopage.cxx5
-rw-r--r--svx/source/svdraw/svdopath.cxx5
-rw-r--r--svx/source/svdraw/svdorect.cxx5
-rw-r--r--svx/source/svdraw/svdotext.cxx5
-rw-r--r--svx/source/svdraw/svdouno.cxx5
-rw-r--r--svx/source/svdraw/svdovirt.cxx5
-rw-r--r--svx/source/table/svdotable.cxx4
23 files changed, 69 insertions, 48 deletions
diff --git a/svx/source/engine3d/cube3d.cxx b/svx/source/engine3d/cube3d.cxx
index a8c92b0556b8..ecc3dc74abc8 100644
--- a/svx/source/engine3d/cube3d.cxx
+++ b/svx/source/engine3d/cube3d.cxx
@@ -25,13 +25,14 @@
#include <basegfx/point/b3dpoint.hxx>
#include <basegfx/polygon/b3dpolygon.hxx>
#include <sdr/contact/viewcontactofe3dcube.hxx>
+#include <o3tl/make_unique.hxx>
// DrawContact section
-sdr::contact::ViewContact* E3dCubeObj::CreateObjectSpecificViewContact()
+std::unique_ptr<sdr::contact::ViewContact> E3dCubeObj::CreateObjectSpecificViewContact()
{
- return new sdr::contact::ViewContactOfE3dCube(*this);
+ return o3tl::make_unique<sdr::contact::ViewContactOfE3dCube>(*this);
}
diff --git a/svx/source/engine3d/extrud3d.cxx b/svx/source/engine3d/extrud3d.cxx
index b28132fd3c65..6ab1ae7440a3 100644
--- a/svx/source/engine3d/extrud3d.cxx
+++ b/svx/source/engine3d/extrud3d.cxx
@@ -36,12 +36,13 @@
#include <basegfx/polygon/b2dpolygontools.hxx>
#include <basegfx/polygon/b3dpolygontools.hxx>
#include <basegfx/polygon/b3dpolypolygontools.hxx>
+#include <o3tl/make_unique.hxx>
// DrawContact section
-sdr::contact::ViewContact* E3dExtrudeObj::CreateObjectSpecificViewContact()
+std::unique_ptr<sdr::contact::ViewContact> E3dExtrudeObj::CreateObjectSpecificViewContact()
{
- return new sdr::contact::ViewContactOfE3dExtrude(*this);
+ return o3tl::make_unique<sdr::contact::ViewContactOfE3dExtrude>(*this);
}
sdr::properties::BaseProperties* E3dExtrudeObj::CreateObjectSpecificProperties()
diff --git a/svx/source/engine3d/lathe3d.cxx b/svx/source/engine3d/lathe3d.cxx
index 40bfd69f276b..629ecfb85127 100644
--- a/svx/source/engine3d/lathe3d.cxx
+++ b/svx/source/engine3d/lathe3d.cxx
@@ -34,12 +34,13 @@
#include <basegfx/polygon/b2dpolypolygontools.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
+#include <o3tl/make_unique.hxx>
// DrawContact section
-sdr::contact::ViewContact* E3dLatheObj::CreateObjectSpecificViewContact()
+std::unique_ptr<sdr::contact::ViewContact> E3dLatheObj::CreateObjectSpecificViewContact()
{
- return new sdr::contact::ViewContactOfE3dLathe(*this);
+ return o3tl::make_unique<sdr::contact::ViewContactOfE3dLathe>(*this);
}
sdr::properties::BaseProperties* E3dLatheObj::CreateObjectSpecificProperties()
diff --git a/svx/source/engine3d/polygn3d.cxx b/svx/source/engine3d/polygn3d.cxx
index 68f808f5e41c..a94c316fe4bf 100644
--- a/svx/source/engine3d/polygn3d.cxx
+++ b/svx/source/engine3d/polygn3d.cxx
@@ -24,11 +24,12 @@
#include <sdr/contact/viewcontactofe3dpolygon.hxx>
#include <basegfx/polygon/b3dpolygon.hxx>
#include <basegfx/polygon/b3dpolygontools.hxx>
+#include <o3tl/make_unique.hxx>
// DrawContact section
-sdr::contact::ViewContact* E3dPolygonObj::CreateObjectSpecificViewContact()
+std::unique_ptr<sdr::contact::ViewContact> E3dPolygonObj::CreateObjectSpecificViewContact()
{
- return new sdr::contact::ViewContactOfE3dPolygon(*this);
+ return o3tl::make_unique<sdr::contact::ViewContactOfE3dPolygon>(*this);
}
E3dPolygonObj::E3dPolygonObj(
diff --git a/svx/source/engine3d/scene3d.cxx b/svx/source/engine3d/scene3d.cxx
index c98ea6d97dca..a6cf651fa9b9 100644
--- a/svx/source/engine3d/scene3d.cxx
+++ b/svx/source/engine3d/scene3d.cxx
@@ -46,6 +46,7 @@
#include <basegfx/polygon/b2dpolypolygontools.hxx>
#include <svx/e3dsceneupdater.hxx>
#include <svx/svdmodel.hxx>
+#include <o3tl/make_unique.hxx>
class ImpRemap3DDepth
@@ -164,9 +165,9 @@ sdr::properties::BaseProperties* E3dScene::CreateObjectSpecificProperties()
// DrawContact section
-sdr::contact::ViewContact* E3dScene::CreateObjectSpecificViewContact()
+std::unique_ptr<sdr::contact::ViewContact> E3dScene::CreateObjectSpecificViewContact()
{
- return new sdr::contact::ViewContactOfE3dScene(*this);
+ return o3tl::make_unique<sdr::contact::ViewContactOfE3dScene>(*this);
}
diff --git a/svx/source/engine3d/sphere3d.cxx b/svx/source/engine3d/sphere3d.cxx
index a3a3f0c168c1..c528d47e5713 100644
--- a/svx/source/engine3d/sphere3d.cxx
+++ b/svx/source/engine3d/sphere3d.cxx
@@ -32,11 +32,12 @@
#include <basegfx/point/b3dpoint.hxx>
#include <sdr/contact/viewcontactofe3dsphere.hxx>
#include <basegfx/polygon/b3dpolygon.hxx>
+#include <o3tl/make_unique.hxx>
// DrawContact section
-sdr::contact::ViewContact* E3dSphereObj::CreateObjectSpecificViewContact()
+std::unique_ptr<sdr::contact::ViewContact> E3dSphereObj::CreateObjectSpecificViewContact()
{
- return new sdr::contact::ViewContactOfE3dSphere(*this);
+ return o3tl::make_unique<sdr::contact::ViewContactOfE3dSphere>(*this);
}
sdr::properties::BaseProperties* E3dSphereObj::CreateObjectSpecificProperties()
diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx
index 5f448b6fb53b..c0a139c26ef7 100644
--- a/svx/source/svdraw/svdoashp.cxx
+++ b/svx/source/svdraw/svdoashp.cxx
@@ -82,6 +82,7 @@
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <basegfx/matrix/b2dhommatrixtools.hxx>
#include <svdobjplusdata.hxx>
+#include <o3tl/make_unique.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -3048,9 +3049,9 @@ bool SdrObjCustomShape::TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegf
return false;
}
-sdr::contact::ViewContact* SdrObjCustomShape::CreateObjectSpecificViewContact()
+std::unique_ptr<sdr::contact::ViewContact> SdrObjCustomShape::CreateObjectSpecificViewContact()
{
- return new sdr::contact::ViewContactOfSdrObjCustomShape(*this);
+ return o3tl::make_unique<sdr::contact::ViewContactOfSdrObjCustomShape>(*this);
}
// #i33136#
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index 663c4b07083a..a463ea523fae 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -130,6 +130,7 @@
#include <rtl/strbuf.hxx>
#include <svdobjplusdata.hxx>
#include <svdobjuserdatalist.hxx>
+#include <o3tl/make_unique.hxx>
#include <boost/optional.hpp>
#include <libxml/xmlwriter.h>
@@ -256,17 +257,17 @@ void SdrObject::RemoveObjectUser(sdr::ObjectUser& rOldUser)
// DrawContact section
-sdr::contact::ViewContact* SdrObject::CreateObjectSpecificViewContact()
+std::unique_ptr<sdr::contact::ViewContact> SdrObject::CreateObjectSpecificViewContact()
{
- return new sdr::contact::ViewContactOfSdrObj(*this);
+ return o3tl::make_unique<sdr::contact::ViewContactOfSdrObj>(*this);
}
sdr::contact::ViewContact& SdrObject::GetViewContact() const
{
if(!mpViewContact)
{
- const_cast< SdrObject* >(this)->mpViewContact.reset(
- const_cast< SdrObject* >(this)->CreateObjectSpecificViewContact() );
+ const_cast< SdrObject* >(this)->mpViewContact =
+ const_cast< SdrObject* >(this)->CreateObjectSpecificViewContact();
}
return *mpViewContact;
diff --git a/svx/source/svdraw/svdocapt.cxx b/svx/source/svdraw/svdocapt.cxx
index e02b596f2195..1a4ea0c18bcc 100644
--- a/svx/source/svdraw/svdocapt.cxx
+++ b/svx/source/svdraw/svdocapt.cxx
@@ -58,6 +58,7 @@
#include <svx/xlnwtit.hxx>
#include <svx/xpoly.hxx>
#include <svx/xpool.hxx>
+#include <o3tl/make_unique.hxx>
enum EscDir {LKS,RTS,OBN,UNT};
@@ -182,9 +183,9 @@ sdr::properties::BaseProperties* SdrCaptionObj::CreateObjectSpecificProperties()
// DrawContact section
-sdr::contact::ViewContact* SdrCaptionObj::CreateObjectSpecificViewContact()
+std::unique_ptr<sdr::contact::ViewContact> SdrCaptionObj::CreateObjectSpecificViewContact()
{
- return new sdr::contact::ViewContactOfSdrCaptionObj(*this);
+ return o3tl::make_unique<sdr::contact::ViewContactOfSdrCaptionObj>(*this);
}
diff --git a/svx/source/svdraw/svdocirc.cxx b/svx/source/svdraw/svdocirc.cxx
index e55f79183d18..71dad28a7b6e 100644
--- a/svx/source/svdraw/svdocirc.cxx
+++ b/svx/source/svdraw/svdocirc.cxx
@@ -49,6 +49,7 @@
#include <svx/xlnstwit.hxx>
#include <svx/xlnwtit.hxx>
#include <svx/xpool.hxx>
+#include <o3tl/make_unique.hxx>
using namespace com::sun::star;
@@ -99,9 +100,9 @@ sdr::properties::BaseProperties* SdrCircObj::CreateObjectSpecificProperties()
// DrawContact section
-sdr::contact::ViewContact* SdrCircObj::CreateObjectSpecificViewContact()
+std::unique_ptr<sdr::contact::ViewContact> SdrCircObj::CreateObjectSpecificViewContact()
{
- return new sdr::contact::ViewContactOfSdrCircObj(*this);
+ return o3tl::make_unique<sdr::contact::ViewContactOfSdrCircObj>(*this);
}
SdrCircObj::SdrCircObj(
diff --git a/svx/source/svdraw/svdoedge.cxx b/svx/source/svdraw/svdoedge.cxx
index 860b4f018a81..ca3174a6de5e 100644
--- a/svx/source/svdraw/svdoedge.cxx
+++ b/svx/source/svdraw/svdoedge.cxx
@@ -47,6 +47,7 @@
#include <svx/sxenditm.hxx>
#include <svx/xpoly.hxx>
#include <svx/xpool.hxx>
+#include <o3tl/make_unique.hxx>
SdrObjConnection::~SdrObjConnection()
@@ -155,9 +156,9 @@ sdr::properties::BaseProperties* SdrEdgeObj::CreateObjectSpecificProperties()
// DrawContact section
-sdr::contact::ViewContact* SdrEdgeObj::CreateObjectSpecificViewContact()
+std::unique_ptr<sdr::contact::ViewContact> SdrEdgeObj::CreateObjectSpecificViewContact()
{
- return new sdr::contact::ViewContactOfSdrEdgeObj(*this);
+ return o3tl::make_unique<sdr::contact::ViewContactOfSdrEdgeObj>(*this);
}
diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx
index aefebe7b3a7c..90e6d4a0c391 100644
--- a/svx/source/svdraw/svdograf.cxx
+++ b/svx/source/svdraw/svdograf.cxx
@@ -62,6 +62,7 @@
#include <drawinglayer/primitive2d/objectinfoprimitive2d.hxx>
#include <memory>
#include <vcl/GraphicLoader.hxx>
+#include <o3tl/make_unique.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -272,9 +273,9 @@ sdr::properties::BaseProperties* SdrGrafObj::CreateObjectSpecificProperties()
// DrawContact section
-sdr::contact::ViewContact* SdrGrafObj::CreateObjectSpecificViewContact()
+std::unique_ptr<sdr::contact::ViewContact> SdrGrafObj::CreateObjectSpecificViewContact()
{
- return new sdr::contact::ViewContactOfGraphic(*this);
+ return o3tl::make_unique<sdr::contact::ViewContactOfGraphic>(*this);
}
// check if SVG and if try to get ObjectInfoPrimitive2D and extract info
diff --git a/svx/source/svdraw/svdogrp.cxx b/svx/source/svdraw/svdogrp.cxx
index c0e6ae0b468d..c66ee4f1bff3 100644
--- a/svx/source/svdraw/svdogrp.cxx
+++ b/svx/source/svdraw/svdogrp.cxx
@@ -49,6 +49,7 @@
#include <basegfx/polygon/b2dpolygontools.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
#include <libxml/xmlwriter.h>
+#include <o3tl/make_unique.hxx>
// BaseProperties section
sdr::properties::BaseProperties* SdrObjGroup::CreateObjectSpecificProperties()
@@ -57,9 +58,9 @@ sdr::properties::BaseProperties* SdrObjGroup::CreateObjectSpecificProperties()
}
// DrawContact section
-sdr::contact::ViewContact* SdrObjGroup::CreateObjectSpecificViewContact()
+std::unique_ptr<sdr::contact::ViewContact> SdrObjGroup::CreateObjectSpecificViewContact()
{
- return new sdr::contact::ViewContactOfGroup(*this);
+ return o3tl::make_unique<sdr::contact::ViewContactOfGroup>(*this);
}
SdrObjGroup::SdrObjGroup(SdrModel& rSdrModel)
diff --git a/svx/source/svdraw/svdomeas.cxx b/svx/source/svdraw/svdomeas.cxx
index b0738696d733..cc6ba7d6f5cb 100644
--- a/svx/source/svdraw/svdomeas.cxx
+++ b/svx/source/svdraw/svdomeas.cxx
@@ -68,6 +68,7 @@
#include <svx/xlnwtit.hxx>
#include <svx/xpoly.hxx>
#include <unotools/syslocale.hxx>
+#include <o3tl/make_unique.hxx>
SdrMeasureObjGeoData::SdrMeasureObjGeoData() {}
@@ -192,9 +193,9 @@ sdr::properties::BaseProperties* SdrMeasureObj::CreateObjectSpecificProperties()
// DrawContact section
-sdr::contact::ViewContact* SdrMeasureObj::CreateObjectSpecificViewContact()
+std::unique_ptr<sdr::contact::ViewContact> SdrMeasureObj::CreateObjectSpecificViewContact()
{
- return new sdr::contact::ViewContactOfSdrMeasureObj(*this);
+ return o3tl::make_unique<sdr::contact::ViewContactOfSdrMeasureObj>(*this);
}
diff --git a/svx/source/svdraw/svdomedia.cxx b/svx/source/svdraw/svdomedia.cxx
index 6767d05eb7d4..54c3d66846da 100644
--- a/svx/source/svdraw/svdomedia.cxx
+++ b/svx/source/svdraw/svdomedia.cxx
@@ -38,6 +38,7 @@
#include <svx/strings.hrc>
#include <svx/sdr/contact/viewcontactofsdrmediaobj.hxx>
#include <avmedia/mediawindow.hxx>
+#include <o3tl/make_unique.hxx>
using namespace ::com::sun::star;
@@ -88,9 +89,9 @@ bool SdrMediaObj::HasTextEdit() const
return false;
}
-sdr::contact::ViewContact* SdrMediaObj::CreateObjectSpecificViewContact()
+std::unique_ptr<sdr::contact::ViewContact> SdrMediaObj::CreateObjectSpecificViewContact()
{
- return new sdr::contact::ViewContactOfSdrMediaObj( *this );
+ return o3tl::make_unique<sdr::contact::ViewContactOfSdrMediaObj>( *this );
}
void SdrMediaObj::TakeObjInfo( SdrObjTransformInfoRec& rInfo ) const
diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx
index feb7caf6700c..d854ffbc3488 100644
--- a/svx/source/svdraw/svdoole2.cxx
+++ b/svx/source/svdraw/svdoole2.cxx
@@ -676,9 +676,9 @@ sdr::properties::BaseProperties* SdrOle2Obj::CreateObjectSpecificProperties()
// DrawContact section
-sdr::contact::ViewContact* SdrOle2Obj::CreateObjectSpecificViewContact()
+std::unique_ptr<sdr::contact::ViewContact> SdrOle2Obj::CreateObjectSpecificViewContact()
{
- return new sdr::contact::ViewContactOfSdrOle2Obj(*this);
+ return o3tl::make_unique<sdr::contact::ViewContactOfSdrOle2Obj>(*this);
}
void SdrOle2Obj::Init()
diff --git a/svx/source/svdraw/svdopage.cxx b/svx/source/svdraw/svdopage.cxx
index c9dfa21838de..ceb4a130fc59 100644
--- a/svx/source/svdraw/svdopage.cxx
+++ b/svx/source/svdraw/svdopage.cxx
@@ -31,6 +31,7 @@
#include <svl/itemset.hxx>
#include <sdr/properties/pageproperties.hxx>
#include <svx/sdr/contact/viewcontactofpageobj.hxx>
+#include <o3tl/make_unique.hxx>
// BaseProperties section
@@ -43,9 +44,9 @@ sdr::properties::BaseProperties* SdrPageObj::CreateObjectSpecificProperties()
// DrawContact section
-sdr::contact::ViewContact* SdrPageObj::CreateObjectSpecificViewContact()
+std::unique_ptr<sdr::contact::ViewContact> SdrPageObj::CreateObjectSpecificViewContact()
{
- return new sdr::contact::ViewContactOfPageObj(*this);
+ return o3tl::make_unique<sdr::contact::ViewContactOfPageObj>(*this);
}
diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx
index 4c5ad7e7bffa..d98c9d6a21fd 100644
--- a/svx/source/svdraw/svdopath.cxx
+++ b/svx/source/svdraw/svdopath.cxx
@@ -51,6 +51,7 @@
#include <svx/sdr/primitive2d/sdrattributecreator.hxx>
#include <basegfx/matrix/b2dhommatrixtools.hxx>
#include <svx/sdr/attribute/sdrformtextattribute.hxx>
+#include <o3tl/make_unique.hxx>
#include <memory>
using namespace sdr;
@@ -1616,9 +1617,9 @@ SdrPathObjGeoData::~SdrPathObjGeoData()
// DrawContact section
-sdr::contact::ViewContact* SdrPathObj::CreateObjectSpecificViewContact()
+std::unique_ptr<sdr::contact::ViewContact> SdrPathObj::CreateObjectSpecificViewContact()
{
- return new sdr::contact::ViewContactOfSdrPathObj(*this);
+ return o3tl::make_unique<sdr::contact::ViewContactOfSdrPathObj>(*this);
}
diff --git a/svx/source/svdraw/svdorect.cxx b/svx/source/svdraw/svdorect.cxx
index c9f8ee955e3b..c1a102b15ac3 100644
--- a/svx/source/svdraw/svdorect.cxx
+++ b/svx/source/svdraw/svdorect.cxx
@@ -43,6 +43,7 @@
#include <svx/sdr/contact/viewcontactofsdrrectobj.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
+#include <o3tl/make_unique.hxx>
using namespace com::sun::star;
@@ -56,9 +57,9 @@ sdr::properties::BaseProperties* SdrRectObj::CreateObjectSpecificProperties()
// DrawContact section
-sdr::contact::ViewContact* SdrRectObj::CreateObjectSpecificViewContact()
+std::unique_ptr<sdr::contact::ViewContact> SdrRectObj::CreateObjectSpecificViewContact()
{
- return new sdr::contact::ViewContactOfSdrRectObj(*this);
+ return o3tl::make_unique<sdr::contact::ViewContactOfSdrRectObj>(*this);
}
diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
index 1e6780866101..7a1d1c9421ce 100644
--- a/svx/source/svdraw/svdotext.cxx
+++ b/svx/source/svdraw/svdotext.cxx
@@ -60,6 +60,7 @@
#include <drawinglayer/geometry/viewinformation2d.hxx>
#include <vcl/virdev.hxx>
#include <basegfx/matrix/b2dhommatrixtools.hxx>
+#include <o3tl/make_unique.hxx>
using namespace com::sun::star;
@@ -70,9 +71,9 @@ sdr::properties::BaseProperties* SdrTextObj::CreateObjectSpecificProperties()
}
// DrawContact section
-sdr::contact::ViewContact* SdrTextObj::CreateObjectSpecificViewContact()
+std::unique_ptr<sdr::contact::ViewContact> SdrTextObj::CreateObjectSpecificViewContact()
{
- return new sdr::contact::ViewContactOfTextObj(*this);
+ return o3tl::make_unique<sdr::contact::ViewContactOfTextObj>(*this);
}
SdrTextObj::SdrTextObj(SdrModel& rSdrModel)
diff --git a/svx/source/svdraw/svdouno.cxx b/svx/source/svdraw/svdouno.cxx
index 40e8c9601edb..68b13f3d2e4f 100644
--- a/svx/source/svdraw/svdouno.cxx
+++ b/svx/source/svdraw/svdouno.cxx
@@ -48,6 +48,7 @@
#include <svx/sdrpaintwindow.hxx>
#include <tools/diagnose_ex.h>
#include <svx/svdograf.hxx>
+#include <o3tl/make_unique.hxx>
using namespace ::com::sun::star;
using namespace sdr::contact;
@@ -525,9 +526,9 @@ bool SdrUnoObj::impl_getViewContact( ViewContactOfUnoControl*& _out_rpContact )
}
-sdr::contact::ViewContact* SdrUnoObj::CreateObjectSpecificViewContact()
+std::unique_ptr<sdr::contact::ViewContact> SdrUnoObj::CreateObjectSpecificViewContact()
{
- return new sdr::contact::ViewContactOfUnoControl( *this );
+ return o3tl::make_unique<sdr::contact::ViewContactOfUnoControl>( *this );
}
diff --git a/svx/source/svdraw/svdovirt.cxx b/svx/source/svdraw/svdovirt.cxx
index 55d564dc71f2..698ac2051adc 100644
--- a/svx/source/svdraw/svdovirt.cxx
+++ b/svx/source/svdraw/svdovirt.cxx
@@ -28,6 +28,7 @@
#include <svx/svdograf.hxx>
#include <svx/svddrgv.hxx>
#include <basegfx/matrix/b2dhommatrixtools.hxx>
+#include <o3tl/make_unique.hxx>
sdr::properties::BaseProperties& SdrVirtObj::GetProperties() const
@@ -37,9 +38,9 @@ sdr::properties::BaseProperties& SdrVirtObj::GetProperties() const
// #i27224#
-sdr::contact::ViewContact* SdrVirtObj::CreateObjectSpecificViewContact()
+std::unique_ptr<sdr::contact::ViewContact> SdrVirtObj::CreateObjectSpecificViewContact()
{
- return new sdr::contact::ViewContactOfVirtObj(*this);
+ return o3tl::make_unique<sdr::contact::ViewContactOfVirtObj>(*this);
}
SdrVirtObj::SdrVirtObj(
diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx
index 6a7dcd3f3427..4586485156d2 100644
--- a/svx/source/table/svdotable.cxx
+++ b/svx/source/table/svdotable.cxx
@@ -846,9 +846,9 @@ sdr::properties::BaseProperties* SdrTableObj::CreateObjectSpecificProperties()
// DrawContact section
-sdr::contact::ViewContact* SdrTableObj::CreateObjectSpecificViewContact()
+std::unique_ptr<sdr::contact::ViewContact> SdrTableObj::CreateObjectSpecificViewContact()
{
- return new sdr::contact::ViewContactOfTableObj(*this);
+ return o3tl::make_unique<sdr::contact::ViewContactOfTableObj>(*this);
}
SdrTableObj::SdrTableObj(SdrModel& rSdrModel)