diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2021-07-19 11:04:45 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-07-19 16:33:01 +0200 |
commit | b1668edf7fa3ad8c32bcc4d73821770f2df011ca (patch) | |
tree | cb93a00ca59f770e616668af15fdc6a50e1627a1 /reportdesign/source | |
parent | 5b3c530016927d3e91e3124e124f7b428ab285ac (diff) |
Move svl::Items to include/svl/whichranges.hxx, and unify its usage
... in WhichRangesContainer and SfxItemSet ctors. Now it's not needed
to explicitly use 'value' in WhichRangesContainer's ctor, or create an
instance for use in SfxItemSet ctor (svl::Items is already defined as
a template value of corresponding type).
Instead of
WhichRangesContainer Foo(svl::Items<1, 2>::value);
SfxItemSet Bar(rItemPool, svl::Items<1, 2>{});
now use:
WhichRangesContainer Foo(svl::Items<1, 2>);
SfxItemSet Bar(rItemPool, svl::Items<1, 2>);
Change-Id: I4681d952b6442732025e5a26768098878907a238
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119157
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'reportdesign/source')
-rw-r--r-- | reportdesign/source/ui/misc/UITools.cxx | 2 | ||||
-rw-r--r-- | reportdesign/source/ui/report/ReportController.cxx | 4 | ||||
-rw-r--r-- | reportdesign/source/ui/report/ReportSection.cxx | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/reportdesign/source/ui/misc/UITools.cxx b/reportdesign/source/ui/misc/UITools.cxx index 115fa2fabf59..739ee26c6048 100644 --- a/reportdesign/source/ui/misc/UITools.cxx +++ b/reportdesign/source/ui/misc/UITools.cxx @@ -723,7 +723,7 @@ bool openCharDialog( const uno::Reference<report::XReportControlFormat >& _rxRep 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 c6305dba182b..dbc992f33c61 100644 --- a/reportdesign/source/ui/report/ReportController.cxx +++ b/reportdesign/source/ui/report/ReportController.cxx @@ -2366,7 +2366,7 @@ void OReportController::openPageDialog(const uno::Reference<report::XSection>& _ static const WhichRangesContainer pRanges(svl::Items< RPTUI_ID_LRSPACE, XATTR_FILL_LAST, 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,7 +4214,7 @@ void OReportController::openZoomDialog() }; 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 diff --git a/reportdesign/source/ui/report/ReportSection.cxx b/reportdesign/source/ui/report/ReportSection.cxx index e74ba7739fa5..ecc35e0bcbb1 100644 --- a/reportdesign/source/ui/report/ReportSection.cxx +++ b/reportdesign/source/ui/report/ReportSection.cxx @@ -609,7 +609,7 @@ void OReportSection::createDefault(const OUString& _sType,SdrObject* _pObj) SDRATTR_GRAF_FIRST, SDRATTR_CUSTOMSHAPE_LAST, // Range from SdrTextObj: - EE_ITEMS_START, EE_ITEMS_END>{}); + EE_ITEMS_START, EE_ITEMS_END>); aDest.Set( rSource ); _pObj->SetMergedItemSet( aDest ); Degree100 nAngle = pSourceObj->GetRotateAngle(); |