diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-15 21:48:57 +0200 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-07-16 08:02:56 +0200 |
commit | 8b08529d6506bfcba9b5658429a1cf4f59c5fbcd (patch) | |
tree | 92cbc4e58e46d84d3feb121d1c61ca98a8918f2c /reportdesign/source | |
parent | f4ea1e6095ff751cbecf10061c4eff9934ffd520 (diff) |
use WhichRangesContainer in reportdesign
Change-Id: I8ae7e48a1fd0bd5504d68b04ee0af3b3d51d58cd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118997
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'reportdesign/source')
-rw-r--r-- | reportdesign/source/ui/misc/UITools.cxx | 8 | ||||
-rw-r--r-- | reportdesign/source/ui/report/ReportController.cxx | 16 |
2 files changed, 9 insertions, 15 deletions
diff --git a/reportdesign/source/ui/misc/UITools.cxx b/reportdesign/source/ui/misc/UITools.cxx index a9fc081556fb..115fa2fabf59 100644 --- a/reportdesign/source/ui/misc/UITools.cxx +++ b/reportdesign/source/ui/misc/UITools.cxx @@ -721,11 +721,9 @@ bool openCharDialog( const uno::Reference<report::XReportControlFormat >& _rxRep OSL_ASSERT( pDefaults.size() == SAL_N_ELEMENTS(aItemInfos) ); - static const sal_uInt16 pRanges[] = - { - XATTR_FILL_FIRST, ITEMID_WEIGHT_COMPLEX, - 0 - }; + static const WhichRangesContainer pRanges(svl::Items< + XATTR_FILL_FIRST, ITEMID_WEIGHT_COMPLEX + >::value); 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 diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx index e50c5e20fbdc..c6305dba182b 100644 --- a/reportdesign/source/ui/report/ReportController.cxx +++ b/reportdesign/source/ui/report/ReportController.cxx @@ -2363,12 +2363,10 @@ void OReportController::openPageDialog(const uno::Reference<report::XSection>& _ MeasurementSystem eSystem = SvtSysLocale().GetLocaleData().getMeasurementSystemEnum(); FieldUnit eUserMetric = MeasurementSystem::Metric == eSystem ? FieldUnit::CM : FieldUnit::INCH; - static const sal_uInt16 pRanges[] = - { + static const WhichRangesContainer pRanges(svl::Items< RPTUI_ID_LRSPACE, XATTR_FILL_LAST, - SID_ATTR_METRIC,SID_ATTR_METRIC, - 0 - }; + SID_ATTR_METRIC,SID_ATTR_METRIC + >::value); rtl::Reference<SfxItemPool> pPool( new SfxItemPool("ReportPageProperties", RPTUI_ID_LRSPACE, RPTUI_ID_METRIC, aItemInfos ) ); const Graphic aNullGraphic; @@ -4214,11 +4212,9 @@ void OReportController::openZoomDialog() { new SvxZoomItem() }; - static const sal_uInt16 pRanges[] = - { - SID_ATTR_ZOOM,SID_ATTR_ZOOM, - 0 - }; + static const WhichRangesContainer pRanges(svl::Items< + SID_ATTR_ZOOM,SID_ATTR_ZOOM + >::value); 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 |