summaryrefslogtreecommitdiffstats
path: root/sd
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-05-21 16:37:56 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-05-28 08:47:06 +0200
commitf59d33a5302f20f98b0596c284116d1e30a17bd6 (patch)
treeaa5e7aff57b2a7c223a3cebba99eeaf8f656af02 /sd
parentloplugin:useuniqueptr in pathTextBreakupHelper (diff)
downloadcore-f59d33a5302f20f98b0596c284116d1e30a17bd6.tar.gz
core-f59d33a5302f20f98b0596c284116d1e30a17bd6.zip
loplugin:useuniqueptr in TextApiObject
Change-Id: I418f18a1e090dab2923395963b2a003df58890ae Reviewed-on: https://gerrit.libreoffice.org/54859 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd')
-rw-r--r--sd/inc/textapi.hxx2
-rw-r--r--sd/source/core/text/textapi.cxx3
2 files changed, 2 insertions, 3 deletions
diff --git a/sd/inc/textapi.hxx b/sd/inc/textapi.hxx
index df771dc55e50..d81ecf4b4ce2 100644
--- a/sd/inc/textapi.hxx
+++ b/sd/inc/textapi.hxx
@@ -47,7 +47,7 @@ public:
static TextApiObject* getImplementation( const css::uno::Reference< css::text::XText >& );
private:
- TextAPIEditSource* mpSource;
+ std::unique_ptr<TextAPIEditSource> mpSource;
TextApiObject( TextAPIEditSource* pEditSource );
};
diff --git a/sd/source/core/text/textapi.cxx b/sd/source/core/text/textapi.cxx
index a4bdb23e46bc..69462124ce27 100644
--- a/sd/source/core/text/textapi.cxx
+++ b/sd/source/core/text/textapi.cxx
@@ -144,8 +144,7 @@ void TextApiObject::dispose()
if( mpSource )
{
mpSource->Dispose();
- delete mpSource;
- mpSource = nullptr;
+ mpSource.reset();
}
}