summaryrefslogtreecommitdiff
path: root/starmath/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-05-06 11:22:05 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-05-06 18:38:22 +0200
commita7ff945ca031324f060b0d989f7a89594fcfe9fe (patch)
treeee502330c3e52c59aa2a4c5d97b6307c5a6babe5 /starmath/source
parent6668b112b341edd24ca77ba88b834108d67b0602 (diff)
add SfxItemPoolDeleter utility
add use so we can hold the pool with std::unique_ptr Change-Id: I685fbc37c0ae145a5b48a66a88eab9fb29a0fc0b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115174 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'starmath/source')
-rw-r--r--starmath/source/document.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx
index 10fee0c6f39c..5dd69cf62944 100644
--- a/starmath/source/document.cxx
+++ b/starmath/source/document.cxx
@@ -353,12 +353,12 @@ EditEngine& SmDocShell::GetEditEngine()
//! see also SmEditWindow::DataChanged !
//!
- mpEditEngineItemPool = EditEngine::CreatePool();
+ mpEditEngineItemPool.reset( EditEngine::CreatePool() );
const StyleSettings& rStyleSettings = Application::GetDefaultDevice()->GetSettings().GetStyleSettings();
UpdateEditEngineDefaultFonts(rStyleSettings.GetFieldTextColor());
- mpEditEngine.reset( new EditEngine( mpEditEngineItemPool ) );
+ mpEditEngine.reset( new EditEngine( mpEditEngineItemPool.get() ) );
mpEditEngine->SetAddExtLeading(true);
@@ -630,7 +630,6 @@ void SmDocShell::Repaint()
SmDocShell::SmDocShell( SfxModelFlags i_nSfxCreationFlags )
: SfxObjectShell(i_nSfxCreationFlags)
- , mpEditEngineItemPool(nullptr)
, mpPrinter(nullptr)
, mpTmpPrinter(nullptr)
, mnModifyCount(0)
@@ -660,7 +659,7 @@ SmDocShell::~SmDocShell()
mpCursor.reset();
mpEditEngine.reset();
- SfxItemPool::Free(mpEditEngineItemPool);
+ mpEditEngineItemPool.reset();
mpPrinter.disposeAndClear();
}