summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
Diffstat (limited to 'starmath')
-rw-r--r--starmath/inc/document.hxx2
-rw-r--r--starmath/source/document.cxx4
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();
}