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 /reportdesign | |
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 'reportdesign')
-rw-r--r-- | reportdesign/source/ui/misc/UITools.cxx | 4 | ||||
-rw-r--r-- | reportdesign/source/ui/report/ReportController.cxx | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/reportdesign/source/ui/misc/UITools.cxx b/reportdesign/source/ui/misc/UITools.cxx index afa270e60664..773e4d24a034 100644 --- a/reportdesign/source/ui/misc/UITools.cxx +++ b/reportdesign/source/ui/misc/UITools.cxx @@ -727,7 +727,7 @@ bool openCharDialog( const uno::Reference<report::XReportControlFormat >& _rxRep 0 }; - std::unique_ptr<SfxItemPool, SfxItemPoolDeleter> pPool(new SfxItemPool("ReportCharProperties", XATTR_FILL_FIRST,ITEMID_WEIGHT_COMPLEX, aItemInfos, &pDefaults)); + rtl::Reference<SfxItemPool> pPool(new SfxItemPool("ReportCharProperties", XATTR_FILL_FIRST,ITEMID_WEIGHT_COMPLEX, aItemInfos, &pDefaults)); // not needed for font height pPool->SetDefaultMetric( MapUnit::Map100thMM ); // ripped, don't understand why pPool->FreezeIdRanges(); // the same bool bSuccess = false; @@ -755,7 +755,7 @@ bool openCharDialog( const uno::Reference<report::XReportControlFormat >& _rxRep DBG_UNHANDLED_EXCEPTION("reportdesign"); } - pPool.reset(); + pPool.clear(); for (SfxPoolItem* pDefault : pDefaults) delete pDefault; diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx index 6b7f10c377af..de4be54c181e 100644 --- a/reportdesign/source/ui/report/ReportController.cxx +++ b/reportdesign/source/ui/report/ReportController.cxx @@ -2369,7 +2369,7 @@ void OReportController::openPageDialog(const uno::Reference<report::XSection>& _ SID_ATTR_METRIC,SID_ATTR_METRIC, 0 }; - std::unique_ptr<SfxItemPool, SfxItemPoolDeleter> pPool( new SfxItemPool("ReportPageProperties", RPTUI_ID_LRSPACE, RPTUI_ID_METRIC, aItemInfos ) ); + rtl::Reference<SfxItemPool> pPool( new SfxItemPool("ReportPageProperties", RPTUI_ID_LRSPACE, RPTUI_ID_METRIC, aItemInfos ) ); const Graphic aNullGraphic; const ::Color aNullLineCol(COL_DEFAULT_SHAPE_STROKE); // #i121448# Use defined default color @@ -2513,7 +2513,7 @@ void OReportController::openPageDialog(const uno::Reference<report::XSection>& _ { DBG_UNHANDLED_EXCEPTION("reportdesign"); } - pPool.reset(); + pPool.clear(); for (SfxPoolItem* pDefault : pDefaults) delete pDefault; @@ -4218,7 +4218,7 @@ void OReportController::openZoomDialog() SID_ATTR_ZOOM,SID_ATTR_ZOOM, 0 }; - std::unique_ptr<SfxItemPool, SfxItemPoolDeleter> pPool( new SfxItemPool("ZoomProperties", SID_ATTR_ZOOM,SID_ATTR_ZOOM, aItemInfos, &pDefaults) ); + rtl::Reference<SfxItemPool> pPool( new SfxItemPool("ZoomProperties", SID_ATTR_ZOOM,SID_ATTR_ZOOM, aItemInfos, &pDefaults) ); pPool->SetDefaultMetric( MapUnit::Map100thMM ); // ripped, don't understand why pPool->FreezeIdRanges(); // the same try @@ -4248,7 +4248,7 @@ void OReportController::openZoomDialog() { DBG_UNHANDLED_EXCEPTION("reportdesign"); } - pPool.reset(); + pPool.clear(); for (SfxPoolItem* pDefault : pDefaults) delete pDefault; |