diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-04-11 11:19:37 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-04-12 13:04:37 +0200 |
commit | 61dd9cafab20af893204deaca81ef26c1e7f7bb0 (patch) | |
tree | 295d290223a484138c2bea2f7e000e274815794a /sw | |
parent | e722564d40143fa029fe10d22a625539c795ee04 (diff) |
make SvxEditSource::Clone return std::unique_ptr
Change-Id: If0d93024a642cc80a2a84d0c15525af1c0596546
Reviewed-on: https://gerrit.libreoffice.org/52715
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/fields/textapi.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/inc/textapi.hxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/docvw/SidebarTxtControlAcc.cxx | 6 |
3 files changed, 6 insertions, 6 deletions
diff --git a/sw/source/core/fields/textapi.cxx b/sw/source/core/fields/textapi.cxx index 0a35462ce69c..5813ecc832cc 100644 --- a/sw/source/core/fields/textapi.cxx +++ b/sw/source/core/fields/textapi.cxx @@ -85,9 +85,9 @@ SwTextAPIEditSource::SwTextAPIEditSource( const SwTextAPIEditSource& rSource ) pImpl->mnRef++; } -SvxEditSource* SwTextAPIEditSource::Clone() const +std::unique_ptr<SvxEditSource> SwTextAPIEditSource::Clone() const { - return new SwTextAPIEditSource( *this ); + return std::unique_ptr<SvxEditSource>(new SwTextAPIEditSource( *this )); } void SwTextAPIEditSource::UpdateData() diff --git a/sw/source/core/inc/textapi.hxx b/sw/source/core/inc/textapi.hxx index ff9305585610..4b3fa15628f4 100644 --- a/sw/source/core/inc/textapi.hxx +++ b/sw/source/core/inc/textapi.hxx @@ -35,7 +35,7 @@ class SwTextAPIEditSource : public SvxEditSource { SwTextAPIEditSource_Impl* pImpl; - virtual SvxEditSource* Clone() const override; + virtual std::unique_ptr<SvxEditSource> Clone() const override; virtual SvxTextForwarder* GetTextForwarder() override; virtual void UpdateData() override; explicit SwTextAPIEditSource( const SwTextAPIEditSource& rSource ); diff --git a/sw/source/uibase/docvw/SidebarTxtControlAcc.cxx b/sw/source/uibase/docvw/SidebarTxtControlAcc.cxx index 1df89c8e13f5..7cab19c264d5 100644 --- a/sw/source/uibase/docvw/SidebarTxtControlAcc.cxx +++ b/sw/source/uibase/docvw/SidebarTxtControlAcc.cxx @@ -46,7 +46,7 @@ class SidebarTextEditSource : public SvxEditSource, explicit SidebarTextEditSource(SidebarTextControl& rSidebarTextControl); virtual ~SidebarTextEditSource() override; - virtual SvxEditSource* Clone() const override; + virtual std::unique_ptr<SvxEditSource> Clone() const override; virtual SvxTextForwarder* GetTextForwarder() override; virtual SvxViewForwarder* GetViewForwarder() override; @@ -83,9 +83,9 @@ SidebarTextEditSource::~SidebarTextEditSource() } } -SvxEditSource* SidebarTextEditSource::Clone() const +std::unique_ptr<SvxEditSource> SidebarTextEditSource::Clone() const { - return new SidebarTextEditSource( mrSidebarTextControl ); + return std::unique_ptr<SvxEditSource>(new SidebarTextEditSource( mrSidebarTextControl )); } SvxTextForwarder* SidebarTextEditSource::GetTextForwarder() |