diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-03-20 13:52:54 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-03-22 07:37:23 +0100 |
commit | ca787ba7c81c142e03126ea0c648540b3b3bdc0b (patch) | |
tree | e78944393d3266307be41d7bb1cbf3f2ef04e88a | |
parent | bf1daa9f4b0bd2ac706133def18c4af4cad9f216 (diff) |
loplugin:useuniqueptr in SmDocShell
Change-Id: I1183edd427da0ee31547ebdad572ec5cac3fb33f
Reviewed-on: https://gerrit.libreoffice.org/51670
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | starmath/inc/document.hxx | 2 | ||||
-rw-r--r-- | starmath/source/document.cxx | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/starmath/inc/document.hxx b/starmath/inc/document.hxx index af2ce9475fc3..00be9e454248 100644 --- a/starmath/inc/document.hxx +++ b/starmath/inc/document.hxx @@ -91,7 +91,7 @@ class SM_DLLPUBLIC SmDocShell : public SfxObjectShell, public SfxListener SvtLinguOptions maLinguOptions; std::unique_ptr<SmTableNode> mpTree; SfxItemPool *mpEditEngineItemPool; - EditEngine *mpEditEngine; + std::unique_ptr<EditEngine> mpEditEngine; VclPtr<SfxPrinter> mpPrinter; //q.v. comment to SmPrinter Access! VclPtr<Printer> mpTmpPrinter; //ditto sal_uInt16 mnModifyCount; diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx index dc2e5fffd255..7153bcccf157 100644 --- a/starmath/source/document.cxx +++ b/starmath/source/document.cxx @@ -331,7 +331,7 @@ EditEngine& SmDocShell::GetEditEngine() SetEditEngineDefaultFonts(*mpEditEngineItemPool, maLinguOptions); - mpEditEngine = new EditEngine( mpEditEngineItemPool ); + mpEditEngine.reset( new EditEngine( mpEditEngineItemPool ) ); mpEditEngine->SetAddExtLeading(true); @@ -639,7 +639,7 @@ SmDocShell::~SmDocShell() EndListening(*pp->GetConfig()); mpCursor.reset(); - delete mpEditEngine; + mpEditEngine.reset(); SfxItemPool::Free(mpEditEngineItemPool); mpPrinter.disposeAndClear(); } |