summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-07-16 12:18:35 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-07-17 08:39:14 +0200
commite77428ae3143166cfd96a6df1262e358c17f4695 (patch)
tree732d2186650e86cfcdaa85804e3b8ccf6242c53e
parentecd0ce5529ad6a577260bacaeff58a8bdf9c379f (diff)
loplugin:useuniqueptr in SwXShape
Change-Id: I7081485c63e17078cfbae7211d20809b0aec6fc3 Reviewed-on: https://gerrit.libreoffice.org/57517 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--sw/inc/unodraw.hxx4
-rw-r--r--sw/source/core/unocore/unodraw.cxx2
2 files changed, 3 insertions, 3 deletions
diff --git a/sw/inc/unodraw.hxx b/sw/inc/unodraw.hxx
index b10ab9b1ac01..c6cbed24f270 100644
--- a/sw/inc/unodraw.hxx
+++ b/sw/inc/unodraw.hxx
@@ -134,7 +134,7 @@ class SwXShape : public SwXShapeBaseClass,
const SfxItemPropertySet* m_pPropSet;
const SfxItemPropertyMapEntry* m_pPropertyMapEntries;
- SwShapeDescriptor_Impl* pImpl;
+ std::unique_ptr<SwShapeDescriptor_Impl> pImpl;
bool m_bDescriptor;
@@ -238,7 +238,7 @@ public:
virtual void SAL_CALL setSize( const css::awt::Size& aSize ) override;
virtual OUString SAL_CALL getShapeType( ) override;
- SwShapeDescriptor_Impl* GetDescImpl() {return pImpl;}
+ SwShapeDescriptor_Impl* GetDescImpl() {return pImpl.get();}
SwFrameFormat* GetFrameFormat() const { return const_cast<SwFrameFormat*>(static_cast<const SwFrameFormat*>(GetRegisteredIn())); }
const css::uno::Reference< css::uno::XAggregation >& GetAggregationInterface() {return xShapeAgg;}
diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx
index a9f376f62d67..3919fc2af1ef 100644
--- a/sw/source/core/unocore/unodraw.cxx
+++ b/sw/source/core/unocore/unodraw.cxx
@@ -984,7 +984,7 @@ SwXShape::~SwXShape()
uno::Reference< uno::XInterface > xRef;
xShapeAgg->setDelegator(xRef);
}
- delete pImpl;
+ pImpl.reset();
EndListeningAll();
}