From 1545949690c750d7b512000723b564e69cf3c3a6 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 7 May 2021 22:06:14 +0200 Subject: ref-count SfxItemPool so we can remove SfxItemPoolUser, which is a right performance hog when we have large calc spreadsheets Change-Id: I344002f536f6eead5cf98c6647dd1667fd9c8874 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115247 Tested-by: Noel Grandin Reviewed-by: Noel Grandin --- forms/source/richtext/richtextengine.cxx | 4 ++-- forms/source/richtext/richtextmodel.cxx | 4 ---- 2 files changed, 2 insertions(+), 6 deletions(-) (limited to 'forms') diff --git a/forms/source/richtext/richtextengine.cxx b/forms/source/richtext/richtextengine.cxx index 437c9abee25e..e6fd4848aa4f 100644 --- a/forms/source/richtext/richtextengine.cxx +++ b/forms/source/richtext/richtextengine.cxx @@ -44,10 +44,10 @@ namespace frm { SolarMutexGuard g; - SfxItemPool* pPool = EditEngine::CreatePool(); + rtl::Reference pPool = EditEngine::CreatePool(); pPool->FreezeIdRanges(); - RichTextEngine* pReturn = new RichTextEngine( pPool ); + RichTextEngine* pReturn = new RichTextEngine( pPool.get() ); OutputDevice* pOutputDevice = pReturn->GetRefDevice(); const MapMode& aDeviceMapMode( pOutputDevice->GetMapMode() ); diff --git a/forms/source/richtext/richtextmodel.cxx b/forms/source/richtext/richtextmodel.cxx index 9e33fb2118dd..cd2ce3463e18 100644 --- a/forms/source/richtext/richtextmodel.cxx +++ b/forms/source/richtext/richtextmodel.cxx @@ -209,12 +209,8 @@ namespace frm if (m_pEngine) { SolarMutexGuard g; - SfxItemPool* pPool = m_pEngine->getPool(); m_pEngine.reset(); - SfxItemPool::Free(pPool); } - - } -- cgit