summaryrefslogtreecommitdiff
path: root/sd/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-05-07 22:06:14 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-05-08 17:36:54 +0200
commit1545949690c750d7b512000723b564e69cf3c3a6 (patch)
tree1463c8b2912a9e269fe8b7ef3f7326dc85173830 /sd/source
parentc10ce2698a3b001d22db3d33f2f43513cc49ebda (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 'sd/source')
-rw-r--r--sd/source/ui/annotations/annotationmanager.cxx6
-rw-r--r--sd/source/ui/presenter/PresenterTextView.cxx4
2 files changed, 5 insertions, 5 deletions
diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx
index a5892787be85..d1986d4309c1 100644
--- a/sd/source/ui/annotations/annotationmanager.cxx
+++ b/sd/source/ui/annotations/annotationmanager.cxx
@@ -99,8 +99,8 @@ namespace sd {
SfxItemPool* GetAnnotationPool()
{
- static SfxItemPool* s_pAnnotationPool = nullptr;
- if( s_pAnnotationPool == nullptr )
+ static rtl::Reference<SfxItemPool> s_pAnnotationPool;
+ if( !s_pAnnotationPool )
{
s_pAnnotationPool = EditEngine::CreatePool();
s_pAnnotationPool->SetPoolDefaultItem(SvxFontHeightItem(423,100,EE_CHAR_FONTHEIGHT));
@@ -109,7 +109,7 @@ SfxItemPool* GetAnnotationPool()
s_pAnnotationPool->SetPoolDefaultItem(SvxFontItem(aAppFont.GetFamilyType(),aAppFont.GetFamilyName(),"",PITCH_DONTKNOW,RTL_TEXTENCODING_DONTKNOW,EE_CHAR_FONTINFO));
}
- return s_pAnnotationPool;
+ return s_pAnnotationPool.get();
}
static SfxBindings* getBindings( ViewShellBase const & rBase )
diff --git a/sd/source/ui/presenter/PresenterTextView.cxx b/sd/source/ui/presenter/PresenterTextView.cxx
index c55547c150d2..6f3b9f93b97e 100644
--- a/sd/source/ui/presenter/PresenterTextView.cxx
+++ b/sd/source/ui/presenter/PresenterTextView.cxx
@@ -79,7 +79,7 @@ private:
cppcanvas::CanvasSharedPtr mpCanvas;
VclPtr<VirtualDevice> mpOutputDevice;
std::unique_ptr<EditEngine> mpEditEngine;
- std::unique_ptr<SfxItemPool, SfxItemPoolDeleter> mpEditEngineItemPool;
+ rtl::Reference<SfxItemPool> mpEditEngineItemPool;
Size maSize;
OUString msText;
sal_Int32 mnTop;
@@ -279,7 +279,7 @@ PresenterTextView::Implementation::Implementation()
PresenterTextView::Implementation::~Implementation()
{
mpEditEngine.reset();
- mpEditEngineItemPool.reset();
+ mpEditEngineItemPool.clear();
mpOutputDevice.disposeAndClear();
}