diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-05-07 22:06:14 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-05-08 17:36:54 +0200 |
commit | 1545949690c750d7b512000723b564e69cf3c3a6 (patch) | |
tree | 1463c8b2912a9e269fe8b7ef3f7326dc85173830 /starmath | |
parent | c10ce2698a3b001d22db3d33f2f43513cc49ebda (diff) |
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 <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'starmath')
-rw-r--r-- | starmath/CppunitTest_starmath_qa_cppunit.mk | 1 | ||||
-rw-r--r-- | starmath/Library_sm.mk | 1 | ||||
-rw-r--r-- | starmath/inc/document.hxx | 2 | ||||
-rw-r--r-- | starmath/source/document.cxx | 4 |
4 files changed, 5 insertions, 3 deletions
diff --git a/starmath/CppunitTest_starmath_qa_cppunit.mk b/starmath/CppunitTest_starmath_qa_cppunit.mk index 6926c34ac0a7..07de25e48a08 100644 --- a/starmath/CppunitTest_starmath_qa_cppunit.mk +++ b/starmath/CppunitTest_starmath_qa_cppunit.mk @@ -32,6 +32,7 @@ $(eval $(call gb_CppunitTest_use_libraries,starmath_qa_cppunit,\ msfilter \ oox \ sal \ + salhelper \ sax \ sfx \ sot \ diff --git a/starmath/Library_sm.mk b/starmath/Library_sm.mk index 0c27c07bc2a4..d5d3657f2120 100644 --- a/starmath/Library_sm.mk +++ b/starmath/Library_sm.mk @@ -48,6 +48,7 @@ $(eval $(call gb_Library_use_libraries,sm,\ msfilter \ oox \ sal \ + salhelper \ sax \ sfx \ sot \ diff --git a/starmath/inc/document.hxx b/starmath/inc/document.hxx index cf52f4497e5b..2c3a9183bf87 100644 --- a/starmath/inc/document.hxx +++ b/starmath/inc/document.hxx @@ -81,7 +81,7 @@ class SM_DLLPUBLIC SmDocShell : public SfxObjectShell, public SfxListener OUString maAccText; SvtLinguOptions maLinguOptions; std::unique_ptr<SmTableNode> mpTree; - std::unique_ptr<SfxItemPool, SfxItemPoolDeleter> mpEditEngineItemPool; + rtl::Reference<SfxItemPool> mpEditEngineItemPool; std::unique_ptr<EditEngine> mpEditEngine; VclPtr<SfxPrinter> mpPrinter; //q.v. comment to SmPrinter Access! VclPtr<Printer> mpTmpPrinter; //ditto diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx index 5dd69cf62944..09078d11f94d 100644 --- a/starmath/source/document.cxx +++ b/starmath/source/document.cxx @@ -353,7 +353,7 @@ EditEngine& SmDocShell::GetEditEngine() //! see also SmEditWindow::DataChanged ! //! - mpEditEngineItemPool.reset( EditEngine::CreatePool() ); + mpEditEngineItemPool = EditEngine::CreatePool(); const StyleSettings& rStyleSettings = Application::GetDefaultDevice()->GetSettings().GetStyleSettings(); UpdateEditEngineDefaultFonts(rStyleSettings.GetFieldTextColor()); @@ -659,7 +659,7 @@ SmDocShell::~SmDocShell() mpCursor.reset(); mpEditEngine.reset(); - mpEditEngineItemPool.reset(); + mpEditEngineItemPool.clear(); mpPrinter.disposeAndClear(); } |