diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-01-11 12:53:32 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-01-13 13:08:52 +0000 |
commit | cd8fdb46fd9a215532688585f3466d36b1daa1ac (patch) | |
tree | 8e25067a0e72ce5afe9c490f9eef567821f594c7 /editeng/source/xml/xmltxtexp.cxx | |
parent | e6d7d737522124350a17a3cfdee055f03200a274 (diff) |
new loplugin: useuniqueptr: editeng
Change-Id: I6df65eab882780d996ee996b5fef8020186b6d98
Reviewed-on: https://gerrit.libreoffice.org/32958
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'editeng/source/xml/xmltxtexp.cxx')
-rw-r--r-- | editeng/source/xml/xmltxtexp.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/editeng/source/xml/xmltxtexp.cxx b/editeng/source/xml/xmltxtexp.cxx index 9b4c6f386e80..710f0accd6c6 100644 --- a/editeng/source/xml/xmltxtexp.cxx +++ b/editeng/source/xml/xmltxtexp.cxx @@ -62,8 +62,8 @@ class SvxEditEngineSourceImpl; class SvxEditEngineSourceImpl : public salhelper::SimpleReferenceObject { private: - EditEngine* mpEditEngine; - SvxTextForwarder* mpTextForwarder; + EditEngine* mpEditEngine; + std::unique_ptr<SvxTextForwarder> mpTextForwarder; virtual ~SvxEditEngineSourceImpl() override; @@ -81,15 +81,14 @@ SvxEditEngineSourceImpl::SvxEditEngineSourceImpl( EditEngine* pEditEngine ) SvxEditEngineSourceImpl::~SvxEditEngineSourceImpl() { - delete mpTextForwarder; } SvxTextForwarder* SvxEditEngineSourceImpl::GetTextForwarder() { if (!mpTextForwarder) - mpTextForwarder = new SvxEditEngineForwarder( *mpEditEngine ); + mpTextForwarder.reset( new SvxEditEngineForwarder( *mpEditEngine ) ); - return mpTextForwarder; + return mpTextForwarder.get(); } // SvxTextEditSource |