diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-09-05 16:46:13 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-09-05 18:59:52 +0200 |
commit | 8b7434bc04de343b47d3107995cd9c3c96de40b0 (patch) | |
tree | 4f4bf0866fc8342789341d64d107bdef3a059ca2 /basctl | |
parent | 4c16f79b30ff3e015c706e0563faf6cf2931e1a6 (diff) |
use unique_ptr in SdrObject::getFullDragClone
Change-Id: I904f1f13bb4958e3457476e6e682ec7d7b97c670
Reviewed-on: https://gerrit.libreoffice.org/78660
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basctl')
-rw-r--r-- | basctl/source/dlged/dlgedobj.cxx | 6 | ||||
-rw-r--r-- | basctl/source/inc/dlgedobj.hxx | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/basctl/source/dlged/dlgedobj.cxx b/basctl/source/dlged/dlgedobj.cxx index 0d491bd303e0..80bf91698928 100644 --- a/basctl/source/dlged/dlgedobj.cxx +++ b/basctl/source/dlged/dlgedobj.cxx @@ -914,13 +914,13 @@ DlgEdObj* DlgEdObj::CloneSdrObject(SdrModel& rTargetModel) const return pDlgEdObj; } -SdrObject* DlgEdObj::getFullDragClone() const +SdrObjectUniquePtr DlgEdObj::getFullDragClone() const { // no need to really add the clone for dragging, it's a temporary // object - SdrObject* pObj = new SdrUnoObj( + SdrObjectUniquePtr pObj( new SdrUnoObj( getSdrModelFromSdrObject(), - OUString()); + OUString()) ); *pObj = *static_cast<const SdrUnoObj*>(this); return pObj; diff --git a/basctl/source/inc/dlgedobj.hxx b/basctl/source/inc/dlgedobj.hxx index 5a1f6c25ce43..8442747bce78 100644 --- a/basctl/source/inc/dlgedobj.hxx +++ b/basctl/source/inc/dlgedobj.hxx @@ -107,7 +107,7 @@ public: void clonedFrom(const DlgEdObj* _pSource); // not working yet // FullDrag support - virtual SdrObject* getFullDragClone() const override; + virtual SdrObjectUniquePtr getFullDragClone() const override; bool supportsService( OUString const & serviceName ) const; OUString GetDefaultName() const; |