Kaydet (Commit) ca787ba7 authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:useuniqueptr in SmDocShell

Change-Id: I1183edd427da0ee31547ebdad572ec5cac3fb33f
Reviewed-on: https://gerrit.libreoffice.org/51670Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst bf1daa9f
...@@ -91,7 +91,7 @@ class SM_DLLPUBLIC SmDocShell : public SfxObjectShell, public SfxListener ...@@ -91,7 +91,7 @@ class SM_DLLPUBLIC SmDocShell : public SfxObjectShell, public SfxListener
SvtLinguOptions maLinguOptions; SvtLinguOptions maLinguOptions;
std::unique_ptr<SmTableNode> mpTree; std::unique_ptr<SmTableNode> mpTree;
SfxItemPool *mpEditEngineItemPool; SfxItemPool *mpEditEngineItemPool;
EditEngine *mpEditEngine; std::unique_ptr<EditEngine> mpEditEngine;
VclPtr<SfxPrinter> mpPrinter; //q.v. comment to SmPrinter Access! VclPtr<SfxPrinter> mpPrinter; //q.v. comment to SmPrinter Access!
VclPtr<Printer> mpTmpPrinter; //ditto VclPtr<Printer> mpTmpPrinter; //ditto
sal_uInt16 mnModifyCount; sal_uInt16 mnModifyCount;
......
...@@ -331,7 +331,7 @@ EditEngine& SmDocShell::GetEditEngine() ...@@ -331,7 +331,7 @@ EditEngine& SmDocShell::GetEditEngine()
SetEditEngineDefaultFonts(*mpEditEngineItemPool, maLinguOptions); SetEditEngineDefaultFonts(*mpEditEngineItemPool, maLinguOptions);
mpEditEngine = new EditEngine( mpEditEngineItemPool ); mpEditEngine.reset( new EditEngine( mpEditEngineItemPool ) );
mpEditEngine->SetAddExtLeading(true); mpEditEngine->SetAddExtLeading(true);
...@@ -639,7 +639,7 @@ SmDocShell::~SmDocShell() ...@@ -639,7 +639,7 @@ SmDocShell::~SmDocShell()
EndListening(*pp->GetConfig()); EndListening(*pp->GetConfig());
mpCursor.reset(); mpCursor.reset();
delete mpEditEngine; mpEditEngine.reset();
SfxItemPool::Free(mpEditEngineItemPool); SfxItemPool::Free(mpEditEngineItemPool);
mpPrinter.disposeAndClear(); mpPrinter.disposeAndClear();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment