summaryrefslogtreecommitdiff
path: root/reportdesign/source
diff options
context:
space:
mode:
Diffstat (limited to 'reportdesign/source')
-rw-r--r--reportdesign/source/ui/misc/UITools.cxx4
-rw-r--r--reportdesign/source/ui/report/ReportController.cxx8
2 files changed, 6 insertions, 6 deletions
diff --git a/reportdesign/source/ui/misc/UITools.cxx b/reportdesign/source/ui/misc/UITools.cxx
index 1981b229e567..afa270e60664 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
};
- SfxItemPool* pPool( new SfxItemPool("ReportCharProperties", XATTR_FILL_FIRST,ITEMID_WEIGHT_COMPLEX, aItemInfos, &pDefaults) );
+ std::unique_ptr<SfxItemPool, SfxItemPoolDeleter> 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");
}
- SfxItemPool::Free(pPool);
+ pPool.reset();
for (SfxPoolItem* pDefault : pDefaults)
delete pDefault;
diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx
index 475bef77a29f..6b7f10c377af 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
};
- SfxItemPool* pPool( new SfxItemPool("ReportPageProperties", RPTUI_ID_LRSPACE, RPTUI_ID_METRIC, aItemInfos ) );
+ std::unique_ptr<SfxItemPool, SfxItemPoolDeleter> 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");
}
- SfxItemPool::Free(pPool);
+ pPool.reset();
for (SfxPoolItem* pDefault : pDefaults)
delete pDefault;
@@ -4218,7 +4218,7 @@ void OReportController::openZoomDialog()
SID_ATTR_ZOOM,SID_ATTR_ZOOM,
0
};
- SfxItemPool* pPool( new SfxItemPool("ZoomProperties", SID_ATTR_ZOOM,SID_ATTR_ZOOM, aItemInfos, &pDefaults) );
+ std::unique_ptr<SfxItemPool, SfxItemPoolDeleter> 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");
}
- SfxItemPool::Free(pPool);
+ pPool.reset();
for (SfxPoolItem* pDefault : pDefaults)
delete pDefault;