summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--basctl/source/basicide/basdoc.cxx2
-rw-r--r--chart2/source/controller/drawinglayer/DrawViewWrapper.cxx5
-rw-r--r--chart2/source/controller/main/DrawCommandDispatch.cxx6
-rw-r--r--chart2/source/controller/main/ShapeController.cxx5
-rw-r--r--compilerplugins/clang/store/sfxitemsetrewrite.cxx262
-rw-r--r--cui/source/dialogs/cuihyperdlg.cxx8
-rw-r--r--cui/source/dialogs/hltpbase.cxx4
-rw-r--r--cui/source/factory/dlgfact.cxx2
-rw-r--r--cui/source/options/treeopt.cxx29
-rw-r--r--cui/source/tabpages/bbdlg.cxx5
-rw-r--r--cui/source/tabpages/page.cxx10
-rw-r--r--desktop/source/app/app.cxx2
-rw-r--r--editeng/source/editeng/editdoc.cxx4
-rw-r--r--editeng/source/editeng/editobj.cxx4
-rw-r--r--editeng/source/editeng/impedit2.cxx2
-rw-r--r--editeng/source/editeng/impedit4.cxx6
-rw-r--r--editeng/source/items/textitem.cxx2
-rw-r--r--editeng/source/uno/unofdesc.cxx4
-rw-r--r--editeng/source/uno/unoipset.cxx2
-rw-r--r--editeng/source/uno/unotext.cxx2
-rw-r--r--extensions/source/propctrlr/formcomponenthandler.cxx5
-rw-r--r--include/svl/itemset.hxx67
-rw-r--r--reportdesign/source/ui/misc/UITools.cxx2
-rw-r--r--reportdesign/source/ui/report/ReportSection.cxx6
-rw-r--r--sc/qa/unit/ucalc_formula.cxx2
-rw-r--r--sc/source/core/data/docpool.cxx7
-rw-r--r--sc/source/core/data/documen8.cxx5
-rw-r--r--sc/source/core/data/patattr.cxx4
-rw-r--r--sc/source/core/data/stlsheet.cxx7
-rw-r--r--sc/source/core/data/table2.cxx2
-rw-r--r--sc/source/core/tool/detfunc.cxx12
-rw-r--r--sc/source/filter/excel/xehelper.cxx4
-rw-r--r--sc/source/filter/excel/xlroot.cxx2
-rw-r--r--sc/source/filter/starcalc/scflt.cxx5
-rw-r--r--sc/source/ui/app/scmod.cxx7
-rw-r--r--sc/source/ui/docshell/docsh3.cxx5
-rw-r--r--sc/source/ui/drawfunc/drawsh.cxx4
-rw-r--r--sc/source/ui/drawfunc/drawsh5.cxx2
-rw-r--r--sc/source/ui/drawfunc/drtxtob.cxx8
-rw-r--r--sc/source/ui/drawfunc/drtxtob1.cxx5
-rw-r--r--sc/source/ui/drawfunc/drtxtob2.cxx9
-rw-r--r--sc/source/ui/drawfunc/fuconcustomshape.cxx6
-rw-r--r--sc/source/ui/drawfunc/futext.cxx4
-rw-r--r--sc/source/ui/pagedlg/tphf.cxx4
-rw-r--r--sc/source/ui/unoobj/confuno.cxx5
-rw-r--r--sc/source/ui/view/cellsh1.cxx2
-rw-r--r--sc/source/ui/view/cellsh2.cxx2
-rw-r--r--sc/source/ui/view/cellsh3.cxx8
-rw-r--r--sc/source/ui/view/drawview.cxx2
-rw-r--r--sc/source/ui/view/formatsh.cxx12
-rw-r--r--sc/source/ui/view/gridwin2.cxx2
-rw-r--r--sc/source/ui/view/gridwin3.cxx2
-rw-r--r--sc/source/ui/view/pivotsh.cxx2
-rw-r--r--sc/source/ui/view/prevwsh.cxx2
-rw-r--r--sc/source/ui/view/tabvwsh3.cxx2
-rw-r--r--sc/source/ui/view/tabvwshc.cxx12
-rw-r--r--sc/source/ui/view/viewfun2.cxx8
-rw-r--r--sc/source/ui/view/viewfunc.cxx2
-rw-r--r--sd/qa/unit/dialogs-test.cxx10
-rw-r--r--sd/source/core/sdpage.cxx4
-rw-r--r--sd/source/core/sdpage2.cxx2
-rw-r--r--sd/source/core/stlsheet.cxx6
-rw-r--r--sd/source/ui/app/sdmod2.cxx10
-rw-r--r--sd/source/ui/dlg/dlgfield.cxx2
-rw-r--r--sd/source/ui/dlg/prltempl.cxx2
-rw-r--r--sd/source/ui/docshell/docshel4.cxx5
-rw-r--r--sd/source/ui/func/fubullet.cxx2
-rw-r--r--sd/source/ui/func/fuconcs.cxx6
-rw-r--r--sd/source/ui/func/fucopy.cxx6
-rw-r--r--sd/source/ui/func/fuexpand.cxx2
-rw-r--r--sd/source/ui/func/fumorph.cxx2
-rw-r--r--sd/source/ui/func/fuoaprms.cxx2
-rw-r--r--sd/source/ui/func/fuolbull.cxx6
-rw-r--r--sd/source/ui/func/fupage.cxx23
-rw-r--r--sd/source/ui/func/fuparagr.cxx5
-rw-r--r--sd/source/ui/func/fuprlout.cxx2
-rw-r--r--sd/source/ui/func/fuprobjs.cxx2
-rw-r--r--sd/source/ui/func/fuscale.cxx2
-rw-r--r--sd/source/ui/func/fusldlg.cxx2
-rw-r--r--sd/source/ui/func/fusnapln.cxx2
-rw-r--r--sd/source/ui/func/fusumry.cxx2
-rw-r--r--sd/source/ui/func/futext.cxx4
-rw-r--r--sd/source/ui/unoidl/UnoDocumentSettings.cxx5
-rw-r--r--sd/source/ui/unoidl/unopage.cxx4
-rw-r--r--sd/source/ui/unoidl/unopback.cxx10
-rw-r--r--sd/source/ui/view/drtxtob.cxx2
-rw-r--r--sd/source/ui/view/drtxtob1.cxx6
-rw-r--r--sd/source/ui/view/drviews2.cxx14
-rw-r--r--sd/source/ui/view/drviews3.cxx18
-rw-r--r--sd/source/ui/view/drviews4.cxx5
-rw-r--r--sd/source/ui/view/drviews7.cxx4
-rw-r--r--sd/source/ui/view/drviewsf.cxx2
-rw-r--r--sd/source/ui/view/drviewsi.cxx5
-rw-r--r--sd/source/ui/view/outlnvsh.cxx4
-rw-r--r--sd/source/ui/view/sdview.cxx4
-rw-r--r--sd/source/ui/view/sdview3.cxx4
-rw-r--r--sd/source/ui/view/sdview4.cxx2
-rw-r--r--sfx2/source/appl/appserv.cxx4
-rw-r--r--sfx2/source/control/bindings.cxx2
-rw-r--r--sfx2/source/control/shell.cxx4
-rw-r--r--sfx2/source/doc/objserv.cxx5
-rw-r--r--starmath/qa/cppunit/test_starmath.cxx8
-rw-r--r--starmath/source/document.cxx5
-rw-r--r--starmath/source/smmod.cxx5
-rw-r--r--starmath/source/view.cxx2
-rw-r--r--svl/source/items/itemset.cxx140
-rw-r--r--svx/source/dialog/databaseregistrationui.cxx2
-rw-r--r--svx/source/dialog/dlgctl3d.cxx7
-rw-r--r--svx/source/dialog/hdft.cxx28
-rw-r--r--svx/source/dialog/imapwnd.cxx2
-rw-r--r--svx/source/engine3d/float3d.cxx7
-rw-r--r--svx/source/engine3d/view3d1.cxx9
-rw-r--r--svx/source/sdr/properties/attributeproperties.cxx7
-rw-r--r--svx/source/sdr/properties/captionproperties.cxx7
-rw-r--r--svx/source/sdr/properties/circleproperties.cxx7
-rw-r--r--svx/source/sdr/properties/connectorproperties.cxx7
-rw-r--r--svx/source/sdr/properties/customshapeproperties.cxx7
-rw-r--r--svx/source/sdr/properties/defaultproperties.cxx6
-rw-r--r--svx/source/sdr/properties/e3dcompoundproperties.cxx4
-rw-r--r--svx/source/sdr/properties/e3dproperties.cxx7
-rw-r--r--svx/source/sdr/properties/e3dsceneproperties.cxx2
-rw-r--r--svx/source/sdr/properties/graphicproperties.cxx7
-rw-r--r--svx/source/sdr/properties/measureproperties.cxx7
-rw-r--r--svx/source/sdr/properties/textproperties.cxx9
-rw-r--r--svx/source/svdraw/svddrgmt.cxx2
-rw-r--r--svx/source/svdraw/svdedtv1.cxx5
-rw-r--r--svx/source/svdraw/svdedtv2.cxx5
-rw-r--r--svx/source/svdraw/svdfmtf.cxx10
-rw-r--r--svx/source/svdraw/svdibrow.cxx2
-rw-r--r--svx/source/svdraw/svdoashp.cxx10
-rw-r--r--svx/source/svdraw/svdotext.cxx10
-rw-r--r--svx/source/svdraw/svdotxed.cxx2
-rw-r--r--svx/source/svdraw/svdpage.cxx2
-rw-r--r--svx/source/table/cell.cxx16
-rw-r--r--svx/source/table/svdotable.cxx7
-rw-r--r--svx/source/tbxctrls/grafctrl.cxx8
-rw-r--r--svx/source/unodraw/UnoNameItemTable.cxx2
-rw-r--r--svx/source/unodraw/unomtabl.cxx2
-rw-r--r--svx/source/unodraw/unoshape.cxx10
-rw-r--r--svx/source/xoutdev/xattr.cxx8
-rw-r--r--svx/source/xoutdev/xexch.cxx2
-rw-r--r--svx/source/xoutdev/xpool.cxx4
-rw-r--r--sw/qa/core/uwriter.cxx2
-rw-r--r--sw/qa/extras/tiledrendering/tiledrendering.cxx14
-rw-r--r--sw/qa/extras/uiwriter/uiwriter.cxx16
-rw-r--r--sw/qa/extras/ww8export/ww8export.cxx2
-rw-r--r--sw/source/core/access/accpara.cxx30
-rw-r--r--sw/source/core/attr/format.cxx2
-rw-r--r--sw/source/core/attr/swatrset.cxx2
-rw-r--r--sw/source/core/crsr/crstrvl.cxx9
-rw-r--r--sw/source/core/crsr/findattr.cxx4
-rw-r--r--sw/source/core/doc/DocumentContentOperationsManager.cxx25
-rw-r--r--sw/source/core/doc/DocumentDeviceManager.cxx10
-rw-r--r--sw/source/core/doc/DocumentFieldsManager.cxx2
-rw-r--r--sw/source/core/doc/docfly.cxx4
-rw-r--r--sw/source/core/doc/docfmt.cxx12
-rw-r--r--sw/source/core/doc/docnew.cxx2
-rw-r--r--sw/source/core/doc/docsort.cxx4
-rw-r--r--sw/source/core/doc/tblcpy.cxx4
-rw-r--r--sw/source/core/doc/tblrwcl.cxx2
-rw-r--r--sw/source/core/docnode/ndtbl.cxx11
-rw-r--r--sw/source/core/docnode/node.cxx4
-rw-r--r--sw/source/core/draw/dcontact.cxx4
-rw-r--r--sw/source/core/draw/dflyobj.cxx2
-rw-r--r--sw/source/core/edit/acorrect.cxx2
-rw-r--r--sw/source/core/edit/autofmt.cxx10
-rw-r--r--sw/source/core/edit/edfmt.cxx4
-rw-r--r--sw/source/core/edit/edlingu.cxx4
-rw-r--r--sw/source/core/fields/cellfml.cxx2
-rw-r--r--sw/source/core/frmedt/fecopy.cxx4
-rw-r--r--sw/source/core/frmedt/fefly1.cxx2
-rw-r--r--sw/source/core/frmedt/feshview.cxx12
-rw-r--r--sw/source/core/frmedt/fews.cxx2
-rw-r--r--sw/source/core/layout/fly.cxx2
-rw-r--r--sw/source/core/text/redlnitr.cxx2
-rw-r--r--sw/source/core/txtnode/ndtxt.cxx17
-rw-r--r--sw/source/core/txtnode/thints.cxx4
-rw-r--r--sw/source/core/undo/unattr.cxx2
-rw-r--r--sw/source/core/undo/untbl.cxx24
-rw-r--r--sw/source/core/unocore/SwXTextDefaults.cxx2
-rw-r--r--sw/source/core/unocore/unodraw.cxx8
-rw-r--r--sw/source/core/unocore/unoframe.cxx16
-rw-r--r--sw/source/core/unocore/unoobj.cxx16
-rw-r--r--sw/source/core/unocore/unoport.cxx5
-rw-r--r--sw/source/core/unocore/unosect.cxx9
-rw-r--r--sw/source/core/unocore/unostyle.cxx15
-rw-r--r--sw/source/core/unocore/unotbl.cxx43
-rw-r--r--sw/source/filter/ascii/parasc.cxx5
-rw-r--r--sw/source/filter/basflt/fltshell.cxx2
-rw-r--r--sw/source/filter/html/SwAppletImpl.cxx2
-rw-r--r--sw/source/filter/html/css1atr.cxx17
-rw-r--r--sw/source/filter/html/htmlatr.cxx6
-rw-r--r--sw/source/filter/html/htmlctxt.cxx4
-rw-r--r--sw/source/filter/html/htmldrawreader.cxx2
-rw-r--r--sw/source/filter/html/htmlfldw.cxx5
-rw-r--r--sw/source/filter/html/htmlflywriter.cxx4
-rw-r--r--sw/source/filter/html/htmlforw.cxx4
-rw-r--r--sw/source/filter/html/htmlgrin.cxx2
-rw-r--r--sw/source/filter/html/htmlplug.cxx4
-rw-r--r--sw/source/filter/html/htmlsect.cxx6
-rw-r--r--sw/source/filter/html/htmltab.cxx8
-rw-r--r--sw/source/filter/html/swhtml.cxx4
-rw-r--r--sw/source/filter/ww8/wrtw8nds.cxx4
-rw-r--r--sw/source/filter/ww8/wrtw8num.cxx4
-rw-r--r--sw/source/filter/ww8/wrtw8sty.cxx2
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx2
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx9
-rw-r--r--sw/source/filter/ww8/ww8graf.cxx8
-rw-r--r--sw/source/filter/ww8/ww8graf2.cxx8
-rw-r--r--sw/source/filter/ww8/ww8par.cxx2
-rw-r--r--sw/source/filter/ww8/ww8par2.cxx4
-rw-r--r--sw/source/filter/ww8/ww8par3.cxx6
-rw-r--r--sw/source/filter/ww8/ww8par4.cxx4
-rw-r--r--sw/source/filter/ww8/ww8par5.cxx8
-rw-r--r--sw/source/filter/ww8/ww8par6.cxx10
-rw-r--r--sw/source/filter/xml/xmlfmt.cxx2
-rw-r--r--sw/source/filter/xml/xmltexti.cxx20
-rw-r--r--sw/source/ui/chrdlg/drpcps.cxx2
-rw-r--r--sw/source/ui/chrdlg/pardlg.cxx4
-rw-r--r--sw/source/ui/config/optpage.cxx5
-rw-r--r--sw/source/ui/dbui/dbinsdlg.cxx4
-rw-r--r--sw/source/ui/dbui/mmlayoutpage.cxx10
-rw-r--r--sw/source/ui/dialog/ascfldlg.cxx5
-rw-r--r--sw/source/ui/dialog/macassgn.cxx2
-rw-r--r--sw/source/ui/dialog/uiregionsw.cxx5
-rw-r--r--sw/source/ui/fldui/fldedt.cxx5
-rw-r--r--sw/source/ui/fldui/fldtdlg.cxx2
-rw-r--r--sw/source/ui/frmdlg/column.cxx7
-rw-r--r--sw/source/ui/frmdlg/frmdlg.cxx4
-rw-r--r--sw/source/ui/index/swuiidxmrk.cxx2
-rw-r--r--sw/source/ui/misc/docfnote.cxx2
-rw-r--r--sw/source/ui/misc/glossary.cxx2
-rw-r--r--sw/source/ui/misc/insfnote.cxx6
-rw-r--r--sw/source/ui/misc/titlepage.cxx2
-rw-r--r--sw/source/uibase/app/appenv.cxx4
-rw-r--r--sw/source/uibase/app/applab.cxx10
-rw-r--r--sw/source/uibase/app/appopt.cxx8
-rw-r--r--sw/source/uibase/app/docsh2.cxx2
-rw-r--r--sw/source/uibase/app/docstyle.cxx5
-rw-r--r--sw/source/uibase/dialog/regionsw.cxx10
-rw-r--r--sw/source/uibase/dochdl/swdtflvr.cxx20
-rw-r--r--sw/source/uibase/docvw/HeaderFooterWin.cxx4
-rw-r--r--sw/source/uibase/docvw/PageBreakWin.cxx5
-rw-r--r--sw/source/uibase/docvw/PostItMgr.cxx2
-rw-r--r--sw/source/uibase/docvw/edtwin.cxx8
-rw-r--r--sw/source/uibase/fldui/fldmgr.cxx2
-rw-r--r--sw/source/uibase/frmdlg/colex.cxx6
-rw-r--r--sw/source/uibase/frmdlg/frmmgr.cxx2
-rw-r--r--sw/source/uibase/lingu/olmenu.cxx7
-rw-r--r--sw/source/uibase/misc/glshell.cxx5
-rw-r--r--sw/source/uibase/ribbar/concustomshape.cxx6
-rw-r--r--sw/source/uibase/ribbar/conrect.cxx2
-rw-r--r--sw/source/uibase/ribbar/drawbase.cxx2
-rw-r--r--sw/source/uibase/ribbar/inputwin.cxx2
-rw-r--r--sw/source/uibase/shells/annotsh.cxx17
-rw-r--r--sw/source/uibase/shells/basesh.cxx49
-rw-r--r--sw/source/uibase/shells/drawsh.cxx2
-rw-r--r--sw/source/uibase/shells/drwbassh.cxx7
-rw-r--r--sw/source/uibase/shells/drwtxtex.cxx16
-rw-r--r--sw/source/uibase/shells/drwtxtsh.cxx5
-rw-r--r--sw/source/uibase/shells/frmsh.cxx27
-rw-r--r--sw/source/uibase/shells/grfsh.cxx26
-rw-r--r--sw/source/uibase/shells/langhelper.cxx2
-rw-r--r--sw/source/uibase/shells/tabsh.cxx43
-rw-r--r--sw/source/uibase/shells/textfld.cxx2
-rw-r--r--sw/source/uibase/shells/textidx.cxx5
-rw-r--r--sw/source/uibase/shells/textsh.cxx11
-rw-r--r--sw/source/uibase/shells/textsh1.cxx37
-rw-r--r--sw/source/uibase/shells/txtattr.cxx26
-rw-r--r--sw/source/uibase/shells/txtnum.cxx5
-rw-r--r--sw/source/uibase/uiview/formatclipboard.cxx18
-rw-r--r--sw/source/uibase/uiview/pview.cxx4
-rw-r--r--sw/source/uibase/uiview/view0.cxx2
-rw-r--r--sw/source/uibase/uiview/view2.cxx4
-rw-r--r--sw/source/uibase/uiview/viewdraw.cxx4
-rw-r--r--sw/source/uibase/uiview/viewprt.cxx5
-rw-r--r--sw/source/uibase/uiview/viewtab.cxx46
-rw-r--r--sw/source/uibase/uno/unotxdoc.cxx15
-rw-r--r--sw/source/uibase/utlui/glbltree.cxx5
-rw-r--r--sw/source/uibase/utlui/numfmtlb.cxx5
-rw-r--r--sw/source/uibase/utlui/uitool.cxx12
-rw-r--r--sw/source/uibase/wrtsh/delete.cxx2
-rw-r--r--sw/source/uibase/wrtsh/wrtsh1.cxx5
283 files changed, 1225 insertions, 1132 deletions
diff --git a/basctl/source/basicide/basdoc.cxx b/basctl/source/basicide/basdoc.cxx
index 5bfb75ab67a0..8006a0550604 100644
--- a/basctl/source/basicide/basdoc.cxx
+++ b/basctl/source/basicide/basdoc.cxx
@@ -63,7 +63,7 @@ SfxPrinter* DocShell::GetPrinter( bool bCreate )
{
if ( !pPrinter && bCreate )
pPrinter.disposeAndReset(VclPtr<SfxPrinter>::Create(o3tl::make_unique<SfxItemSet>(
- GetPool(), SID_PRINTER_NOTFOUND_WARN, SID_PRINTER_NOTFOUND_WARN
+ GetPool(), svl::Items<SID_PRINTER_NOTFOUND_WARN, SID_PRINTER_NOTFOUND_WARN>{}
)));
return pPrinter.get();
diff --git a/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx b/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx
index c1005f5e0ef3..59cff5f86c18 100644
--- a/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx
+++ b/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx
@@ -284,11 +284,10 @@ SdrOutliner* DrawViewWrapper::getOutliner() const
SfxItemSet DrawViewWrapper::getPositionAndSizeItemSetFromMarkedObject() const
{
SfxItemSet aFullSet( GetModel()->GetItemPool(),
- SID_ATTR_TRANSFORM_POS_X, SID_ATTR_TRANSFORM_ANGLE,
+ svl::Items<SID_ATTR_TRANSFORM_POS_X, SID_ATTR_TRANSFORM_ANGLE,
SID_ATTR_TRANSFORM_PROTECT_POS, SID_ATTR_TRANSFORM_AUTOHEIGHT,
SDRATTR_ECKENRADIUS, SDRATTR_ECKENRADIUS,
- SID_ATTR_METRIC, SID_ATTR_METRIC,
- 0);
+ SID_ATTR_METRIC, SID_ATTR_METRIC>{});
SfxItemSet aGeoSet( E3dView::GetGeoAttrFromMarked() );
aFullSet.Put( aGeoSet );
aFullSet.Put( SfxUInt16Item(SID_ATTR_METRIC,static_cast< sal_uInt16 >( ConfigurationAccess::getFieldUnit())));
diff --git a/chart2/source/controller/main/DrawCommandDispatch.cxx b/chart2/source/controller/main/DrawCommandDispatch.cxx
index 4b06f17c9d26..d9f8cc0b1229 100644
--- a/chart2/source/controller/main/DrawCommandDispatch.cxx
+++ b/chart2/source/controller/main/DrawCommandDispatch.cxx
@@ -137,7 +137,7 @@ void DrawCommandDispatch::setAttributes( SdrObject* pObj )
{
const SfxItemSet& rSource = pSourceObj->GetMergedItemSet();
SfxItemSet aDest( pObj->GetModel()->GetItemPool(), // ranges from SdrAttrObj
- SDRATTR_START, SDRATTR_SHADOW_LAST,
+ svl::Items<SDRATTR_START, SDRATTR_SHADOW_LAST,
SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST,
SDRATTR_TEXTDIRECTION, SDRATTR_TEXTDIRECTION,
// Graphic Attributes
@@ -147,9 +147,7 @@ void DrawCommandDispatch::setAttributes( SdrObject* pObj )
// CustomShape properties
SDRATTR_CUSTOMSHAPE_FIRST, SDRATTR_CUSTOMSHAPE_LAST,
// range from SdrTextObj
- EE_ITEMS_START, EE_ITEMS_END,
- // end
- 0, 0);
+ EE_ITEMS_START, EE_ITEMS_END>{});
aDest.Set( rSource );
pObj->SetMergedItemSet( aDest );
sal_Int32 nAngle = pSourceObj->GetRotateAngle();
diff --git a/chart2/source/controller/main/ShapeController.cxx b/chart2/source/controller/main/ShapeController.cxx
index 1895f2db54d2..c9a34316a727 100644
--- a/chart2/source/controller/main/ShapeController.cxx
+++ b/chart2/source/controller/main/ShapeController.cxx
@@ -564,13 +564,12 @@ void ShapeController::executeDispatch_ParagraphDialog()
pDrawViewWrapper->GetAttributes( aAttr );
SfxItemSet aNewAttr( rPool,
- EE_ITEMS_START, EE_ITEMS_END,
+ svl::Items<EE_ITEMS_START, EE_ITEMS_END,
SID_ATTR_PARA_HYPHENZONE, SID_ATTR_PARA_HYPHENZONE,
SID_ATTR_PARA_PAGEBREAK, SID_ATTR_PARA_PAGEBREAK,
SID_ATTR_PARA_SPLIT, SID_ATTR_PARA_SPLIT,
SID_ATTR_PARA_WIDOWS, SID_ATTR_PARA_WIDOWS,
- SID_ATTR_PARA_ORPHANS, SID_ATTR_PARA_ORPHANS,
- 0 );
+ SID_ATTR_PARA_ORPHANS, SID_ATTR_PARA_ORPHANS>{} );
aNewAttr.Put( aAttr );
aNewAttr.Put( SvxHyphenZoneItem( false, SID_ATTR_PARA_HYPHENZONE ) );
aNewAttr.Put( SvxFormatBreakItem( SvxBreak::NONE, SID_ATTR_PARA_PAGEBREAK ) );
diff --git a/compilerplugins/clang/store/sfxitemsetrewrite.cxx b/compilerplugins/clang/store/sfxitemsetrewrite.cxx
new file mode 100644
index 000000000000..db316f861af2
--- /dev/null
+++ b/compilerplugins/clang/store/sfxitemsetrewrite.cxx
@@ -0,0 +1,262 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "check.hxx"
+#include "plugin.hxx"
+
+namespace {
+
+class Visitor final:
+ public RecursiveASTVisitor<Visitor>, public loplugin::RewritePlugin
+{
+public:
+ explicit Visitor(InstantiationData const & data): RewritePlugin(data) {}
+
+ bool VisitCXXConstructExpr(CXXConstructExpr const * expr) {
+ if (ignoreLocation(expr)) {
+ return true;
+ }
+ auto const ctor = expr->getConstructor();
+ if (!loplugin::DeclCheck(ctor->getParent()).Class("SfxItemSet")
+ .GlobalNamespace())
+ {
+ return true;
+ }
+ auto const numParams = ctor->getNumParams();
+ auto const variadic = ctor->isVariadic();
+ if (!(((numParams == 3 && !variadic) || (numParams == 4 && variadic))
+ && (loplugin::TypeCheck(ctor->getParamDecl(0)->getType())
+ .LvalueReference().Class("SfxItemPool").GlobalNamespace())))
+ {
+ return true;
+ }
+ auto const numArgs = expr->getNumArgs();
+ if (numArgs < 3) {
+ report(
+ DiagnosticsEngine::Warning,
+ ("unexpected SfxItemPool constructor call with less than three"
+ " arguments"),
+ expr->getExprLoc())
+ << expr->getSourceRange();
+ return true;
+ }
+ rewrite(expr, variadic, false, numArgs, expr->getArgs());
+ return true;
+ }
+
+ bool VisitCallExpr(CallExpr const * expr) {
+ if (ignoreLocation(expr)) {
+ return true;
+ }
+ auto const dre = dyn_cast<DeclRefExpr>(
+ expr->getCallee()->IgnoreParenImpCasts());
+ if (dre == nullptr
+ || !(loplugin::DeclCheck(dre->getDecl()).Function("make_unique")
+ .Namespace("o3tl").GlobalNamespace()))
+ {
+ return true;
+ }
+ auto const numTArgs = dre->getNumTemplateArgs();
+ if (numTArgs == 0) {
+ report(
+ DiagnosticsEngine::Warning,
+ "unexpected o3tl::make_unique call without template arguments",
+ expr->getExprLoc())
+ << expr->getSourceRange();
+ return true;
+ }
+ auto const tArg0 = dre->getTemplateArgs()[0].getArgument();
+ if (tArg0.getKind() != TemplateArgument::Type) {
+ report(
+ DiagnosticsEngine::Warning,
+ ("unexpected o3tl::make_unique call with non-type first"
+ " template argument"),
+ expr->getExprLoc())
+ << expr->getSourceRange();
+ return true;
+ }
+ if (!loplugin::TypeCheck(tArg0.getAsType()).Class("SfxItemSet")
+ .GlobalNamespace())
+ {
+ return true;
+ }
+ auto const numArgs = expr->getNumArgs();
+ if (numArgs < 3) {
+ return true;
+ }
+ rewrite(expr, numArgs > 3, true, numArgs, expr->getArgs());
+ return true;
+ }
+
+private:
+ void run() override {
+ if (compiler.getLangOpts().CPlusPlus) {
+ TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
+ }
+ }
+
+ SourceLocation nextToken(SourceLocation loc) {
+ return loc.getLocWithOffset(
+ Lexer::MeasureTokenLength(
+ loc, compiler.getSourceManager(), compiler.getLangOpts()));
+ }
+
+ SourceLocation atMacroExpansionStart(SourceLocation loc) {
+ while (loc.isMacroID()
+ && (compiler.getSourceManager()
+ .isAtStartOfImmediateMacroExpansion(loc, &loc)))
+ {}
+ return loc;
+ }
+
+ SourceLocation atMacroExpansionEnd(SourceLocation loc) {
+ while (compiler.getSourceManager().isMacroBodyExpansion(loc)) {
+ loc = compiler.getSourceManager().getImmediateExpansionRange(loc)
+ .second;
+ }
+ return loc;
+ }
+
+ void rewrite(
+ Expr const * expr, bool variadic, bool forward, unsigned numArgs,
+ Expr const * const * args)
+ {
+ bool constant = true;
+ unsigned firstZero = 0;
+ for (unsigned i = 1; i != numArgs; ++i) {
+ auto const arg = args[i];
+ constant = constant
+ && arg->isCXX11ConstantExpr(compiler.getASTContext());
+ APSInt v;
+ auto const zero
+ = ((arg->EvaluateAsInt(v, compiler.getASTContext())
+ && v == 0)
+ || (variadic && i > 4
+ && arg->isNullPointerConstant(
+ compiler.getASTContext(),
+ Expr::NPC_ValueDependentIsNotNull)));
+ if (variadic) {
+ if (zero) {
+ if (firstZero == 0) {
+ if (i == 1) {
+ report(
+ DiagnosticsEngine::Warning,
+ ("unexpected missing non-zero arguments before"
+ " first zero argument in SfxItemPool"
+ " constructor call"),
+ arg->getExprLoc())
+ << expr->getSourceRange();
+ return;
+ }
+ if (i % 2 == 0) {
+ report(
+ DiagnosticsEngine::Warning,
+ ("unexpected odd number of potentially non-zero"
+ " arguments before first definitely zero"
+ " argument in SfxItemPool constructor call"),
+ arg->getExprLoc())
+ << expr->getSourceRange();
+ return;
+ }
+ firstZero = i;
+ }
+ } else if (firstZero != 0) {
+ report(
+ DiagnosticsEngine::Warning,
+ ("unexpected potentially non-zero argument in"
+ " SfxItemPool constructor call, following zero"
+ " argument"),
+ arg->getExprLoc())
+ << expr->getSourceRange();
+ return;
+ }
+ } else if (zero) {
+ report(
+ DiagnosticsEngine::Warning,
+ "unexpected zero argument in SfxItemPool constructor call",
+ arg->getExprLoc())
+ << expr->getSourceRange();
+ return;
+ }
+ }
+ if (variadic && firstZero == 0) {
+ report(
+ DiagnosticsEngine::Warning,
+ ("unexpected SfxItemPool constructor call with no detectable"
+ " zero arguments"),
+ expr->getExprLoc())
+ << expr->getSourceRange();
+ return;
+ }
+ if (rewriter != nullptr) {
+ if (!insertTextBefore(
+ atMacroExpansionStart(args[1]->getLocStart()),
+ (constant
+ ? StringRef("svl::Items<")
+ : (forward
+ ? StringRef("std::initializer_list<SfxItemSet::Pair>{{")
+ : StringRef("{{")))))
+ {
+ goto failed;
+ }
+ auto const postLoc = atMacroExpansionEnd(
+ args[numArgs - 1]->getLocEnd());
+ auto const postStr = constant ? StringRef(">{}") : StringRef("}}");
+ if (variadic) {
+ //TODO: the replaced range can contain relevant comments:
+ if (!replaceText(
+ SourceRange(
+ nextToken(
+ atMacroExpansionEnd(
+ args[firstZero - 1]->getLocEnd())),
+ postLoc),
+ postStr))
+ {
+ goto failed;
+ }
+ } else {
+ if (!insertTextAfterToken(postLoc, postStr)) {
+ goto failed;
+ }
+ }
+ if (!constant && variadic) {
+ for (unsigned i = 2; i != firstZero - 1; ++i) {
+ auto const arg = args[i];
+ if (!(i % 2 == 0
+ ? insertTextAfterToken(
+ atMacroExpansionEnd(arg->getLocEnd()), "}")
+ : insertTextBefore(
+ atMacroExpansionStart(arg->getLocStart()), "{")))
+ {
+ goto failed;
+ }
+ }
+ }
+ return;
+ }
+ failed: //TODO: undo partial changes
+ report(
+ DiagnosticsEngine::Warning,
+ ("rewrite SfxItemPool constructor call with"
+ " %select{%select{|std::initializer_list<SfxItemSet::Pair>}1"
+ "%{%{..., ...%}, ..., %{..., ...%}%}|svl::Items<...>%{%}}0 around"
+ " the %select{|leading }2%3 WID arguments%select{| and remove the"
+ " remaining %4 zero %plural{1:argument|:arguments}4}2"),
+ expr->getExprLoc())
+ << constant << forward << variadic
+ << (variadic ? firstZero - 1 : numArgs - 1) << (numArgs - firstZero)
+ << expr->getSourceRange();
+ }
+};
+
+static loplugin::Plugin::Registration<Visitor> reg("sfxitemsetrewrite",true);
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/cui/source/dialogs/cuihyperdlg.cxx b/cui/source/dialogs/cuihyperdlg.cxx
index eb8e9515b759..c5bd7a669c99 100644
--- a/cui/source/dialogs/cuihyperdlg.cxx
+++ b/cui/source/dialogs/cuihyperdlg.cxx
@@ -118,8 +118,8 @@ SvxHpLinkDlg::SvxHpLinkDlg (vcl::Window* pParent, SfxBindings* pBindings)
GetCancelButton().SetText ( CuiResId(RID_SVXSTR_HYPDLG_CLOSEBUT) );
// create itemset for tabpages
- mpItemSet = o3tl::make_unique<SfxItemSet>( SfxGetpApp()->GetPool(), SID_HYPERLINK_GETLINK,
- SID_HYPERLINK_SETLINK );
+ mpItemSet = o3tl::make_unique<SfxItemSet>( SfxGetpApp()->GetPool(), svl::Items<SID_HYPERLINK_GETLINK,
+ SID_HYPERLINK_SETLINK>{} );
SvxHyperlinkItem aItem(SID_HYPERLINK_GETLINK);
mpItemSet->Put(aItem);
@@ -191,8 +191,8 @@ bool SvxHpLinkDlg::Close()
void SvxHpLinkDlg::Apply()
{
- SfxItemSet aItemSet( SfxGetpApp()->GetPool(), SID_HYPERLINK_GETLINK,
- SID_HYPERLINK_SETLINK );
+ SfxItemSet aItemSet( SfxGetpApp()->GetPool(), svl::Items<SID_HYPERLINK_GETLINK,
+ SID_HYPERLINK_SETLINK>{} );
SvxHyperlinkTabPageBase* pCurrentPage = static_cast<SvxHyperlinkTabPageBase*>(
GetTabPage( GetCurPageId() ) );
diff --git a/cui/source/dialogs/hltpbase.cxx b/cui/source/dialogs/hltpbase.cxx
index 9c6d5c10f073..2a8fcbbf763b 100644
--- a/cui/source/dialogs/hltpbase.cxx
+++ b/cui/source/dialogs/hltpbase.cxx
@@ -323,8 +323,8 @@ IMPL_LINK_NOARG(SvxHyperlinkTabPageBase, ClickScriptHdl_Impl, Button*, void)
// create empty itemset for macro-dlg
std::unique_ptr<SfxItemSet> pItemSet( new SfxItemSet(SfxGetpApp()->GetPool(),
- SID_ATTR_MACROITEM,
- SID_ATTR_MACROITEM ) );
+ svl::Items<SID_ATTR_MACROITEM,
+ SID_ATTR_MACROITEM>{} ) );
pItemSet->Put ( aItem );
/* disable HyperLinkDlg for input while the MacroAssignDlg is working
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index a6e5d5f68004..4d07d9f9e5f8 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -1285,7 +1285,7 @@ class SvxMacroAssignDialog : public VclAbstractDialog
public:
SvxMacroAssignDialog( vcl::Window* _pParent, const Reference< XFrame >& _rxDocumentFrame, const bool _bUnoDialogMode,
const Reference< XNameReplace >& _rxEvents, const sal_uInt16 _nInitiallySelectedEvent )
- :m_aItems( SfxGetpApp()->GetPool(), SID_ATTR_MACROITEM, SID_ATTR_MACROITEM )
+ :m_aItems( SfxGetpApp()->GetPool(), svl::Items<SID_ATTR_MACROITEM, SID_ATTR_MACROITEM>{} )
{
m_aItems.Put( SfxBoolItem( SID_ATTR_MACROITEM, _bUnoDialogMode ) );
m_pDialog.reset( VclPtr<SvxMacroAssignDlg>::Create( _pParent, _rxDocumentFrame, m_aItems, _rxEvents, _nInitiallySelectedEvent ) );
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index 72721304337b..b82a2a948442 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -1124,14 +1124,13 @@ std::unique_ptr<SfxItemSet> OfaTreeOptionsDialog::CreateItemSet( sal_uInt16 nId
{
pRet = o3tl::make_unique<SfxItemSet>(
SfxGetpApp()->GetPool(),
- SID_ATTR_METRIC, SID_ATTR_SPELL,
+ svl::Items<SID_ATTR_METRIC, SID_ATTR_SPELL,
SID_AUTOSPELL_CHECK, SID_AUTOSPELL_CHECK,
SID_ATTR_QUICKLAUNCHER, SID_ATTR_QUICKLAUNCHER,
SID_ATTR_YEAR2000, SID_ATTR_YEAR2000,
- SID_HTML_MODE, SID_HTML_MODE,
- 0 );
+ SID_HTML_MODE, SID_HTML_MODE>{} );
- SfxItemSet aOptSet( SfxGetpApp()->GetPool(), SID_ATTR_QUICKLAUNCHER, SID_ATTR_QUICKLAUNCHER );
+ SfxItemSet aOptSet( SfxGetpApp()->GetPool(), svl::Items<SID_ATTR_QUICKLAUNCHER, SID_ATTR_QUICKLAUNCHER>{} );
SfxGetpApp()->GetOptions(aOptSet);
pRet->Put(aOptSet);
@@ -1164,11 +1163,10 @@ std::unique_ptr<SfxItemSet> OfaTreeOptionsDialog::CreateItemSet( sal_uInt16 nId
case SID_LANGUAGE_OPTIONS :
{
pRet = o3tl::make_unique<SfxItemSet>(SfxGetpApp()->GetPool(),
- SID_ATTR_LANGUAGE, SID_AUTOSPELL_CHECK,
+ svl::Items<SID_ATTR_LANGUAGE, SID_AUTOSPELL_CHECK,
SID_ATTR_CHAR_CJK_LANGUAGE, SID_ATTR_CHAR_CTL_LANGUAGE,
SID_OPT_LOCALE_CHANGED, SID_OPT_LOCALE_CHANGED,
- SID_SET_DOCUMENT_LANGUAGE, SID_SET_DOCUMENT_LANGUAGE,
- 0 );
+ SID_SET_DOCUMENT_LANGUAGE, SID_SET_DOCUMENT_LANGUAGE>{} );
// for linguistic
@@ -1233,28 +1231,25 @@ std::unique_ptr<SfxItemSet> OfaTreeOptionsDialog::CreateItemSet( sal_uInt16 nId
break;
case SID_INET_DLG :
pRet = o3tl::make_unique<SfxItemSet>( SfxGetpApp()->GetPool(),
- SID_BASIC_ENABLED, SID_BASIC_ENABLED,
+ svl::Items<SID_BASIC_ENABLED, SID_BASIC_ENABLED,
//SID_OPTIONS_START - ..END
SID_SAVEREL_INET, SID_SAVEREL_FSYS,
SID_INET_NOPROXY, SID_INET_FTP_PROXY_PORT,
- SID_SECURE_URL, SID_SECURE_URL,
- 0L );
+ SID_SECURE_URL, SID_SECURE_URL>{} );
SfxGetpApp()->GetOptions(*pRet);
break;
case SID_FILTER_DLG:
pRet = o3tl::make_unique<SfxItemSet>( SfxGetpApp()->GetPool(),
- SID_ATTR_DOCINFO, SID_ATTR_AUTOSAVEMINUTE,
+ svl::Items<SID_ATTR_DOCINFO, SID_ATTR_AUTOSAVEMINUTE,
SID_SAVEREL_INET, SID_SAVEREL_FSYS,
SID_ATTR_PRETTYPRINTING, SID_ATTR_PRETTYPRINTING,
- SID_ATTR_WARNALIENFORMAT, SID_ATTR_WARNALIENFORMAT,
- 0 );
+ SID_ATTR_WARNALIENFORMAT, SID_ATTR_WARNALIENFORMAT>{} );
SfxGetpApp()->GetOptions(*pRet);
break;
case SID_SB_STARBASEOPTIONS:
pRet = o3tl::make_unique<SfxItemSet>( SfxGetpApp()->GetPool(),
- SID_SB_POOLING_ENABLED, SID_SB_DB_REGISTER,
- 0 );
+ svl::Items<SID_SB_POOLING_ENABLED, SID_SB_DB_REGISTER>{} );
::offapp::ConnectionPoolConfig::GetOptions(*pRet);
svx::DbRegisteredNamesConfig::GetOptions(*pRet);
break;
@@ -1262,7 +1257,7 @@ std::unique_ptr<SfxItemSet> OfaTreeOptionsDialog::CreateItemSet( sal_uInt16 nId
case SID_SCH_EDITOPTIONS:
{
SvxChartOptions aChartOpt;
- pRet = o3tl::make_unique<SfxItemSet>( SfxGetpApp()->GetPool(), SID_SCH_EDITOPTIONS, SID_SCH_EDITOPTIONS );
+ pRet = o3tl::make_unique<SfxItemSet>( SfxGetpApp()->GetPool(), svl::Items<SID_SCH_EDITOPTIONS, SID_SCH_EDITOPTIONS>{} );
pRet->Put( SvxChartColorTableItem( SID_SCH_EDITOPTIONS, aChartOpt.GetDefaultColors() ) );
break;
}
@@ -1278,7 +1273,7 @@ void OfaTreeOptionsDialog::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet
{
utl::MiscCfg aMisc;
const SfxPoolItem* pItem = nullptr;
- SfxItemSet aOptSet(SfxGetpApp()->GetPool(), SID_ATTR_QUICKLAUNCHER, SID_ATTR_QUICKLAUNCHER );
+ SfxItemSet aOptSet(SfxGetpApp()->GetPool(), svl::Items<SID_ATTR_QUICKLAUNCHER, SID_ATTR_QUICKLAUNCHER>{} );
aOptSet.Put(rSet);
if(aOptSet.Count())
SfxGetpApp()->SetOptions( aOptSet );
diff --git a/cui/source/tabpages/bbdlg.cxx b/cui/source/tabpages/bbdlg.cxx
index 0cef97d9ce1b..114f7dd28269 100644
--- a/cui/source/tabpages/bbdlg.cxx
+++ b/cui/source/tabpages/bbdlg.cxx
@@ -74,9 +74,8 @@ void SvxBorderBackgroundDlg::PageCreated( sal_uInt16 nPageId, SfxTabPage& rTabPa
{
SfxItemSet aNew(
*GetInputSetImpl()->GetPool(),
- SID_COLOR_TABLE, SID_BITMAP_LIST,
- SID_OFFER_IMPORT, SID_OFFER_IMPORT,
- 0, 0);
+ svl::Items<SID_COLOR_TABLE, SID_BITMAP_LIST,
+ SID_OFFER_IMPORT, SID_OFFER_IMPORT>{});
aNew.Put(*GetInputSetImpl());
diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx
index 16100cc46413..437cdb41a0e5 100644
--- a/cui/source/tabpages/page.cxx
+++ b/cui/source/tabpages/page.cxx
@@ -1155,7 +1155,7 @@ void SvxPageDescPage::ResetBackground_Impl(const SfxItemSet& rSet)
{
// create FillAttributes from SvxBrushItem
const SvxBrushItem& rItem = static_cast< const SvxBrushItem& >(rTmpSet.Get(nWhich));
- SfxItemSet aTempSet(*rTmpSet.GetPool(), XATTR_FILL_FIRST, XATTR_FILL_LAST);
+ SfxItemSet aTempSet(*rTmpSet.GetPool(), svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST>{});
setSvxBrushItemAsFillAttributesToTargetSet(rItem, aTempSet);
aHeaderFillAttributes.reset(new drawinglayer::attribute::SdrAllFillAttributesHelper(aTempSet));
@@ -1199,7 +1199,7 @@ void SvxPageDescPage::ResetBackground_Impl(const SfxItemSet& rSet)
{
// create FillAttributes from SvxBrushItem
const SvxBrushItem& rItem = static_cast< const SvxBrushItem& >(rTmpSet.Get(nWhich));
- SfxItemSet aTempSet(*rTmpSet.GetPool(), XATTR_FILL_FIRST, XATTR_FILL_LAST);
+ SfxItemSet aTempSet(*rTmpSet.GetPool(), svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST>{});
setSvxBrushItemAsFillAttributesToTargetSet(rItem, aTempSet);
aFooterFillAttributes.reset(new drawinglayer::attribute::SdrAllFillAttributesHelper(aTempSet));
@@ -1233,7 +1233,7 @@ void SvxPageDescPage::ResetBackground_Impl(const SfxItemSet& rSet)
{
// create FillAttributes from SvxBrushItem
const SvxBrushItem& rItem = static_cast< const SvxBrushItem& >(*pItem);
- SfxItemSet aTempSet(*rSet.GetPool(), XATTR_FILL_FIRST, XATTR_FILL_LAST);
+ SfxItemSet aTempSet(*rSet.GetPool(), svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST>{});
setSvxBrushItemAsFillAttributesToTargetSet(rItem, aTempSet);
aPageFillAttributes.reset(new drawinglayer::attribute::SdrAllFillAttributesHelper(aTempSet));
@@ -1303,7 +1303,7 @@ void SvxPageDescPage::InitHeadFoot_Impl( const SfxItemSet& rSet )
{
// aBspWin.SetHdColor(rItem.GetColor());
const SvxBrushItem& rItem = static_cast< const SvxBrushItem& >(rHeaderSet.Get(nWhich));
- SfxItemSet aTempSet(*rHeaderSet.GetPool(), XATTR_FILL_FIRST, XATTR_FILL_LAST);
+ SfxItemSet aTempSet(*rHeaderSet.GetPool(), svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST>{});
setSvxBrushItemAsFillAttributesToTargetSet(rItem, aTempSet);
aHeaderFillAttributes.reset(new drawinglayer::attribute::SdrAllFillAttributesHelper(aTempSet));
@@ -1365,7 +1365,7 @@ void SvxPageDescPage::InitHeadFoot_Impl( const SfxItemSet& rSet )
{
// aBspWin.SetFtColor(rItem.GetColor());
const SvxBrushItem& rItem = static_cast<const SvxBrushItem&>(rFooterSet.Get(nWhich));
- SfxItemSet aTempSet(*rFooterSet.GetPool(), XATTR_FILL_FIRST, XATTR_FILL_LAST);
+ SfxItemSet aTempSet(*rFooterSet.GetPool(), svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST>{});
setSvxBrushItemAsFillAttributesToTargetSet(rItem, aTempSet);
aFooterFillAttributes.reset(new drawinglayer::attribute::SdrAllFillAttributesHelper(aTempSet));
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 640c2ec550cc..993f6933d84b 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -289,7 +289,7 @@ bool shouldLaunchQuickstart()
if (!bQuickstart)
{
const SfxPoolItem* pItem=nullptr;
- SfxItemSet aQLSet(SfxGetpApp()->GetPool(), SID_ATTR_QUICKLAUNCHER, SID_ATTR_QUICKLAUNCHER);
+ SfxItemSet aQLSet(SfxGetpApp()->GetPool(), svl::Items<SID_ATTR_QUICKLAUNCHER, SID_ATTR_QUICKLAUNCHER>{});
SfxGetpApp()->GetOptions(aQLSet);
SfxItemState eState = aQLSet.GetItemState(SID_ATTR_QUICKLAUNCHER, false, &pItem);
if (SfxItemState::SET == eState)
diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx
index 67ab2af678b9..28c2641d43c4 100644
--- a/editeng/source/editeng/editdoc.cxx
+++ b/editeng/source/editeng/editdoc.cxx
@@ -1860,7 +1860,7 @@ void ContentNode::dumpAsXml(struct _xmlTextWriter* pWriter) const
ContentAttribs::ContentAttribs( SfxItemPool& rPool )
: pStyle(nullptr)
-, aAttribSet( rPool, EE_PARA_START, EE_CHAR_END )
+, aAttribSet( rPool, svl::Items<EE_PARA_START, EE_CHAR_END>{} )
{
}
@@ -2105,7 +2105,7 @@ void CreateFont( SvxFont& rFont, const SfxItemSet& rSet, bool bSearchInParent, S
void EditDoc::CreateDefFont( bool bUseStyles )
{
- SfxItemSet aTmpSet( GetItemPool(), EE_PARA_START, EE_CHAR_END );
+ SfxItemSet aTmpSet( GetItemPool(), svl::Items<EE_PARA_START, EE_CHAR_END>{} );
CreateFont( aDefFont, aTmpSet );
aDefFont.SetVertical( IsVertical() );
aDefFont.SetOrientation( IsVertical() ? (IsTopToBottom() ? 2700 : 900) : 0 );
diff --git a/editeng/source/editeng/editobj.cxx b/editeng/source/editeng/editobj.cxx
index ed1fdb06136e..8eee9ea854ef 100644
--- a/editeng/source/editeng/editobj.cxx
+++ b/editeng/source/editeng/editobj.cxx
@@ -115,7 +115,7 @@ const XParaPortion& XParaPortionList::operator [](size_t i) const
ContentInfo::ContentInfo( SfxItemPool& rPool ) :
eFamily(SfxStyleFamily::Para),
- aParaAttribs(rPool, EE_PARA_START, EE_CHAR_END)
+ aParaAttribs(rPool, svl::Items<EE_PARA_START, EE_CHAR_END>{})
{
}
@@ -124,7 +124,7 @@ ContentInfo::ContentInfo( const ContentInfo& rCopyFrom, SfxItemPool& rPoolToUse
maText(rCopyFrom.maText),
aStyle(rCopyFrom.aStyle),
eFamily(rCopyFrom.eFamily),
- aParaAttribs(rPoolToUse, EE_PARA_START, EE_CHAR_END)
+ aParaAttribs(rPoolToUse, svl::Items<EE_PARA_START, EE_CHAR_END>{})
{
// this should ensure that the Items end up in the correct Pool!
aParaAttribs.Set( rCopyFrom.GetParaAttribs() );
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index 048f330e18c8..bd56b86f1ae5 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -699,7 +699,7 @@ const SfxItemSet& ImpEditEngine::GetEmptyItemSet()
{
if ( !pEmptyItemSet )
{
- pEmptyItemSet = o3tl::make_unique<SfxItemSet>( aEditDoc.GetItemPool(), EE_ITEMS_START, EE_ITEMS_END );
+ pEmptyItemSet = o3tl::make_unique<SfxItemSet>( aEditDoc.GetItemPool(), svl::Items<EE_ITEMS_START, EE_ITEMS_END>{} );
for ( sal_uInt16 nWhich = EE_ITEMS_START; nWhich <= EE_CHAR_END; nWhich++)
{
pEmptyItemSet->ClearItem( nWhich );
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index 2e2232c08870..b7c33d0e7588 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -2154,7 +2154,7 @@ void ImpEditEngine::ApplyChangedSentence(EditView& rEditView,
if(aCurrentNewPortion->sText != aCurrentOldPortion->sText)
{
//change text and apply language
- SfxItemSet aSet( aEditDoc.GetItemPool(), nLangWhichId, nLangWhichId);
+ SfxItemSet aSet( aEditDoc.GetItemPool(), {{nLangWhichId, nLangWhichId}});
aSet.Put(SvxLanguageItem(aCurrentNewPortion->eLanguage, nLangWhichId));
SetAttribs( *aCurrentOldPosition, aSet );
ImpInsertText( *aCurrentOldPosition, aCurrentNewPortion->sText );
@@ -2162,7 +2162,7 @@ void ImpEditEngine::ApplyChangedSentence(EditView& rEditView,
else if(aCurrentNewPortion->eLanguage != aCurrentOldPortion->eLanguage)
{
//apply language
- SfxItemSet aSet( aEditDoc.GetItemPool(), nLangWhichId, nLangWhichId);
+ SfxItemSet aSet( aEditDoc.GetItemPool(), {{nLangWhichId, nLangWhichId}});
aSet.Put(SvxLanguageItem(aCurrentNewPortion->eLanguage, nLangWhichId));
SetAttribs( *aCurrentOldPosition, aSet );
}
@@ -2199,7 +2199,7 @@ void ImpEditEngine::ApplyChangedSentence(EditView& rEditView,
case SvtScriptType::COMPLEX : nLangWhichId = EE_CHAR_LANGUAGE_CTL; break;
default: break;
}
- SfxItemSet aSet( aEditDoc.GetItemPool(), nLangWhichId, nLangWhichId);
+ SfxItemSet aSet( aEditDoc.GetItemPool(), {{nLangWhichId, nLangWhichId}});
aSet.Put(SvxLanguageItem(aCurrentNewPortion->eLanguage, nLangWhichId));
SetAttribs( aCurrentPaM, aSet );
}
diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx
index c6882ca85ca2..e40a630698d2 100644
--- a/editeng/source/items/textitem.cxx
+++ b/editeng/source/items/textitem.cxx
@@ -3260,7 +3260,7 @@ SfxPoolItem* SvxScriptTypeItem::Clone( SfxItemPool * ) const
SvxScriptSetItem::SvxScriptSetItem( sal_uInt16 nSlotId, SfxItemPool& rPool )
: SfxSetItem( nSlotId, o3tl::make_unique<SfxItemSet>( rPool,
- SID_ATTR_CHAR_FONT, SID_ATTR_CHAR_FONT ))
+ svl::Items<SID_ATTR_CHAR_FONT, SID_ATTR_CHAR_FONT>{} ))
{
sal_uInt16 nLatin, nAsian, nComplex;
GetWhichIds( nLatin, nAsian, nComplex );
diff --git a/editeng/source/uno/unofdesc.cxx b/editeng/source/uno/unofdesc.cxx
index 3d0b90ed3d02..7e136e4ae8c4 100644
--- a/editeng/source/uno/unofdesc.cxx
+++ b/editeng/source/uno/unofdesc.cxx
@@ -190,13 +190,13 @@ void SvxUnoFontDescriptor::setPropertyToDefault( SfxItemSet& rSet )
uno::Any SvxUnoFontDescriptor::getPropertyDefault( SfxItemPool* pPool )
{
- SfxItemSet aSet( *pPool, EE_CHAR_FONTINFO, EE_CHAR_FONTINFO,
+ SfxItemSet aSet( *pPool, svl::Items<EE_CHAR_FONTINFO, EE_CHAR_FONTINFO,
EE_CHAR_FONTHEIGHT, EE_CHAR_FONTHEIGHT,
EE_CHAR_ITALIC, EE_CHAR_ITALIC,
EE_CHAR_UNDERLINE, EE_CHAR_UNDERLINE,
EE_CHAR_WEIGHT, EE_CHAR_WEIGHT,
EE_CHAR_STRIKEOUT, EE_CHAR_STRIKEOUT,
- EE_CHAR_WLM, EE_CHAR_WLM, 0 );
+ EE_CHAR_WLM, EE_CHAR_WLM>{} );
uno::Any aAny;
diff --git a/editeng/source/uno/unoipset.cxx b/editeng/source/uno/unoipset.cxx
index 0eebf97ee0c9..cc2a5c6c1861 100644
--- a/editeng/source/uno/unoipset.cxx
+++ b/editeng/source/uno/unoipset.cxx
@@ -203,7 +203,7 @@ uno::Any SvxItemPropertySet::getPropertyValue( const SfxItemPropertySimpleEntry*
if( eMapUnit == MapUnit::Map100thMM )
nMemberId &= (~CONVERT_TWIPS);
uno::Any aVal;
- SfxItemSet aSet( mrItemPool, pMap->nWID, pMap->nWID);
+ SfxItemSet aSet( mrItemPool, {{pMap->nWID, pMap->nWID}});
if( (pMap->nWID < OWN_ATTR_VALUE_START) || (pMap->nWID > OWN_ATTR_VALUE_END ) )
{
diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx
index 155d93412bac..d3b27a366914 100644
--- a/editeng/source/uno/unotext.cxx
+++ b/editeng/source/uno/unotext.cxx
@@ -1273,7 +1273,7 @@ uno::Any SAL_CALL SvxUnoTextRangeBase::getPropertyDefault( const OUString& aProp
// Get Default from ItemPool
if(SfxItemPool::IsWhich(pMap->nWID))
{
- SfxItemSet aSet( *pPool, pMap->nWID, pMap->nWID);
+ SfxItemSet aSet( *pPool, {{pMap->nWID, pMap->nWID}});
aSet.Put(pPool->GetDefaultItem(pMap->nWID));
return SvxItemPropertySet::getPropertyValue(pMap, aSet, true, false );
}
diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx
index 4537548b8a36..ab4dbe5d3368 100644
--- a/extensions/source/propctrlr/formcomponenthandler.cxx
+++ b/extensions/source/propctrlr/formcomponenthandler.cxx
@@ -2660,9 +2660,8 @@ namespace pcr
{
// create the itemset for the dialog
SfxItemSet aCoreSet(SfxGetpApp()->GetPool(),
- SID_ATTR_NUMBERFORMAT_VALUE, SID_ATTR_NUMBERFORMAT_VALUE,
- SID_ATTR_NUMBERFORMAT_INFO, SID_ATTR_NUMBERFORMAT_INFO,
- 0); // ripped this somewhere ... don't understand it :(
+ svl::Items<SID_ATTR_NUMBERFORMAT_VALUE, SID_ATTR_NUMBERFORMAT_VALUE,
+ SID_ATTR_NUMBERFORMAT_INFO, SID_ATTR_NUMBERFORMAT_INFO>{}); // ripped this somewhere ... don't understand it :(
// get the number formats supplier
Reference< XNumberFormatsSupplier > xSupplier;
diff --git a/include/svl/itemset.hxx b/include/svl/itemset.hxx
index ee3ac3d06366..a1715cc896f5 100644
--- a/include/svl/itemset.hxx
+++ b/include/svl/itemset.hxx
@@ -19,9 +19,14 @@
#ifndef INCLUDED_SVL_ITEMSET_HXX
#define INCLUDED_SVL_ITEMSET_HXX
-#include <svl/svldllapi.h>
+#include <sal/config.h>
+
+#include <cassert>
+#include <cstddef>
+#include <initializer_list>
+#include <type_traits>
-#include <cstdarg>
+#include <svl/svldllapi.h>
#include <svl/poolitem.hxx>
class SfxItemPool;
@@ -30,6 +35,48 @@ class SvStream;
typedef SfxPoolItem const** SfxItemArray;
+namespace svl {
+
+namespace detail {
+
+constexpr bool validRange(sal_uInt16 wid1, sal_uInt16 wid2)
+{ return wid1 != 0 && wid1 <= wid2; }
+
+constexpr bool validGap(sal_uInt16, sal_uInt16)
+{ return true; } //TODO: wid2 > wid1 && wid2 - wid1 > 1
+
+template<sal_uInt16 WID1, sal_uInt16 WID2> constexpr bool validRanges()
+{ return validRange(WID1, WID2); }
+
+template<sal_uInt16 WID1, sal_uInt16 WID2, sal_uInt16 WID3, sal_uInt16... WIDs>
+constexpr bool validRanges() {
+ return validRange(WID1, WID2) && validGap(WID2, WID3)
+ && validRanges<WID3, WIDs...>();
+}
+
+// The calculations in rangeSize and rangesSize cannot overflow, assuming
+// std::size_t is no smaller than sal_uInt16:
+
+constexpr std::size_t rangeSize(sal_uInt16 wid1, sal_uInt16 wid2) {
+#if HAVE_CXX14_CONSTEXPR
+ assert(validRange(wid1, wid2));
+#endif
+ return wid2 - wid1 + 1;
+}
+
+template<sal_uInt16 WID1, sal_uInt16 WID2> constexpr std::size_t rangesSize()
+{ return rangeSize(WID1, WID2); }
+
+template<sal_uInt16 WID1, sal_uInt16 WID2, sal_uInt16 WID3, sal_uInt16... WIDs>
+constexpr std::size_t rangesSize()
+{ return rangeSize(WID1, WID2) + rangesSize<WID3, WIDs...>(); }
+
+}
+
+template<sal_uInt16... WIDs> struct Items {};
+
+}
+
class SAL_WARN_UNUSED SVL_DLLPUBLIC SfxItemSet
{
friend class SfxItemIter;
@@ -45,8 +92,10 @@ friend class SfxAllItemSet;
private:
SVL_DLLPRIVATE void InitRanges_Impl(const sal_uInt16 *nWhichPairTable);
- SVL_DLLPRIVATE void InitRanges_Impl(va_list pWhich, sal_uInt16 n1, sal_uInt16 n2, sal_uInt16 n3);
- SVL_DLLPRIVATE void InitRanges_Impl(sal_uInt16 nWh1, sal_uInt16 nWh2);
+
+ SfxItemSet(
+ SfxItemPool & pool, std::initializer_list<sal_uInt16> wids,
+ std::size_t items);
public:
SfxItemArray GetItems_Impl() const { return m_pItems; }
@@ -61,11 +110,17 @@ protected:
void PutDirect(const SfxPoolItem &rItem);
public:
+ struct Pair { sal_uInt16 wid1, wid2; };
+
SfxItemSet( const SfxItemSet& );
SfxItemSet( SfxItemPool&);
- SfxItemSet( SfxItemPool&, sal_uInt16 nWhich1, sal_uInt16 nWhich2 );
- SfxItemSet( SfxItemPool&, int nWh1, int nWh2, int nNull, ... );
+ template<sal_uInt16... WIDs> SfxItemSet(
+ typename std::enable_if<
+ svl::detail::validRanges<WIDs...>(), SfxItemPool &>::type pool,
+ svl::Items<WIDs...>):
+ SfxItemSet(pool, {WIDs...}, svl::detail::rangesSize<WIDs...>()) {}
+ SfxItemSet( SfxItemPool&, std::initializer_list<Pair> wids );
SfxItemSet( SfxItemPool&, const sal_uInt16* nWhichPairTable );
virtual ~SfxItemSet();
diff --git a/reportdesign/source/ui/misc/UITools.cxx b/reportdesign/source/ui/misc/UITools.cxx
index 7e535aabd2f0..443e23ca2c1f 100644
--- a/reportdesign/source/ui/misc/UITools.cxx
+++ b/reportdesign/source/ui/misc/UITools.cxx
@@ -751,7 +751,7 @@ bool openAreaDialog( const uno::Reference<report::XShape >& _xShape,const uno::R
try
{
SfxItemPool& rItemPool = pModel->GetItemPool();
- ::std::unique_ptr<SfxItemSet> pDescriptor( new SfxItemSet( rItemPool, rItemPool.GetFirstWhich(),rItemPool.GetLastWhich() ) );
+ ::std::unique_ptr<SfxItemSet> pDescriptor( new SfxItemSet( rItemPool, {{rItemPool.GetFirstWhich(),rItemPool.GetLastWhich()}} ) );
lcl_fillShapeToItems(_xShape,*pDescriptor);
{ // want the dialog to be destroyed before our set
diff --git a/reportdesign/source/ui/report/ReportSection.cxx b/reportdesign/source/ui/report/ReportSection.cxx
index 88171c364b60..b84b81973ca7 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)
{
const SfxItemSet& rSource = pSourceObj->GetMergedItemSet();
SfxItemSet aDest( _pObj->GetModel()->GetItemPool(), // ranges from SdrAttrObj
- SDRATTR_START, SDRATTR_SHADOW_LAST,
+ svl::Items<SDRATTR_START, SDRATTR_SHADOW_LAST,
SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST,
SDRATTR_TEXTDIRECTION, SDRATTR_TEXTDIRECTION,
// Graphic Attributes
@@ -619,9 +619,7 @@ void OReportSection::createDefault(const OUString& _sType,SdrObject* _pObj)
// CustomShape properties
SDRATTR_CUSTOMSHAPE_FIRST, SDRATTR_CUSTOMSHAPE_LAST,
// range from SdrTextObj
- EE_ITEMS_START, EE_ITEMS_END,
- // end
- 0, 0);
+ EE_ITEMS_START, EE_ITEMS_END>{});
aDest.Set( rSource );
_pObj->SetMergedItemSet( aDest );
sal_Int32 nAngle = pSourceObj->GetRotateAngle();
diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx
index a438eaeb77e8..6154ed4d9915 100644
--- a/sc/qa/unit/ucalc_formula.cxx
+++ b/sc/qa/unit/ucalc_formula.cxx
@@ -3425,7 +3425,7 @@ void Test::testFormulaRefUpdateValidity()
SfxUInt32Item aItem(ATTR_VALIDDATA, nIndex);
ScPatternAttr aNewAttrs(
- o3tl::make_unique<SfxItemSet>(*m_pDoc->GetPool(), ATTR_PATTERN_START, ATTR_PATTERN_END));
+ o3tl::make_unique<SfxItemSet>(*m_pDoc->GetPool(), svl::Items<ATTR_PATTERN_START, ATTR_PATTERN_END>{}));
aNewAttrs.GetItemSet().Put(aItem);
m_pDoc->ApplyPattern(0, 1, 0, aNewAttrs);
diff --git a/sc/source/core/data/docpool.cxx b/sc/source/core/data/docpool.cxx
index 1e5511642fff..f0845342489a 100644
--- a/sc/source/core/data/docpool.cxx
+++ b/sc/source/core/data/docpool.cxx
@@ -209,14 +209,13 @@ ScDocumentPool::ScDocumentPool()
GetDefaultFonts( aDummy, *pCjkFont, *pCtlFont );
SvxBoxInfoItem* pGlobalBorderInnerAttr = new SvxBoxInfoItem( ATTR_BORDER_INNER );
- auto pSet = o3tl::make_unique<SfxItemSet>( *this, ATTR_PATTERN_START, ATTR_PATTERN_END );
+ auto pSet = o3tl::make_unique<SfxItemSet>( *this, svl::Items<ATTR_PATTERN_START, ATTR_PATTERN_END>{} );
SfxItemSet aSetItemItemSet( *this,
- ATTR_BACKGROUND, ATTR_BACKGROUND,
+ svl::Items<ATTR_BACKGROUND, ATTR_BACKGROUND,
ATTR_BORDER, ATTR_SHADOW,
ATTR_LRSPACE, ATTR_ULSPACE,
ATTR_PAGE_SIZE, ATTR_PAGE_SIZE,
- ATTR_PAGE_ON, ATTR_PAGE_SHARED,
- 0 );
+ ATTR_PAGE_ON, ATTR_PAGE_SHARED>{} );
pGlobalBorderInnerAttr->SetLine(nullptr, SvxBoxInfoItemLine::HORI);
pGlobalBorderInnerAttr->SetLine(nullptr, SvxBoxInfoItemLine::VERT);
diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx
index d01155961a13..1dec3d68cd75 100644
--- a/sc/source/core/data/documen8.cxx
+++ b/sc/source/core/data/documen8.cxx
@@ -120,11 +120,10 @@ SfxPrinter* ScDocument::GetPrinter(bool bCreateIfNotExist)
{
auto pSet =
o3tl::make_unique<SfxItemSet>( *xPoolHelper->GetDocPool(),
- SID_PRINTER_NOTFOUND_WARN, SID_PRINTER_NOTFOUND_WARN,
+ svl::Items<SID_PRINTER_NOTFOUND_WARN, SID_PRINTER_NOTFOUND_WARN,
SID_PRINTER_CHANGESTODOC, SID_PRINTER_CHANGESTODOC,
SID_PRINT_SELECTEDSHEET, SID_PRINT_SELECTEDSHEET,
- SID_SCPRINTOPTIONS, SID_SCPRINTOPTIONS,
- nullptr );
+ SID_SCPRINTOPTIONS, SID_SCPRINTOPTIONS>{} );
::utl::MiscCfg aMisc;
SfxPrinterChangeFlags nFlags = SfxPrinterChangeFlags::NONE;
diff --git a/sc/source/core/data/patattr.cxx b/sc/source/core/data/patattr.cxx
index 0ab7a9c60c0c..cddd652158b3 100644
--- a/sc/source/core/data/patattr.cxx
+++ b/sc/source/core/data/patattr.cxx
@@ -85,7 +85,7 @@ ScPatternAttr::ScPatternAttr( std::unique_ptr<SfxItemSet>&& pItemSet )
}
ScPatternAttr::ScPatternAttr( SfxItemPool* pItemPool )
- : SfxSetItem ( ATTR_PATTERN, o3tl::make_unique<SfxItemSet>( *pItemPool, ATTR_PATTERN_START, ATTR_PATTERN_END ) ),
+ : SfxSetItem ( ATTR_PATTERN, o3tl::make_unique<SfxItemSet>( *pItemPool, svl::Items<ATTR_PATTERN_START, ATTR_PATTERN_END>{} ) ),
pName ( nullptr ),
pStyle ( nullptr ),
mnKey(0)
@@ -161,7 +161,7 @@ SfxPoolItem* ScPatternAttr::Create( SvStream& rStream, sal_uInt16 /* nVersion */
pStr = new OUString( ScGlobal::GetRscString(STR_STYLENAME_STANDARD) );
auto pNewSet = o3tl::make_unique<SfxItemSet>( *GetItemSet().GetPool(),
- ATTR_PATTERN_START, ATTR_PATTERN_END );
+ svl::Items<ATTR_PATTERN_START, ATTR_PATTERN_END>{} );
pNewSet->Load( rStream );
ScPatternAttr* pPattern = new ScPatternAttr( std::move(pNewSet) );
diff --git a/sc/source/core/data/stlsheet.cxx b/sc/source/core/data/stlsheet.cxx
index ae7aed25f171..a04cc9f00309 100644
--- a/sc/source/core/data/stlsheet.cxx
+++ b/sc/source/core/data/stlsheet.cxx
@@ -139,12 +139,11 @@ SfxItemSet& ScStyleSheet::GetItemSet()
SfxItemPool& rItemPool = GetPool().GetPool();
pSet = new SfxItemSet( rItemPool,
- ATTR_BACKGROUND, ATTR_BACKGROUND,
+ svl::Items<ATTR_BACKGROUND, ATTR_BACKGROUND,
ATTR_BORDER, ATTR_SHADOW,
ATTR_LRSPACE, ATTR_PAGE_SCALETO,
ATTR_WRITINGDIR, ATTR_WRITINGDIR,
- ATTR_USERDEF, ATTR_USERDEF,
- 0 );
+ ATTR_USERDEF, ATTR_USERDEF>{} );
// If being loaded also the set is then filled in from the file,
// so the defaults do not need to be set.
@@ -222,7 +221,7 @@ SfxItemSet& ScStyleSheet::GetItemSet()
case SfxStyleFamily::Para:
default:
- pSet = new SfxItemSet( GetPool().GetPool(), ATTR_PATTERN_START, ATTR_PATTERN_END );
+ pSet = new SfxItemSet( GetPool().GetPool(), svl::Items<ATTR_PATTERN_START, ATTR_PATTERN_END>{} );
break;
}
bMySet = true;
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index 4d8ce194b3c9..e63c23c3e2c2 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -479,7 +479,7 @@ void ScTable::DeleteSelection( InsertDeleteFlags nDelFlag, const ScMarkData& rMa
if ( IsProtected() && (nDelFlag & InsertDeleteFlags::ATTRIB) )
{
ScDocumentPool* pPool = pDocument->GetPool();
- SfxItemSet aSet( *pPool, ATTR_PATTERN_START, ATTR_PATTERN_END );
+ SfxItemSet aSet( *pPool, svl::Items<ATTR_PATTERN_START, ATTR_PATTERN_END>{} );
aSet.Put( ScProtectionAttr( false ) );
SfxItemPoolCache aCache( pPool, &aSet );
ApplySelectionCache( &aCache, rMark );
diff --git a/sc/source/core/tool/detfunc.cxx b/sc/source/core/tool/detfunc.cxx
index 9544fb20453c..56c3578088aa 100644
--- a/sc/source/core/tool/detfunc.cxx
+++ b/sc/source/core/tool/detfunc.cxx
@@ -134,11 +134,11 @@ static bool lcl_HasThickLine( SdrObject& rObj )
}
ScDetectiveData::ScDetectiveData( SdrModel* pModel ) :
- aBoxSet( pModel->GetItemPool(), SDRATTR_START, SDRATTR_END ),
- aArrowSet( pModel->GetItemPool(), SDRATTR_START, SDRATTR_END ),
- aToTabSet( pModel->GetItemPool(), SDRATTR_START, SDRATTR_END ),
- aFromTabSet( pModel->GetItemPool(), SDRATTR_START, SDRATTR_END ),
- aCircleSet( pModel->GetItemPool(), SDRATTR_START, SDRATTR_END )
+ aBoxSet( pModel->GetItemPool(), svl::Items<SDRATTR_START, SDRATTR_END>{} ),
+ aArrowSet( pModel->GetItemPool(), svl::Items<SDRATTR_START, SDRATTR_END>{} ),
+ aToTabSet( pModel->GetItemPool(), svl::Items<SDRATTR_START, SDRATTR_END>{} ),
+ aFromTabSet( pModel->GetItemPool(), svl::Items<SDRATTR_START, SDRATTR_END>{} ),
+ aCircleSet( pModel->GetItemPool(), svl::Items<SDRATTR_START, SDRATTR_END>{} )
{
nMaxLevel = 0;
@@ -194,7 +194,7 @@ ScDetectiveData::ScDetectiveData( SdrModel* pModel ) :
}
ScCommentData::ScCommentData( ScDocument& rDoc, SdrModel* pModel ) :
- aCaptionSet( pModel->GetItemPool(), SDRATTR_START, SDRATTR_END, EE_ITEMS_START, EE_ITEMS_END, 0, 0 )
+ aCaptionSet( pModel->GetItemPool(), svl::Items<SDRATTR_START, SDRATTR_END, EE_ITEMS_START, EE_ITEMS_END>{} )
{
basegfx::B2DPolygon aTriangle;
aTriangle.append(basegfx::B2DPoint(10.0, 0.0));
diff --git a/sc/source/filter/excel/xehelper.cxx b/sc/source/filter/excel/xehelper.cxx
index fe01b5c27477..37244ae8ae80 100644
--- a/sc/source/filter/excel/xehelper.cxx
+++ b/sc/source/filter/excel/xehelper.cxx
@@ -424,7 +424,7 @@ XclExpStringRef lclCreateFormattedString(
// font buffer and helper item set for edit engine -> Calc item conversion
XclExpFontBuffer& rFontBuffer = rRoot.GetFontBuffer();
- SfxItemSet aItemSet( *rRoot.GetDoc().GetPool(), ATTR_PATTERN_START, ATTR_PATTERN_END );
+ SfxItemSet aItemSet( *rRoot.GetDoc().GetPool(), svl::Items<ATTR_PATTERN_START, ATTR_PATTERN_END>{} );
// script type handling
Reference< XBreakIterator > xBreakIt = rRoot.GetDoc().GetBreakIterator();
@@ -678,7 +678,7 @@ void XclExpHFConverter::AppendPortion( const EditTextObject* pTextObj, sal_Unico
OUString aText;
sal_Int32 nHeight = 0;
- SfxItemSet aItemSet( *GetDoc().GetPool(), ATTR_PATTERN_START, ATTR_PATTERN_END );
+ SfxItemSet aItemSet( *GetDoc().GetPool(), svl::Items<ATTR_PATTERN_START, ATTR_PATTERN_END>{} );
// edit engine
bool bOldUpdateMode = mrEE.GetUpdateMode();
diff --git a/sc/source/filter/excel/xlroot.cxx b/sc/source/filter/excel/xlroot.cxx
index f2dccf1b4aa7..cd8ea057cab5 100644
--- a/sc/source/filter/excel/xlroot.cxx
+++ b/sc/source/filter/excel/xlroot.cxx
@@ -371,7 +371,7 @@ ScHeaderEditEngine& XclRoot::GetHFEditEngine() const
// set Calc header/footer defaults
SfxItemSet* pEditSet = new SfxItemSet( rEE.GetEmptyItemSet() );
- SfxItemSet aItemSet( *GetDoc().GetPool(), ATTR_PATTERN_START, ATTR_PATTERN_END );
+ SfxItemSet aItemSet( *GetDoc().GetPool(), svl::Items<ATTR_PATTERN_START, ATTR_PATTERN_END>{} );
ScPatternAttr::FillToEditItemSet( *pEditSet, aItemSet );
// FillToEditItemSet() adjusts font height to 1/100th mm, we need twips
std::unique_ptr<SfxPoolItem> pNewItem( aItemSet.Get( ATTR_FONT_HEIGHT ).CloneSetWhich(EE_CHAR_FONTHEIGHT));
diff --git a/sc/source/filter/starcalc/scflt.cxx b/sc/source/filter/starcalc/scflt.cxx
index e2ba310fc3e1..f07075e483a8 100644
--- a/sc/source/filter/starcalc/scflt.cxx
+++ b/sc/source/filter/starcalc/scflt.cxx
@@ -760,12 +760,11 @@ void Sc10PageCollection::PutToDoc( ScDocument* pDoc )
pSet->Put( aHeaderItem );
SfxItemSet aSetItemItemSet( *pDoc->GetPool(),
- ATTR_BACKGROUND, ATTR_BACKGROUND,
+ svl::Items<ATTR_BACKGROUND, ATTR_BACKGROUND,
ATTR_BORDER, ATTR_SHADOW,
ATTR_PAGE_SIZE, ATTR_PAGE_SIZE,
ATTR_LRSPACE, ATTR_ULSPACE,
- ATTR_PAGE_ON, ATTR_PAGE_SHARED,
- 0 );
+ ATTR_PAGE_ON, ATTR_PAGE_SHARED>{} );
nColor = pHeadFootLine->BackColor;
Color aBColor( nColor.Red, nColor.Green, nColor.Blue );
nColor = pHeadFootLine->RasterColor;
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index 8ca88ba3b886..db4637665612 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -405,7 +405,7 @@ void ScModule::Execute( SfxRequest& rReq )
bSet = !GetDocOptions().IsAutoSpell();
}
- SfxItemSet aSet( GetPool(), SID_AUTOSPELL_CHECK, SID_AUTOSPELL_CHECK );
+ SfxItemSet aSet( GetPool(), svl::Items<SID_AUTOSPELL_CHECK, SID_AUTOSPELL_CHECK>{} );
aSet.Put( SfxBoolItem( SID_AUTOSPELL_CHECK, bSet ) );
ModifyOptions( aSet );
rReq.Done();
@@ -1932,7 +1932,7 @@ std::unique_ptr<SfxItemSet> ScModule::CreateItemSet( sal_uInt16 nId )
{
pRet = o3tl::make_unique<SfxItemSet>( GetPool(),
// TP_CALC:
- SID_SCDOCOPTIONS, SID_SCDOCOPTIONS,
+ svl::Items<SID_SCDOCOPTIONS, SID_SCDOCOPTIONS,
// TP_VIEW:
SID_SCVIEWOPTIONS, SID_SCVIEWOPTIONS,
SID_SC_OPT_SYNCZOOM, SID_SC_OPT_SYNCZOOM,
@@ -1955,8 +1955,7 @@ std::unique_ptr<SfxItemSet> ScModule::CreateItemSet( sal_uInt16 nId )
// TP_DEFAULTS
SID_SCDEFAULTSOPTIONS, SID_SCDEFAULTSOPTIONS,
// TP_FORMULA
- SID_SCFORMULAOPTIONS, SID_SCFORMULAOPTIONS,
- 0 );
+ SID_SCFORMULAOPTIONS, SID_SCFORMULAOPTIONS>{} );
const ScAppOptions& rAppOpt = GetAppOptions();
diff --git a/sc/source/ui/docshell/docsh3.cxx b/sc/source/ui/docshell/docsh3.cxx
index 2a6e39bad2f9..25d137b30f53 100644
--- a/sc/source/ui/docshell/docsh3.cxx
+++ b/sc/source/ui/docshell/docsh3.cxx
@@ -645,10 +645,9 @@ void ScDocShell::ExecuteChangeCommentDialog( ScChangeAction* pAction, vcl::Windo
aDate += ScGlobal::pLocaleData->getTime( aDT, false );
SfxItemSet aSet( GetPool(),
- SID_ATTR_POSTIT_AUTHOR, SID_ATTR_POSTIT_AUTHOR,
+ svl::Items<SID_ATTR_POSTIT_AUTHOR, SID_ATTR_POSTIT_AUTHOR,
SID_ATTR_POSTIT_DATE, SID_ATTR_POSTIT_DATE,
- SID_ATTR_POSTIT_TEXT, SID_ATTR_POSTIT_TEXT,
- 0 );
+ SID_ATTR_POSTIT_TEXT, SID_ATTR_POSTIT_TEXT>{} );
aSet.Put( SvxPostItTextItem ( aComment, SID_ATTR_POSTIT_TEXT ) );
aSet.Put( SvxPostItAuthorItem( aAuthor, SID_ATTR_POSTIT_AUTHOR ) );
diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx
index 7d28bfe733f4..670d713774b7 100644
--- a/sc/source/ui/drawfunc/drawsh.cxx
+++ b/sc/source/ui/drawfunc/drawsh.cxx
@@ -122,7 +122,7 @@ void ScDrawShell::ExecDrawAttr( SfxRequest& rReq )
case SID_TEXT_STANDARD: // delete hard text attributes
{
- SfxItemSet aEmptyAttr(GetPool(), EE_ITEMS_START, EE_ITEMS_END);
+ SfxItemSet aEmptyAttr(GetPool(), svl::Items<EE_ITEMS_START, EE_ITEMS_END>{});
pView->SetAttributes(aEmptyAttr, true);
}
break;
@@ -334,7 +334,7 @@ void ScDrawShell::ExecuteMacroAssign( SdrObject* pObj, vcl::Window* pWin )
}
// create empty itemset for macro-dlg
- std::unique_ptr<SfxItemSet> pItemSet(new SfxItemSet(SfxGetpApp()->GetPool(), SID_ATTR_MACROITEM, SID_ATTR_MACROITEM, SID_EVENTCONFIG, SID_EVENTCONFIG, 0 ));
+ std::unique_ptr<SfxItemSet> pItemSet(new SfxItemSet(SfxGetpApp()->GetPool(), svl::Items<SID_ATTR_MACROITEM, SID_ATTR_MACROITEM, SID_EVENTCONFIG, SID_EVENTCONFIG>{} ));
pItemSet->Put ( aItem );
SfxEventNamesItem aNamesItem(SID_EVENTCONFIG);
diff --git a/sc/source/ui/drawfunc/drawsh5.cxx b/sc/source/ui/drawfunc/drawsh5.cxx
index 1b7cb1f9107c..2bd0815df733 100644
--- a/sc/source/ui/drawfunc/drawsh5.cxx
+++ b/sc/source/ui/drawfunc/drawsh5.cxx
@@ -451,7 +451,7 @@ void ScDrawShell::ExecDrawFunc( SfxRequest& rReq )
const SfxBoolItem* pItem = rReq.GetArg<SfxBoolItem>(SID_ENABLE_HYPHENATION);
if( pItem )
{
- SfxItemSet aSet( GetPool(), EE_PARA_HYPHENATE, EE_PARA_HYPHENATE );
+ SfxItemSet aSet( GetPool(), svl::Items<EE_PARA_HYPHENATE, EE_PARA_HYPHENATE>{} );
bool bValue = pItem->GetValue();
aSet.Put( SfxBoolItem( EE_PARA_HYPHENATE, bValue ) );
pView->SetAttributes( aSet );
diff --git a/sc/source/ui/drawfunc/drtxtob.cxx b/sc/source/ui/drawfunc/drtxtob.cxx
index a4b096213b49..92b092f758b0 100644
--- a/sc/source/ui/drawfunc/drtxtob.cxx
+++ b/sc/source/ui/drawfunc/drtxtob.cxx
@@ -801,7 +801,7 @@ void ScDrawTextObjectBar::ExecuteAttr( SfxRequest &rReq )
if ( pOutView )
pOutView->Paint( tools::Rectangle() );
- SfxItemSet aEmptyAttr( *aEditAttr.GetPool(), EE_ITEMS_START, EE_ITEMS_END );
+ SfxItemSet aEmptyAttr( *aEditAttr.GetPool(), svl::Items<EE_ITEMS_START, EE_ITEMS_END>{} );
pView->SetAttributes( aEmptyAttr, true );
if ( pOutView )
@@ -924,7 +924,7 @@ void ScDrawTextObjectBar::ExecuteAttr( SfxRequest &rReq )
sal_uInt16 nId = SID_ATTR_PARA_LRSPACE;
const SvxLRSpaceItem& rItem = static_cast<const SvxLRSpaceItem&>(
pArgs->Get( nId ));
- SfxItemSet aAttr( GetPool(), EE_PARA_LRSPACE, EE_PARA_LRSPACE );
+ SfxItemSet aAttr( GetPool(), svl::Items<EE_PARA_LRSPACE, EE_PARA_LRSPACE>{} );
nId = EE_PARA_LRSPACE;
SvxLRSpaceItem aLRSpaceItem( rItem.GetLeft(),
rItem.GetRight(), rItem.GetTextLeft(),
@@ -936,7 +936,7 @@ void ScDrawTextObjectBar::ExecuteAttr( SfxRequest &rReq )
{
SvxLineSpacingItem aLineSpaceItem = static_cast<const SvxLineSpacingItem&>(pArgs->Get(
GetPool().GetWhich(nSlot)));
- SfxItemSet aAttr( GetPool(), EE_PARA_SBL, EE_PARA_SBL );
+ SfxItemSet aAttr( GetPool(), svl::Items<EE_PARA_SBL, EE_PARA_SBL>{} );
aAttr.Put( aLineSpaceItem );
pView->SetAttributes( aAttr );
}
@@ -944,7 +944,7 @@ void ScDrawTextObjectBar::ExecuteAttr( SfxRequest &rReq )
{
SvxULSpaceItem aULSpaceItem = static_cast<const SvxULSpaceItem&>(pArgs->Get(
GetPool().GetWhich(nSlot)));
- SfxItemSet aAttr( GetPool(), EE_PARA_ULSPACE, EE_PARA_ULSPACE );
+ SfxItemSet aAttr( GetPool(), svl::Items<EE_PARA_ULSPACE, EE_PARA_ULSPACE>{} );
aULSpaceItem.SetWhich(EE_PARA_ULSPACE);
aAttr.Put( aULSpaceItem );
pView->SetAttributes( aAttr );
diff --git a/sc/source/ui/drawfunc/drtxtob1.cxx b/sc/source/ui/drawfunc/drtxtob1.cxx
index c655351c888b..f6c1e339eb6b 100644
--- a/sc/source/ui/drawfunc/drtxtob1.cxx
+++ b/sc/source/ui/drawfunc/drtxtob1.cxx
@@ -72,13 +72,12 @@ bool ScDrawTextObjectBar::ExecuteParaDlg( const SfxItemSet& rArgs,
{
SfxItemPool* pArgPool = rArgs.GetPool();
SfxItemSet aNewAttr( *pArgPool,
- EE_ITEMS_START, EE_ITEMS_END,
+ svl::Items<EE_ITEMS_START, EE_ITEMS_END,
SID_ATTR_PARA_HYPHENZONE, SID_ATTR_PARA_HYPHENZONE,
SID_ATTR_PARA_PAGEBREAK, SID_ATTR_PARA_PAGEBREAK,
SID_ATTR_PARA_SPLIT, SID_ATTR_PARA_SPLIT,
SID_ATTR_PARA_WIDOWS, SID_ATTR_PARA_WIDOWS,
- SID_ATTR_PARA_ORPHANS, SID_ATTR_PARA_ORPHANS,
- 0 );
+ SID_ATTR_PARA_ORPHANS, SID_ATTR_PARA_ORPHANS>{} );
aNewAttr.Put( rArgs );
// Values have been taken over once to show the dialog.
diff --git a/sc/source/ui/drawfunc/drtxtob2.cxx b/sc/source/ui/drawfunc/drtxtob2.cxx
index 8b0fddfbfed6..8783ef9c27ba 100644
--- a/sc/source/ui/drawfunc/drtxtob2.cxx
+++ b/sc/source/ui/drawfunc/drtxtob2.cxx
@@ -91,7 +91,7 @@ void ScDrawTextObjectBar::ExecuteGlobal( SfxRequest &rReq )
case SID_TEXTDIRECTION_LEFT_TO_RIGHT:
case SID_TEXTDIRECTION_TOP_TO_BOTTOM:
{
- SfxItemSet aAttr( pView->GetModel()->GetItemPool(), SDRATTR_TEXTDIRECTION, SDRATTR_TEXTDIRECTION, 0 );
+ SfxItemSet aAttr( pView->GetModel()->GetItemPool(), svl::Items<SDRATTR_TEXTDIRECTION, SDRATTR_TEXTDIRECTION>{} );
aAttr.Put( SvxWritingModeItem(
nSlot == SID_TEXTDIRECTION_LEFT_TO_RIGHT ?
css::text::WritingMode_LR_TB : css::text::WritingMode_TB_RL,
@@ -107,7 +107,7 @@ void ScDrawTextObjectBar::ExecuteGlobal( SfxRequest &rReq )
const SfxBoolItem* pItem = rReq.GetArg<SfxBoolItem>(SID_ENABLE_HYPHENATION);
if( pItem )
{
- SfxItemSet aSet( GetPool(), EE_PARA_HYPHENATE, EE_PARA_HYPHENATE );
+ SfxItemSet aSet( GetPool(), svl::Items<EE_PARA_HYPHENATE, EE_PARA_HYPHENATE>{} );
bool bValue = pItem->GetValue();
aSet.Put( SfxBoolItem( EE_PARA_HYPHENATE, bValue ) );
pView->SetAttributes( aSet );
@@ -163,9 +163,8 @@ void ScDrawTextObjectBar::ExecuteExtra( SfxRequest &rReq )
case SID_ATTR_PARA_RIGHT_TO_LEFT:
{
SfxItemSet aAttr( pView->GetModel()->GetItemPool(),
- EE_PARA_WRITINGDIR, EE_PARA_WRITINGDIR,
- EE_PARA_JUST, EE_PARA_JUST,
- 0 );
+ svl::Items<EE_PARA_WRITINGDIR, EE_PARA_WRITINGDIR,
+ EE_PARA_JUST, EE_PARA_JUST>{} );
bool bLeft = ( nSlot == SID_ATTR_PARA_LEFT_TO_RIGHT );
aAttr.Put( SvxFrameDirectionItem(
bLeft ? SvxFrameDirection::Horizontal_LR_TB : SvxFrameDirection::Horizontal_RL_TB,
diff --git a/sc/source/ui/drawfunc/fuconcustomshape.cxx b/sc/source/ui/drawfunc/fuconcustomshape.cxx
index 54d8470229f6..9cc4cd982c8f 100644
--- a/sc/source/ui/drawfunc/fuconcustomshape.cxx
+++ b/sc/source/ui/drawfunc/fuconcustomshape.cxx
@@ -168,7 +168,7 @@ void FuConstCustomShape::SetAttributes( SdrObject* pObj )
{
const SfxItemSet& rSource = pSourceObj->GetMergedItemSet();
SfxItemSet aDest( pObj->GetModel()->GetItemPool(), // ranges from SdrAttrObj
- SDRATTR_START, SDRATTR_SHADOW_LAST,
+ svl::Items<SDRATTR_START, SDRATTR_SHADOW_LAST,
SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST,
SDRATTR_TEXTDIRECTION, SDRATTR_TEXTDIRECTION,
// Graphic Attributes
@@ -178,9 +178,7 @@ void FuConstCustomShape::SetAttributes( SdrObject* pObj )
// CustomShape properties
SDRATTR_CUSTOMSHAPE_FIRST, SDRATTR_CUSTOMSHAPE_LAST,
// range from SdrTextObj
- EE_ITEMS_START, EE_ITEMS_END,
- // end
- 0, 0);
+ EE_ITEMS_START, EE_ITEMS_END>{});
aDest.Set( rSource );
pObj->SetMergedItemSet( aDest );
sal_Int32 nAngle = pSourceObj->GetRotateAngle();
diff --git a/sc/source/ui/drawfunc/futext.cxx b/sc/source/ui/drawfunc/futext.cxx
index c7d735a32ae0..3062294a8292 100644
--- a/sc/source/ui/drawfunc/futext.cxx
+++ b/sc/source/ui/drawfunc/futext.cxx
@@ -413,7 +413,7 @@ bool FuText::MouseButtonUp(const MouseEvent& rMEvt)
// set needed attributes for scrolling
SfxItemSet aItemSet( pDrDoc->GetItemPool(),
- SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST);
+ svl::Items<SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST>{});
aItemSet.Put( makeSdrTextAutoGrowWidthItem( false ) );
aItemSet.Put( makeSdrTextAutoGrowHeightItem( false ) );
@@ -684,7 +684,7 @@ SdrObject* FuText::CreateDefaultObject(const sal_uInt16 nID, const tools::Rectan
if(bMarquee)
{
- SfxItemSet aSet(pDrDoc->GetItemPool(), SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST);
+ SfxItemSet aSet(pDrDoc->GetItemPool(), svl::Items<SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST>{});
aSet.Put( makeSdrTextAutoGrowWidthItem( false ) );
aSet.Put( makeSdrTextAutoGrowHeightItem( false ) );
diff --git a/sc/source/ui/pagedlg/tphf.cxx b/sc/source/ui/pagedlg/tphf.cxx
index 2a4e385c851c..0c6c0b04a157 100644
--- a/sc/source/ui/pagedlg/tphf.cxx
+++ b/sc/source/ui/pagedlg/tphf.cxx
@@ -44,8 +44,8 @@ ScHFPage::ScHFPage( vcl::Window* pParent, const SfxItemSet& rSet, sal_uInt16 nSe
: SvxHFPage ( pParent, rSet, nSetId ),
aDataSet ( *rSet.GetPool(),
- ATTR_PAGE_HEADERLEFT, ATTR_PAGE_FOOTERRIGHT,
- ATTR_PAGE, ATTR_PAGE, 0 ),
+ svl::Items<ATTR_PAGE_HEADERLEFT, ATTR_PAGE_FOOTERRIGHT,
+ ATTR_PAGE, ATTR_PAGE>{} ),
nPageUsage ( SvxPageUsage::All ),
pStyleDlg ( nullptr )
{
diff --git a/sc/source/ui/unoobj/confuno.cxx b/sc/source/ui/unoobj/confuno.cxx
index 1cbab301bb6d..857b9d1bac4d 100644
--- a/sc/source/ui/unoobj/confuno.cxx
+++ b/sc/source/ui/unoobj/confuno.cxx
@@ -238,11 +238,10 @@ void SAL_CALL ScDocumentConfiguration::setPropertyValue(
SvMemoryStream aStream (aSequence.getArray(), nSize, StreamMode::READ );
aStream.Seek ( STREAM_SEEK_TO_BEGIN );
auto pSet = o3tl::make_unique<SfxItemSet>( *rDoc.GetPool(),
- SID_PRINTER_NOTFOUND_WARN, SID_PRINTER_NOTFOUND_WARN,
+ svl::Items<SID_PRINTER_NOTFOUND_WARN, SID_PRINTER_NOTFOUND_WARN,
SID_PRINTER_CHANGESTODOC, SID_PRINTER_CHANGESTODOC,
SID_PRINT_SELECTEDSHEET, SID_PRINT_SELECTEDSHEET,
- SID_SCPRINTOPTIONS, SID_SCPRINTOPTIONS,
- nullptr );
+ SID_SCPRINTOPTIONS, SID_SCPRINTOPTIONS>{} );
pDocShell->SetPrinter( SfxPrinter::Create( aStream, std::move(pSet) ) );
}
}
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 90700aa3ee5f..ff173fda39fe 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -3036,7 +3036,7 @@ void ScCellShell::ExecuteSubtotals(SfxRequest& rReq)
ScopedVclPtr<SfxAbstractTabDialog> pDlg;
ScSubTotalParam aSubTotalParam;
- SfxItemSet aArgSet( GetPool(), SCITEM_SUBTDATA, SCITEM_SUBTDATA );
+ SfxItemSet aArgSet( GetPool(), svl::Items<SCITEM_SUBTDATA, SCITEM_SUBTDATA>{} );
// Only get existing named database range.
ScDBData* pDBData = pTabViewShell->GetDBData(true, SC_DB_OLD);
diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx
index 3c6eec7a0b20..feeba69dc20a 100644
--- a/sc/source/ui/view/cellsh2.cxx
+++ b/sc/source/ui/view/cellsh2.cxx
@@ -478,7 +478,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
if( lcl_GetSortParam( pData, aSortParam ) )
{
ScDocument* pDoc = GetViewData()->GetDocument();
- SfxItemSet aArgSet( GetPool(), SCITEM_SORTDATA, SCITEM_SORTDATA );
+ SfxItemSet aArgSet( GetPool(), svl::Items<SCITEM_SORTDATA, SCITEM_SORTDATA>{} );
pDBData->GetSortParam( aSortParam );
bool bHasHeader = pDoc->HasColHeader( aSortParam.nCol1, aSortParam.nRow1, aSortParam.nCol2, aSortParam.nRow2, pData->GetTabNo() );
diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx
index 1b3105b87aab..b2be50b1ba05 100644
--- a/sc/source/ui/view/cellsh3.cxx
+++ b/sc/source/ui/view/cellsh3.cxx
@@ -331,13 +331,13 @@ void ScCellShell::Execute( SfxRequest& rReq )
std::unique_ptr<SfxItemSet> pEmptySet(
new SfxItemSet( *pReqArgs->GetPool(),
- ATTR_PATTERN_START,
- ATTR_PATTERN_END ));
+ svl::Items<ATTR_PATTERN_START,
+ ATTR_PATTERN_END>{} ));
std::unique_ptr<SfxItemSet> pNewSet(
new SfxItemSet( *pReqArgs->GetPool(),
- ATTR_PATTERN_START,
- ATTR_PATTERN_END ));
+ svl::Items<ATTR_PATTERN_START,
+ ATTR_PATTERN_END>{} ));
const SfxPoolItem* pAttr = nullptr;
sal_uInt16 nWhich = 0;
diff --git a/sc/source/ui/view/drawview.cxx b/sc/source/ui/view/drawview.cxx
index e8b2e064bd85..23cbe4ddf408 100644
--- a/sc/source/ui/view/drawview.cxx
+++ b/sc/source/ui/view/drawview.cxx
@@ -997,7 +997,7 @@ SdrObject* ScDrawView::ApplyGraphicToObject(
{
AddUndo(new SdrUndoAttrObj(rHitObject));
- SfxItemSet aSet(GetModel()->GetItemPool(), XATTR_FILLSTYLE, XATTR_FILLBITMAP);
+ SfxItemSet aSet(GetModel()->GetItemPool(), svl::Items<XATTR_FILLSTYLE, XATTR_FILLBITMAP>{});
aSet.Put(XFillStyleItem(drawing::FillStyle_BITMAP));
aSet.Put(XFillBitmapItem(OUString(), rGraphic));
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index 7dd4bfb5dd54..6895e17c064b 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -1033,7 +1033,7 @@ void ScFormatShell::ExecuteNumFormat( SfxRequest& rReq )
}
short nType = GetCurrentNumberFormatType();
- SfxItemSet aSet( GetPool(), nSlot, nSlot );
+ SfxItemSet aSet( GetPool(), {{nSlot, nSlot}} );
switch ( nSlot )
{
case SID_NUMBER_TWODEC:
@@ -1239,7 +1239,7 @@ void ScFormatShell::ExecuteNumFormat( SfxRequest& rReq )
const SfxItemSet& rOldSet =
pTabViewShell->GetSelectionPattern()->GetItemSet();
SfxItemPool* pDocPool = GetViewData()->GetDocument()->GetPool();
- SfxItemSet aNewSet( *pDocPool, ATTR_PATTERN_START, ATTR_PATTERN_END );
+ SfxItemSet aNewSet( *pDocPool, svl::Items<ATTR_PATTERN_START, ATTR_PATTERN_END>{} );
aNewSet.Put( *pItem );
pTabViewShell->ApplyAttributes( &aNewSet, &rOldSet );
}
@@ -1873,13 +1873,13 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq )
std::unique_ptr<SfxItemSet> pOldSet(
new SfxItemSet(
*(pDoc->GetPool()),
- ATTR_PATTERN_START,
- ATTR_PATTERN_END ));
+ svl::Items<ATTR_PATTERN_START,
+ ATTR_PATTERN_END>{} ));
std::unique_ptr<SfxItemSet> pNewSet(
new SfxItemSet(
*(pDoc->GetPool()),
- ATTR_PATTERN_START,
- ATTR_PATTERN_END ));
+ svl::Items<ATTR_PATTERN_START,
+ ATTR_PATTERN_END>{} ));
const SfxPoolItem& rBorderAttr =
pOldAttrs->GetItemSet().
Get( ATTR_BORDER );
diff --git a/sc/source/ui/view/gridwin2.cxx b/sc/source/ui/view/gridwin2.cxx
index 46f6ed82e251..7688dd25b9a2 100644
--- a/sc/source/ui/view/gridwin2.cxx
+++ b/sc/source/ui/view/gridwin2.cxx
@@ -199,7 +199,7 @@ void ScGridWindow::DoPushPivotButton( SCCOL nCol, SCROW nRow, const MouseEvent&
}
SfxItemSet aArgSet( pViewData->GetViewShell()->GetPool(),
- SCITEM_QUERYDATA, SCITEM_QUERYDATA );
+ svl::Items<SCITEM_QUERYDATA, SCITEM_QUERYDATA>{} );
aArgSet.Put( ScQueryItem( SCITEM_QUERYDATA, pViewData, &aQueryParam ) );
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
diff --git a/sc/source/ui/view/gridwin3.cxx b/sc/source/ui/view/gridwin3.cxx
index 3383f18d0720..fb6aba1ee455 100644
--- a/sc/source/ui/view/gridwin3.cxx
+++ b/sc/source/ui/view/gridwin3.cxx
@@ -332,7 +332,7 @@ void ScGridWindow::UpdateStatusPosSize()
if (!pPV)
return; // shouldn't be called in that case either
- SfxItemSet aSet(pViewData->GetViewShell()->GetPool(), SID_ATTR_POSITION, SID_ATTR_SIZE);
+ SfxItemSet aSet(pViewData->GetViewShell()->GetPool(), svl::Items<SID_ATTR_POSITION, SID_ATTR_SIZE>{});
// Fill items for position and size:
// show action rectangle during action,
diff --git a/sc/source/ui/view/pivotsh.cxx b/sc/source/ui/view/pivotsh.cxx
index 2c96d3e62a5a..185000c9c866 100644
--- a/sc/source/ui/view/pivotsh.cxx
+++ b/sc/source/ui/view/pivotsh.cxx
@@ -100,7 +100,7 @@ void ScPivotShell::Execute( SfxRequest& rReq )
ScViewData& rViewData = pViewShell->GetViewData();
SfxItemSet aArgSet( pViewShell->GetPool(),
- SCITEM_QUERYDATA, SCITEM_QUERYDATA );
+ svl::Items<SCITEM_QUERYDATA, SCITEM_QUERYDATA>{} );
aArgSet.Put( ScQueryItem( SCITEM_QUERYDATA, &rViewData, &aQueryParam ) );
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx
index 3bd8aed1684f..6d86d188e7fb 100644
--- a/sc/source/ui/view/prevwsh.cxx
+++ b/sc/source/ui/view/prevwsh.cxx
@@ -627,7 +627,7 @@ void ScPreviewShell::Execute( SfxRequest& rReq )
}
else
{
- SfxItemSet aSet ( GetPool(), SID_ATTR_ZOOM, SID_ATTR_ZOOM );
+ SfxItemSet aSet ( GetPool(), svl::Items<SID_ATTR_ZOOM, SID_ATTR_ZOOM>{} );
SvxZoomItem aZoomItem( SvxZoomType::PERCENT, pPreview->GetZoom(), SID_ATTR_ZOOM );
aSet.Put( aZoomItem );
diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx
index d6d11f18c79e..559aa45506bc 100644
--- a/sc/source/ui/view/tabvwsh3.cxx
+++ b/sc/source/ui/view/tabvwsh3.cxx
@@ -706,7 +706,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
}
else
{
- SfxItemSet aSet ( GetPool(), SID_ATTR_ZOOM, SID_ATTR_ZOOM );
+ SfxItemSet aSet ( GetPool(), svl::Items<SID_ATTR_ZOOM, SID_ATTR_ZOOM>{} );
SvxZoomItem aZoomItem( eOldZoomType, nOldZoom, SID_ATTR_ZOOM );
ScopedVclPtr<AbstractSvxZoomDialog> pDlg;
ScMarkData& rMark = GetViewData().GetMarkData();
diff --git a/sc/source/ui/view/tabvwshc.cxx b/sc/source/ui/view/tabvwshc.cxx
index 7cbcaed65b9b..53ad7ede5038 100644
--- a/sc/source/ui/view/tabvwshc.cxx
+++ b/sc/source/ui/view/tabvwshc.cxx
@@ -203,8 +203,8 @@ VclPtr<SfxModelessDialog> ScTabViewShell::CreateRefDialog(
case SID_OPENDLG_CONSOLIDATE:
{
SfxItemSet aArgSet( GetPool(),
- SCITEM_CONSOLIDATEDATA,
- SCITEM_CONSOLIDATEDATA );
+ svl::Items<SCITEM_CONSOLIDATEDATA,
+ SCITEM_CONSOLIDATEDATA>{} );
const ScConsolidateParam* pDlgData =
pDoc->GetConsolidateDlgData();
@@ -254,8 +254,8 @@ VclPtr<SfxModelessDialog> ScTabViewShell::CreateRefDialog(
{
ScQueryParam aQueryParam;
SfxItemSet aArgSet( GetPool(),
- SCITEM_QUERYDATA,
- SCITEM_QUERYDATA );
+ svl::Items<SCITEM_QUERYDATA,
+ SCITEM_QUERYDATA>{} );
ScDBData* pDBData = GetDBData(false, SC_DB_MAKE, ScGetDBSelection::RowDown);
pDBData->ExtendDataArea(pDoc);
@@ -284,8 +284,8 @@ VclPtr<SfxModelessDialog> ScTabViewShell::CreateRefDialog(
ScQueryParam aQueryParam;
SfxItemSet aArgSet( GetPool(),
- SCITEM_QUERYDATA,
- SCITEM_QUERYDATA );
+ svl::Items<SCITEM_QUERYDATA,
+ SCITEM_QUERYDATA>{} );
ScDBData* pDBData = GetDBData(false, SC_DB_MAKE, ScGetDBSelection::RowDown);
pDBData->ExtendDataArea(pDoc);
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index dec005d3561a..36e22d64ab24 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -3126,12 +3126,12 @@ void ScViewFunc::SetSelectionFrameLines( const SvxBorderLine* pLine,
{
std::unique_ptr<SfxItemSet> pOldSet(new SfxItemSet(
*(pDoc->GetPool()),
- ATTR_PATTERN_START,
- ATTR_PATTERN_END ));
+ svl::Items<ATTR_PATTERN_START,
+ ATTR_PATTERN_END>{} ));
std::unique_ptr<SfxItemSet> pNewSet(new SfxItemSet(
*(pDoc->GetPool()),
- ATTR_PATTERN_START,
- ATTR_PATTERN_END ));
+ svl::Items<ATTR_PATTERN_START,
+ ATTR_PATTERN_END>{} ));
SvxBorderLine aLine;
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index db6edf9d6112..6e09d4b6291b 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -981,7 +981,7 @@ void ScViewFunc::ApplyAttr( const SfxPoolItem& rAttrItem )
}
ScPatternAttr aNewAttrs( o3tl::make_unique<SfxItemSet>( *GetViewData().GetDocument()->GetPool(),
- ATTR_PATTERN_START, ATTR_PATTERN_END ) );
+ svl::Items<ATTR_PATTERN_START, ATTR_PATTERN_END>{} ) );
aNewAttrs.GetItemSet().Put( rAttrItem );
// if justify is set (with Buttons), always indentation 0
diff --git a/sd/qa/unit/dialogs-test.cxx b/sd/qa/unit/dialogs-test.cxx
index 2a7642b2a813..3901d7e2ce86 100644
--- a/sd/qa/unit/dialogs-test.cxx
+++ b/sd/qa/unit/dialogs-test.cxx
@@ -222,7 +222,7 @@ const SfxItemSet& SdDialogsTest::getEmptyFillStyleSfxItemSet()
{
SdDrawDocument* pDrawDoc = getSdXImpressDocument()->GetDoc();
CPPUNIT_ASSERT(pDrawDoc);
- mpEmptyFillStyleSfxItemSet.reset( new SfxItemSet(pDrawDoc->GetItemPool(), XATTR_FILL_FIRST, XATTR_FILL_LAST) );
+ mpEmptyFillStyleSfxItemSet.reset( new SfxItemSet(pDrawDoc->GetItemPool(), svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST>{}) );
CPPUNIT_ASSERT(mpEmptyFillStyleSfxItemSet);
mpEmptyFillStyleSfxItemSet->Put(XFillStyleItem(drawing::FillStyle_NONE));
}
@@ -350,7 +350,7 @@ VclPtr<VclAbstractDialog> SdDialogsTest::createDialogByID(sal_uInt32 nID)
// CreateSdSnapLineDlg(const SfxItemSet& rInAttrs, ::sd::View* pView) override;
SdDrawDocument* pDrawDoc = getSdXImpressDocument()->GetDoc();
CPPUNIT_ASSERT(pDrawDoc);
- SfxItemSet aNewAttr(pDrawDoc->GetItemPool(), ATTR_SNAPLINE_START, ATTR_SNAPLINE_END);
+ SfxItemSet aNewAttr(pDrawDoc->GetItemPool(), svl::Items<ATTR_SNAPLINE_START, ATTR_SNAPLINE_END>{});
aNewAttr.Put(SfxInt32Item(ATTR_SNAPLINE_X, 0));
aNewAttr.Put(SfxInt32Item(ATTR_SNAPLINE_Y, 0));
pRetval = getSdAbstractDialogFactory()->CreateSdSnapLineDlg(
@@ -364,7 +364,7 @@ VclPtr<VclAbstractDialog> SdDialogsTest::createDialogByID(sal_uInt32 nID)
// CreateSdInsertLayerDlg(const SfxItemSet& rInAttrs, bool bDeletable, const OUString& aStr) override;
SdDrawDocument* pDrawDoc = getSdXImpressDocument()->GetDoc();
CPPUNIT_ASSERT(pDrawDoc);
- SfxItemSet aNewAttr(pDrawDoc->GetItemPool(), ATTR_LAYER_START, ATTR_LAYER_END);
+ SfxItemSet aNewAttr(pDrawDoc->GetItemPool(), svl::Items<ATTR_LAYER_START, ATTR_LAYER_END>{});
const OUString aLayerName = SdResId(STR_LAYER); // + OUString::number(2);
aNewAttr.Put(makeSdAttrLayerName(aLayerName));
aNewAttr.Put(makeSdAttrLayerTitle());
@@ -432,7 +432,7 @@ VclPtr<VclAbstractDialog> SdDialogsTest::createDialogByID(sal_uInt32 nID)
const std::vector<OUString> aPageNames;
SdDrawDocument* pDrawDoc = getSdXImpressDocument()->GetDoc();
CPPUNIT_ASSERT(pDrawDoc);
- SfxItemSet aDlgSet(pDrawDoc->GetItemPool(), ATTR_PRESENT_START, ATTR_PRESENT_END);
+ SfxItemSet aDlgSet(pDrawDoc->GetItemPool(), svl::Items<ATTR_PRESENT_START, ATTR_PRESENT_END>{});
::sd::PresentationSettings& rPresentationSettings = pDrawDoc->getPresentationSettings();
aDlgSet.Put(SfxBoolItem(ATTR_PRESENT_ALL, rPresentationSettings.mbAll));
aDlgSet.Put(SfxBoolItem(ATTR_PRESENT_CUSTOMSHOW, rPresentationSettings.mbCustomShow));
@@ -513,7 +513,7 @@ VclPtr<VclAbstractDialog> SdDialogsTest::createDialogByID(sal_uInt32 nID)
// CreatSdActionDialog(const SfxItemSet* pAttr, ::sd::View* pView) override;
SdDrawDocument* pDrawDoc = getSdXImpressDocument()->GetDoc();
CPPUNIT_ASSERT(pDrawDoc);
- SfxItemSet aSet(pDrawDoc->GetItemPool(), ATTR_ANIMATION_START, ATTR_ACTION_END);
+ SfxItemSet aSet(pDrawDoc->GetItemPool(), svl::Items<ATTR_ANIMATION_START, ATTR_ACTION_END>{});
aSet.Put(SfxBoolItem(ATTR_ANIMATION_ACTIVE, false));
aSet.Put(SfxAllEnumItem(ATTR_ANIMATION_EFFECT, sal_uInt16(presentation::AnimationEffect_NONE)));
aSet.Put(SfxAllEnumItem(ATTR_ANIMATION_TEXTEFFECT, sal_uInt16(presentation::AnimationEffect_NONE)));
diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index dd4f403344a2..2594a895bedd 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -2156,7 +2156,7 @@ SdrObject* convertPresentationObjectImpl(SdPage& rPage, SdrObject* pSourceObj, P
}
// Remove LRSpace item
- SfxItemSet aSet(pModel->GetPool(), EE_PARA_LRSPACE, EE_PARA_LRSPACE );
+ SfxItemSet aSet(pModel->GetPool(), svl::Items<EE_PARA_LRSPACE, EE_PARA_LRSPACE>{} );
aSet.Put(pNewObj->GetMergedItemSet());
@@ -2194,7 +2194,7 @@ SdrObject* convertPresentationObjectImpl(SdPage& rPage, SdrObject* pSourceObj, P
pNewObj->SetEmptyPresObj(false);
// reset left indent
- SfxItemSet aSet(pModel->GetPool(), EE_PARA_LRSPACE, EE_PARA_LRSPACE );
+ SfxItemSet aSet(pModel->GetPool(), svl::Items<EE_PARA_LRSPACE, EE_PARA_LRSPACE>{} );
aSet.Put(pNewObj->GetMergedItemSet());
diff --git a/sd/source/core/sdpage2.cxx b/sd/source/core/sdpage2.cxx
index c8c5b946776c..bf66a0b57338 100644
--- a/sd/source/core/sdpage2.cxx
+++ b/sd/source/core/sdpage2.cxx
@@ -479,7 +479,7 @@ SfxStyleSheet* SdPage::GetTextStyleSheetForObject( SdrObject* pObj ) const
SfxItemSet* SdPage::getOrCreateItems()
{
if( mpItems == nullptr )
- mpItems = o3tl::make_unique<SfxItemSet>( pModel->GetItemPool(), SDRATTR_XMLATTRIBUTES, SDRATTR_XMLATTRIBUTES );
+ mpItems = o3tl::make_unique<SfxItemSet>( pModel->GetItemPool(), svl::Items<SDRATTR_XMLATTRIBUTES, SDRATTR_XMLATTRIBUTES>{} );
return mpItems.get();
}
diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx
index 74fe9937bde8..5fabb740dbd2 100644
--- a/sd/source/core/stlsheet.cxx
+++ b/sd/source/core/stlsheet.cxx
@@ -1006,7 +1006,7 @@ void SAL_CALL SdStyleSheet::setPropertyValue( const OUString& aPropertyName, con
throw IllegalArgumentException();
}
- SfxItemSet aSet( GetPool().GetPool(), pEntry->nWID, pEntry->nWID);
+ SfxItemSet aSet( GetPool().GetPool(), {{pEntry->nWID, pEntry->nWID}});
aSet.Put( rStyleSet );
if( !aSet.Count() )
@@ -1113,7 +1113,7 @@ Any SAL_CALL SdStyleSheet::getPropertyValue( const OUString& PropertyName )
}
else
{
- SfxItemSet aSet( GetPool().GetPool(), pEntry->nWID, pEntry->nWID);
+ SfxItemSet aSet( GetPool().GetPool(), {{pEntry->nWID, pEntry->nWID}});
const SfxPoolItem* pItem;
SfxItemSet& rStyleSet = GetItemSet();
@@ -1301,7 +1301,7 @@ Any SAL_CALL SdStyleSheet::getPropertyDefault( const OUString& aPropertyName )
else
{
SfxItemPool& rMyPool = GetPool().GetPool();
- SfxItemSet aSet( rMyPool, pEntry->nWID, pEntry->nWID);
+ SfxItemSet aSet( rMyPool, {{pEntry->nWID, pEntry->nWID}});
aSet.Put( rMyPool.GetDefaultItem( pEntry->nWID ) );
aRet = SvxItemPropertySet_getPropertyValue( pEntry, aSet );
}
diff --git a/sd/source/ui/app/sdmod2.cxx b/sd/source/ui/app/sdmod2.cxx
index 2ddb26a7ee84..2bcf6455ea31 100644
--- a/sd/source/ui/app/sdmod2.cxx
+++ b/sd/source/ui/app/sdmod2.cxx
@@ -442,7 +442,7 @@ std::unique_ptr<SfxItemSet> SdModule::CreateItemSet( sal_uInt16 nSlot )
rPool.SetDefaultMetric( MapUnit::Map100thMM );
auto pRet = o3tl::make_unique<SfxItemSet>( rPool,
- SID_ATTR_METRIC, SID_ATTR_METRIC,
+ svl::Items<SID_ATTR_METRIC, SID_ATTR_METRIC,
SID_ATTR_DEFTABSTOP, SID_ATTR_DEFTABSTOP,
ATTR_OPTIONS_LAYOUT, ATTR_OPTIONS_LAYOUT,
@@ -455,8 +455,7 @@ std::unique_ptr<SfxItemSet> SdModule::CreateItemSet( sal_uInt16 nSlot )
ATTR_OPTIONS_PRINT, ATTR_OPTIONS_PRINT,
- SID_ATTR_GRID_OPTIONS, SID_ATTR_GRID_OPTIONS,
- 0 );
+ SID_ATTR_GRID_OPTIONS, SID_ATTR_GRID_OPTIONS>{} );
// TP_OPTIONS_LAYOUT:
pRet->Put( SdOptionsLayoutItem( pOptions, pFrameView ) );
@@ -628,10 +627,9 @@ void SdModule::ApplyItemSet( sal_uInt16 nSlot, const SfxItemSet& rSet )
}
SfxItemSet aPrintSet( GetPool(),
- SID_PRINTER_NOTFOUND_WARN, SID_PRINTER_NOTFOUND_WARN,
+ svl::Items<SID_PRINTER_NOTFOUND_WARN, SID_PRINTER_NOTFOUND_WARN,
SID_PRINTER_CHANGESTODOC, SID_PRINTER_CHANGESTODOC,
- ATTR_OPTIONS_PRINT, ATTR_OPTIONS_PRINT,
- 0 );
+ ATTR_OPTIONS_PRINT, ATTR_OPTIONS_PRINT>{} );
// Print
const SdOptionsPrintItem* pPrintItem = nullptr;
diff --git a/sd/source/ui/dlg/dlgfield.cxx b/sd/source/ui/dlg/dlgfield.cxx
index 6270815d8ff0..047d2fab0b4a 100644
--- a/sd/source/ui/dlg/dlgfield.cxx
+++ b/sd/source/ui/dlg/dlgfield.cxx
@@ -319,7 +319,7 @@ IMPL_LINK_NOARG(SdModifyFieldDlg, LanguageChangeHdl, ListBox&, void)
SfxItemSet SdModifyFieldDlg::GetItemSet()
{
- SfxItemSet aOutput( *maInputSet.GetPool(), EE_CHAR_LANGUAGE, EE_CHAR_LANGUAGE_CTL );
+ SfxItemSet aOutput( *maInputSet.GetPool(), svl::Items<EE_CHAR_LANGUAGE, EE_CHAR_LANGUAGE_CTL>{} );
if( m_pLbLanguage->IsValueChangedFromSaved() )
{
diff --git a/sd/source/ui/dlg/prltempl.cxx b/sd/source/ui/dlg/prltempl.cxx
index 0f5e3db0c55b..dbd14ef2161d 100644
--- a/sd/source/ui/dlg/prltempl.cxx
+++ b/sd/source/ui/dlg/prltempl.cxx
@@ -60,7 +60,7 @@ SdPresLayoutTemplateDlg::SdPresLayoutTemplateDlg( SfxObjectShell* pDocSh,
, "modules/sdraw/ui/drawprtldialog.ui"),
mpDocShell ( pDocSh ),
ePO ( _ePO ),
- aInputSet ( *rStyleBase.GetItemSet().GetPool(), SID_PARAM_NUM_PRESET, SID_PARAM_CUR_NUM_LEVEL ),
+ aInputSet ( *rStyleBase.GetItemSet().GetPool(), svl::Items<SID_PARAM_NUM_PRESET, SID_PARAM_CUR_NUM_LEVEL>{} ),
pOutSet ( nullptr ),
pOrgSet ( &rStyleBase.GetItemSet() )
{
diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx
index 3f680f6871f2..cb562673ef43 100644
--- a/sd/source/ui/docshell/docshel4.cxx
+++ b/sd/source/ui/docshell/docshel4.cxx
@@ -100,10 +100,9 @@ SfxPrinter* DrawDocShell::GetPrinter(bool bCreate)
{
// create ItemSet with special pool area
auto pSet = o3tl::make_unique<SfxItemSet>( GetPool(),
- SID_PRINTER_NOTFOUND_WARN, SID_PRINTER_NOTFOUND_WARN,
+ svl::Items<SID_PRINTER_NOTFOUND_WARN, SID_PRINTER_NOTFOUND_WARN,
SID_PRINTER_CHANGESTODOC, SID_PRINTER_CHANGESTODOC,
- ATTR_OPTIONS_PRINT, ATTR_OPTIONS_PRINT,
- 0 );
+ ATTR_OPTIONS_PRINT, ATTR_OPTIONS_PRINT>{} );
// set PrintOptionsSet
SdOptionsPrintItem aPrintItem( SD_MOD()->GetSdOptions(mpDoc->GetDocumentType()) );
SfxFlagItem aFlagItem( SID_PRINTER_CHANGESTODOC );
diff --git a/sd/source/ui/func/fubullet.cxx b/sd/source/ui/func/fubullet.cxx
index 82f43477691c..1ef5ac6276ad 100644
--- a/sd/source/ui/func/fubullet.cxx
+++ b/sd/source/ui/func/fubullet.cxx
@@ -252,7 +252,7 @@ void FuBullet::InsertSpecialCharacter( SfxRequest& rReq )
empty string). */
pOV->InsertText( "" );
- SfxItemSet aOldSet( mpDoc->GetPool(), EE_CHAR_FONTINFO, EE_CHAR_FONTINFO, 0 );
+ SfxItemSet aOldSet( mpDoc->GetPool(), svl::Items<EE_CHAR_FONTINFO, EE_CHAR_FONTINFO>{} );
aOldSet.Put( pOV->GetAttribs() );
::svl::IUndoManager& rUndoMgr = pOL->GetUndoManager();
diff --git a/sd/source/ui/func/fuconcs.cxx b/sd/source/ui/func/fuconcs.cxx
index ef7a9e9402b9..9536a691d1de 100644
--- a/sd/source/ui/func/fuconcs.cxx
+++ b/sd/source/ui/func/fuconcs.cxx
@@ -191,7 +191,7 @@ void FuConstructCustomShape::SetAttributes( SdrObject* pObj )
{
const SfxItemSet& rSource = pSourceObj->GetMergedItemSet();
SfxItemSet aDest( pObj->GetModel()->GetItemPool(), // ranges from SdrAttrObj
- SDRATTR_START, SDRATTR_SHADOW_LAST,
+ svl::Items<SDRATTR_START, SDRATTR_SHADOW_LAST,
SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST,
SDRATTR_TEXTDIRECTION, SDRATTR_TEXTDIRECTION,
// Graphic Attributes
@@ -201,9 +201,7 @@ void FuConstructCustomShape::SetAttributes( SdrObject* pObj )
// CustomShape properties
SDRATTR_CUSTOMSHAPE_FIRST, SDRATTR_CUSTOMSHAPE_LAST,
// range from SdrTextObj
- EE_ITEMS_START, EE_ITEMS_END,
- // end
- 0, 0);
+ EE_ITEMS_START, EE_ITEMS_END>{});
aDest.Set( rSource );
pObj->SetMergedItemSet( aDest );
sal_Int32 nAngle = pSourceObj->GetRotateAngle();
diff --git a/sd/source/ui/func/fucopy.cxx b/sd/source/ui/func/fucopy.cxx
index 41ce0571c81a..505521b48ccb 100644
--- a/sd/source/ui/func/fucopy.cxx
+++ b/sd/source/ui/func/fucopy.cxx
@@ -77,7 +77,7 @@ void FuCopy::DoExecute( SfxRequest& rReq )
if( !pArgs )
{
SfxItemSet aSet( mpViewShell->GetPool(),
- ATTR_COPY_START, ATTR_COPY_END, 0 );
+ svl::Items<ATTR_COPY_START, ATTR_COPY_END>{} );
// indicate color attribute
SfxItemSet aAttr( mpDoc->GetPool() );
@@ -210,7 +210,7 @@ void FuCopy::DoExecute( SfxRequest& rReq )
if( ( 1 == i ) && bColor )
{
- SfxItemSet aNewSet( mpViewShell->GetPool(), XATTR_FILLSTYLE, XATTR_FILLCOLOR, 0L );
+ SfxItemSet aNewSet( mpViewShell->GetPool(), svl::Items<XATTR_FILLSTYLE, XATTR_FILLCOLOR>{} );
aNewSet.Put( XFillStyleItem( drawing::FillStyle_SOLID ) );
aNewSet.Put( XFillColorItem( OUString(), aStartColor ) );
mpView->SetAttributes( aNewSet );
@@ -272,7 +272,7 @@ void FuCopy::DoExecute( SfxRequest& rReq )
sal_uInt8 nGreen = aStartColor.GetGreen() + (sal_uInt8) ( ( (long) aEndColor.GetGreen() - (long) aStartColor.GetGreen() ) * (long) i / (long) nNumber );
sal_uInt8 nBlue = aStartColor.GetBlue() + (sal_uInt8) ( ( (long) aEndColor.GetBlue() - (long) aStartColor.GetBlue() ) * (long) i / (long) nNumber );
Color aNewColor( nRed, nGreen, nBlue );
- SfxItemSet aNewSet( mpViewShell->GetPool(), XATTR_FILLSTYLE, XATTR_FILLCOLOR, 0L );
+ SfxItemSet aNewSet( mpViewShell->GetPool(), svl::Items<XATTR_FILLSTYLE, XATTR_FILLCOLOR>{} );
aNewSet.Put( XFillStyleItem( drawing::FillStyle_SOLID ) );
aNewSet.Put( XFillColorItem( OUString(), aNewColor ) );
mpView->SetAttributes( aNewSet );
diff --git a/sd/source/ui/func/fuexpand.cxx b/sd/source/ui/func/fuexpand.cxx
index a7b3dbcbb419..a6f73a44bb66 100644
--- a/sd/source/ui/func/fuexpand.cxx
+++ b/sd/source/ui/func/fuexpand.cxx
@@ -116,7 +116,7 @@ void FuExpandPage::DoExecute( SfxRequest& )
pOutl->SetText(*pParaObj);
// remove hard paragraph- and character attributes
- SfxItemSet aEmptyEEAttr(mpDoc->GetPool(), EE_ITEMS_START, EE_ITEMS_END);
+ SfxItemSet aEmptyEEAttr(mpDoc->GetPool(), svl::Items<EE_ITEMS_START, EE_ITEMS_END>{});
sal_Int32 nParaCount1 = pOutl->GetParagraphCount();
for (sal_Int32 nPara = 0; nPara < nParaCount1; nPara++)
diff --git a/sd/source/ui/func/fumorph.cxx b/sd/source/ui/func/fumorph.cxx
index 84484652aab6..39a11f7da83c 100644
--- a/sd/source/ui/func/fumorph.cxx
+++ b/sd/source/ui/func/fumorph.cxx
@@ -343,7 +343,7 @@ void FuMorph::ImpInsertPolygons(
long nEndLineWidth = 0;
SdrPageView* pPageView = mpView->GetSdrPageView();
SfxItemPool & rPool = pObj1->GetObjectItemPool();
- SfxItemSet aSet1( rPool,SDRATTR_START,SDRATTR_NOTPERSIST_FIRST-1,EE_ITEMS_START,EE_ITEMS_END,0 );
+ SfxItemSet aSet1( rPool,svl::Items<SDRATTR_START,SDRATTR_NOTPERSIST_FIRST-1,EE_ITEMS_START,EE_ITEMS_END>{} );
SfxItemSet aSet2( aSet1 );
bool bLineColor = false;
bool bFillColor = false;
diff --git a/sd/source/ui/func/fuoaprms.cxx b/sd/source/ui/func/fuoaprms.cxx
index a58efa46b682..7ad003aa4b68 100644
--- a/sd/source/ui/func/fuoaprms.cxx
+++ b/sd/source/ui/func/fuoaprms.cxx
@@ -339,7 +339,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq )
if(!pArgs)
{
// fill ItemSet for dialog
- SfxItemSet aSet(mpDoc->GetPool(), ATTR_ANIMATION_START, ATTR_ACTION_END);
+ SfxItemSet aSet(mpDoc->GetPool(), svl::Items<ATTR_ANIMATION_START, ATTR_ACTION_END>{});
// fill the set
if (nAnimationSet == ATTR_SET)
diff --git a/sd/source/ui/func/fuolbull.cxx b/sd/source/ui/func/fuolbull.cxx
index c15d2948573b..a9b36dcd63c3 100644
--- a/sd/source/ui/func/fuolbull.cxx
+++ b/sd/source/ui/func/fuolbull.cxx
@@ -77,7 +77,7 @@ void FuOutlineBullet::DoExecute( SfxRequest& rReq )
mpView->GetAttributes( aEditAttr );
SfxItemSet aNewAttr( mpViewShell->GetPool(),
- EE_ITEMS_START, EE_ITEMS_END );
+ svl::Items<EE_ITEMS_START, EE_ITEMS_END>{} );
aNewAttr.Put( aEditAttr, false );
// create and execute dialog
@@ -150,7 +150,7 @@ void FuOutlineBullet::SetCurrentBulletsNumbering(SfxRequest& rReq)
return;
}
- SfxItemSet aNewAttr( mpViewShell->GetPool(), EE_ITEMS_START, EE_ITEMS_END );
+ SfxItemSet aNewAttr( mpViewShell->GetPool(), svl::Items<EE_ITEMS_START, EE_ITEMS_END>{} );
{
SfxItemSet aEditAttr( mpDoc->GetPool() );
mpView->GetAttributes( aEditAttr );
@@ -270,7 +270,7 @@ void FuOutlineBullet::SetCurrentBulletsNumbering(SfxRequest& rReq)
if (bInMasterView && pNumRule)
{
- SfxItemSet aSetAttr( mpViewShell->GetPool(), EE_ITEMS_START, EE_ITEMS_END );
+ SfxItemSet aSetAttr( mpViewShell->GetPool(), svl::Items<EE_ITEMS_START, EE_ITEMS_END>{} );
aSetAttr.Put(SvxNumBulletItem( *pNumRule, nNumItemId ));
mpView->SetAttributes(aSetAttr);
}
diff --git a/sd/source/ui/func/fupage.cxx b/sd/source/ui/func/fupage.cxx
index 77ad9e4a990c..024afcc41ac4 100644
--- a/sd/source/ui/func/fupage.cxx
+++ b/sd/source/ui/func/fupage.cxx
@@ -212,15 +212,14 @@ const SfxItemSet* FuPage::ExecuteDialog( vcl::Window* pParent )
PageKind ePageKind = mpDrawViewShell->GetPageKind();
SfxItemSet aNewAttr(mpDoc->GetPool(),
- mpDoc->GetPool().GetWhich(SID_ATTR_LRSPACE),
- mpDoc->GetPool().GetWhich(SID_ATTR_ULSPACE),
- SID_ATTR_PAGE, SID_ATTR_PAGE_SHARED,
- SID_ATTR_BORDER_OUTER, SID_ATTR_BORDER_OUTER,
- SID_ATTR_BORDER_SHADOW, SID_ATTR_BORDER_SHADOW,
- XATTR_FILL_FIRST, XATTR_FILL_LAST,
- SID_ATTR_PAGE_COLOR,SID_ATTR_PAGE_FILLSTYLE,
- EE_PARA_WRITINGDIR, EE_PARA_WRITINGDIR,
- 0);
+ {{mpDoc->GetPool().GetWhich(SID_ATTR_LRSPACE),
+ mpDoc->GetPool().GetWhich(SID_ATTR_ULSPACE)},
+ {SID_ATTR_PAGE, SID_ATTR_PAGE_SHARED},
+ {SID_ATTR_BORDER_OUTER, SID_ATTR_BORDER_OUTER},
+ {SID_ATTR_BORDER_SHADOW, SID_ATTR_BORDER_SHADOW},
+ {XATTR_FILL_FIRST, XATTR_FILL_LAST},
+ {SID_ATTR_PAGE_COLOR,SID_ATTR_PAGE_FILLSTYLE},
+ {EE_PARA_WRITINGDIR, EE_PARA_WRITINGDIR}});
// Retrieve additional data for dialog
@@ -279,7 +278,7 @@ const SfxItemSet* FuPage::ExecuteDialog( vcl::Window* pParent )
p2 = pPtr[3];
pPtr += 2;
}
- SfxItemSet aMergedAttr( *aNewAttr.GetPool(), p1, p2 );
+ SfxItemSet aMergedAttr( *aNewAttr.GetPool(), {{p1, p2}} );
mergeItemSetsImpl( aMergedAttr, aNewAttr );
@@ -316,12 +315,12 @@ const SfxItemSet* FuPage::ExecuteDialog( vcl::Window* pParent )
int nError = aDlg.GetGraphic(aGraphic);
if( nError == ERRCODE_NONE )
{
- pTempSet.reset( new SfxItemSet( mpDoc->GetPool(), XATTR_FILL_FIRST, XATTR_FILL_LAST, 0) );
+ pTempSet.reset( new SfxItemSet( mpDoc->GetPool(), svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST>{}) );
pTempSet->Put( XFillStyleItem( drawing::FillStyle_BITMAP ) );
// MigrateItemSet makes sure the XFillBitmapItem will have a unique name
- SfxItemSet aMigrateSet( mpDoc->GetPool(), XATTR_FILLBITMAP, XATTR_FILLBITMAP );
+ SfxItemSet aMigrateSet( mpDoc->GetPool(), svl::Items<XATTR_FILLBITMAP, XATTR_FILLBITMAP>{} );
aMigrateSet.Put(XFillBitmapItem(OUString("background"), aGraphic));
SdrModel::MigrateItemSet( &aMigrateSet, pTempSet.get(), mpDoc );
diff --git a/sd/source/ui/func/fuparagr.cxx b/sd/source/ui/func/fuparagr.cxx
index 9d0f39d8fff8..eb5158088d50 100644
--- a/sd/source/ui/func/fuparagr.cxx
+++ b/sd/source/ui/func/fuparagr.cxx
@@ -70,10 +70,9 @@ void FuParagraph::DoExecute( SfxRequest& rReq )
mpView->GetAttributes( aEditAttr );
SfxItemPool *pPool = aEditAttr.GetPool();
SfxItemSet aNewAttr( *pPool,
- EE_ITEMS_START, EE_ITEMS_END,
+ svl::Items<EE_ITEMS_START, EE_ITEMS_END,
SID_ATTR_TABSTOP_OFFSET, SID_ATTR_TABSTOP_OFFSET,
- ATTR_PARANUMBERING_START, ATTR_PARANUMBERING_END,
- 0 );
+ ATTR_PARANUMBERING_START, ATTR_PARANUMBERING_END>{} );
aNewAttr.Put( aEditAttr );
diff --git a/sd/source/ui/func/fuprlout.cxx b/sd/source/ui/func/fuprlout.cxx
index e615de959c54..b2b09be755e5 100644
--- a/sd/source/ui/func/fuprlout.cxx
+++ b/sd/source/ui/func/fuprlout.cxx
@@ -143,7 +143,7 @@ void FuPresentationLayout::DoExecute( SfxRequest& rReq )
bool bLoad = false; // appear the new master pages?
OUString aFile;
- SfxItemSet aSet(mpDoc->GetPool(), ATTR_PRESLAYOUT_START, ATTR_PRESLAYOUT_END);
+ SfxItemSet aSet(mpDoc->GetPool(), svl::Items<ATTR_PRESLAYOUT_START, ATTR_PRESLAYOUT_END>{});
aSet.Put( SfxBoolItem( ATTR_PRESLAYOUT_LOAD, bLoad));
aSet.Put( SfxBoolItem( ATTR_PRESLAYOUT_MASTER_PAGE, bMasterPage ) );
diff --git a/sd/source/ui/func/fuprobjs.cxx b/sd/source/ui/func/fuprobjs.cxx
index 7f8fed69b2a9..ba72af5aab2c 100644
--- a/sd/source/ui/func/fuprobjs.cxx
+++ b/sd/source/ui/func/fuprobjs.cxx
@@ -71,7 +71,7 @@ void FuPresentationObjects::DoExecute( SfxRequest& )
/* does the selections end in a unique presentation layout?
if not, it is not allowed to edit the templates */
- SfxItemSet aSet(mpDoc->GetItemPool(), SID_STATUS_LAYOUT, SID_STATUS_LAYOUT);
+ SfxItemSet aSet(mpDoc->GetItemPool(), svl::Items<SID_STATUS_LAYOUT, SID_STATUS_LAYOUT>{});
pOutlineViewShell->GetStatusBarState( aSet );
OUString aLayoutName = static_cast<const SfxStringItem&>(aSet.Get(SID_STATUS_LAYOUT)).GetValue();
DBG_ASSERT(!aLayoutName.isEmpty(), "Layout not defined");
diff --git a/sd/source/ui/func/fuscale.cxx b/sd/source/ui/func/fuscale.cxx
index e71d93a17378..7235a5c37ce7 100644
--- a/sd/source/ui/func/fuscale.cxx
+++ b/sd/source/ui/func/fuscale.cxx
@@ -69,7 +69,7 @@ void FuScale::DoExecute( SfxRequest& rReq )
if( !pArgs )
{
- SfxItemSet aNewAttr( mpDoc->GetPool(), SID_ATTR_ZOOM, SID_ATTR_ZOOM );
+ SfxItemSet aNewAttr( mpDoc->GetPool(), svl::Items<SID_ATTR_ZOOM, SID_ATTR_ZOOM>{} );
std::unique_ptr<SvxZoomItem> pZoomItem;
SvxZoomEnableFlags nZoomValues = SvxZoomEnableFlags::ALL;
diff --git a/sd/source/ui/func/fusldlg.cxx b/sd/source/ui/func/fusldlg.cxx
index 2ef0a548a184..c0ab1580bf6c 100644
--- a/sd/source/ui/func/fusldlg.cxx
+++ b/sd/source/ui/func/fusldlg.cxx
@@ -60,7 +60,7 @@ void FuSlideShowDlg::DoExecute( SfxRequest& )
{
PresentationSettings& rPresentationSettings = mpDoc->getPresentationSettings();
- SfxItemSet aDlgSet( mpDoc->GetPool(), ATTR_PRESENT_START, ATTR_PRESENT_END );
+ SfxItemSet aDlgSet( mpDoc->GetPool(), svl::Items<ATTR_PRESENT_START, ATTR_PRESENT_END>{} );
std::vector<OUString> aPageNameList(mpDoc->GetSdPageCount( PageKind::Standard ));
const OUString& rPresPage = rPresentationSettings.maPresPage;
OUString aFirstPage;
diff --git a/sd/source/ui/func/fusnapln.cxx b/sd/source/ui/func/fusnapln.cxx
index 25fe9b64a559..c06452231199 100644
--- a/sd/source/ui/func/fusnapln.cxx
+++ b/sd/source/ui/func/fusnapln.cxx
@@ -72,7 +72,7 @@ void FuSnapLine::DoExecute( SfxRequest& rReq )
if (!pArgs)
{
- SfxItemSet aNewAttr(mpViewShell->GetPool(), ATTR_SNAPLINE_START, ATTR_SNAPLINE_END);
+ SfxItemSet aNewAttr(mpViewShell->GetPool(), svl::Items<ATTR_SNAPLINE_START, ATTR_SNAPLINE_END>{});
bool bLineExist (false);
Point aLinePos;
diff --git a/sd/source/ui/func/fusumry.cxx b/sd/source/ui/func/fusumry.cxx
index 661e5ae13359..bb199e0b5438 100644
--- a/sd/source/ui/func/fusumry.cxx
+++ b/sd/source/ui/func/fusumry.cxx
@@ -194,7 +194,7 @@ void FuSummaryPage::DoExecute( SfxRequest& )
return;
// remove hard break- and character attributes
- SfxItemSet aEmptyEEAttr(mpDoc->GetPool(), EE_ITEMS_START, EE_ITEMS_END);
+ SfxItemSet aEmptyEEAttr(mpDoc->GetPool(), svl::Items<EE_ITEMS_START, EE_ITEMS_END>{});
sal_Int32 nParaCount = pOutl->GetParagraphCount();
for (sal_Int32 nPara = 0; nPara < nParaCount; nPara++)
diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx
index 647a67db86aa..488032f4bf54 100644
--- a/sd/source/ui/func/futext.cxx
+++ b/sd/source/ui/func/futext.cxx
@@ -532,7 +532,7 @@ void FuText::ImpSetAttributesForNewTextObject(SdrTextObj* pTxtObj)
void FuText::ImpSetAttributesFitToSize(SdrTextObj* pTxtObj)
{
// FitToSize (fit to frame)
- SfxItemSet aSet(mpViewShell->GetPool(), SDRATTR_TEXT_AUTOGROWHEIGHT, SDRATTR_TEXT_AUTOGROWWIDTH);
+ SfxItemSet aSet(mpViewShell->GetPool(), svl::Items<SDRATTR_TEXT_AUTOGROWHEIGHT, SDRATTR_TEXT_AUTOGROWWIDTH>{});
SdrFitToSizeType eFTS = SdrFitToSizeType::Proportional;
aSet.Put(SdrTextFitToSizeTypeItem(eFTS));
aSet.Put(makeSdrTextAutoGrowHeightItem(false));
@@ -544,7 +544,7 @@ void FuText::ImpSetAttributesFitToSize(SdrTextObj* pTxtObj)
void FuText::ImpSetAttributesFitToSizeVertical(SdrTextObj* pTxtObj)
{
SfxItemSet aSet(mpViewShell->GetPool(),
- SDRATTR_TEXT_AUTOGROWHEIGHT, SDRATTR_TEXT_AUTOGROWWIDTH);
+ svl::Items<SDRATTR_TEXT_AUTOGROWHEIGHT, SDRATTR_TEXT_AUTOGROWWIDTH>{});
SdrFitToSizeType eFTS = SdrFitToSizeType::Proportional;
aSet.Put(SdrTextFitToSizeTypeItem(eFTS));
aSet.Put(makeSdrTextAutoGrowHeightItem(false));
diff --git a/sd/source/ui/unoidl/UnoDocumentSettings.cxx b/sd/source/ui/unoidl/UnoDocumentSettings.cxx
index 3958c469867a..3e0fcb8a7141 100644
--- a/sd/source/ui/unoidl/UnoDocumentSettings.cxx
+++ b/sd/source/ui/unoidl/UnoDocumentSettings.cxx
@@ -754,10 +754,9 @@ DocumentSettings::_setPropertyValues(const PropertyMapEntry** ppEntries,
else
{
pItemSet = o3tl::make_unique<SfxItemSet>(pDoc->GetPool(),
- SID_PRINTER_NOTFOUND_WARN, SID_PRINTER_NOTFOUND_WARN,
+ svl::Items<SID_PRINTER_NOTFOUND_WARN, SID_PRINTER_NOTFOUND_WARN,
SID_PRINTER_CHANGESTODOC, SID_PRINTER_CHANGESTODOC,
- ATTR_OPTIONS_PRINT, ATTR_OPTIONS_PRINT,
- 0 );
+ ATTR_OPTIONS_PRINT, ATTR_OPTIONS_PRINT>{} );
}
pPrinter = SfxPrinter::Create ( aStream, std::move(pItemSet) );
diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx
index 081b25604a84..490b061ca422 100644
--- a/sd/source/ui/unoidl/unopage.cxx
+++ b/sd/source/ui/unoidl/unopage.cxx
@@ -2481,7 +2481,7 @@ void SdDrawPage::setBackground( const Any& rValue )
// is it our own implementation?
SdUnoPageBackground* pBack = SdUnoPageBackground::getImplementation( xSet );
- SfxItemSet aSet( GetModel()->GetDoc()->GetPool(), XATTR_FILL_FIRST, XATTR_FILL_LAST );
+ SfxItemSet aSet( GetModel()->GetDoc()->GetPool(), svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST>{} );
if( pBack )
{
@@ -2867,7 +2867,7 @@ void SdMasterPage::setBackground( const Any& rValue )
// is it our own implementation?
SdUnoPageBackground* pBack = SdUnoPageBackground::getImplementation( xInputSet );
- SfxItemSet aSet( GetModel()->GetDoc()->GetPool(), XATTR_FILL_FIRST, XATTR_FILL_LAST );
+ SfxItemSet aSet( GetModel()->GetDoc()->GetPool(), svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST>{} );
if( pBack )
{
diff --git a/sd/source/ui/unoidl/unopback.cxx b/sd/source/ui/unoidl/unopback.cxx
index e588d0b1bc63..c31bd58cd661 100644
--- a/sd/source/ui/unoidl/unopback.cxx
+++ b/sd/source/ui/unoidl/unopback.cxx
@@ -60,7 +60,7 @@ SdUnoPageBackground::SdUnoPageBackground(
if( pDoc )
{
StartListening( *pDoc );
- mpSet = o3tl::make_unique<SfxItemSet>( pDoc->GetPool(), XATTR_FILL_FIRST, XATTR_FILL_LAST );
+ mpSet = o3tl::make_unique<SfxItemSet>( pDoc->GetPool(), svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST>{} );
if( pSet )
mpSet->Put(*pSet);
@@ -101,7 +101,7 @@ void SdUnoPageBackground::fillItemSet( SdDrawDocument* pDoc, SfxItemSet& rSet )
StartListening( *pDoc );
mpDoc = pDoc;
- mpSet = o3tl::make_unique<SfxItemSet>( *rSet.GetPool(), XATTR_FILL_FIRST, XATTR_FILL_LAST );
+ mpSet = o3tl::make_unique<SfxItemSet>( *rSet.GetPool(), svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST>{} );
if( mpPropSet->AreThereOwnUsrAnys() )
{
@@ -228,7 +228,7 @@ void SAL_CALL SdUnoPageBackground::setPropertyValue( const OUString& aPropertyNa
}
SfxItemPool& rPool = *mpSet->GetPool();
- SfxItemSet aSet( rPool, pEntry->nWID, pEntry->nWID);
+ SfxItemSet aSet( rPool, {{pEntry->nWID, pEntry->nWID}});
aSet.Put( *mpSet );
if( !aSet.Count() )
@@ -290,7 +290,7 @@ uno::Any SAL_CALL SdUnoPageBackground::getPropertyValue( const OUString& Propert
else
{
SfxItemPool& rPool = *mpSet->GetPool();
- SfxItemSet aSet( rPool, pEntry->nWID, pEntry->nWID);
+ SfxItemSet aSet( rPool, {{pEntry->nWID, pEntry->nWID}});
aSet.Put( *mpSet );
if( !aSet.Count() )
@@ -418,7 +418,7 @@ uno::Any SAL_CALL SdUnoPageBackground::getPropertyDefault( const OUString& aProp
else
{
SfxItemPool& rPool = *mpSet->GetPool();
- SfxItemSet aSet( rPool, pEntry->nWID, pEntry->nWID);
+ SfxItemSet aSet( rPool, {{pEntry->nWID, pEntry->nWID}});
aSet.Put( rPool.GetDefaultItem( pEntry->nWID ) );
aAny = SvxItemPropertySet_getPropertyValue( pEntry, aSet );
diff --git a/sd/source/ui/view/drtxtob.cxx b/sd/source/ui/view/drtxtob.cxx
index 33e8977c6292..de7c1e9db631 100644
--- a/sd/source/ui/view/drtxtob.cxx
+++ b/sd/source/ui/view/drtxtob.cxx
@@ -129,7 +129,7 @@ void TextObjectBar::GetCharState( SfxItemSet& rSet )
SfxItemSet aCharAttrSet( mpView->GetDoc().GetPool() );
mpView->GetAttributes( aCharAttrSet );
- SfxItemSet aNewAttr( mpViewShell->GetPool(),EE_ITEMS_START,EE_ITEMS_END);
+ SfxItemSet aNewAttr( mpViewShell->GetPool(),svl::Items<EE_ITEMS_START,EE_ITEMS_END>{});
aNewAttr.Put(aCharAttrSet, false);
rSet.Put(aNewAttr, false);
diff --git a/sd/source/ui/view/drtxtob1.cxx b/sd/source/ui/view/drtxtob1.cxx
index 351b5a960b31..bcb39952be3e 100644
--- a/sd/source/ui/view/drtxtob1.cxx
+++ b/sd/source/ui/view/drtxtob1.cxx
@@ -267,7 +267,7 @@ void TextObjectBar::Execute( SfxRequest &rReq )
SvxLRSpaceItem aLRSpace = static_cast<const SvxLRSpaceItem&>(pArgs->Get(
GetPool().GetWhich(nSpaceSlot)));
- SfxItemSet aEditAttr( GetPool(), EE_PARA_LRSPACE, EE_PARA_LRSPACE );
+ SfxItemSet aEditAttr( GetPool(), svl::Items<EE_PARA_LRSPACE, EE_PARA_LRSPACE>{} );
aLRSpace.SetWhich( EE_PARA_LRSPACE );
aEditAttr.Put( aLRSpace );
@@ -279,7 +279,7 @@ void TextObjectBar::Execute( SfxRequest &rReq )
case SID_HANGING_INDENT:
{
- SfxItemSet aLRSpaceSet( GetPool(), EE_PARA_LRSPACE, EE_PARA_LRSPACE );
+ SfxItemSet aLRSpaceSet( GetPool(), svl::Items<EE_PARA_LRSPACE, EE_PARA_LRSPACE>{} );
mpView->GetAttributes( aLRSpaceSet );
SvxLRSpaceItem aParaMargin( static_cast<const SvxLRSpaceItem&>( aLRSpaceSet.Get( EE_PARA_LRSPACE ) ) );
@@ -324,7 +324,7 @@ void TextObjectBar::Execute( SfxRequest &rReq )
case SID_TEXTDIRECTION_TOP_TO_BOTTOM:
{
mpView->SdrEndTextEdit();
- SfxItemSet aAttr( mpView->GetDoc().GetPool(), SDRATTR_TEXTDIRECTION, SDRATTR_TEXTDIRECTION, 0 );
+ SfxItemSet aAttr( mpView->GetDoc().GetPool(), svl::Items<SDRATTR_TEXTDIRECTION, SDRATTR_TEXTDIRECTION>{} );
aAttr.Put( SvxWritingModeItem(
nSlot == SID_TEXTDIRECTION_LEFT_TO_RIGHT ?
css::text::WritingMode_LR_TB : css::text::WritingMode_TB_RL,
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index a674d8836db5..fb5f5b31eb33 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -313,7 +313,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
if( pItem )
{
- SfxItemSet aSet( GetPool(), EE_PARA_HYPHENATE, EE_PARA_HYPHENATE );
+ SfxItemSet aSet( GetPool(), svl::Items<EE_PARA_HYPHENATE, EE_PARA_HYPHENATE>{} );
bool bValue = pItem->GetValue();
aSet.Put( SfxBoolItem( EE_PARA_HYPHENATE, bValue ) );
mpDrawView->SetAttributes( aSet );
@@ -321,7 +321,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
else // only for testing purpose
{
OSL_FAIL(" no value for hyphenation!");
- SfxItemSet aSet( GetPool(), EE_PARA_HYPHENATE, EE_PARA_HYPHENATE );
+ SfxItemSet aSet( GetPool(), svl::Items<EE_PARA_HYPHENATE, EE_PARA_HYPHENATE>{} );
bool bValue = true;
aSet.Put( SfxBoolItem( EE_PARA_HYPHENATE, bValue ) );
mpDrawView->SetAttributes( aSet );
@@ -785,7 +785,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
pOutl->RemoveFields(checkSvxFieldData<SvxURLField>);
}
- pSet.reset(new SfxItemSet( GetPool(), EE_ITEMS_START, EE_ITEMS_END ));
+ pSet.reset(new SfxItemSet( GetPool(), svl::Items<EE_ITEMS_START, EE_ITEMS_END>{} ));
mpDrawView->SetAttributes( *pSet, true );
}
else
@@ -806,7 +806,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
if( pPresPage->IsPresObj( pObj ) )
{
- auto pNewSet = o3tl::make_unique<SfxItemSet>( GetDoc()->GetPool(), SDRATTR_TEXT_MINFRAMEHEIGHT, SDRATTR_TEXT_AUTOGROWHEIGHT, 0 );
+ auto pNewSet = o3tl::make_unique<SfxItemSet>( GetDoc()->GetPool(), svl::Items<SDRATTR_TEXT_MINFRAMEHEIGHT, SDRATTR_TEXT_AUTOGROWHEIGHT>{} );
pNewSet->Put(pObj->GetMergedItemSet());
aAttrList.push_back(std::make_pair(std::move(pNewSet), pObj->GetUserCall()));
}
@@ -1283,7 +1283,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
case SID_CONNECTION_NEW_ROUTING:
{
- SfxItemSet aDefAttr( GetPool(), SDRATTR_EDGELINE1DELTA, SDRATTR_EDGELINE3DELTA );
+ SfxItemSet aDefAttr( GetPool(), svl::Items<SDRATTR_EDGELINE1DELTA, SDRATTR_EDGELINE3DELTA>{} );
GetView()->SetAttributes( aDefAttr, true ); // (ReplaceAll)
Cancel();
@@ -1387,7 +1387,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
if (! pArgs)
{
- SfxItemSet aNewAttr( GetDoc()->GetPool(), ATTR_LAYER_START, ATTR_LAYER_END );
+ SfxItemSet aNewAttr( GetDoc()->GetPool(), svl::Items<ATTR_LAYER_START, ATTR_LAYER_END>{} );
aNewAttr.Put( makeSdAttrLayerName( aLayerName ) );
aNewAttr.Put( makeSdAttrLayerTitle() );
@@ -1555,7 +1555,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
if (! pArgs)
{
- SfxItemSet aNewAttr( GetDoc()->GetPool(), ATTR_LAYER_START, ATTR_LAYER_END );
+ SfxItemSet aNewAttr( GetDoc()->GetPool(), svl::Items<ATTR_LAYER_START, ATTR_LAYER_END>{} );
aNewAttr.Put( makeSdAttrLayerName( aLayerName ) );
aNewAttr.Put( makeSdAttrLayerTitle( aLayerTitle ) );
diff --git a/sd/source/ui/view/drviews3.cxx b/sd/source/ui/view/drviews3.cxx
index ab4aaf5f6936..8fd9640f62fe 100644
--- a/sd/source/ui/view/drviews3.cxx
+++ b/sd/source/ui/view/drviews3.cxx
@@ -657,7 +657,7 @@ void DrawViewShell::ExecRuler(SfxRequest& rReq)
const SvxTabStopItem& rItem = static_cast<const SvxTabStopItem&>(
pArgs->Get( EE_PARA_TABS ));
- SfxItemSet aEditAttr( GetPool(), EE_PARA_TABS, EE_PARA_TABS );
+ SfxItemSet aEditAttr( GetPool(), svl::Items<EE_PARA_TABS, EE_PARA_TABS>{} );
aEditAttr.Put( rItem );
mpDrawView->SetAttributes( aEditAttr );
@@ -672,7 +672,7 @@ void DrawViewShell::ExecRuler(SfxRequest& rReq)
SvxLineSpacingItem aParaLineSP = static_cast<const SvxLineSpacingItem&>(pArgs->Get(
GetPool().GetWhich(nSlot)));
- SfxItemSet aEditAttr( GetPool(), EE_PARA_SBL, EE_PARA_SBL );
+ SfxItemSet aEditAttr( GetPool(), svl::Items<EE_PARA_SBL, EE_PARA_SBL>{} );
aParaLineSP.SetWhich( EE_PARA_SBL );
aEditAttr.Put( aParaLineSP );
@@ -684,7 +684,7 @@ void DrawViewShell::ExecRuler(SfxRequest& rReq)
case SID_ATTR_PARA_ADJUST_LEFT:
{
SvxAdjustItem aItem( SvxAdjust::Left, EE_PARA_JUST );
- SfxItemSet aEditAttr( GetPool(), EE_PARA_JUST, EE_PARA_JUST );
+ SfxItemSet aEditAttr( GetPool(), svl::Items<EE_PARA_JUST, EE_PARA_JUST>{} );
aEditAttr.Put( aItem );
mpDrawView->SetAttributes( aEditAttr );
@@ -695,7 +695,7 @@ void DrawViewShell::ExecRuler(SfxRequest& rReq)
case SID_ATTR_PARA_ADJUST_CENTER:
{
SvxAdjustItem aItem( SvxAdjust::Center, EE_PARA_JUST );
- SfxItemSet aEditAttr( GetPool(), EE_PARA_JUST, EE_PARA_JUST );
+ SfxItemSet aEditAttr( GetPool(), svl::Items<EE_PARA_JUST, EE_PARA_JUST>{} );
aEditAttr.Put( aItem );
mpDrawView->SetAttributes( aEditAttr );
@@ -706,7 +706,7 @@ void DrawViewShell::ExecRuler(SfxRequest& rReq)
case SID_ATTR_PARA_ADJUST_RIGHT:
{
SvxAdjustItem aItem( SvxAdjust::Right, EE_PARA_JUST );
- SfxItemSet aEditAttr( GetPool(), EE_PARA_JUST, EE_PARA_JUST );
+ SfxItemSet aEditAttr( GetPool(), svl::Items<EE_PARA_JUST, EE_PARA_JUST>{} );
aEditAttr.Put( aItem );
mpDrawView->SetAttributes( aEditAttr );
@@ -717,7 +717,7 @@ void DrawViewShell::ExecRuler(SfxRequest& rReq)
case SID_ATTR_PARA_ADJUST_BLOCK:
{
SvxAdjustItem aItem( SvxAdjust::Block, EE_PARA_JUST );
- SfxItemSet aEditAttr( GetPool(), EE_PARA_JUST, EE_PARA_JUST );
+ SfxItemSet aEditAttr( GetPool(), svl::Items<EE_PARA_JUST, EE_PARA_JUST>{} );
aEditAttr.Put( aItem );
mpDrawView->SetAttributes( aEditAttr );
@@ -731,7 +731,7 @@ void DrawViewShell::ExecRuler(SfxRequest& rReq)
sal_uInt16 nSlot = SID_ATTR_PARA_ULSPACE;
SvxULSpaceItem aULSP = static_cast<const SvxULSpaceItem&>(pArgs->Get(
GetPool().GetWhich(nSlot)));
- SfxItemSet aEditAttr( GetPool(), EE_PARA_ULSPACE, EE_PARA_ULSPACE );
+ SfxItemSet aEditAttr( GetPool(), svl::Items<EE_PARA_ULSPACE, EE_PARA_ULSPACE>{} );
aULSP.SetWhich( EE_PARA_ULSPACE );
aEditAttr.Put( aULSP );
@@ -747,7 +747,7 @@ void DrawViewShell::ExecRuler(SfxRequest& rReq)
SvxLRSpaceItem aLRSpace = static_cast<const SvxLRSpaceItem&>(pArgs->Get(
GetPool().GetWhich(nSlot)));
- SfxItemSet aEditAttr( GetPool(), EE_PARA_LRSPACE, EE_PARA_LRSPACE );
+ SfxItemSet aEditAttr( GetPool(), svl::Items<EE_PARA_LRSPACE, EE_PARA_LRSPACE>{} );
aLRSpace.SetWhich( EE_PARA_LRSPACE );
aEditAttr.Put( aLRSpace );
@@ -837,7 +837,7 @@ void DrawViewShell::ExecRuler(SfxRequest& rReq)
// only put lrSpace item
SfxItemSet aEditAttrReduced( GetDoc()->GetPool(),
- EE_PARA_LRSPACE, EE_PARA_LRSPACE );
+ svl::Items<EE_PARA_LRSPACE, EE_PARA_LRSPACE>{} );
aEditAttrReduced.Put( aLRSpaceItem );
mpDrawView->SetAttributes( aEditAttrReduced );
diff --git a/sd/source/ui/view/drviews4.cxx b/sd/source/ui/view/drviews4.cxx
index a89af7f4e69b..1dcd2aa8f3c5 100644
--- a/sd/source/ui/view/drviews4.cxx
+++ b/sd/source/ui/view/drviews4.cxx
@@ -835,10 +835,9 @@ void DrawViewShell::ShowMousePosInfo(const ::tools::Rectangle& rRect,
OSL_ASSERT (GetViewShell()!=nullptr);
if ( !GetViewShell()->GetUIActiveClient() )
{
- SfxItemSet aSet(GetPool(), SID_CONTEXT, SID_CONTEXT,
+ SfxItemSet aSet(GetPool(), svl::Items<SID_CONTEXT, SID_CONTEXT,
SID_ATTR_POSITION, SID_ATTR_POSITION,
- SID_ATTR_SIZE, SID_ATTR_SIZE,
- 0);
+ SID_ATTR_SIZE, SID_ATTR_SIZE>{});
GetStatusBarState(aSet);
diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx
index 976449563727..6e9d40f365e7 100644
--- a/sd/source/ui/view/drviews7.cxx
+++ b/sd/source/ui/view/drviews7.cxx
@@ -1546,7 +1546,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
SdPage* pPage = GetActualPage();
if (pPage != nullptr && GetDoc() != nullptr)
{
- SfxItemSet aMergedAttr(GetDoc()->GetPool(), XATTR_FILL_FIRST, XATTR_FILL_LAST, 0);
+ SfxItemSet aMergedAttr(GetDoc()->GetPool(), svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST>{});
SdStyleSheet* pStyleSheet = pPage->getPresentationStyle(HID_PSEUDOSHEET_BACKGROUND);
MergePageBackgroundFilling(pPage, pStyleSheet, meEditMode == EditMode::MasterPage, aMergedAttr);
if (drawing::FillStyle_BITMAP == static_cast<const XFillStyleItem&>(aMergedAttr.Get(XATTR_FILLSTYLE)).GetValue())
@@ -1751,7 +1751,7 @@ void DrawViewShell::SetPageProperties (SfxRequest& rReq)
XFillGradientItem aGradientItem( static_cast<const XFillGradientItem&>(pArgs->Get( XATTR_FILLGRADIENT )) );
// MigrateItemSet guarantees unique gradient names
- SfxItemSet aMigrateSet( mpDrawView->GetModel()->GetItemPool(), XATTR_FILLGRADIENT, XATTR_FILLGRADIENT );
+ SfxItemSet aMigrateSet( mpDrawView->GetModel()->GetItemPool(), svl::Items<XATTR_FILLGRADIENT, XATTR_FILLGRADIENT>{} );
aMigrateSet.Put( aGradientItem );
SdrModel::MigrateItemSet( &aMigrateSet, pTempSet, mpDrawView->GetModel() );
diff --git a/sd/source/ui/view/drviewsf.cxx b/sd/source/ui/view/drviewsf.cxx
index e07c835f5ec1..dd57a075214c 100644
--- a/sd/source/ui/view/drviewsf.cxx
+++ b/sd/source/ui/view/drviewsf.cxx
@@ -571,7 +571,7 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet )
SfxItemSet aEditAttr( GetDoc()->GetPool() );
mpDrawView->GetAttributes( aEditAttr );
- SfxItemSet aNewAttr( GetPool(), EE_ITEMS_START, EE_ITEMS_END );
+ SfxItemSet aNewAttr( GetPool(), svl::Items<EE_ITEMS_START, EE_ITEMS_END>{} );
aNewAttr.Put( aEditAttr, false );
std::unique_ptr<SvxNumRule> pNumRule;
diff --git a/sd/source/ui/view/drviewsi.cxx b/sd/source/ui/view/drviewsi.cxx
index fe10d917541c..48e403f7ceb6 100644
--- a/sd/source/ui/view/drviewsi.cxx
+++ b/sd/source/ui/view/drviewsi.cxx
@@ -121,8 +121,7 @@ void DrawViewShell::AssignFrom3DWindow()
if(!GetView()->IsPresObjSelected())
{
SfxItemSet aSet( GetDoc()->GetPool(),
- SDRATTR_START, SDRATTR_END,
- 0, 0);
+ svl::Items<SDRATTR_START, SDRATTR_END>{});
p3DWin->GetAttr( aSet );
// own UNDO-compounding also around transformation in 3D
@@ -132,7 +131,7 @@ void DrawViewShell::AssignFrom3DWindow()
{
// assign only text-attribute
SfxItemSet aTextSet( GetDoc()->GetPool(),
- EE_ITEMS_START, EE_ITEMS_END, 0 );
+ svl::Items<EE_ITEMS_START, EE_ITEMS_END>{} );
aTextSet.Put( aSet, false );
GetView()->SetAttributes( aTextSet );
diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx
index 0ce3e37e7631..328c2b101857 100644
--- a/sd/source/ui/view/outlnvsh.cxx
+++ b/sd/source/ui/view/outlnvsh.cxx
@@ -832,7 +832,7 @@ void OutlineViewShell::GetMenuState( SfxItemSet &rSet )
// does the selection provide a unique presentation layout?
// if not, the templates must not be edited
- SfxItemSet aSet(*rSet.GetPool(), SID_STATUS_LAYOUT, SID_STATUS_LAYOUT);
+ SfxItemSet aSet(*rSet.GetPool(), svl::Items<SID_STATUS_LAYOUT, SID_STATUS_LAYOUT>{});
GetStatusBarState(aSet);
OUString aTest = static_cast<const SfxStringItem&>(aSet.Get(SID_STATUS_LAYOUT)).GetValue();
if (aTest.isEmpty())
@@ -1477,7 +1477,7 @@ void OutlineViewShell::GetAttrState( SfxItemSet& rSet )
SfxUInt16Item* pFamilyItem = dynamic_cast<SfxUInt16Item*>(pItem.get());
if (pFamilyItem && static_cast<SfxStyleFamily>(pFamilyItem->GetValue()) == SD_STYLE_FAMILY_PSEUDO)
{
- SfxItemSet aSet(*rSet.GetPool(), SID_STATUS_LAYOUT, SID_STATUS_LAYOUT);
+ SfxItemSet aSet(*rSet.GetPool(), svl::Items<SID_STATUS_LAYOUT, SID_STATUS_LAYOUT>{});
GetStatusBarState(aSet);
OUString aRealStyle = static_cast<const SfxStringItem&>(aSet.Get(SID_STATUS_LAYOUT)).GetValue();
if (aRealStyle.isEmpty())
diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx
index 8d6543a45744..bc7467e4045e 100644
--- a/sd/source/ui/view/sdview.cxx
+++ b/sd/source/ui/view/sdview.cxx
@@ -991,8 +991,8 @@ bool View::IsMorphingAllowed() const
( nKind1 != OBJ_CAPTION && nKind2 != OBJ_CAPTION ) &&
dynamic_cast< const E3dObject *>( pObj1 ) == nullptr && dynamic_cast< const E3dObject *>( pObj2 ) == nullptr )
{
- SfxItemSet aSet1( mrDoc.GetPool(), XATTR_FILLSTYLE, XATTR_FILLSTYLE );
- SfxItemSet aSet2( mrDoc.GetPool(), XATTR_FILLSTYLE, XATTR_FILLSTYLE );
+ SfxItemSet aSet1( mrDoc.GetPool(), svl::Items<XATTR_FILLSTYLE, XATTR_FILLSTYLE>{} );
+ SfxItemSet aSet2( mrDoc.GetPool(), svl::Items<XATTR_FILLSTYLE, XATTR_FILLSTYLE>{} );
aSet1.Put(pObj1->GetMergedItemSet());
aSet2.Put(pObj2->GetMergedItemSet());
diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx
index 34a6cc857c01..cff977eb1461 100644
--- a/sd/source/ui/view/sdview3.cxx
+++ b/sd/source/ui/view/sdview3.cxx
@@ -790,8 +790,8 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
if( dynamic_cast< E3dObject *>( pPickObj ) != nullptr && dynamic_cast< E3dObject *>( pObj ) != nullptr )
{
// handle 3D attribute in addition
- SfxItemSet aNewSet( mrDoc.GetPool(), SID_ATTR_3D_START, SID_ATTR_3D_END, 0 );
- SfxItemSet aOldSet( mrDoc.GetPool(), SID_ATTR_3D_START, SID_ATTR_3D_END, 0 );
+ SfxItemSet aNewSet( mrDoc.GetPool(), svl::Items<SID_ATTR_3D_START, SID_ATTR_3D_END>{} );
+ SfxItemSet aOldSet( mrDoc.GetPool(), svl::Items<SID_ATTR_3D_START, SID_ATTR_3D_END>{} );
aOldSet.Put(pPickObj->GetMergedItemSet());
aNewSet.Put( pObj->GetMergedItemSet() );
diff --git a/sd/source/ui/view/sdview4.cxx b/sd/source/ui/view/sdview4.cxx
index 051a3cc0e5e3..3d98ee66ea4f 100644
--- a/sd/source/ui/view/sdview4.cxx
+++ b/sd/source/ui/view/sdview4.cxx
@@ -161,7 +161,7 @@ SdrGrafObj* View::InsertGraphic( const Graphic& rGraphic, sal_Int8& rAction,
EndUndo();
}
- SfxItemSet aSet(mpDocSh->GetPool(), XATTR_FILLSTYLE, XATTR_FILLBITMAP);
+ SfxItemSet aSet(mpDocSh->GetPool(), svl::Items<XATTR_FILLSTYLE, XATTR_FILLBITMAP>{});
aSet.Put(XFillStyleItem(drawing::FillStyle_BITMAP));
aSet.Put(XFillBitmapItem(rGraphic));
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index 0eddae83f90d..4ee7dc17a2fe 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -406,7 +406,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
const SfxStringItem* pStringItem = rReq.GetArg<SfxStringItem>(SID_CONFIG);
SfxItemSet aSet(
- GetPool(), SID_CONFIG, SID_CONFIG );
+ GetPool(), svl::Items<SID_CONFIG, SID_CONFIG>{} );
if ( pStringItem )
{
@@ -1597,7 +1597,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
if ( pFact )
{
- SfxItemSet aSet(GetPool(), SID_AUTO_CORRECT_DLG, SID_AUTO_CORRECT_DLG);
+ SfxItemSet aSet(GetPool(), svl::Items<SID_AUTO_CORRECT_DLG, SID_AUTO_CORRECT_DLG>{});
const SfxPoolItem* pItem=nullptr;
const SfxItemSet* pSet = rReq.GetArgs();
SfxItemPool* pSetPool = pSet ? pSet->GetPool() : nullptr;
diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx
index 012596c175b3..eb0592dc479f 100644
--- a/sfx2/source/control/bindings.cxx
+++ b/sfx2/source/control/bindings.cxx
@@ -1043,7 +1043,7 @@ void SfxBindings::Execute_Impl( SfxRequest& aReq, const SfxSlot* pSlot, SfxShell
{
// The value is attached to a toggleable attribute (Bools)
sal_uInt16 nWhich = pSlot->GetWhich(rPool);
- SfxItemSet aSet(rPool, nWhich, nWhich);
+ SfxItemSet aSet(rPool, {{nWhich, nWhich}});
SfxStateFunc aFunc = pSlot->GetStateFnc();
pShell->CallState( aFunc, aSet );
const SfxPoolItem *pOldItem;
diff --git a/sfx2/source/control/shell.cxx b/sfx2/source/control/shell.cxx
index ce67c0f8dac3..5bf5b0c413a6 100644
--- a/sfx2/source/control/shell.cxx
+++ b/sfx2/source/control/shell.cxx
@@ -382,7 +382,7 @@ bool SfxShell::CanExecuteSlot_Impl( const SfxSlot &rSlot )
// Get Slot status
SfxItemPool &rPool = GetPool();
const sal_uInt16 nId = rSlot.GetWhich( rPool );
- SfxItemSet aSet(rPool, nId, nId);
+ SfxItemSet aSet(rPool, {{nId, nId}});
SfxStateFunc pFunc = rSlot.GetStateFnc();
CallState( pFunc, aSet );
return aSet.GetItemState(nId) != SfxItemState::DISABLED;
@@ -454,7 +454,7 @@ const SfxPoolItem* SfxShell::GetSlotState
// Get Item and Item status
const SfxPoolItem *pItem = nullptr;
- SfxItemSet aSet( rPool, nSlotId, nSlotId ); // else pItem dies too soon
+ SfxItemSet aSet( rPool, {{nSlotId, nSlotId}} ); // else pItem dies too soon
if ( pSlot )
{
// Call Status method
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index 5dbf2c272e8b..fea3af2af67b 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -456,9 +456,8 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
// templates not supported
aDocInfoItem.SetTemplate(false);
- SfxItemSet aSet(GetPool(), SID_DOCINFO, SID_DOCINFO, SID_DOC_READONLY, SID_DOC_READONLY,
- SID_EXPLORER_PROPS_START, SID_EXPLORER_PROPS_START, SID_BASEURL, SID_BASEURL,
- 0L );
+ SfxItemSet aSet(GetPool(), svl::Items<SID_DOCINFO, SID_DOCINFO, SID_DOC_READONLY, SID_DOC_READONLY,
+ SID_EXPLORER_PROPS_START, SID_EXPLORER_PROPS_START, SID_BASEURL, SID_BASEURL>{} );
aSet.Put( aDocInfoItem );
aSet.Put( SfxBoolItem( SID_DOC_READONLY, bReadOnly ) );
aSet.Put( SfxStringItem( SID_EXPLORER_PROPS_START, GetTitle() ) );
diff --git a/starmath/qa/cppunit/test_starmath.cxx b/starmath/qa/cppunit/test_starmath.cxx
index 8accbc2225ae..c7cbb284aa2f 100644
--- a/starmath/qa/cppunit/test_starmath.cxx
+++ b/starmath/qa/cppunit/test_starmath.cxx
@@ -436,7 +436,7 @@ void Test::viewZoom()
}
{
- SfxItemSet aSet(SmDocShell::GetPool(), SID_ATTR_ZOOM, SID_ATTR_ZOOM);
+ SfxItemSet aSet(SmDocShell::GetPool(), svl::Items<SID_ATTR_ZOOM, SID_ATTR_ZOOM>{});
aSet.Put(SvxZoomItem(SvxZoomType::OPTIMAL, 0));
SfxRequest aZoom(SID_ATTR_ZOOM, SfxCallMode::SYNCHRON, aSet);
m_pViewShell->Execute(aZoom);
@@ -482,7 +482,7 @@ void Test::viewZoom()
nFinalZoom = rGraphicWindow.GetZoom();
CPPUNIT_ASSERT_MESSAGE("Should not be optimal zoom", nFinalZoom != nOptimalZoom);
- SfxItemSet aSet(SmDocShell::GetPool(), SID_ATTR_ZOOM, SID_ATTR_ZOOM);
+ SfxItemSet aSet(SmDocShell::GetPool(), svl::Items<SID_ATTR_ZOOM, SID_ATTR_ZOOM>{});
aSet.Put(SvxZoomItem(SvxZoomType::PERCENT, 50));
SfxRequest aZoom(SID_ATTR_ZOOM, SfxCallMode::SYNCHRON, aSet);
m_pViewShell->Execute(aZoom);
@@ -491,7 +491,7 @@ void Test::viewZoom()
}
{
- SfxItemSet aSet(SmDocShell::GetPool(), SID_ATTR_ZOOM, SID_ATTR_ZOOM);
+ SfxItemSet aSet(SmDocShell::GetPool(), svl::Items<SID_ATTR_ZOOM, SID_ATTR_ZOOM>{});
aSet.Put(SvxZoomItem(SvxZoomType::PERCENT, 5));
SfxRequest aZoom(SID_ATTR_ZOOM, SfxCallMode::SYNCHRON, aSet);
m_pViewShell->Execute(aZoom);
@@ -500,7 +500,7 @@ void Test::viewZoom()
}
{
- SfxItemSet aSet(SmDocShell::GetPool(), SID_ATTR_ZOOM, SID_ATTR_ZOOM);
+ SfxItemSet aSet(SmDocShell::GetPool(), svl::Items<SID_ATTR_ZOOM, SID_ATTR_ZOOM>{});
aSet.Put(SvxZoomItem(SvxZoomType::PERCENT, 1000));
SfxRequest aZoom(SID_ATTR_ZOOM, SfxCallMode::SYNCHRON, aSet);
m_pViewShell->Execute(aZoom);
diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx
index 4f4c198e81b3..f814db1962c7 100644
--- a/starmath/source/document.cxx
+++ b/starmath/source/document.cxx
@@ -561,15 +561,14 @@ Printer* SmDocShell::GetPrt()
else if (!mpPrinter)
{
auto pOptions = o3tl::make_unique<SfxItemSet>(GetPool(),
- SID_PRINTSIZE, SID_PRINTSIZE,
+ svl::Items<SID_PRINTSIZE, SID_PRINTSIZE,
SID_PRINTZOOM, SID_PRINTZOOM,
SID_PRINTTITLE, SID_PRINTTITLE,
SID_PRINTTEXT, SID_PRINTTEXT,
SID_PRINTFRAME, SID_PRINTFRAME,
SID_NO_RIGHT_SPACES, SID_NO_RIGHT_SPACES,
SID_SAVE_ONLY_USED_SYMBOLS, SID_SAVE_ONLY_USED_SYMBOLS,
- SID_AUTO_CLOSE_BRACKETS, SID_AUTO_CLOSE_BRACKETS,
- 0);
+ SID_AUTO_CLOSE_BRACKETS, SID_AUTO_CLOSE_BRACKETS>{});
SmModule *pp = SM_MOD();
pp->GetConfig()->ConfigToItemSet(*pOptions);
mpPrinter = VclPtr<SfxPrinter>::Create(std::move(pOptions));
diff --git a/starmath/source/smmod.cxx b/starmath/source/smmod.cxx
index e4ce32a4baeb..b532073bafac 100644
--- a/starmath/source/smmod.cxx
+++ b/starmath/source/smmod.cxx
@@ -249,15 +249,14 @@ std::unique_ptr<SfxItemSet> SmModule::CreateItemSet( sal_uInt16 nId )
{
pRet = o3tl::make_unique<SfxItemSet>(GetPool(),
//TP_SMPRINT
- SID_PRINTSIZE, SID_PRINTSIZE,
+ svl::Items<SID_PRINTSIZE, SID_PRINTSIZE,
SID_PRINTZOOM, SID_PRINTZOOM,
SID_PRINTTITLE, SID_PRINTTITLE,
SID_PRINTTEXT, SID_PRINTTEXT,
SID_PRINTFRAME, SID_PRINTFRAME,
SID_NO_RIGHT_SPACES, SID_NO_RIGHT_SPACES,
SID_SAVE_ONLY_USED_SYMBOLS, SID_SAVE_ONLY_USED_SYMBOLS,
- SID_AUTO_CLOSE_BRACKETS, SID_AUTO_CLOSE_BRACKETS,
- 0 );
+ SID_AUTO_CLOSE_BRACKETS, SID_AUTO_CLOSE_BRACKETS>{} );
GetConfig()->ConfigToItemSet(*pRet);
}
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index b68d72e7d866..a9652672e16f 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -1715,7 +1715,7 @@ void SmViewShell::Execute(SfxRequest& rReq)
}
else
{
- SfxItemSet aSet( SmDocShell::GetPool(), SID_ATTR_ZOOM, SID_ATTR_ZOOM);
+ SfxItemSet aSet( SmDocShell::GetPool(), svl::Items<SID_ATTR_ZOOM, SID_ATTR_ZOOM>{});
aSet.Put( SvxZoomItem( SvxZoomType::PERCENT, mpGraphic->GetZoom()));
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
if(pFact)
diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx
index 664e36acfcfe..39ec0a18222c 100644
--- a/svl/source/items/itemset.cxx
+++ b/svl/source/items/itemset.cxx
@@ -20,8 +20,10 @@
#include <string.h>
+#include <algorithm>
#include <cassert>
-#include <cstdarg>
+#include <cstddef>
+
#include <libxml/xmlwriter.h>
#include <sal/log.hxx>
@@ -42,50 +44,6 @@ namespace
{
/**
- * Creates a sal_uInt16-ranges-array in 'rpRanges' using 'nWh1' and 'nWh2' as
- * first range, 'nNull' as terminator or start of 2nd range and 'pArgs' as
- * remainder.
- *
- * It returns the number of sal_uInt16s which are contained in the described
- * set of sal_uInt16s.
- */
-sal_uInt16 InitializeRanges_Impl( sal_uInt16 *&rpRanges, va_list pArgs,
- sal_uInt16 nWh1, sal_uInt16 nWh2, sal_uInt16 nNull )
-{
- sal_uInt16 nSize = 0, nIns = 0;
- std::vector<sal_uInt16> aNumArr;
- aNumArr.push_back( nWh1 );
- aNumArr.push_back( nWh2 );
- DBG_ASSERT( nWh1 <= nWh2, "Invalid range" );
- nSize += nWh2 - nWh1 + 1;
- aNumArr.push_back( nNull );
- bool bEndOfRange = false;
- while ( 0 !=
- ( nIns =
- sal::static_int_cast< sal_uInt16 >(
- va_arg( pArgs, int ) ) ) )
- {
- bEndOfRange = !bEndOfRange;
- if ( bEndOfRange )
- {
- const sal_uInt16 nPrev(*aNumArr.rbegin());
- DBG_ASSERT( nPrev <= nIns, "Invalid range" );
- nSize += nIns - nPrev + 1;
- }
- aNumArr.push_back( nIns );
- }
-
- assert( bEndOfRange ); // odd number of WhichIds
-
- // Now all ranges are present
- rpRanges = new sal_uInt16[ aNumArr.size() + 1 ];
- std::copy( aNumArr.begin(), aNumArr.end(), rpRanges);
- *(rpRanges + aNumArr.size()) = 0;
-
- return nSize;
-}
-
-/**
* Determines the number of sal_uInt16s in a 0-terminated array of pairs of
* sal_uInt16s.
* The terminating 0 is not included in the count.
@@ -143,52 +101,6 @@ SfxItemSet::SfxItemSet(SfxItemPool& rPool)
m_pItems = new const SfxPoolItem*[nSize]{};
}
-SfxItemSet::SfxItemSet(SfxItemPool& rPool, sal_uInt16 nWhich1, sal_uInt16 nWhich2)
- : m_pPool( &rPool )
- , m_pParent(nullptr)
- , m_nCount(0)
-{
- assert(nWhich1 <= nWhich2);
-
- InitRanges_Impl(nWhich1, nWhich2);
-}
-
-void SfxItemSet::InitRanges_Impl(sal_uInt16 nWh1, sal_uInt16 nWh2)
-{
- m_pWhichRanges = new sal_uInt16[3]{nWh1, nWh2, 0};
- const sal_uInt16 nRg = nWh2 - nWh1 + 1;
- m_pItems = new const SfxPoolItem*[nRg]{};
-}
-
-void SfxItemSet::InitRanges_Impl(va_list pArgs, sal_uInt16 nWh1, sal_uInt16 nWh2, sal_uInt16 nNull)
-{
- sal_uInt16 nSize = InitializeRanges_Impl(m_pWhichRanges, pArgs, nWh1, nWh2, nNull);
- m_pItems = new const SfxPoolItem*[nSize]{};
-}
-
-SfxItemSet::SfxItemSet(SfxItemPool& rPool, int nWh1, int nWh2, int nNull, ...)
- : m_pPool( &rPool )
- , m_pParent(nullptr)
- , m_pWhichRanges(nullptr)
- , m_nCount(0)
-{
- assert(nWh1 <= nWh2);
-
- if(!nNull)
- InitRanges_Impl(
- sal::static_int_cast< sal_uInt16 >(nWh1),
- sal::static_int_cast< sal_uInt16 >(nWh2));
- else {
- va_list pArgs;
- va_start( pArgs, nNull );
- InitRanges_Impl(
- pArgs, sal::static_int_cast< sal_uInt16 >(nWh1),
- sal::static_int_cast< sal_uInt16 >(nWh2),
- sal::static_int_cast< sal_uInt16 >(nNull));
- va_end(pArgs);
- }
-}
-
void SfxItemSet::InitRanges_Impl(const sal_uInt16 *pWhichPairTable)
{
sal_uInt16 nCnt = 0;
@@ -206,6 +118,52 @@ void SfxItemSet::InitRanges_Impl(const sal_uInt16 *pWhichPairTable)
memcpy( m_pWhichRanges, pWhichPairTable, sizeof( sal_uInt16 ) * cnt );
}
+SfxItemSet::SfxItemSet(
+ SfxItemPool & pool, std::initializer_list<sal_uInt16> wids,
+ std::size_t items):
+ m_pPool(&pool), m_pParent(nullptr),
+ m_pItems(new SfxPoolItem const *[items]{}),
+ m_pWhichRanges(new sal_uInt16[wids.size() + 1]),
+ // cannot overflow, assuming std::size_t is no smaller than sal_uInt16,
+ // as wids.size() must be substantially smaller than
+ // std::numeric_limits<sal_uInt16>::max() by construction in
+ // SfxItemSet::create
+ m_nCount(0)
+{
+ assert(wids.size() != 0);
+ assert(wids.size() % 2 == 0);
+ std::copy(wids.begin(), wids.end(), m_pWhichRanges);
+ m_pWhichRanges[wids.size()] = 0;
+}
+
+SfxItemSet::SfxItemSet(
+ SfxItemPool & pool, std::initializer_list<Pair> wids):
+ m_pPool(&pool), m_pParent(nullptr),
+ m_pWhichRanges(new sal_uInt16[2 * wids.size() + 1]), //TODO: overflow
+ m_nCount(0)
+{
+ assert(wids.size() != 0);
+ std::size_t i = 0;
+ std::size_t size = 0;
+#if !defined NDEBUG
+ sal_uInt16 prev = 0;
+#endif
+ for (auto const & p: wids) {
+ assert(svl::detail::validRange(p.wid1, p.wid2));
+ assert(prev == 0 || svl::detail::validGap(prev, p.wid1));
+ m_pWhichRanges[i++] = p.wid1;
+ m_pWhichRanges[i++] = p.wid2;
+ size += svl::detail::rangeSize(p.wid1, p.wid2);
+ // cannot overflow, assuming std::size_t is no smaller than
+ // sal_uInt16
+#if !defined NDEBUG
+ prev = p.wid2;
+#endif
+ }
+ m_pWhichRanges[i] = 0;
+ m_pItems = new SfxPoolItem const *[size]{};
+}
+
SfxItemSet::SfxItemSet( SfxItemPool& rPool, const sal_uInt16* pWhichPairTable )
: m_pPool(&rPool)
, m_pParent(nullptr)
diff --git a/svx/source/dialog/databaseregistrationui.cxx b/svx/source/dialog/databaseregistrationui.cxx
index 4827a7580361..68c8ffa6bf7c 100644
--- a/svx/source/dialog/databaseregistrationui.cxx
+++ b/svx/source/dialog/databaseregistrationui.cxx
@@ -33,7 +33,7 @@ namespace svx
{
sal_uInt16 nResult = RET_CANCEL;
- SfxItemSet aRegistrationItems( SfxGetpApp()->GetPool(), SID_SB_DB_REGISTER, SID_SB_DB_REGISTER, 0 );
+ SfxItemSet aRegistrationItems( SfxGetpApp()->GetPool(), svl::Items<SID_SB_DB_REGISTER, SID_SB_DB_REGISTER>{} );
SvxAbstractDialogFactory* pDialogFactory = SvxAbstractDialogFactory::Create();
ScopedVclPtr<SfxAbstractDialog> pDialog;
diff --git a/svx/source/dialog/dlgctl3d.cxx b/svx/source/dialog/dlgctl3d.cxx
index 17952278e00d..0fe4c3535fbd 100644
--- a/svx/source/dialog/dlgctl3d.cxx
+++ b/svx/source/dialog/dlgctl3d.cxx
@@ -131,9 +131,8 @@ void Svx3DPreviewControl::Construct()
mpScene->SetRectsDirty();
SfxItemSet aSet( mpModel->GetItemPool(),
- XATTR_LINESTYLE, XATTR_LINESTYLE,
- XATTR_FILL_FIRST, XATTR_FILLBITMAP,
- 0, 0 );
+ svl::Items<XATTR_LINESTYLE, XATTR_LINESTYLE,
+ XATTR_FILL_FIRST, XATTR_FILLBITMAP>{} );
aSet.Put( XLineStyleItem( drawing::LineStyle_NONE ) );
aSet.Put( XFillStyleItem( drawing::FillStyle_SOLID ) );
aSet.Put( XFillColorItem( "", Color( COL_WHITE ) ) );
@@ -189,7 +188,7 @@ void Svx3DPreviewControl::SetObjectType(SvxPreviewObjectType nType)
{
if( mnObjectType != nType || !mp3DObj)
{
- SfxItemSet aSet(mpModel->GetItemPool(), SDRATTR_START, SDRATTR_END, 0, 0);
+ SfxItemSet aSet(mpModel->GetItemPool(), svl::Items<SDRATTR_START, SDRATTR_END>{});
mnObjectType = nType;
if( mp3DObj )
diff --git a/svx/source/dialog/hdft.cxx b/svx/source/dialog/hdft.cxx
index 044a1d9f7ddc..6a4d0bb2ece3 100644
--- a/svx/source/dialog/hdft.cxx
+++ b/svx/source/dialog/hdft.cxx
@@ -599,12 +599,11 @@ IMPL_LINK_NOARG(SvxHFPage, BackgroundHdl, Button*, void)
{
pBBSet = new SfxItemSet(
*GetItemSet().GetPool(),
- XATTR_FILL_FIRST, XATTR_FILL_LAST, // DrawingLayer FillStyle definitions
- SID_COLOR_TABLE, SID_PATTERN_LIST, // XPropertyLists for Color, Gradient, Hatch and Graphic fills
- nOuter, nOuter,
- nInner, nInner,
- nShadow, nShadow,
- 0, 0);
+ {{XATTR_FILL_FIRST, XATTR_FILL_LAST}, // DrawingLayer FillStyle definitions
+ {SID_COLOR_TABLE, SID_PATTERN_LIST}, // XPropertyLists for Color, Gradient, Hatch and Graphic fills
+ {nOuter, nOuter},
+ {nInner, nInner},
+ {nShadow, nShadow}});
// copy items for XPropertyList entries from the DrawModel so that
// the Area TabPage can access them
@@ -637,11 +636,10 @@ IMPL_LINK_NOARG(SvxHFPage, BackgroundHdl, Button*, void)
pBBSet = new SfxItemSet(
*GetItemSet().GetPool(),
- nBrush, nBrush,
- nOuter, nOuter,
- nInner, nInner,
- nShadow, nShadow,
- 0, 0);
+ {{nBrush, nBrush},
+ {nOuter, nOuter},
+ {nInner, nInner},
+ {nShadow, nShadow}});
}
const SfxPoolItem* pItem;
@@ -713,7 +711,7 @@ IMPL_LINK_NOARG(SvxHFPage, BackgroundHdl, Button*, void)
{
// create FillAttributes from SvxBrushItem
const SvxBrushItem& rItem = static_cast< const SvxBrushItem& >(pBBSet->Get(nWhich));
- SfxItemSet aTempSet(*pBBSet->GetPool(), XATTR_FILL_FIRST, XATTR_FILL_LAST);
+ SfxItemSet aTempSet(*pBBSet->GetPool(), svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST>{});
setSvxBrushItemAsFillAttributesToTargetSet(rItem, aTempSet);
aFillAttributes.reset(new drawinglayer::attribute::SdrAllFillAttributesHelper(aTempSet));
@@ -800,7 +798,7 @@ void SvxHFPage::ResetBackground_Impl( const SfxItemSet& rSet )
{
// create FillAttributes from SvxBrushItem
const SvxBrushItem& rItem = static_cast< const SvxBrushItem& >(rTmpSet.Get(nWhich));
- SfxItemSet aTempSet(*rTmpSet.GetPool(), XATTR_FILL_FIRST, XATTR_FILL_LAST);
+ SfxItemSet aTempSet(*rTmpSet.GetPool(), svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST>{});
setSvxBrushItemAsFillAttributesToTargetSet(rItem, aTempSet);
aHeaderFillAttributes.reset(new drawinglayer::attribute::SdrAllFillAttributesHelper(aTempSet));
@@ -844,7 +842,7 @@ void SvxHFPage::ResetBackground_Impl( const SfxItemSet& rSet )
{
// create FillAttributes from SvxBrushItem
const SvxBrushItem& rItem = static_cast< const SvxBrushItem& >(rTmpSet.Get(nWhich));
- SfxItemSet aTempSet(*rTmpSet.GetPool(), XATTR_FILL_FIRST, XATTR_FILL_LAST);
+ SfxItemSet aTempSet(*rTmpSet.GetPool(), svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST>{});
setSvxBrushItemAsFillAttributesToTargetSet(rItem, aTempSet);
aFooterFillAttributes.reset(new drawinglayer::attribute::SdrAllFillAttributesHelper(aTempSet));
@@ -877,7 +875,7 @@ void SvxHFPage::ResetBackground_Impl( const SfxItemSet& rSet )
{
// create FillAttributes from SvxBrushItem
const SvxBrushItem& rItem = static_cast< const SvxBrushItem& >(rSet.Get(nWhich));
- SfxItemSet aTempSet(*rSet.GetPool(), XATTR_FILL_FIRST, XATTR_FILL_LAST);
+ SfxItemSet aTempSet(*rSet.GetPool(), svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST>{});
setSvxBrushItemAsFillAttributesToTargetSet(rItem, aTempSet);
aPageFillAttributes.reset(new drawinglayer::attribute::SdrAllFillAttributesHelper(aTempSet));
diff --git a/svx/source/dialog/imapwnd.cxx b/svx/source/dialog/imapwnd.cxx
index 44534a92627d..8b7456d585a9 100644
--- a/svx/source/dialog/imapwnd.cxx
+++ b/svx/source/dialog/imapwnd.cxx
@@ -635,7 +635,7 @@ void IMapWindow::DoMacroAssign()
if ( pSdrObj )
{
- SfxItemSet aSet( *pIMapPool, SID_ATTR_MACROITEM, SID_ATTR_MACROITEM, SID_EVENTCONFIG, SID_EVENTCONFIG, 0 );
+ SfxItemSet aSet( *pIMapPool, svl::Items<SID_ATTR_MACROITEM, SID_ATTR_MACROITEM, SID_EVENTCONFIG, SID_EVENTCONFIG>{} );
SfxEventNamesItem aNamesItem(SID_EVENTCONFIG);
aNamesItem.AddEvent( "MouseOver", "", SFX_EVENT_MOUSEOVER_OBJECT );
diff --git a/svx/source/engine3d/float3d.cxx b/svx/source/engine3d/float3d.cxx
index f55dd445ec40..d2b3077d71fa 100644
--- a/svx/source/engine3d/float3d.cxx
+++ b/svx/source/engine3d/float3d.cxx
@@ -468,9 +468,8 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
mpRemember2DAttributes->ClearItem();
else
mpRemember2DAttributes = o3tl::make_unique<SfxItemSet>(*rAttrs.GetPool(),
- SDRATTR_START, SDRATTR_SHADOW_LAST,
- SDRATTR_3D_FIRST, SDRATTR_3D_LAST,
- 0, 0);
+ svl::Items<SDRATTR_START, SDRATTR_SHADOW_LAST,
+ SDRATTR_3D_FIRST, SDRATTR_3D_LAST>{});
SfxWhichIter aIter(*mpRemember2DAttributes);
sal_uInt16 nWhich(aIter.FirstWhich());
@@ -2793,7 +2792,7 @@ void Svx3DWin::UpdatePreview()
pModel = new FmFormModel();
// Get Itemset
- SfxItemSet aSet( pModel->GetItemPool(), SDRATTR_START, SDRATTR_END);
+ SfxItemSet aSet( pModel->GetItemPool(), svl::Items<SDRATTR_START, SDRATTR_END>{});
// Get Attributes and set the preview
GetAttr( aSet );
diff --git a/svx/source/engine3d/view3d1.cxx b/svx/source/engine3d/view3d1.cxx
index 74ada1128d04..27cf4a30e5b9 100644
--- a/svx/source/engine3d/view3d1.cxx
+++ b/svx/source/engine3d/view3d1.cxx
@@ -103,9 +103,8 @@ SfxItemSet E3dView::Get3DAttributes() const
// Creating itemset with corresponding field
SfxItemSet aSet(
mpModel->GetItemPool(),
- SDRATTR_START, SDRATTR_END,
- SID_ATTR_3D_INTERN, SID_ATTR_3D_INTERN,
- 0, 0);
+ svl::Items<SDRATTR_START, SDRATTR_END,
+ SID_ATTR_3D_INTERN, SID_ATTR_3D_INTERN>{});
sal_uInt32 nSelectedItems(0L);
@@ -129,7 +128,7 @@ SfxItemSet E3dView::Get3DAttributes() const
if(!nSelectedItems)
{
// Get defaults and apply
- SfxItemSet aDefaultSet(mpModel->GetItemPool(), SDRATTR_3D_FIRST, SDRATTR_3D_LAST);
+ SfxItemSet aDefaultSet(mpModel->GetItemPool(), svl::Items<SDRATTR_3D_FIRST, SDRATTR_3D_LAST>{});
GetAttributes(aDefaultSet);
aSet.Put(aDefaultSet);
@@ -169,7 +168,7 @@ void E3dView::Set3DAttributes( const SfxItemSet& rAttr)
if(!nSelectedItems)
{
// Set defaults
- SfxItemSet aDefaultSet(mpModel->GetItemPool(), SDRATTR_3D_FIRST, SDRATTR_3D_LAST);
+ SfxItemSet aDefaultSet(mpModel->GetItemPool(), svl::Items<SDRATTR_3D_FIRST, SDRATTR_3D_LAST>{});
aDefaultSet.Put(rAttr);
SetAttributes(aDefaultSet);
}
diff --git a/svx/source/sdr/properties/attributeproperties.cxx b/svx/source/sdr/properties/attributeproperties.cxx
index 137cc6bd93c0..de3873a8179f 100644
--- a/svx/source/sdr/properties/attributeproperties.cxx
+++ b/svx/source/sdr/properties/attributeproperties.cxx
@@ -118,12 +118,9 @@ namespace sdr
return o3tl::make_unique<SfxItemSet>(rPool,
// ranges from SdrAttrObj
- SDRATTR_START, SDRATTR_SHADOW_LAST,
+ svl::Items<SDRATTR_START, SDRATTR_SHADOW_LAST,
SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST,
- SDRATTR_TEXTDIRECTION, SDRATTR_TEXTDIRECTION,
-
- // end
- 0, 0);
+ SDRATTR_TEXTDIRECTION, SDRATTR_TEXTDIRECTION>{});
}
AttributeProperties::AttributeProperties(SdrObject& rObj)
diff --git a/svx/source/sdr/properties/captionproperties.cxx b/svx/source/sdr/properties/captionproperties.cxx
index be25e2ed6e50..2a32b8dab720 100644
--- a/svx/source/sdr/properties/captionproperties.cxx
+++ b/svx/source/sdr/properties/captionproperties.cxx
@@ -38,7 +38,7 @@ namespace sdr
return o3tl::make_unique<SfxItemSet>(rPool,
// range from SdrAttrObj
- SDRATTR_START, SDRATTR_SHADOW_LAST,
+ svl::Items<SDRATTR_START, SDRATTR_SHADOW_LAST,
SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST,
SDRATTR_TEXTDIRECTION, SDRATTR_TEXTDIRECTION,
@@ -46,10 +46,7 @@ namespace sdr
SDRATTR_CAPTION_FIRST, SDRATTR_CAPTION_LAST,
// range from SdrTextObj
- EE_ITEMS_START, EE_ITEMS_END,
-
- // end
- 0, 0);
+ EE_ITEMS_START, EE_ITEMS_END>{});
}
CaptionProperties::CaptionProperties(SdrObject& rObj)
diff --git a/svx/source/sdr/properties/circleproperties.cxx b/svx/source/sdr/properties/circleproperties.cxx
index 4168e28e29e7..4782128d79ff 100644
--- a/svx/source/sdr/properties/circleproperties.cxx
+++ b/svx/source/sdr/properties/circleproperties.cxx
@@ -40,7 +40,7 @@ namespace sdr
return o3tl::make_unique<SfxItemSet>(rPool,
// range from SdrAttrObj
- SDRATTR_START, SDRATTR_SHADOW_LAST,
+ svl::Items<SDRATTR_START, SDRATTR_SHADOW_LAST,
SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST,
SDRATTR_TEXTDIRECTION, SDRATTR_TEXTDIRECTION,
@@ -48,10 +48,7 @@ namespace sdr
SDRATTR_CIRC_FIRST, SDRATTR_CIRC_LAST,
// range from SdrTextObj
- EE_ITEMS_START, EE_ITEMS_END,
-
- // end
- 0, 0);
+ EE_ITEMS_START, EE_ITEMS_END>{});
}
CircleProperties::CircleProperties(SdrObject& rObj)
diff --git a/svx/source/sdr/properties/connectorproperties.cxx b/svx/source/sdr/properties/connectorproperties.cxx
index 05501095a21c..fc7b278fdb77 100644
--- a/svx/source/sdr/properties/connectorproperties.cxx
+++ b/svx/source/sdr/properties/connectorproperties.cxx
@@ -38,7 +38,7 @@ namespace sdr
return o3tl::make_unique<SfxItemSet>(rPool,
// range from SdrAttrObj
- SDRATTR_START, SDRATTR_SHADOW_LAST,
+ svl::Items<SDRATTR_START, SDRATTR_SHADOW_LAST,
SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST,
SDRATTR_TEXTDIRECTION, SDRATTR_TEXTDIRECTION,
@@ -46,10 +46,7 @@ namespace sdr
SDRATTR_EDGE_FIRST, SDRATTR_EDGE_LAST,
// range from SdrTextObj
- EE_ITEMS_START, EE_ITEMS_END,
-
- // end
- 0, 0);
+ EE_ITEMS_START, EE_ITEMS_END>{});
}
ConnectorProperties::ConnectorProperties(SdrObject& rObj)
diff --git a/svx/source/sdr/properties/customshapeproperties.cxx b/svx/source/sdr/properties/customshapeproperties.cxx
index f674ab5b51b0..05e28368f529 100644
--- a/svx/source/sdr/properties/customshapeproperties.cxx
+++ b/svx/source/sdr/properties/customshapeproperties.cxx
@@ -67,7 +67,7 @@ namespace sdr
return o3tl::make_unique<SfxItemSet>(rPool,
// ranges from SdrAttrObj
- SDRATTR_START, SDRATTR_SHADOW_LAST,
+ svl::Items<SDRATTR_START, SDRATTR_SHADOW_LAST,
SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST,
SDRATTR_TEXTDIRECTION, SDRATTR_TEXTDIRECTION,
@@ -81,10 +81,7 @@ namespace sdr
SDRATTR_CUSTOMSHAPE_FIRST, SDRATTR_CUSTOMSHAPE_LAST,
// range from SdrTextObj
- EE_ITEMS_START, EE_ITEMS_END,
-
- // end
- 0, 0);
+ EE_ITEMS_START, EE_ITEMS_END>{});
}
bool CustomShapeProperties::AllowItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem ) const
diff --git a/svx/source/sdr/properties/defaultproperties.cxx b/svx/source/sdr/properties/defaultproperties.cxx
index ce5d927ba270..167e368382c4 100644
--- a/svx/source/sdr/properties/defaultproperties.cxx
+++ b/svx/source/sdr/properties/defaultproperties.cxx
@@ -96,7 +96,7 @@ namespace sdr
ItemChange(nWhichID, &rItem);
PostItemChange(nWhichID);
- SfxItemSet aSet(GetSdrObject().GetObjectItemPool(), nWhichID, nWhichID);
+ SfxItemSet aSet(GetSdrObject().GetObjectItemPool(), {{nWhichID, nWhichID}});
aSet.Put(rItem);
ItemSetChanged(aSet);
}
@@ -121,7 +121,7 @@ namespace sdr
if(nWhich)
{
- SfxItemSet aSet(GetSdrObject().GetObjectItemPool(), nWhich, nWhich, 0, 0);
+ SfxItemSet aSet(GetSdrObject().GetObjectItemPool(), {{nWhich, nWhich}});
ItemSetChanged(aSet);
}
}
@@ -142,7 +142,7 @@ namespace sdr
const SfxPoolItem *pPoolItem;
std::vector< sal_uInt16 > aPostItemChangeList;
bool bDidChange(false);
- SfxItemSet aSet(GetSdrObject().GetObjectItemPool(), SDRATTR_START, EE_ITEMS_END);
+ SfxItemSet aSet(GetSdrObject().GetObjectItemPool(), svl::Items<SDRATTR_START, EE_ITEMS_END>{});
// give a hint to STL_Vector
aPostItemChangeList.reserve(rSet.Count());
diff --git a/svx/source/sdr/properties/e3dcompoundproperties.cxx b/svx/source/sdr/properties/e3dcompoundproperties.cxx
index 5b24f56273ae..7da70b568254 100644
--- a/svx/source/sdr/properties/e3dcompoundproperties.cxx
+++ b/svx/source/sdr/properties/e3dcompoundproperties.cxx
@@ -58,7 +58,7 @@ namespace sdr
GetObjectItemSet();
// add filtered scene properties (SDRATTR_3DSCENE_) to local itemset
- SfxItemSet aSet(*mpItemSet->GetPool(), SDRATTR_3DSCENE_FIRST, SDRATTR_3DSCENE_LAST);
+ SfxItemSet aSet(*mpItemSet->GetPool(), svl::Items<SDRATTR_3DSCENE_FIRST, SDRATTR_3DSCENE_LAST>{});
aSet.Put(pScene->GetProperties().GetObjectItemSet());
mpItemSet->Put(aSet);
}
@@ -79,7 +79,7 @@ namespace sdr
GetObjectItemSet();
// Generate filtered scene properties (SDRATTR_3DSCENE_) itemset
- SfxItemSet aSet(*mpItemSet->GetPool(), SDRATTR_3DSCENE_FIRST, SDRATTR_3DSCENE_LAST);
+ SfxItemSet aSet(*mpItemSet->GetPool(), svl::Items<SDRATTR_3DSCENE_FIRST, SDRATTR_3DSCENE_LAST>{});
aSet.Put(rSet);
if(bClearAllItems)
diff --git a/svx/source/sdr/properties/e3dproperties.cxx b/svx/source/sdr/properties/e3dproperties.cxx
index 2a674886e570..e22c10d2ed5f 100644
--- a/svx/source/sdr/properties/e3dproperties.cxx
+++ b/svx/source/sdr/properties/e3dproperties.cxx
@@ -36,15 +36,12 @@ namespace sdr
return o3tl::make_unique<SfxItemSet>(rPool,
// ranges from SdrAttrObj
- SDRATTR_START, SDRATTR_SHADOW_LAST,
+ svl::Items<SDRATTR_START, SDRATTR_SHADOW_LAST,
SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST,
SDRATTR_TEXTDIRECTION, SDRATTR_TEXTDIRECTION,
// ranges from E3dObject, contains object and scene because of GetMergedItemSet()
- SDRATTR_3D_FIRST, SDRATTR_3D_LAST,
-
- // end
- 0, 0);
+ SDRATTR_3D_FIRST, SDRATTR_3D_LAST>{});
}
E3dProperties::E3dProperties(SdrObject& rObj)
diff --git a/svx/source/sdr/properties/e3dsceneproperties.cxx b/svx/source/sdr/properties/e3dsceneproperties.cxx
index f7e459ac66ed..2639a96d9e7a 100644
--- a/svx/source/sdr/properties/e3dsceneproperties.cxx
+++ b/svx/source/sdr/properties/e3dsceneproperties.cxx
@@ -55,7 +55,7 @@ namespace sdr
if(mpItemSet)
{
// filter for SDRATTR_3DSCENE_ items, only keep those items
- SfxItemSet aNew(*mpItemSet->GetPool(), SDRATTR_3DSCENE_FIRST, SDRATTR_3DSCENE_LAST);
+ SfxItemSet aNew(*mpItemSet->GetPool(), svl::Items<SDRATTR_3DSCENE_FIRST, SDRATTR_3DSCENE_LAST>{});
aNew.Put(*mpItemSet);
mpItemSet->ClearItem();
mpItemSet->Put(aNew);
diff --git a/svx/source/sdr/properties/graphicproperties.cxx b/svx/source/sdr/properties/graphicproperties.cxx
index 955384961f70..8ea829f85c5b 100644
--- a/svx/source/sdr/properties/graphicproperties.cxx
+++ b/svx/source/sdr/properties/graphicproperties.cxx
@@ -39,7 +39,7 @@ namespace sdr
return o3tl::make_unique<SfxItemSet>(rPool,
// range from SdrAttrObj
- SDRATTR_START, SDRATTR_SHADOW_LAST,
+ svl::Items<SDRATTR_START, SDRATTR_SHADOW_LAST,
SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST,
SDRATTR_TEXTDIRECTION, SDRATTR_TEXTDIRECTION,
@@ -47,10 +47,7 @@ namespace sdr
SDRATTR_GRAF_FIRST, SDRATTR_GRAF_LAST,
// range from SdrTextObj
- EE_ITEMS_START, EE_ITEMS_END,
-
- // end
- 0, 0);
+ EE_ITEMS_START, EE_ITEMS_END>{});
}
GraphicProperties::GraphicProperties(SdrObject& rObj)
diff --git a/svx/source/sdr/properties/measureproperties.cxx b/svx/source/sdr/properties/measureproperties.cxx
index 03f10aeda774..3b1ae3ee3fda 100644
--- a/svx/source/sdr/properties/measureproperties.cxx
+++ b/svx/source/sdr/properties/measureproperties.cxx
@@ -44,7 +44,7 @@ namespace sdr
return o3tl::make_unique<SfxItemSet>(rPool,
// range from SdrAttrObj
- SDRATTR_START, SDRATTR_SHADOW_LAST,
+ svl::Items<SDRATTR_START, SDRATTR_SHADOW_LAST,
SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST,
SDRATTR_TEXTDIRECTION, SDRATTR_TEXTDIRECTION,
@@ -52,10 +52,7 @@ namespace sdr
SDRATTR_MEASURE_FIRST, SDRATTR_MEASURE_LAST,
// range from SdrTextObj
- EE_ITEMS_START, EE_ITEMS_END,
-
- // end
- 0, 0);
+ EE_ITEMS_START, EE_ITEMS_END>{});
}
MeasureProperties::MeasureProperties(SdrObject& rObj)
diff --git a/svx/source/sdr/properties/textproperties.cxx b/svx/source/sdr/properties/textproperties.cxx
index 4749a1c02506..76317ca6683c 100644
--- a/svx/source/sdr/properties/textproperties.cxx
+++ b/svx/source/sdr/properties/textproperties.cxx
@@ -50,15 +50,12 @@ namespace sdr
return o3tl::make_unique<SfxItemSet>(rPool,
// range from SdrAttrObj
- SDRATTR_START, SDRATTR_SHADOW_LAST,
+ svl::Items<SDRATTR_START, SDRATTR_SHADOW_LAST,
SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST,
SDRATTR_TEXTDIRECTION, SDRATTR_TEXTDIRECTION,
// range from SdrTextObj
- EE_ITEMS_START, EE_ITEMS_END,
-
- // end
- 0, 0);
+ EE_ITEMS_START, EE_ITEMS_END>{});
}
TextProperties::TextProperties(SdrObject& rObj)
@@ -483,7 +480,7 @@ namespace sdr
if(bHasURL)
{
- SfxItemSet aColorSet(*aSet.GetPool(), EE_CHAR_COLOR, EE_CHAR_COLOR );
+ SfxItemSet aColorSet(*aSet.GetPool(), svl::Items<EE_CHAR_COLOR, EE_CHAR_COLOR>{} );
aColorSet.Put(aSet, false);
ESelection aSel(nPara, 0);
diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx
index b46d6ae7e0c8..da33c32f0d26 100644
--- a/svx/source/svdraw/svddrgmt.cxx
+++ b/svx/source/svdraw/svddrgmt.cxx
@@ -3978,7 +3978,7 @@ bool SdrDragCrop::EndSdrDrag(bool /*bCopy*/)
sal_Int32 nBottomCrop = static_cast<sal_Int32>( rOldCrop.GetBottom() - nDiffBottom * fScaleY );
SfxItemPool& rPool = getSdrDragView().GetModel()->GetItemPool();
- SfxItemSet aSet( rPool, SDRATTR_GRAFCROP, SDRATTR_GRAFCROP );
+ SfxItemSet aSet( rPool, svl::Items<SDRATTR_GRAFCROP, SDRATTR_GRAFCROP>{} );
aSet.Put( SdrGrafCropItem( nLeftCrop, nTopCrop, nRightCrop, nBottomCrop ) );
getSdrDragView().SetAttributes( aSet, false );
diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx
index 062c828ca20c..d45f9ab819c1 100644
--- a/svx/source/svdraw/svdedtv1.cxx
+++ b/svx/source/svdraw/svdedtv1.cxx
@@ -1270,10 +1270,9 @@ bool SdrEditView::SetStyleSheet(SfxStyleSheet* pStyleSheet, bool bDontRemoveHard
SfxItemSet SdrEditView::GetGeoAttrFromMarked() const
{
SfxItemSet aRetSet(mpModel->GetItemPool(), // SID_ATTR_TRANSFORM_... from s:svxids.hrc
- SID_ATTR_TRANSFORM_POS_X, SID_ATTR_TRANSFORM_ANGLE,
+ svl::Items<SID_ATTR_TRANSFORM_POS_X, SID_ATTR_TRANSFORM_ANGLE,
SID_ATTR_TRANSFORM_PROTECT_POS, SID_ATTR_TRANSFORM_AUTOHEIGHT,
- SDRATTR_ECKENRADIUS, SDRATTR_ECKENRADIUS,
- 0);
+ SDRATTR_ECKENRADIUS, SDRATTR_ECKENRADIUS>{});
if (AreObjectsMarked())
{
diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx
index 671f1d4591e8..b26b34cc48a6 100644
--- a/svx/source/svdraw/svdedtv2.cxx
+++ b/svx/source/svdraw/svdedtv2.cxx
@@ -549,10 +549,9 @@ void SdrEditView::ImpCopyAttributes(const SdrObject* pSource, SdrObject* pDest)
if(pSource && pDest)
{
SfxItemSet aSet(mpModel->GetItemPool(),
- SDRATTR_START, SDRATTR_NOTPERSIST_FIRST-1,
+ svl::Items<SDRATTR_START, SDRATTR_NOTPERSIST_FIRST-1,
SDRATTR_NOTPERSIST_LAST+1, SDRATTR_END,
- EE_ITEMS_START, EE_ITEMS_END,
- 0, 0);
+ EE_ITEMS_START, EE_ITEMS_END>{});
aSet.Put(pSource->GetMergedItemSet());
diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx
index 9b08878962ef..54b8604b1dcd 100644
--- a/svx/source/svdraw/svdfmtf.cxx
+++ b/svx/source/svdraw/svdfmtf.cxx
@@ -110,9 +110,9 @@ ImpSdrGDIMetaFileImport::ImpSdrGDIMetaFileImport(
mpVD->SetLineColor();
mpVD->SetFillColor();
maOldLineColor.SetRed( mpVD->GetLineColor().GetRed() + 1 );
- mpLineAttr = o3tl::make_unique<SfxItemSet>(rModel.GetItemPool(), XATTR_LINE_FIRST, XATTR_LINE_LAST, 0, 0);
- mpFillAttr = o3tl::make_unique<SfxItemSet>(rModel.GetItemPool(), XATTR_FILL_FIRST, XATTR_FILL_LAST, 0, 0);
- mpTextAttr = o3tl::make_unique<SfxItemSet>(rModel.GetItemPool(), EE_ITEMS_START, EE_ITEMS_END, 0, 0);
+ mpLineAttr = o3tl::make_unique<SfxItemSet>(rModel.GetItemPool(), svl::Items<XATTR_LINE_FIRST, XATTR_LINE_LAST>{});
+ mpFillAttr = o3tl::make_unique<SfxItemSet>(rModel.GetItemPool(), svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST>{});
+ mpTextAttr = o3tl::make_unique<SfxItemSet>(rModel.GetItemPool(), svl::Items<EE_ITEMS_START, EE_ITEMS_END>{});
checkClip();
}
@@ -715,7 +715,7 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaRoundRectAction& rAct)
SetAttributes(pRect);
long nRad=(rAct.GetHorzRound()+rAct.GetVertRound())/2;
if (nRad!=0) {
- SfxItemSet aSet(*mpLineAttr->GetPool(), SDRATTR_ECKENRADIUS, SDRATTR_ECKENRADIUS, 0, 0);
+ SfxItemSet aSet(*mpLineAttr->GetPool(), svl::Items<SDRATTR_ECKENRADIUS, SDRATTR_ECKENRADIUS>{});
aSet.Put(SdrMetricItem(SDRATTR_ECKENRADIUS, nRad));
pRect->SetMergedItemSet(aSet);
}
@@ -1016,7 +1016,7 @@ void ImpSdrGDIMetaFileImport::ImportText( const Point& rPos, const OUString& rSt
if (!aFnt.IsTransparent())
{
- SfxItemSet aAttr(*mpFillAttr->GetPool(), XATTR_FILL_FIRST, XATTR_FILL_LAST, 0, 0);
+ SfxItemSet aAttr(*mpFillAttr->GetPool(), svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST>{});
aAttr.Put(XFillStyleItem(drawing::FillStyle_SOLID));
aAttr.Put(XFillColorItem(OUString(), aFnt.GetFillColor()));
pText->SetMergedItemSet(aAttr);
diff --git a/svx/source/svdraw/svdibrow.cxx b/svx/source/svdraw/svdibrow.cxx
index a83797f3c11a..303ecff96f45 100644
--- a/svx/source/svdraw/svdibrow.cxx
+++ b/svx/source/svdraw/svdibrow.cxx
@@ -1138,7 +1138,7 @@ IMPL_LINK(SdrItemBrowser, ChangedHdl, SdrItemBrowserControl&, rBrowse, void)
SfxItemSet aSet(pView->GetModel()->GetItemPool());
pView->GetAttributes(aSet);
- SfxItemSet aNewSet(*aSet.GetPool(),pEntry->nWhichId,pEntry->nWhichId);
+ SfxItemSet aNewSet(*aSet.GetPool(),{{pEntry->nWhichId,pEntry->nWhichId}});
OUString aNewText(rBrowse.GetNewEntryValue());
bool bDel( aNewText == "del"
|| aNewText == "Del"
diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx
index 1b8b0dbe0311..1be76ee3b955 100644
--- a/svx/source/svdraw/svdoashp.cxx
+++ b/svx/source/svdraw/svdoashp.cxx
@@ -1389,9 +1389,8 @@ void SdrObjCustomShape::AdaptTextMinSize()
const bool bResizeShapeToFitText(static_cast< const SdrOnOffItem& >(GetObjectItem(SDRATTR_TEXT_AUTOGROWHEIGHT)).GetValue());
SfxItemSet aSet(
*GetObjectItemSet().GetPool(),
- SDRATTR_TEXT_MINFRAMEHEIGHT, SDRATTR_TEXT_AUTOGROWHEIGHT,
- SDRATTR_TEXT_MINFRAMEWIDTH, SDRATTR_TEXT_AUTOGROWWIDTH, // contains SDRATTR_TEXT_MAXFRAMEWIDTH
- 0, 0);
+ svl::Items<SDRATTR_TEXT_MINFRAMEHEIGHT, SDRATTR_TEXT_AUTOGROWHEIGHT,
+ SDRATTR_TEXT_MINFRAMEWIDTH, SDRATTR_TEXT_AUTOGROWWIDTH>{}); // contains SDRATTR_TEXT_MAXFRAMEWIDTH
bool bChanged(false);
if(bResizeShapeToFitText)
@@ -2202,11 +2201,10 @@ void SdrObjCustomShape::SetVerticalWriting( bool bVertical )
// prepare ItemSet to set exchanged width and height items
SfxItemSet aNewSet(*rSet.GetPool(),
- SDRATTR_TEXT_AUTOGROWHEIGHT, SDRATTR_TEXT_AUTOGROWHEIGHT,
+ svl::Items<SDRATTR_TEXT_AUTOGROWHEIGHT, SDRATTR_TEXT_AUTOGROWHEIGHT,
// Expanded item ranges to also support horizontal and vertical adjust.
SDRATTR_TEXT_VERTADJUST, SDRATTR_TEXT_VERTADJUST,
- SDRATTR_TEXT_AUTOGROWWIDTH, SDRATTR_TEXT_HORZADJUST,
- 0, 0);
+ SDRATTR_TEXT_AUTOGROWWIDTH, SDRATTR_TEXT_HORZADJUST>{});
aNewSet.Put(rSet);
diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
index 52f8bf1e616e..3ee0475d31f9 100644
--- a/svx/source/svdraw/svdotext.cxx
+++ b/svx/source/svdraw/svdotext.cxx
@@ -544,9 +544,8 @@ void SdrTextObj::AdaptTextMinSize()
SfxItemSet aSet(
*GetObjectItemSet().GetPool(),
- SDRATTR_TEXT_MINFRAMEHEIGHT, SDRATTR_TEXT_AUTOGROWHEIGHT,
- SDRATTR_TEXT_MINFRAMEWIDTH, SDRATTR_TEXT_AUTOGROWWIDTH, // contains SDRATTR_TEXT_MAXFRAMEWIDTH
- 0, 0);
+ svl::Items<SDRATTR_TEXT_MINFRAMEHEIGHT, SDRATTR_TEXT_AUTOGROWHEIGHT,
+ SDRATTR_TEXT_MINFRAMEWIDTH, SDRATTR_TEXT_AUTOGROWWIDTH>{}); // contains SDRATTR_TEXT_MAXFRAMEWIDTH
if(bW)
{
@@ -1555,11 +1554,10 @@ void SdrTextObj::SetVerticalWriting(bool bVertical)
// prepare ItemSet to set exchanged width and height items
SfxItemSet aNewSet(*rSet.GetPool(),
- SDRATTR_TEXT_AUTOGROWHEIGHT, SDRATTR_TEXT_AUTOGROWHEIGHT,
+ svl::Items<SDRATTR_TEXT_AUTOGROWHEIGHT, SDRATTR_TEXT_AUTOGROWHEIGHT,
// Expanded item ranges to also support hor and ver adjust.
SDRATTR_TEXT_VERTADJUST, SDRATTR_TEXT_VERTADJUST,
- SDRATTR_TEXT_AUTOGROWWIDTH, SDRATTR_TEXT_HORZADJUST,
- 0, 0);
+ SDRATTR_TEXT_AUTOGROWWIDTH, SDRATTR_TEXT_HORZADJUST>{});
aNewSet.Put(rSet);
aNewSet.Put(makeSdrTextAutoGrowWidthItem(bAutoGrowHeight));
diff --git a/svx/source/svdraw/svdotxed.cxx b/svx/source/svdraw/svdotxed.cxx
index 3d4b392bab22..515277a4cd18 100644
--- a/svx/source/svdraw/svdotxed.cxx
+++ b/svx/source/svdraw/svdotxed.cxx
@@ -96,7 +96,7 @@ bool SdrTextObj::BegTextEdit(SdrOutliner& rOutl)
// at SetParaAttribs(), all attributes contained in the parent become
// attributed hard to the paragraph.
const SfxItemSet& rSet = GetObjectItemSet();
- SfxItemSet aFilteredSet(*rSet.GetPool(), EE_ITEMS_START, EE_ITEMS_END);
+ SfxItemSet aFilteredSet(*rSet.GetPool(), svl::Items<EE_ITEMS_START, EE_ITEMS_END>{});
aFilteredSet.Put(rSet);
rOutl.SetParaAttribs(0, aFilteredSet);
}
diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx
index 24e440fab2e0..b50e0990caa8 100644
--- a/svx/source/svdraw/svdpage.cxx
+++ b/svx/source/svdraw/svdpage.cxx
@@ -1081,7 +1081,7 @@ SdrPageProperties::SdrPageProperties(SdrPage& rSdrPage)
: SfxListener(),
mpSdrPage(&rSdrPage),
mpStyleSheet(nullptr),
- maProperties(mpSdrPage->GetModel()->GetItemPool(), XATTR_FILL_FIRST, XATTR_FILL_LAST)
+ maProperties(mpSdrPage->GetModel()->GetItemPool(), svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST>{})
{
if(!rSdrPage.IsMasterPage())
{
diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx
index c1703c9cb88e..c2d539cc25d4 100644
--- a/svx/source/table/cell.cxx
+++ b/svx/source/table/cell.cxx
@@ -183,7 +183,7 @@ namespace sdr
return o3tl::make_unique<SfxItemSet>(rPool,
// range from SdrAttrObj
- SDRATTR_START, SDRATTR_SHADOW_LAST,
+ svl::Items<SDRATTR_START, SDRATTR_SHADOW_LAST,
SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST,
SDRATTR_TEXTDIRECTION, SDRATTR_TEXTDIRECTION,
@@ -191,10 +191,7 @@ namespace sdr
SDRATTR_TABLE_FIRST, SDRATTR_TABLE_LAST,
// range from SdrTextObj
- EE_ITEMS_START, EE_ITEMS_END,
-
- // end
- 0, 0);
+ EE_ITEMS_START, EE_ITEMS_END>{});
}
const svx::ITextProvider& CellProperties::getTextProvider() const
@@ -360,8 +357,7 @@ namespace sdr
// prepare ItemSet to set exchanged width and height items
SfxItemSet aNewSet(*rSet.GetPool(),
- SDRATTR_TEXT_AUTOGROWHEIGHT, SDRATTR_TEXT_AUTOGROWHEIGHT,
- 0, 0);
+ svl::Items<SDRATTR_TEXT_AUTOGROWHEIGHT, SDRATTR_TEXT_AUTOGROWHEIGHT>{});
aNewSet.Put(rSet);
aNewSet.Put(makeSdrTextAutoGrowWidthItem(bAutoGrowHeight));
@@ -1116,7 +1112,7 @@ void SAL_CALL Cell::setPropertyValue( const OUString& rPropertyName, const Any&
}
default:
{
- SfxItemSet aSet( GetModel()->GetItemPool(), pMap->nWID, pMap->nWID);
+ SfxItemSet aSet( GetModel()->GetItemPool(), {{pMap->nWID, pMap->nWID}});
aSet.Put(mpProperties->GetItem(pMap->nWID));
bool bSpecial = false;
@@ -1236,7 +1232,7 @@ Any SAL_CALL Cell::getPropertyValue( const OUString& PropertyName )
}
default:
{
- SfxItemSet aSet( GetModel()->GetItemPool(), pMap->nWID, pMap->nWID);
+ SfxItemSet aSet( GetModel()->GetItemPool(), {{pMap->nWID, pMap->nWID}});
aSet.Put(mpProperties->GetItem(pMap->nWID));
Any aAny;
@@ -1570,7 +1566,7 @@ Any SAL_CALL Cell::getPropertyDefault( const OUString& aPropertyName )
{
if( SfxItemPool::IsWhich(pMap->nWID) )
{
- SfxItemSet aSet( GetModel()->GetItemPool(), pMap->nWID, pMap->nWID);
+ SfxItemSet aSet( GetModel()->GetItemPool(), {{pMap->nWID, pMap->nWID}});
aSet.Put(GetModel()->GetItemPool().GetDefaultItem(pMap->nWID));
return GetAnyForItem( aSet, pMap );
}
diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx
index 2e2d01887fa2..98ff74e07471 100644
--- a/svx/source/table/svdotable.cxx
+++ b/svx/source/table/svdotable.cxx
@@ -130,7 +130,7 @@ std::unique_ptr<SfxItemSet> TableProperties::CreateObjectSpecificItemSet(SfxItem
return o3tl::make_unique<SfxItemSet>(rPool,
// range from SdrAttrObj
- SDRATTR_START, SDRATTR_SHADOW_LAST,
+ svl::Items<SDRATTR_START, SDRATTR_SHADOW_LAST,
SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST,
SDRATTR_TEXTDIRECTION, SDRATTR_TEXTDIRECTION,
@@ -138,10 +138,7 @@ std::unique_ptr<SfxItemSet> TableProperties::CreateObjectSpecificItemSet(SfxItem
SDRATTR_TABLE_FIRST, SDRATTR_TABLE_LAST,
// range from SdrTextObj
- EE_ITEMS_START, EE_ITEMS_END,
-
- // end
- 0, 0);
+ EE_ITEMS_START, EE_ITEMS_END>{});
}
class TableObjectGeoData : public SdrTextObjGeoData
diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx
index 7b45fdadd62c..e753d7c6f1a6 100644
--- a/svx/source/tbxctrls/grafctrl.cxx
+++ b/svx/source/tbxctrls/grafctrl.cxx
@@ -550,7 +550,7 @@ VclPtr<vcl::Window> SvxGrafModeToolBoxControl::CreateItemWindow( vcl::Window *pP
void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView )
{
SfxItemPool& rPool = rView.GetModel()->GetItemPool();
- SfxItemSet aSet( rPool, SDRATTR_GRAF_FIRST, SDRATTR_GRAF_LAST );
+ SfxItemSet aSet( rPool, svl::Items<SDRATTR_GRAF_FIRST, SDRATTR_GRAF_LAST>{} );
OUString aUndoStr;
const bool bUndo = rView.IsUndoEnabled();
@@ -669,7 +669,7 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView )
( pObj->GetGraphicType() != GraphicType::NONE ) &&
( pObj->GetGraphicType() != GraphicType::Default ) )
{
- SfxItemSet aGrfAttr( rPool, SDRATTR_GRAFCROP, SDRATTR_GRAFCROP, 0 );
+ SfxItemSet aGrfAttr( rPool, svl::Items<SDRATTR_GRAFCROP, SDRATTR_GRAFCROP>{} );
const MapUnit eOldMetric = rPool.GetMetric( 0 );
const MapMode aMap100( MapUnit::Map100thMM );
const MapMode aMapTwip( MapUnit::MapTwip );
@@ -678,11 +678,11 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView )
rPool.SetDefaultMetric( MapUnit::MapTwip );
SfxItemSet aCropDlgAttr( rPool,
- SDRATTR_GRAFCROP, SDRATTR_GRAFCROP,
+ svl::Items<SDRATTR_GRAFCROP, SDRATTR_GRAFCROP,
SID_ATTR_GRAF_GRAPHIC, SID_ATTR_GRAF_GRAPHIC,
SID_ATTR_PAGE_SIZE, SID_ATTR_PAGE_SIZE,
SID_ATTR_GRAF_FRMSIZE, SID_ATTR_GRAF_FRMSIZE,
- SID_ATTR_GRAF_CROP, SID_ATTR_GRAF_CROP, 0 );
+ SID_ATTR_GRAF_CROP, SID_ATTR_GRAF_CROP>{} );
aCropDlgAttr.Put( SvxBrushItem( pObj->GetGraphic(), GPOS_MM, SID_ATTR_GRAF_GRAPHIC ) );
aCropDlgAttr.Put( SvxSizeItem( SID_ATTR_PAGE_SIZE,
diff --git a/svx/source/unodraw/UnoNameItemTable.cxx b/svx/source/unodraw/UnoNameItemTable.cxx
index cab1dace59ce..422e4c1e769b 100644
--- a/svx/source/unodraw/UnoNameItemTable.cxx
+++ b/svx/source/unodraw/UnoNameItemTable.cxx
@@ -81,7 +81,7 @@ sal_Bool SAL_CALL SvxUnoNameItemTable::supportsService( const OUString& Service
void SAL_CALL SvxUnoNameItemTable::ImplInsertByName( const OUString& aName, const uno::Any& aElement )
{
- maItemSetVector.push_back( o3tl::make_unique< SfxItemSet >( *mpModelPool, mnWhich, mnWhich ) );
+ maItemSetVector.push_back( o3tl::make_unique< SfxItemSet >( *mpModelPool, std::initializer_list<SfxItemSet::Pair>{{mnWhich, mnWhich}} ) );
std::unique_ptr<NameOrIndex> pNewItem(createItem());
pNewItem->SetName( aName );
diff --git a/svx/source/unodraw/unomtabl.cxx b/svx/source/unodraw/unomtabl.cxx
index ebb05b90733b..17a54744e6a2 100644
--- a/svx/source/unodraw/unomtabl.cxx
+++ b/svx/source/unodraw/unomtabl.cxx
@@ -143,7 +143,7 @@ uno::Sequence< OUString > SAL_CALL SvxUnoMarkerTable::getSupportedServiceNames(
void SAL_CALL SvxUnoMarkerTable::ImplInsertByName( const OUString& aName, const uno::Any& aElement )
{
maItemSetVector.push_back(
- o3tl::make_unique<SfxItemSet>( *mpModelPool, XATTR_LINESTART, XATTR_LINEEND ));
+ o3tl::make_unique<SfxItemSet>( *mpModelPool, svl::Items<XATTR_LINESTART, XATTR_LINEEND>{} ));
auto pInSet = maItemSetVector.back().get();
XLineEndItem aEndMarker(XATTR_LINEEND);
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index ba50ddedc577..b213c026ebbd 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -649,7 +649,7 @@ void SvxShape::ObtainSettingsFromPropertySet(const SvxItemPropertySet& rPropSet)
DBG_TESTSOLARMUTEX();
if(mpObj.is() && rPropSet.AreThereOwnUsrAnys() && mpModel)
{
- SfxItemSet aSet( mpModel->GetItemPool(), SDRATTR_START, SDRATTR_END);
+ SfxItemSet aSet( mpModel->GetItemPool(), svl::Items<SDRATTR_START, SDRATTR_END>{});
Reference< beans::XPropertySet > xShape( static_cast<OWeakObject*>(this), UNO_QUERY );
SvxItemPropertySet_ObtainSettingsFromPropertySet(rPropSet, aSet, xShape, &mpPropSet->getPropertyMap() );
@@ -1399,7 +1399,7 @@ void SAL_CALL SvxShape::removeVetoableChangeListener( const OUString& , const Re
bool SAL_CALL SvxShape::SetFillAttribute( sal_Int32 nWID, const OUString& rName )
{
- SfxItemSet aSet( mpModel->GetItemPool(), (sal_uInt16)nWID, (sal_uInt16)nWID );
+ SfxItemSet aSet( mpModel->GetItemPool(), {{(sal_uInt16)nWID, (sal_uInt16)nWID}} );
if( SetFillAttribute( nWID, rName, aSet, mpModel ) )
{
@@ -1651,7 +1651,7 @@ void SAL_CALL SvxShape::_setPropertyValue( const OUString& rPropertyName, const
}
else
{
- pSet = new SfxItemSet( mpModel->GetItemPool(), pMap->nWID, pMap->nWID);
+ pSet = new SfxItemSet( mpModel->GetItemPool(), {{pMap->nWID, pMap->nWID}});
}
if( pSet->GetItemState( pMap->nWID ) != SfxItemState::SET )
@@ -1727,7 +1727,7 @@ uno::Any SvxShape::_getPropertyValue( const OUString& PropertyName )
DBG_ASSERT( pMap->nWID == SDRATTR_TEXTDIRECTION || (pMap->nWID < SDRATTR_NOTPERSIST_FIRST || pMap->nWID > SDRATTR_NOTPERSIST_LAST), "Not persist item not handled!" );
DBG_ASSERT( pMap->nWID < OWN_ATTR_VALUE_START || pMap->nWID > OWN_ATTR_VALUE_END, "Not item property not handled!" );
- SfxItemSet aSet( mpModel->GetItemPool(), pMap->nWID, pMap->nWID);
+ SfxItemSet aSet( mpModel->GetItemPool(), {{pMap->nWID, pMap->nWID}});
aSet.Put(mpObj->GetMergedItem(pMap->nWID));
if(SvxUnoTextRangeBase::GetPropertyValueHelper( aSet, pMap, aAny ))
@@ -3011,7 +3011,7 @@ uno::Any SAL_CALL SvxShape::_getPropertyDefault( const OUString& aPropertyName )
if(!SfxItemPool::IsWhich(pMap->nWID))
throw beans::UnknownPropertyException( "No WhichID " + OUString::number(pMap->nWID) + " for " + aPropertyName, static_cast<cppu::OWeakObject*>(this));
- SfxItemSet aSet( mpModel->GetItemPool(), pMap->nWID, pMap->nWID);
+ SfxItemSet aSet( mpModel->GetItemPool(), {{pMap->nWID, pMap->nWID}});
aSet.Put(mpModel->GetItemPool().GetDefaultItem(pMap->nWID));
return GetAnyForItem( aSet, pMap );
diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx
index a9441061442a..e71df58049c6 100644
--- a/svx/source/xoutdev/xattr.cxx
+++ b/svx/source/xoutdev/xattr.cxx
@@ -3479,7 +3479,7 @@ XLineAttrSetItem::XLineAttrSetItem( std::unique_ptr<SfxItemSet>&& pItemSet ) :
XLineAttrSetItem::XLineAttrSetItem( SfxItemPool* pItemPool ) :
SfxSetItem( XATTRSET_LINE,
- o3tl::make_unique<SfxItemSet>( *pItemPool, XATTR_LINE_FIRST, XATTR_LINE_LAST))
+ o3tl::make_unique<SfxItemSet>( *pItemPool, svl::Items<XATTR_LINE_FIRST, XATTR_LINE_LAST>{}))
{
}
@@ -3503,7 +3503,7 @@ SfxPoolItem* XLineAttrSetItem::Clone( SfxItemPool* pPool ) const
SfxPoolItem* XLineAttrSetItem::Create( SvStream& rStream, sal_uInt16 /*nVersion*/) const
{
auto pSet2 = o3tl::make_unique<SfxItemSet>( *GetItemSet().GetPool(),
- XATTR_LINE_FIRST, XATTR_LINE_LAST);
+ svl::Items<XATTR_LINE_FIRST, XATTR_LINE_LAST>{});
pSet2->Load( rStream );
return new XLineAttrSetItem( std::move(pSet2) );
}
@@ -3516,7 +3516,7 @@ XFillAttrSetItem::XFillAttrSetItem( std::unique_ptr<SfxItemSet>&& pItemSet ) :
XFillAttrSetItem::XFillAttrSetItem( SfxItemPool* pItemPool ) :
SfxSetItem( XATTRSET_FILL,
- o3tl::make_unique<SfxItemSet>( *pItemPool, XATTR_FILL_FIRST, XATTR_FILL_LAST))
+ o3tl::make_unique<SfxItemSet>( *pItemPool, svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST>{}))
{
}
@@ -3540,7 +3540,7 @@ SfxPoolItem* XFillAttrSetItem::Clone( SfxItemPool* pPool ) const
SfxPoolItem* XFillAttrSetItem::Create( SvStream& rStream, sal_uInt16 /*nVersion*/) const
{
auto pSet2 = o3tl::make_unique<SfxItemSet>( *GetItemSet().GetPool(),
- XATTR_FILL_FIRST, XATTR_FILL_LAST);
+ svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST>{});
pSet2->Load( rStream );
return new XFillAttrSetItem( std::move(pSet2) );
}
diff --git a/svx/source/xoutdev/xexch.cxx b/svx/source/xoutdev/xexch.cxx
index 156554223b99..73145abe31cc 100644
--- a/svx/source/xoutdev/xexch.cxx
+++ b/svx/source/xoutdev/xexch.cxx
@@ -86,7 +86,7 @@ SvStream& ReadXFillExchangeData( SvStream& rIStm, XFillExchangeData& rData )
{
DBG_ASSERT( rData.pPool, "XFillExchangeData has no pool" );
- auto pSet = o3tl::make_unique<SfxItemSet>( *rData.pPool, XATTR_FILL_FIRST, XATTR_FILL_LAST );
+ auto pSet = o3tl::make_unique<SfxItemSet>( *rData.pPool, svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST>{} );
sal_uInt32 nItemCount = 0;
sal_uInt16 nWhich, nItemVersion;
diff --git a/svx/source/xoutdev/xpool.cxx b/svx/source/xoutdev/xpool.cxx
index 591a57fc2575..0146afe75120 100644
--- a/svx/source/xoutdev/xpool.cxx
+++ b/svx/source/xoutdev/xpool.cxx
@@ -111,10 +111,10 @@ XOutdevItemPool::XOutdevItemPool(SfxItemPool* _pMaster, bool bLoadRefCounts)
// create SetItems
rPoolDefaults[XATTRSET_LINE - XATTR_START] = new XLineAttrSetItem(
o3tl::make_unique<SfxItemSet>(
- *_pMaster, XATTR_LINE_FIRST, XATTR_LINE_LAST));
+ *_pMaster, svl::Items<XATTR_LINE_FIRST, XATTR_LINE_LAST>{}));
rPoolDefaults[XATTRSET_FILL - XATTR_START] = new XFillAttrSetItem(
o3tl::make_unique<SfxItemSet>(
- *_pMaster, XATTR_FILL_FIRST, XATTR_FILL_LAST));
+ *_pMaster, svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST>{}));
// create ItemInfos
for(sal_uInt16 i(GetFirstWhich()); i <= GetLastWhich(); i++)
diff --git a/sw/qa/core/uwriter.cxx b/sw/qa/core/uwriter.cxx
index e0ccaaeb778b..e816a91f0b30 100644
--- a/sw/qa/core/uwriter.cxx
+++ b/sw/qa/core/uwriter.cxx
@@ -970,7 +970,7 @@ void SwDocTest::testGraphicAnchorDeletion()
aPaM.GetPoint()->nContent.Assign(aPaM.GetContentNode(), RTL_CONSTASCII_LENGTH("graphic anchor>>"));
//Insert a graphic at X of >>X<< in paragraph 2
- SfxItemSet aFlySet(m_pDoc->GetAttrPool(), RES_FRMATR_BEGIN, RES_FRMATR_END-1);
+ SfxItemSet aFlySet(m_pDoc->GetAttrPool(), svl::Items<RES_FRMATR_BEGIN, RES_FRMATR_END-1>{});
SwFormatAnchor aAnchor(RndStdIds::FLY_AS_CHAR);
aAnchor.SetAnchor(aPaM.GetPoint());
aFlySet.Put(aAnchor);
diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx b/sw/qa/extras/tiledrendering/tiledrendering.cxx
index ecd84826233f..e719a368558e 100644
--- a/sw/qa/extras/tiledrendering/tiledrendering.cxx
+++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx
@@ -1383,7 +1383,7 @@ void SwTiledRenderingTest::testTrackChangesCallback()
CPPUNIT_ASSERT_EQUAL(-1, m_nTrackedChangeIndex);
pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/false, 1, /*bBasicCall=*/false);
- SfxItemSet aSet(pWrtShell->GetDoc()->GetAttrPool(), FN_REDLINE_ACCEPT_DIRECT, FN_REDLINE_ACCEPT_DIRECT);
+ SfxItemSet aSet(pWrtShell->GetDoc()->GetAttrPool(), svl::Items<FN_REDLINE_ACCEPT_DIRECT, FN_REDLINE_ACCEPT_DIRECT>{});
SfxVoidItem aItem(FN_REDLINE_ACCEPT_DIRECT);
aSet.Put(aItem);
pWrtShell->GetView().GetState(aSet);
@@ -1730,8 +1730,8 @@ namespace {
void checkUndoRepairStates(SwXTextDocument* pXTextDocument, SwView* pView1, SwView* pView2)
{
- SfxItemSet aItemSet1(pXTextDocument->GetDocShell()->GetDoc()->GetAttrPool(), SID_UNDO, SID_UNDO);
- SfxItemSet aItemSet2(pXTextDocument->GetDocShell()->GetDoc()->GetAttrPool(), SID_UNDO, SID_UNDO);
+ SfxItemSet aItemSet1(pXTextDocument->GetDocShell()->GetDoc()->GetAttrPool(), svl::Items<SID_UNDO, SID_UNDO>{});
+ SfxItemSet aItemSet2(pXTextDocument->GetDocShell()->GetDoc()->GetAttrPool(), svl::Items<SID_UNDO, SID_UNDO>{});
// first view, undo enabled
pView1->GetState(aItemSet1);
CPPUNIT_ASSERT_EQUAL(SfxItemState::SET, aItemSet1.GetItemState(SID_UNDO));
@@ -1764,8 +1764,8 @@ void SwTiledRenderingTest::testDisableUndoRepair()
int nView2 = SfxLokHelper::getView();
{
- SfxItemSet aItemSet1(pXTextDocument->GetDocShell()->GetDoc()->GetAttrPool(), SID_UNDO, SID_UNDO);
- SfxItemSet aItemSet2(pXTextDocument->GetDocShell()->GetDoc()->GetAttrPool(), SID_UNDO, SID_UNDO);
+ SfxItemSet aItemSet1(pXTextDocument->GetDocShell()->GetDoc()->GetAttrPool(), svl::Items<SID_UNDO, SID_UNDO>{});
+ SfxItemSet aItemSet2(pXTextDocument->GetDocShell()->GetDoc()->GetAttrPool(), svl::Items<SID_UNDO, SID_UNDO>{});
pView1->GetState(aItemSet1);
CPPUNIT_ASSERT_EQUAL(SfxItemState::DISABLED, aItemSet1.GetItemState(SID_UNDO));
pView2->GetState(aItemSet2);
@@ -1785,8 +1785,8 @@ void SwTiledRenderingTest::testDisableUndoRepair()
pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 'u', 0);
Scheduler::ProcessEventsToIdle();
{
- SfxItemSet aItemSet1(pXTextDocument->GetDocShell()->GetDoc()->GetAttrPool(), SID_UNDO, SID_UNDO);
- SfxItemSet aItemSet2(pXTextDocument->GetDocShell()->GetDoc()->GetAttrPool(), SID_UNDO, SID_UNDO);
+ SfxItemSet aItemSet1(pXTextDocument->GetDocShell()->GetDoc()->GetAttrPool(), svl::Items<SID_UNDO, SID_UNDO>{});
+ SfxItemSet aItemSet2(pXTextDocument->GetDocShell()->GetDoc()->GetAttrPool(), svl::Items<SID_UNDO, SID_UNDO>{});
// second view, undo enabled
pView2->GetState(aItemSet2);
CPPUNIT_ASSERT_EQUAL(SfxItemState::SET, aItemSet2.GetItemState(SID_UNDO));
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index 7ef2dabaf0d4..e1d73952b9e5 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -1004,7 +1004,7 @@ void SwUiWriterTest::testCp1000071()
// Change the document layout to be 2 columns, and then undo.
pWrtShell->SelAll();
SwSectionData section(CONTENT_SECTION, pWrtShell->GetUniqueSectionName());
- SfxItemSet set( pDoc->GetDocShell()->GetPool(), RES_COL, RES_COL, 0 );
+ SfxItemSet set( pDoc->GetDocShell()->GetPool(), svl::Items<RES_COL, RES_COL>{} );
SwFormatCol col;
col.Init( 2, 0, 10000 );
set.Put( col );
@@ -2078,7 +2078,7 @@ void SwUiWriterTest::testTdf72788()
//Apply a *Bold* attribute to selection
SvxWeightItem aWeightItem(WEIGHT_BOLD, RES_CHRATR_WEIGHT);
rIDCO.InsertPoolItem(*pCursor, aWeightItem);
- SfxItemSet aSet( pDoc->GetAttrPool(), RES_CHRATR_WEIGHT, RES_CHRATR_WEIGHT);
+ SfxItemSet aSet( pDoc->GetAttrPool(), svl::Items<RES_CHRATR_WEIGHT, RES_CHRATR_WEIGHT>{});
//Add selected text's attributes to aSet
pCursor->GetNode().GetTextNode()->GetAttr(aSet, 5, 12);
SfxPoolItem const * pPoolItem = aSet.GetItem(RES_CHRATR_WEIGHT);
@@ -3225,8 +3225,8 @@ void SwUiWriterTest::testUndoDelAsCharTdf107512()
sw::UndoManager & rUndoManager(pDoc->GetUndoManager());
IDocumentContentOperations & rIDCO(pDoc->getIDocumentContentOperations());
SwCursorShell * pShell(pDoc->GetEditShell());
- SfxItemSet frameSet(pDoc->GetAttrPool(), RES_FRMATR_BEGIN, RES_FRMATR_END-1);
- SfxItemSet grfSet(pDoc->GetAttrPool(), RES_GRFATR_BEGIN, RES_GRFATR_END-1);
+ SfxItemSet frameSet(pDoc->GetAttrPool(), svl::Items<RES_FRMATR_BEGIN, RES_FRMATR_END-1>{});
+ SfxItemSet grfSet(pDoc->GetAttrPool(), svl::Items<RES_GRFATR_BEGIN, RES_GRFATR_END-1>{});
rIDCO.InsertString(*pShell->GetCursor(), "foo");
pShell->ClearMark();
SwFormatAnchor anchor(RndStdIds::FLY_AS_CHAR);
@@ -3245,7 +3245,7 @@ void SwUiWriterTest::testUndoDelAsCharTdf107512()
CPPUNIT_ASSERT(pShell->GetCursor()->GetNode().GetTextNode()->GetTextAttrForCharAt(4, RES_TXTATR_FLYCNT));
CPPUNIT_ASSERT_EQUAL(OUString(OUStringLiteral1(CH_TXTATR_BREAKWORD) + u"foo" + OUStringLiteral1(CH_TXTATR_BREAKWORD)), pShell->GetCursor()->GetNode().GetTextNode()->GetText());
SfxPoolItem const* pItem;
- SfxItemSet query(pDoc->GetAttrPool(), RES_CHRATR_HIDDEN, RES_CHRATR_HIDDEN);
+ SfxItemSet query(pDoc->GetAttrPool(), svl::Items<RES_CHRATR_HIDDEN, RES_CHRATR_HIDDEN>{});
pShell->GetCursor()->GetNode().GetTextNode()->GetAttr(query, 1, 4);
CPPUNIT_ASSERT_EQUAL(SfxItemState::SET, query.GetItemState(RES_CHRATR_HIDDEN, false, &pItem));
CPPUNIT_ASSERT(static_cast<SvxCharHiddenItem const*>(pItem)->GetValue());
@@ -3358,7 +3358,7 @@ void SwUiWriterTest::testUndoCharAttribute()
// Apply a "Bold" attribute to selection
SvxWeightItem aWeightItem(WEIGHT_BOLD, RES_CHRATR_WEIGHT);
rIDCO.InsertPoolItem(*pCursor, aWeightItem);
- SfxItemSet aSet( pDoc->GetAttrPool(), RES_CHRATR_WEIGHT, RES_CHRATR_WEIGHT);
+ SfxItemSet aSet( pDoc->GetAttrPool(), svl::Items<RES_CHRATR_WEIGHT, RES_CHRATR_WEIGHT>{});
// Adds selected text's attributes to aSet
pCursor->GetNode().GetTextNode()->GetAttr(aSet, 10, 19);
SfxPoolItem const * pPoolItem = aSet.GetItem(RES_CHRATR_WEIGHT);
@@ -3379,8 +3379,8 @@ void SwUiWriterTest::testUndoDelAsChar()
sw::UndoManager & rUndoManager(pDoc->GetUndoManager());
IDocumentContentOperations & rIDCO(pDoc->getIDocumentContentOperations());
SwCursorShell * pShell(pDoc->GetEditShell());
- SfxItemSet frameSet(pDoc->GetAttrPool(), RES_FRMATR_BEGIN, RES_FRMATR_END-1);
- SfxItemSet grfSet(pDoc->GetAttrPool(), RES_GRFATR_BEGIN, RES_GRFATR_END-1);
+ SfxItemSet frameSet(pDoc->GetAttrPool(), svl::Items<RES_FRMATR_BEGIN, RES_FRMATR_END-1>{});
+ SfxItemSet grfSet(pDoc->GetAttrPool(), svl::Items<RES_GRFATR_BEGIN, RES_GRFATR_END-1>{});
SwFormatAnchor anchor(RndStdIds::FLY_AS_CHAR);
frameSet.Put(anchor);
GraphicObject grf;
diff --git a/sw/qa/extras/ww8export/ww8export.cxx b/sw/qa/extras/ww8export/ww8export.cxx
index 2af0b8fde045..003c12a6e0d8 100644
--- a/sw/qa/extras/ww8export/ww8export.cxx
+++ b/sw/qa/extras/ww8export/ww8export.cxx
@@ -129,7 +129,7 @@ protected:
// emulate the behavior from tdf#94386 - insert an envelope to the
// document
- SfxItemSet aSet(pWrtShell->GetView().GetCurShell()->GetPool(), FN_ENVELOP, FN_ENVELOP);
+ SfxItemSet aSet(pWrtShell->GetView().GetCurShell()->GetPool(), svl::Items<FN_ENVELOP, FN_ENVELOP>{});
aSet.Put(SwEnvItem());
SfxRequest aRequest(FN_ENVELOP, SfxCallMode::SYNCHRON, aSet);
SW_MOD()->ExecOther(aRequest);
diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx
index 5ef35031a60f..0decdcd1a448 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -1681,16 +1681,14 @@ void SwAccessibleParagraph::_getDefaultAttributesImpl(
if ( !bOnlyCharAttrs )
{
pSet.reset( new SfxItemSet( const_cast<SwAttrPool&>(pTextNode->GetDoc()->GetAttrPool()),
- RES_CHRATR_BEGIN, RES_CHRATR_END - 1,
+ svl::Items<RES_CHRATR_BEGIN, RES_CHRATR_END - 1,
RES_PARATR_BEGIN, RES_PARATR_END - 1,
- RES_FRMATR_BEGIN, RES_FRMATR_END - 1,
- 0 ) );
+ RES_FRMATR_BEGIN, RES_FRMATR_END - 1>{} ) );
}
else
{
pSet.reset( new SfxItemSet( const_cast<SwAttrPool&>(pTextNode->GetDoc()->GetAttrPool()),
- RES_CHRATR_BEGIN, RES_CHRATR_END - 1,
- 0 ) );
+ svl::Items<RES_CHRATR_BEGIN, RES_CHRATR_END - 1>{} ) );
}
// #i82637# - From the perspective of the a11y API the default character
// attributes are the character attributes, which are set at the paragraph style
@@ -1701,9 +1699,8 @@ void SwAccessibleParagraph::_getDefaultAttributesImpl(
if ( !bOnlyCharAttrs )
{
SfxItemSet aParaSet( const_cast<SwAttrPool&>(pTextNode->GetDoc()->GetAttrPool()),
- RES_PARATR_BEGIN, RES_PARATR_END - 1,
- RES_FRMATR_BEGIN, RES_FRMATR_END - 1,
- 0 );
+ svl::Items<RES_PARATR_BEGIN, RES_PARATR_END - 1,
+ RES_FRMATR_BEGIN, RES_FRMATR_END - 1>{} );
pTextNode->SwContentNode::GetAttr( aParaSet );
pSet->Put( aParaSet );
}
@@ -1713,8 +1710,7 @@ void SwAccessibleParagraph::_getDefaultAttributesImpl(
if ( pTextNode->GetTextColl() )
{
SfxItemSet aCharSet( const_cast<SwAttrPool&>(pTextNode->GetDoc()->GetAttrPool()),
- RES_CHRATR_BEGIN, RES_CHRATR_END - 1,
- 0 );
+ svl::Items<RES_CHRATR_BEGIN, RES_CHRATR_END - 1>{} );
SetPutRecursive( aCharSet, pTextNode->GetTextColl()->GetAttrSet() );
pSet->Put( aCharSet );
}
@@ -1904,8 +1900,7 @@ void SwAccessibleParagraph::_getRunAttributesImpl(
// retrieve character attributes for the created PaM <pPaM>
SfxItemSet aSet( pPaM->GetDoc()->GetAttrPool(),
- RES_CHRATR_BEGIN, RES_CHRATR_END -1,
- 0 );
+ svl::Items<RES_CHRATR_BEGIN, RES_CHRATR_END -1>{} );
// #i82637#
// From the perspective of the a11y API the character attributes, which
// are set at the automatic paragraph style of the paragraph, are treated
@@ -1917,8 +1912,7 @@ void SwAccessibleParagraph::_getRunAttributesImpl(
if ( pTextNode->HasSwAttrSet() )
{
SfxItemSet aAutomaticParaStyleCharAttrs( pPaM->GetDoc()->GetAttrPool(),
- RES_CHRATR_BEGIN, RES_CHRATR_END -1,
- 0 );
+ svl::Items<RES_CHRATR_BEGIN, RES_CHRATR_END -1>{} );
aAutomaticParaStyleCharAttrs.Put( *(pTextNode->GetpSwAttrSet()), false );
aSet.Put( aAutomaticParaStyleCharAttrs );
}
@@ -1926,8 +1920,7 @@ void SwAccessibleParagraph::_getRunAttributesImpl(
// get character attributes at <pPaM> and merge these into <aSet>
{
SfxItemSet aCharAttrsAtPaM( pPaM->GetDoc()->GetAttrPool(),
- RES_CHRATR_BEGIN, RES_CHRATR_END -1,
- 0 );
+ svl::Items<RES_CHRATR_BEGIN, RES_CHRATR_END -1>{} );
SwUnoCursorHelper::GetCursorAttr(*pPaM, aCharAttrsAtPaM, true);
aSet.Put( aCharAttrsAtPaM );
}
@@ -2024,14 +2017,13 @@ void SwAccessibleParagraph::_getSupplementalAttributesImpl(
const SwTextNode* pTextNode( GetTextNode() );
std::unique_ptr<SfxItemSet> pSet;
pSet.reset( new SfxItemSet( const_cast<SwAttrPool&>(pTextNode->GetDoc()->GetAttrPool()),
- RES_PARATR_ADJUST, RES_PARATR_ADJUST,
+ svl::Items<RES_PARATR_ADJUST, RES_PARATR_ADJUST,
RES_PARATR_TABSTOP, RES_PARATR_TABSTOP,
RES_PARATR_LINESPACING, RES_PARATR_LINESPACING,
RES_UL_SPACE, RES_UL_SPACE,
RES_LR_SPACE, RES_LR_SPACE,
RES_PARATR_NUMRULE, RES_PARATR_NUMRULE,
- RES_PARATR_LIST_BEGIN, RES_PARATR_LIST_END-1,
- 0 ) );
+ RES_PARATR_LIST_BEGIN, RES_PARATR_LIST_END-1>{} ) );
if ( pTextNode->HasBullet() || pTextNode->HasNumber() )
{
diff --git a/sw/source/core/attr/format.cxx b/sw/source/core/attr/format.cxx
index ca951a3e159a..12f0de192efd 100644
--- a/sw/source/core/attr/format.cxx
+++ b/sw/source/core/attr/format.cxx
@@ -482,7 +482,7 @@ bool SwFormat::SetFormatAttr( const SfxPoolItem& rAttr )
{
// FALLBACKBREAKHERE should not be used; instead use [XATTR_FILL_FIRST .. XATTR_FILL_LAST]
SAL_INFO("sw.core", "Do no longer use SvxBrushItem, instead use [XATTR_FILL_FIRST .. XATTR_FILL_LAST] FillAttributes (simple fallback is in place and used)");
- SfxItemSet aTempSet(*m_aSet.GetPool(), XATTR_FILL_FIRST, XATTR_FILL_LAST, 0, 0);
+ SfxItemSet aTempSet(*m_aSet.GetPool(), svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST>{});
const SvxBrushItem& rSource = static_cast< const SvxBrushItem& >(rAttr);
// fill a local ItemSet with the attributes corresponding as good as possible
diff --git a/sw/source/core/attr/swatrset.cxx b/sw/source/core/attr/swatrset.cxx
index 29a6cb291d22..bc55739cecba 100644
--- a/sw/source/core/attr/swatrset.cxx
+++ b/sw/source/core/attr/swatrset.cxx
@@ -143,7 +143,7 @@ void SwAttrPool::removeAndDeleteSecondaryPools()
}
SwAttrSet::SwAttrSet( SwAttrPool& rPool, sal_uInt16 nWh1, sal_uInt16 nWh2 )
- : SfxItemSet( rPool, nWh1, nWh2 ), m_pOldSet( nullptr ), m_pNewSet( nullptr )
+ : SfxItemSet( rPool, {{nWh1, nWh2}} ), m_pOldSet( nullptr ), m_pNewSet( nullptr )
{
}
diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index ccd662d67f13..4adb93eb0337 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -1570,8 +1570,8 @@ bool SwCursorShell::GetContentAtPos( const Point& rPt,
if( !bRet && IsAttrAtPos::CurrAttrs & rContentAtPos.eContentAtPos )
{
const sal_Int32 n = aPos.nContent.GetIndex();
- SfxItemSet aSet( GetDoc()->GetAttrPool(), POOLATTR_BEGIN,
- POOLATTR_END - 1 );
+ SfxItemSet aSet( GetDoc()->GetAttrPool(), svl::Items<POOLATTR_BEGIN,
+ POOLATTR_END - 1>{} );
if( pTextNd->GetpSwpHints() )
{
for( size_t i = 0; i < pTextNd->GetSwpHints().Count(); ++i )
@@ -1928,9 +1928,8 @@ bool SwCursorShell::SetShadowCursorPos( const Point& rPt, SwFillMode eFillMode )
if( nullptr != (pCNd = aPos.nNode.GetNode().GetContentNode() ))
{
SfxItemSet aSet( GetDoc()->GetAttrPool(),
- RES_LR_SPACE, RES_LR_SPACE,
- RES_PARATR_ADJUST, RES_PARATR_ADJUST,
- 0 );
+ svl::Items<RES_LR_SPACE, RES_LR_SPACE,
+ RES_PARATR_ADJUST, RES_PARATR_ADJUST>{} );
SvxLRSpaceItem aLR( static_cast<const SvxLRSpaceItem&>(
pCNd->GetAttr( RES_LR_SPACE ) ) );
aLR.SetTextLeft( aFPos.nTabCnt );
diff --git a/sw/source/core/crsr/findattr.cxx b/sw/source/core/crsr/findattr.cxx
index bf0ec9142114..0d14fbf72a94 100644
--- a/sw/source/core/crsr/findattr.cxx
+++ b/sw/source/core/crsr/findattr.cxx
@@ -227,7 +227,7 @@ SwAttrCheckArr::SwAttrCheckArr( const SfxItemSet& rSet, bool bFwd,
, nNdEnd(0)
, nFound(0)
, nStackCnt(0)
- , aCmpSet( *rSet.GetPool(), RES_CHRATR_BEGIN, RES_TXTATR_END-1 )
+ , aCmpSet( *rSet.GetPool(), svl::Items<RES_CHRATR_BEGIN, RES_TXTATR_END-1>{} )
, bNoColls(bNoCollections)
, bForward(bFwd)
{
@@ -977,7 +977,7 @@ bool SwPaM::Find( const SfxItemSet& rSet, bool bNoColls, SwMoveFnCollection cons
// check which text/char attributes are searched
SwAttrCheckArr aCmpArr( rSet, bSrchForward, bNoColls );
SfxItemSet aOtherSet( GetDoc()->GetAttrPool(),
- RES_PARATR_BEGIN, RES_GRFATR_END-1 );
+ svl::Items<RES_PARATR_BEGIN, RES_GRFATR_END-1>{} );
aOtherSet.Put( rSet, false ); // got all invalid items
FnSearchAttr fnSearch = bSrchForward
diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx
index 49d8b4fedfab..df72344446a9 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -1072,24 +1072,21 @@ namespace //local functions originally from docfmt.cxx
if ( !bCharAttr && !bOtherAttr )
{
SfxItemSet* pTmpCharItemSet = new SfxItemSet( pDoc->GetAttrPool(),
- RES_CHRATR_BEGIN, RES_CHRATR_END-1,
+ svl::Items<RES_CHRATR_BEGIN, RES_CHRATR_END-1,
RES_TXTATR_AUTOFMT, RES_TXTATR_AUTOFMT,
RES_TXTATR_INETFMT, RES_TXTATR_INETFMT,
RES_TXTATR_CHARFMT, RES_TXTATR_CHARFMT,
- RES_TXTATR_UNKNOWN_CONTAINER, RES_TXTATR_UNKNOWN_CONTAINER,
- 0 );
+ RES_TXTATR_UNKNOWN_CONTAINER, RES_TXTATR_UNKNOWN_CONTAINER>{} );
SfxItemSet* pTmpOtherItemSet = new SfxItemSet( pDoc->GetAttrPool(),
- RES_PARATR_BEGIN, RES_PARATR_END-1,
+ svl::Items<RES_PARATR_BEGIN, RES_PARATR_END-1,
RES_PARATR_LIST_BEGIN, RES_PARATR_LIST_END-1,
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
RES_GRFATR_BEGIN, RES_GRFATR_END-1,
RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1,
// FillAttribute support
- XATTR_FILL_FIRST, XATTR_FILL_LAST,
-
- 0 );
+ XATTR_FILL_FIRST, XATTR_FILL_LAST>{} );
pTmpCharItemSet->Put( rChgSet );
pTmpOtherItemSet->Put( rChgSet );
@@ -1151,7 +1148,7 @@ namespace //local functions originally from docfmt.cxx
if ( !bCharAttr && !bOtherAttr )
{
SfxItemSet aTextSet( pDoc->GetAttrPool(),
- RES_TXTATR_NOEND_BEGIN, RES_TXTATR_NOEND_END-1 );
+ svl::Items<RES_TXTATR_NOEND_BEGIN, RES_TXTATR_NOEND_END-1>{} );
aTextSet.Put( rChgSet );
if( aTextSet.Count() )
{
@@ -1182,11 +1179,10 @@ namespace //local functions originally from docfmt.cxx
// CharFormat and URL attributes are treated separately!
// TEST_TEMP ToDo: AutoFormat!
SfxItemSet aTextSet( pDoc->GetAttrPool(),
- RES_TXTATR_REFMARK, RES_TXTATR_TOXMARK,
+ svl::Items<RES_TXTATR_REFMARK, RES_TXTATR_TOXMARK,
RES_TXTATR_META, RES_TXTATR_METAFIELD,
RES_TXTATR_CJK_RUBY, RES_TXTATR_CJK_RUBY,
- RES_TXTATR_INPUTFIELD, RES_TXTATR_INPUTFIELD,
- 0 );
+ RES_TXTATR_INPUTFIELD, RES_TXTATR_INPUTFIELD>{} );
aTextSet.Put( rChgSet );
if( aTextSet.Count() )
@@ -3092,7 +3088,7 @@ bool DocumentContentOperationsManager::InsertPoolItem(
pUndoAttr = new SwUndoAttr( rRg, rHt, nFlags );
}
- SfxItemSet aSet( m_rDoc.GetAttrPool(), rHt.Which(), rHt.Which() );
+ SfxItemSet aSet( m_rDoc.GetAttrPool(), {{rHt.Which(), rHt.Which()}} );
aSet.Put( rHt );
const bool bRet = lcl_InsAttr( &m_rDoc, rRg, aSet, nFlags, pUndoAttr, bExpandCharToPara );
@@ -3882,9 +3878,8 @@ bool DocumentContentOperationsManager::ReplaceRangeImpl( SwPaM& rPam, const OUSt
{
// Apply the first character's attributes to the ReplaceText
SfxItemSet aSet( m_rDoc.GetAttrPool(),
- RES_CHRATR_BEGIN, RES_TXTATR_WITHEND_END - 1,
- RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1,
- 0 );
+ svl::Items<RES_CHRATR_BEGIN, RES_TXTATR_WITHEND_END - 1,
+ RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1>{} );
pTextNd->GetAttr( aSet, nStt+1, nStt+1 );
aSet.ClearItem( RES_TXTATR_REFMARK );
diff --git a/sw/source/core/doc/DocumentDeviceManager.cxx b/sw/source/core/doc/DocumentDeviceManager.cxx
index b5ccaa5aead6..f88fceee1680 100644
--- a/sw/source/core/doc/DocumentDeviceManager.cxx
+++ b/sw/source/core/doc/DocumentDeviceManager.cxx
@@ -207,11 +207,10 @@ void DocumentDeviceManager::setJobsetup(/*[in]*/ const JobSetup &rJobSetup )
{
//The ItemSet is deleted by Sfx!
auto pSet = o3tl::make_unique<SfxItemSet>( m_rDoc.GetAttrPool(),
- FN_PARAM_ADDPRINTER, FN_PARAM_ADDPRINTER,
+ svl::Items<FN_PARAM_ADDPRINTER, FN_PARAM_ADDPRINTER,
SID_HTML_MODE, SID_HTML_MODE,
SID_PRINTER_NOTFOUND_WARN, SID_PRINTER_NOTFOUND_WARN,
- SID_PRINTER_CHANGESTODOC, SID_PRINTER_CHANGESTODOC,
- 0 );
+ SID_PRINTER_CHANGESTODOC, SID_PRINTER_CHANGESTODOC>{} );
VclPtr<SfxPrinter> p = VclPtr<SfxPrinter>::Create( std::move(pSet), rJobSetup );
if ( bCheckPageDescs )
setPrinter( p, true, true );
@@ -291,11 +290,10 @@ SfxPrinter& DocumentDeviceManager::CreatePrinter_() const
// We create a default SfxPrinter.
// The ItemSet is deleted by Sfx!
auto pSet = o3tl::make_unique<SfxItemSet>( m_rDoc.GetAttrPool(),
- FN_PARAM_ADDPRINTER, FN_PARAM_ADDPRINTER,
+ svl::Items<FN_PARAM_ADDPRINTER, FN_PARAM_ADDPRINTER,
SID_HTML_MODE, SID_HTML_MODE,
SID_PRINTER_NOTFOUND_WARN, SID_PRINTER_NOTFOUND_WARN,
- SID_PRINTER_CHANGESTODOC, SID_PRINTER_CHANGESTODOC,
- 0 );
+ SID_PRINTER_CHANGESTODOC, SID_PRINTER_CHANGESTODOC>{} );
VclPtr<SfxPrinter> pNewPrt = VclPtr<SfxPrinter>::Create( std::move(pSet) );
const_cast<DocumentDeviceManager*>(this)->setPrinter( pNewPrt, true, true );
diff --git a/sw/source/core/doc/DocumentFieldsManager.cxx b/sw/source/core/doc/DocumentFieldsManager.cxx
index 65238ea36193..e68c4eb00cd5 100644
--- a/sw/source/core/doc/DocumentFieldsManager.cxx
+++ b/sw/source/core/doc/DocumentFieldsManager.cxx
@@ -811,7 +811,7 @@ void DocumentFieldsManager::UpdateTableFields( SfxPoolItem* pHt )
SwFrameFormat* pFormat = pBox->ClaimFrameFormat();
SfxItemSet aTmp( m_rDoc.GetAttrPool(),
- RES_BOXATR_BEGIN,RES_BOXATR_END-1 );
+ svl::Items<RES_BOXATR_BEGIN,RES_BOXATR_END-1>{} );
if( pCalc->IsCalcError() )
nValue = DBL_MAX;
diff --git a/sw/source/core/doc/docfly.cxx b/sw/source/core/doc/docfly.cxx
index cfe3ca7ba717..49d1dc7c16e9 100644
--- a/sw/source/core/doc/docfly.cxx
+++ b/sw/source/core/doc/docfly.cxx
@@ -1078,8 +1078,8 @@ SwChainRet SwDoc::Chain( SwFrameFormat &rSource, const SwFrameFormat &rDest )
aChain.SetPrev( &static_cast<SwFlyFrameFormat&>(rSource) );
SetAttr( aChain, rDestFormat );
- SfxItemSet aSet( GetAttrPool(), RES_FRM_SIZE, RES_FRM_SIZE,
- RES_CHAIN, RES_CHAIN, 0 );
+ SfxItemSet aSet( GetAttrPool(), svl::Items<RES_FRM_SIZE, RES_FRM_SIZE,
+ RES_CHAIN, RES_CHAIN>{} );
// Attach Follow to the Master.
aChain.SetPrev( &static_cast<SwFlyFrameFormat&>(rSource) );
diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx
index ef366c600c1d..4e66dccc6c2a 100644
--- a/sw/source/core/doc/docfmt.cxx
+++ b/sw/source/core/doc/docfmt.cxx
@@ -110,16 +110,16 @@ static bool lcl_RstAttr( const SwNodePtr& rpNd, void* pArgs )
// remove unused attribute RES_LR_SPACE
// add list attributes
- SfxItemSet aSavedAttrsSet(pDoc->GetAttrPool(), RES_PAGEDESC, RES_BREAK,
+ SfxItemSet aSavedAttrsSet(pDoc->GetAttrPool(), svl::Items<RES_PAGEDESC, RES_BREAK,
RES_PARATR_NUMRULE, RES_PARATR_NUMRULE,
RES_PARATR_LIST_BEGIN,
- RES_PARATR_LIST_END - 1, 0);
+ RES_PARATR_LIST_END - 1>{});
const SfxItemSet* pAttrSetOfNode = pNode->GetpSwAttrSet();
std::vector<sal_uInt16> aClearWhichIds;
// restoring all paragraph list attributes
{
- SfxItemSet aListAttrSet( pDoc->GetAttrPool(), RES_PARATR_LIST_BEGIN, RES_PARATR_LIST_END - 1 );
+ SfxItemSet aListAttrSet( pDoc->GetAttrPool(), svl::Items<RES_PARATR_LIST_BEGIN, RES_PARATR_LIST_END - 1>{} );
aListAttrSet.Set(*pAttrSetOfNode);
if ( aListAttrSet.Count() )
{
@@ -425,7 +425,7 @@ bool SwDoc::UpdateRsid( const SwPaM &rRg, const sal_Int32 nLen )
const sal_Int32 nStart(rRg.GetPoint()->nContent.GetIndex() - nLen);
SvxRsidItem aRsid( mnRsid, RES_CHRATR_RSID );
- SfxItemSet aSet(GetAttrPool(), RES_CHRATR_RSID, RES_CHRATR_RSID);
+ SfxItemSet aSet(GetAttrPool(), svl::Items<RES_CHRATR_RSID, RES_CHRATR_RSID>{});
aSet.Put(aRsid);
bool const bRet(pTextNode->SetAttr(aSet, nStart,
rRg.GetPoint()->nContent.GetIndex()));
@@ -462,7 +462,7 @@ bool SwDoc::UpdateParRsid( SwTextNode *pTextNode, sal_uInt32 nVal )
/// If Undo is enabled, the old values is added to the Undo history.
void SwDoc::SetAttr( const SfxPoolItem& rAttr, SwFormat& rFormat )
{
- SfxItemSet aSet( GetAttrPool(), rAttr.Which(), rAttr.Which() );
+ SfxItemSet aSet( GetAttrPool(), {{rAttr.Which(), rAttr.Which()}} );
aSet.Put( rAttr );
SetAttr( aSet, rFormat );
}
@@ -540,7 +540,7 @@ static bool lcl_SetNewDefTabStops( SwTwips nOldWidth, SwTwips nNewWidth,
/// If Undo is enabled, the old value is added to the Undo history.
void SwDoc::SetDefault( const SfxPoolItem& rAttr )
{
- SfxItemSet aSet( GetAttrPool(), rAttr.Which(), rAttr.Which() );
+ SfxItemSet aSet( GetAttrPool(), {{rAttr.Which(), rAttr.Which()}} );
aSet.Put( rAttr );
SetDefault( aSet );
}
diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx
index f4a6095dfe62..ecb98a2c5284 100644
--- a/sw/source/core/doc/docnew.cxx
+++ b/sw/source/core/doc/docnew.cxx
@@ -341,7 +341,7 @@ SwDoc::SwDoc()
// pass empty item set containing the paragraph's list attributes
// as ignorable items to the stype manager.
{
- SfxItemSet aIgnorableParagraphItems( GetAttrPool(), RES_PARATR_LIST_BEGIN, RES_PARATR_LIST_END-1);
+ SfxItemSet aIgnorableParagraphItems( GetAttrPool(), svl::Items<RES_PARATR_LIST_BEGIN, RES_PARATR_LIST_END-1>{});
mpStyleAccess = createStyleManager( &aIgnorableParagraphItems );
}
diff --git a/sw/source/core/doc/docsort.cxx b/sw/source/core/doc/docsort.cxx
index 69e301ed17b4..c59b2fa7184d 100644
--- a/sw/source/core/doc/docsort.cxx
+++ b/sw/source/core/doc/docsort.cxx
@@ -895,8 +895,8 @@ void FlatFndBox::FillFlat(const FndBox_& rBox, bool bLastBox)
SfxItemState::SET == pFormat->GetItemState( RES_BOXATR_VALUE ) )
{
auto pSet = o3tl::make_unique<SfxItemSet>( pDoc->GetAttrPool(),
- RES_BOXATR_FORMAT, RES_BOXATR_VALUE,
- RES_VERT_ORIENT, RES_VERT_ORIENT, 0 );
+ svl::Items<RES_BOXATR_FORMAT, RES_BOXATR_VALUE,
+ RES_VERT_ORIENT, RES_VERT_ORIENT>{} );
pSet->Put( pFormat->GetAttrSet() );
if( ppItemSets.empty() )
{
diff --git a/sw/source/core/doc/tblcpy.cxx b/sw/source/core/doc/tblcpy.cxx
index fb1eb20955f8..1527689908df 100644
--- a/sw/source/core/doc/tblcpy.cxx
+++ b/sw/source/core/doc/tblcpy.cxx
@@ -632,8 +632,8 @@ static void lcl_CpyBox( const SwTable& rCpyTable, const SwTableBox* pCpyBox,
// Copy the TableBoxAttributes - Formula/Format/Value
if( pCpyBox )
{
- SfxItemSet aBoxAttrSet( pCpyDoc->GetAttrPool(), RES_BOXATR_FORMAT,
- RES_BOXATR_VALUE );
+ SfxItemSet aBoxAttrSet( pCpyDoc->GetAttrPool(), svl::Items<RES_BOXATR_FORMAT,
+ RES_BOXATR_VALUE>{} );
aBoxAttrSet.Put( pCpyBox->GetFrameFormat()->GetAttrSet() );
if( aBoxAttrSet.Count() )
{
diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx
index 625d668f216c..bba0d703f00d 100644
--- a/sw/source/core/doc/tblrwcl.cxx
+++ b/sw/source/core/doc/tblrwcl.cxx
@@ -1895,7 +1895,7 @@ static void lcl_CopyBoxToDoc(FndBox_ const& rFndBox, CpyPara *const pCpyPara)
// We can also copy formulas and values, if we copy the content
{
SfxItemSet aBoxAttrSet( pCpyPara->pDoc->GetAttrPool(),
- RES_BOXATR_FORMAT, RES_BOXATR_VALUE );
+ svl::Items<RES_BOXATR_FORMAT, RES_BOXATR_VALUE>{} );
aBoxAttrSet.Put(rFndBox.GetBox()->GetFrameFormat()->GetAttrSet());
if( aBoxAttrSet.Count() )
{
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx
index d5c9d5357a06..d6ceddd2a889 100644
--- a/sw/source/core/docnode/ndtbl.cxx
+++ b/sw/source/core/docnode/ndtbl.cxx
@@ -477,7 +477,7 @@ const SwTable* SwDoc::InsertTable( const SwInsertTableOptions& rInsTableOpts,
const sal_uInt16 nBoxArrLen = pTAFormat ? 16 : 4;
aBoxFormatArr.resize( nBoxArrLen, nullptr );
}
- SfxItemSet aCharSet( GetAttrPool(), RES_CHRATR_BEGIN, RES_PARATR_LIST_END-1 );
+ SfxItemSet aCharSet( GetAttrPool(), svl::Items<RES_CHRATR_BEGIN, RES_PARATR_LIST_END-1>{} );
SwNodeIndex aNdIdx( *pTableNd, 1 ); // Set to StartNode of first Box
SwTableLines& rLines = rNdTable.GetTabLines();
@@ -766,7 +766,7 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTableOpts,
aBoxFormatArr2.reset(new std::vector<SwTableBoxFormat*>( nBoxArrLen, nullptr ));
}
- SfxItemSet aCharSet( GetAttrPool(), RES_CHRATR_BEGIN, RES_PARATR_LIST_END-1 );
+ SfxItemSet aCharSet( GetAttrPool(), svl::Items<RES_CHRATR_BEGIN, RES_PARATR_LIST_END-1>{} );
SwHistory* pHistory = pUndo ? &pUndo->GetHistory() : nullptr;
@@ -3701,7 +3701,7 @@ static bool lcl_SetAFormatBox(FndBox_ & rBox, SetAFormatTabPara *pSetPara, bool
pSetBox->SetDirectFormatting(false);
SwDoc* pDoc = pSetBox->GetFrameFormat()->GetDoc();
- SfxItemSet aCharSet(pDoc->GetAttrPool(), RES_CHRATR_BEGIN, RES_PARATR_LIST_END-1);
+ SfxItemSet aCharSet(pDoc->GetAttrPool(), svl::Items<RES_CHRATR_BEGIN, RES_PARATR_LIST_END-1>{});
SfxItemSet aBoxSet(pDoc->GetAttrPool(), aTableBoxSetRange);
sal_uInt8 nPos = pSetPara->nAFormatLine * 4 + pSetPara->nAFormatBox;
pSetPara->rTableFormat.UpdateToSet(nPos, aCharSet, SwTableAutoFormat::UPDATE_CHAR, nullptr);
@@ -4078,7 +4078,7 @@ void SwDoc::ChkBoxNumFormat( SwTableBox& rBox, bool bCallUpdate )
}
SwTableBoxFormat* pBoxFormat = static_cast<SwTableBoxFormat*>(rBox.GetFrameFormat());
- SfxItemSet aBoxSet( GetAttrPool(), RES_BOXATR_FORMAT, RES_BOXATR_VALUE );
+ SfxItemSet aBoxSet( GetAttrPool(), svl::Items<RES_BOXATR_FORMAT, RES_BOXATR_VALUE>{} );
bool bLockModify = true;
bool bSetNumberFormat = IsInsTableFormatNum();
@@ -4230,8 +4230,7 @@ void SwDoc::ClearLineNumAttrs( SwPosition & rPos )
{
const SfxPoolItem* pFormatItem = nullptr;
SfxItemSet rSet( pTextNode->GetDoc()->GetAttrPool(),
- RES_PARATR_BEGIN, RES_PARATR_END - 1,
- 0);
+ svl::Items<RES_PARATR_BEGIN, RES_PARATR_END - 1>{});
pTextNode->SwContentNode::GetAttr( rSet );
if ( SfxItemState::SET == rSet.GetItemState( RES_PARATR_NUMRULE , false , &pFormatItem ) )
{
diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx
index 578e1a98e2ff..b23fac6f9d00 100644
--- a/sw/source/core/docnode/node.cxx
+++ b/sw/source/core/docnode/node.cxx
@@ -153,7 +153,7 @@ bool Put( std::shared_ptr<const SfxItemSet>& rpAttrSet, const SwContentNode& rNo
std::unique_ptr<SfxItemSet> pStyleNames;
if ( SfxItemState::SET == rSet.GetItemState( RES_FRMATR_STYLE_NAME, false ) )
{
- pStyleNames.reset(new SfxItemSet( *aNewSet.GetPool(), RES_FRMATR_STYLE_NAME, RES_FRMATR_CONDITIONAL_STYLE_NAME ));
+ pStyleNames.reset(new SfxItemSet( *aNewSet.GetPool(), svl::Items<RES_FRMATR_STYLE_NAME, RES_FRMATR_CONDITIONAL_STYLE_NAME>{} ));
pStyleNames->Put( aNewSet );
}
@@ -200,7 +200,7 @@ bool Put_BC( std::shared_ptr<const SfxItemSet>& rpAttrSet,
std::unique_ptr<SfxItemSet> pStyleNames;
if ( SfxItemState::SET == rSet.GetItemState( RES_FRMATR_STYLE_NAME, false ) )
{
- pStyleNames.reset(new SfxItemSet( *aNewSet.GetPool(), RES_FRMATR_STYLE_NAME, RES_FRMATR_CONDITIONAL_STYLE_NAME ));
+ pStyleNames.reset(new SfxItemSet( *aNewSet.GetPool(), svl::Items<RES_FRMATR_STYLE_NAME, RES_FRMATR_CONDITIONAL_STYLE_NAME>{} ));
pStyleNames->Put( aNewSet );
}
diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx
index 5c620cafc4d3..23fe86495c98 100644
--- a/sw/source/core/draw/dcontact.cxx
+++ b/sw/source/core/draw/dcontact.cxx
@@ -1062,7 +1062,7 @@ void lcl_textBoxSizeNotify(SwFrameFormat* pFormat)
if (SwTextBoxHelper::isTextBox(pFormat, RES_DRAWFRMFMT))
{
// Just notify the textbox that the size has changed, the actual object size is not interesting.
- SfxItemSet aResizeSet(pFormat->GetDoc()->GetAttrPool(), RES_FRM_SIZE, RES_FRM_SIZE, 0);
+ SfxItemSet aResizeSet(pFormat->GetDoc()->GetAttrPool(), svl::Items<RES_FRM_SIZE, RES_FRM_SIZE>{});
SwFormatFrameSize aSize;
aResizeSet.Put(aSize);
SwTextBoxHelper::syncFlyFrameAttr(*pFormat, aResizeSet);
@@ -1252,7 +1252,7 @@ void SwDrawContact::Changed_( const SdrObject& rObj,
}
}
SfxItemSet aSet( GetFormat()->GetDoc()->GetAttrPool(),
- RES_VERT_ORIENT, RES_HORI_ORIENT, 0 );
+ svl::Items<RES_VERT_ORIENT, RES_HORI_ORIENT>{} );
const SwFormatVertOrient& rVert = GetFormat()->GetVertOrient();
if ( nYPosDiff != 0 )
{
diff --git a/sw/source/core/draw/dflyobj.cxx b/sw/source/core/draw/dflyobj.cxx
index 28ac7d83874a..f89cdeea30c9 100644
--- a/sw/source/core/draw/dflyobj.cxx
+++ b/sw/source/core/draw/dflyobj.cxx
@@ -747,7 +747,7 @@ void SwVirtFlyDrawObj::NbcCrop(const Point& rRef, const Fraction& xFact, const F
return ;
// Get old values for crop in 10th of mm
- SfxItemSet aSet( pSh->GetAttrPool(), RES_GRFATR_CROPGRF, RES_GRFATR_CROPGRF );
+ SfxItemSet aSet( pSh->GetAttrPool(), svl::Items<RES_GRFATR_CROPGRF, RES_GRFATR_CROPGRF>{} );
pSh->GetCurAttr( aSet );
SwCropGrf aCrop( static_cast<const SwCropGrf&>(aSet.Get(RES_GRFATR_CROPGRF)) );
diff --git a/sw/source/core/edit/acorrect.cxx b/sw/source/core/edit/acorrect.cxx
index ed42d4ff1d4d..b2a15b34c601 100644
--- a/sw/source/core/edit/acorrect.cxx
+++ b/sw/source/core/edit/acorrect.cxx
@@ -257,7 +257,7 @@ bool SwAutoCorrDoc::SetINetAttr( sal_Int32 nStt, sal_Int32 nEnd, const OUString&
SwPaM aPam( rNd, nStt, rNd, nEnd );
SfxItemSet aSet( rEditSh.GetDoc()->GetAttrPool(),
- RES_TXTATR_INETFMT, RES_TXTATR_INETFMT );
+ svl::Items<RES_TXTATR_INETFMT, RES_TXTATR_INETFMT>{} );
aSet.Put( SwFormatINetFormat( rURL, OUString() ));
rEditSh.GetDoc()->SetFormatItemByAutoFormat( aPam, aSet );
if( bUndoIdInitialized )
diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx
index f9a992833f10..f9e37f7ab433 100644
--- a/sw/source/core/edit/autofmt.cxx
+++ b/sw/source/core/edit/autofmt.cxx
@@ -578,9 +578,8 @@ bool SwAutoFormat::DoUnderline()
break;
}
SfxItemSet aSet(m_pDoc->GetAttrPool(),
- RES_PARATR_CONNECT_BORDER, RES_PARATR_CONNECT_BORDER,
- RES_BOX, RES_BOX,
- 0);
+ svl::Items<RES_PARATR_CONNECT_BORDER, RES_PARATR_CONNECT_BORDER,
+ RES_BOX, RES_BOX>{});
aSet.Put( SwParaConnectBorderItem( false ) );
SvxBoxItem aBox( RES_BOX );
aBox.SetLine( &aLine, SvxBoxItemLine::BOTTOM );
@@ -988,11 +987,10 @@ void SwAutoFormat::SetColl( sal_uInt16 nId, bool bHdLineOrText )
// keep hard tabs, alignment, language, hyphenation, DropCaps and nearly all frame attributes
SfxItemSet aSet( m_pDoc->GetAttrPool(),
- RES_PARATR_ADJUST, RES_PARATR_ADJUST,
+ svl::Items<RES_PARATR_ADJUST, RES_PARATR_ADJUST,
RES_PARATR_TABSTOP, RES_PARATR_DROP,
RES_CHRATR_LANGUAGE, RES_CHRATR_LANGUAGE,
- RES_BACKGROUND, RES_SHADOW,
- 0 );
+ RES_BACKGROUND, RES_SHADOW>{} );
if( m_pCurTextNd->HasSwAttrSet() )
{
diff --git a/sw/source/core/edit/edfmt.cxx b/sw/source/core/edit/edfmt.cxx
index 40d716e6cc17..c162358a1913 100644
--- a/sw/source/core/edit/edfmt.cxx
+++ b/sw/source/core/edit/edfmt.cxx
@@ -42,8 +42,8 @@ SwCharFormat& SwEditShell::GetCharFormat(sal_uInt16 nFormat) const
SwCharFormat* SwEditShell::GetCurCharFormat() const
{
SwCharFormat *pFormat = nullptr;
- SfxItemSet aSet( GetDoc()->GetAttrPool(), RES_TXTATR_CHARFMT,
- RES_TXTATR_CHARFMT );
+ SfxItemSet aSet( GetDoc()->GetAttrPool(), svl::Items<RES_TXTATR_CHARFMT,
+ RES_TXTATR_CHARFMT>{} );
const SfxPoolItem* pItem;
if( GetCurAttr( aSet ) && SfxItemState::SET ==
aSet.GetItemState( RES_TXTATR_CHARFMT, false, &pItem ) )
diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx
index 2c01c9e5cff0..e75ee2dee152 100644
--- a/sw/source/core/edit/edlingu.cxx
+++ b/sw/source/core/edit/edlingu.cxx
@@ -1230,7 +1230,7 @@ void SwEditShell::ApplyChangedSentence(const svx::SpellPortions& rNewPortions, b
case SvtScriptType::COMPLEX : nLangWhichId = RES_CHRATR_CTL_LANGUAGE; break;
default: break;
}
- SfxItemSet aSet(GetAttrPool(), nLangWhichId, nLangWhichId, 0);
+ SfxItemSet aSet(GetAttrPool(), {{nLangWhichId, nLangWhichId}});
GetCurAttr( aSet );
const SvxLanguageItem& rLang = static_cast<const SvxLanguageItem& >(aSet.Get(nLangWhichId));
if(rLang.GetLanguage() != aCurrentNewPortion->eLanguage)
@@ -1558,7 +1558,7 @@ static LanguageType lcl_GetLanguage(SwEditShell& rSh)
case SvtScriptType::COMPLEX : nLangWhichId = RES_CHRATR_CTL_LANGUAGE; break;
default: break;
}
- SfxItemSet aSet(rSh.GetAttrPool(), nLangWhichId, nLangWhichId, 0);
+ SfxItemSet aSet(rSh.GetAttrPool(), {{nLangWhichId, nLangWhichId}});
rSh.GetCurAttr( aSet );
const SvxLanguageItem& rLang = static_cast<const SvxLanguageItem& >(aSet.Get(nLangWhichId));
return rLang.GetLanguage();
diff --git a/sw/source/core/fields/cellfml.cxx b/sw/source/core/fields/cellfml.cxx
index 1be01755be5a..90bdef938d0e 100644
--- a/sw/source/core/fields/cellfml.cxx
+++ b/sw/source/core/fields/cellfml.cxx
@@ -118,7 +118,7 @@ double SwTableBox::GetValue( SwTableCalcPara& rCalcPara ) const
{
SwFrameFormat* pFormat = pBox->ClaimFrameFormat();
SfxItemSet aTmp( pDoc->GetAttrPool(),
- RES_BOXATR_BEGIN,RES_BOXATR_END-1 );
+ svl::Items<RES_BOXATR_BEGIN,RES_BOXATR_END-1>{} );
aTmp.Put( SwTableBoxValue( nRet ) );
if( SfxItemState::SET != pFormat->GetItemState( RES_BOXATR_FORMAT ))
aTmp.Put( SwTableBoxNumFormat( 0 ));
diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx
index 42c09bd5555a..11513cf65eff 100644
--- a/sw/source/core/frmedt/fecopy.cxx
+++ b/sw/source/core/frmedt/fecopy.cxx
@@ -1392,7 +1392,7 @@ void SwFEShell::Paste( SvStream& rStrm, SwPasteSdr nAction, const Point* pPt )
{
// store attributes, then set SdrObject
SfxItemSet aFrameSet( mpDoc->GetAttrPool(),
- RES_SURROUND, RES_ANCHOR );
+ svl::Items<RES_SURROUND, RES_ANCHOR>{} );
aFrameSet.Set( pFormat->GetAttrSet() );
Point aNullPt;
@@ -1572,7 +1572,7 @@ bool SwFEShell::Paste(const Graphic &rGrf, const OUString& rURL)
{
pView->AddUndo(new SdrUndoAttrObj(*pObj));
- SfxItemSet aSet(pView->GetModel()->GetItemPool(), XATTR_FILLSTYLE, XATTR_FILLBITMAP);
+ SfxItemSet aSet(pView->GetModel()->GetItemPool(), svl::Items<XATTR_FILLSTYLE, XATTR_FILLBITMAP>{});
aSet.Put(XFillStyleItem(drawing::FillStyle_BITMAP));
aSet.Put(XFillBitmapItem(OUString(), rGrf));
diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx
index b0d3a3a8e0f3..575a16bbf96c 100644
--- a/sw/source/core/frmedt/fefly1.cxx
+++ b/sw/source/core/frmedt/fefly1.cxx
@@ -1063,7 +1063,7 @@ SfxItemSet SwFEShell::makeItemSetFromFormatAnchor(SfxItemPool& rPool, const SwFo
// The set also includes VERT/HORI_ORIENT, because the align
// shall be changed in FEShell::SetFlyFrameAttr/SetFlyFrameAnchor,
// possibly as a result of the anchor change.
- SfxItemSet aSet(rPool, RES_VERT_ORIENT, RES_ANCHOR);
+ SfxItemSet aSet(rPool, svl::Items<RES_VERT_ORIENT, RES_ANCHOR>{});
aSet.Put(rAnchor);
return aSet;
}
diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx
index 813dcc658a8d..f7165eb5678e 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -1884,8 +1884,8 @@ bool SwFEShell::ImpEndCreate()
}
}
- SfxItemSet aSet( GetDoc()->GetAttrPool(), RES_FRM_SIZE, RES_FRM_SIZE,
- RES_SURROUND, RES_ANCHOR, 0 );
+ SfxItemSet aSet( GetDoc()->GetAttrPool(), svl::Items<RES_FRM_SIZE, RES_FRM_SIZE,
+ RES_SURROUND, RES_ANCHOR>{} );
aSet.Put( aAnch );
// OD 2004-03-30 #i26791# - determine relative object position
@@ -1953,7 +1953,7 @@ bool SwFEShell::ImpEndCreate()
::GetHtmlMode( GetDoc()->GetDocShell() ) &&
nullptr != ( pFlyFrame = GetSelectedFlyFrame() ))
{
- SfxItemSet aHtmlSet( GetDoc()->GetAttrPool(), RES_VERT_ORIENT, RES_HORI_ORIENT );
+ SfxItemSet aHtmlSet( GetDoc()->GetAttrPool(), svl::Items<RES_VERT_ORIENT, RES_HORI_ORIENT>{} );
// horizontal orientation:
const bool bLeftFrame = aFlyRect.Left() <
pAnch->Frame().Left() + pAnch->Prt().Left(),
@@ -2704,8 +2704,8 @@ void SwFEShell::CheckUnboundObjects()
// First the action here, to assure GetCharRect delivers current values.
StartAllAction();
- SfxItemSet aSet( GetAttrPool(), RES_FRM_SIZE, RES_FRM_SIZE,
- RES_SURROUND, RES_ANCHOR, 0 );
+ SfxItemSet aSet( GetAttrPool(), svl::Items<RES_FRM_SIZE, RES_FRM_SIZE,
+ RES_SURROUND, RES_ANCHOR>{} );
aSet.Put( aAnch );
Point aRelNullPt;
@@ -3069,7 +3069,7 @@ long SwFEShell::GetSectionWidth( SwFormat const & rFormat ) const
if(bMarquee)
{
- SfxItemSet aSet(pDrawModel->GetItemPool(), SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST);
+ SfxItemSet aSet(pDrawModel->GetItemPool(), svl::Items<SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST>{});
aSet.Put( makeSdrTextAutoGrowWidthItem( false ) );
aSet.Put( makeSdrTextAutoGrowHeightItem( false ) );
aSet.Put( SdrTextAniKindItem( SdrTextAniKind::Slide ) );
diff --git a/sw/source/core/frmedt/fews.cxx b/sw/source/core/frmedt/fews.cxx
index 1208a71aa8cf..3233ea34800f 100644
--- a/sw/source/core/frmedt/fews.cxx
+++ b/sw/source/core/frmedt/fews.cxx
@@ -518,7 +518,7 @@ void SwFEShell::InsertLabel( const SwLabelType eType, const OUString &rText, con
//the next line, pushing the caption text out of
//the frame making the caption apparently disappear
SvxCharHiddenItem aHidden(true, RES_CHRATR_HIDDEN);
- SfxItemSet aSet(GetDoc()->GetAttrPool(), aHidden.Which(), aHidden.Which());
+ SfxItemSet aSet(GetDoc()->GetAttrPool(), {{aHidden.Which(), aHidden.Which()}});
aSet.Put(aHidden);
pTextNode->SetAttr(aSet, nIndex, nIndex + 1);
}
diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
index 8ad675b77590..7a45f973ecef 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -1035,7 +1035,7 @@ void SwFlyFrame::ChgRelPos( const Point &rNewPos )
if( bVert )
nTmpY = -nTmpY;
SfxItemSet aSet( pFormat->GetDoc()->GetAttrPool(),
- RES_VERT_ORIENT, RES_HORI_ORIENT);
+ svl::Items<RES_VERT_ORIENT, RES_HORI_ORIENT>{});
SwFormatVertOrient aVert( pFormat->GetVertOrient() );
const SwTextFrame *pAutoFrame = nullptr;
diff --git a/sw/source/core/text/redlnitr.cxx b/sw/source/core/text/redlnitr.cxx
index b0aaeb31bf8d..3a68743aaff5 100644
--- a/sw/source/core/text/redlnitr.cxx
+++ b/sw/source/core/text/redlnitr.cxx
@@ -236,7 +236,7 @@ short SwRedlineItr::Seek_(SwFont& rFnt, sal_Int32 nNew, sal_Int32 nOld)
{
SwAttrPool& rPool =
const_cast<SwDoc&>(rDoc).GetAttrPool();
- pSet = o3tl::make_unique<SfxItemSet>(rPool, RES_CHRATR_BEGIN, RES_CHRATR_END-1);
+ pSet = o3tl::make_unique<SfxItemSet>(rPool, svl::Items<RES_CHRATR_BEGIN, RES_CHRATR_END-1>{});
}
if( 1 < pRed->GetStackCount() )
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index c687809cbb92..3c5f2553a795 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -1706,11 +1706,10 @@ void SwTextNode::CopyText( SwTextNode *const pDest,
nLen != pDest->GetText().getLength()))
{
SfxItemSet aCharSet( pDest->GetDoc()->GetAttrPool(),
- RES_CHRATR_BEGIN, RES_CHRATR_END-1,
+ svl::Items<RES_CHRATR_BEGIN, RES_CHRATR_END-1,
RES_TXTATR_INETFMT, RES_TXTATR_INETFMT,
RES_TXTATR_CHARFMT, RES_TXTATR_CHARFMT,
- RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1,
- 0 );
+ RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1>{} );
aCharSet.Put( *GetpSwAttrSet() );
if( aCharSet.Count() )
{
@@ -1749,11 +1748,10 @@ void SwTextNode::CopyText( SwTextNode *const pDest,
nLen != pDest->GetText().getLength()))
{
SfxItemSet aCharSet( pDest->GetDoc()->GetAttrPool(),
- RES_CHRATR_BEGIN, RES_CHRATR_END-1,
+ svl::Items<RES_CHRATR_BEGIN, RES_CHRATR_END-1,
RES_TXTATR_INETFMT, RES_TXTATR_INETFMT,
RES_TXTATR_CHARFMT, RES_TXTATR_CHARFMT,
- RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1,
- 0 );
+ RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1>{} );
aCharSet.Put( *GetpSwAttrSet() );
if( aCharSet.Count() )
{
@@ -2108,11 +2106,10 @@ void SwTextNode::CutImpl( SwTextNode * const pDest, const SwIndex & rDestStart,
nLen != pDest->GetText().getLength())
{
SfxItemSet aCharSet( pDest->GetDoc()->GetAttrPool(),
- RES_CHRATR_BEGIN, RES_CHRATR_END-1,
+ svl::Items<RES_CHRATR_BEGIN, RES_CHRATR_END-1,
RES_TXTATR_INETFMT, RES_TXTATR_INETFMT,
RES_TXTATR_CHARFMT, RES_TXTATR_CHARFMT,
- RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1,
- 0 );
+ RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1>{} );
aCharSet.Put( *GetpSwAttrSet() );
if( aCharSet.Count() )
pDest->SetAttr( aCharSet, nDestStart, nDestStart + nLen );
@@ -4880,7 +4877,7 @@ void SwTextNode::dumpAsXml(xmlTextWriterPtr pWriter) const
sal_uInt32 SwTextNode::GetRsid( sal_Int32 nStt, sal_Int32 nEnd ) const
{
- SfxItemSet aSet( const_cast<SfxItemPool&>(static_cast<SfxItemPool const &>(GetDoc()->GetAttrPool())), RES_CHRATR_RSID, RES_CHRATR_RSID );
+ SfxItemSet aSet( const_cast<SfxItemPool&>(static_cast<SfxItemPool const &>(GetDoc()->GetAttrPool())), svl::Items<RES_CHRATR_RSID, RES_CHRATR_RSID>{} );
if ( GetAttr(aSet, nStt, nEnd) )
{
const SvxRsidItem* pRsid = aSet.GetItem<SvxRsidItem>(RES_CHRATR_RSID);
diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx
index c590a6e5cab7..e0095e77acf0 100644
--- a/sw/source/core/txtnode/thints.cxx
+++ b/sw/source/core/txtnode/thints.cxx
@@ -993,7 +993,7 @@ SwTextAttr* MakeTextAttr(
// Sorry, this is not allowed any longer.
// You'll get a brand new autostyle attribute:
SfxItemSet aItemSet( rDoc.GetAttrPool(),
- RES_CHRATR_BEGIN, RES_CHRATR_END );
+ svl::Items<RES_CHRATR_BEGIN, RES_CHRATR_END>{} );
aItemSet.Put( rAttr );
return MakeTextAttr( rDoc, aItemSet, nStt, nEnd );
}
@@ -1834,7 +1834,7 @@ bool SwTextNode::SetAttr(
// split sets (for selection in nodes)
const SfxItemSet* pSet = &rSet;
- SfxItemSet aTextSet( *rSet.GetPool(), RES_TXTATR_BEGIN, RES_TXTATR_END-1 );
+ SfxItemSet aTextSet( *rSet.GetPool(), svl::Items<RES_TXTATR_BEGIN, RES_TXTATR_END-1>{} );
// entire paragraph
if ( !nStt && (nEnd == m_Text.getLength()) &&
diff --git a/sw/source/core/undo/unattr.cxx b/sw/source/core/undo/unattr.cxx
index deaf037a82fd..4be99c3222b6 100644
--- a/sw/source/core/undo/unattr.cxx
+++ b/sw/source/core/undo/unattr.cxx
@@ -665,7 +665,7 @@ void SwUndoResetAttr::SetAttrs( const std::set<sal_uInt16> &rAttrs )
SwUndoAttr::SwUndoAttr( const SwPaM& rRange, const SfxPoolItem& rAttr,
const SetAttrMode nFlags )
: SwUndo( SwUndoId::INSATTR, rRange.GetDoc() ), SwUndRng( rRange )
- , m_AttrSet( rRange.GetDoc()->GetAttrPool(), rAttr.Which(), rAttr.Which() )
+ , m_AttrSet( rRange.GetDoc()->GetAttrPool(), {{rAttr.Which(), rAttr.Which()}} )
, m_pHistory( new SwHistory )
, m_nNodeIndex( ULONG_MAX )
, m_nInsertFlags( nFlags )
diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx
index c1d0dc50afaa..0d65e3caa7d0 100644
--- a/sw/source/core/undo/untbl.cxx
+++ b/sw/source/core/undo/untbl.cxx
@@ -2326,7 +2326,7 @@ void SwUndoTableNumFormat::RedoImpl(::sw::UndoRedoContext & rContext)
if( bNewFormat || bNewFormula || bNewValue )
{
SfxItemSet aBoxSet( rDoc.GetAttrPool(),
- RES_BOXATR_FORMAT, RES_BOXATR_VALUE );
+ svl::Items<RES_BOXATR_FORMAT, RES_BOXATR_VALUE>{} );
// Resetting attributes is not enough. In addition, take care that the
// text will be also formatted correctly.
@@ -2355,7 +2355,7 @@ void SwUndoTableNumFormat::RedoImpl(::sw::UndoRedoContext & rContext)
else if( css::util::NumberFormat::TEXT != static_cast<sal_Int16>(nFormatIdx) )
{
SfxItemSet aBoxSet( rDoc.GetAttrPool(),
- RES_BOXATR_FORMAT, RES_BOXATR_VALUE );
+ svl::Items<RES_BOXATR_FORMAT, RES_BOXATR_VALUE>{} );
aBoxSet.Put( SwTableBoxNumFormat( nFormatIdx ));
aBoxSet.Put( SwTableBoxValue( fNum ));
@@ -2529,8 +2529,8 @@ void SwUndoTableCpyTable::UndoImpl(::sw::UndoRedoContext & rContext)
aInsIdx = rBox.GetSttIdx() + 1;
rDoc.GetNodes().Delete( aInsIdx );
- SfxItemSet aTmpSet( rDoc.GetAttrPool(), RES_BOXATR_FORMAT, RES_BOXATR_VALUE,
- RES_VERT_ORIENT, RES_VERT_ORIENT, 0 );
+ SfxItemSet aTmpSet( rDoc.GetAttrPool(), svl::Items<RES_BOXATR_FORMAT, RES_BOXATR_VALUE,
+ RES_VERT_ORIENT, RES_VERT_ORIENT>{} );
aTmpSet.Put( rBox.GetFrameFormat()->GetAttrSet() );
if( aTmpSet.Count() )
{
@@ -2548,8 +2548,8 @@ void SwUndoTableCpyTable::UndoImpl(::sw::UndoRedoContext & rContext)
if( aTmpSet.Count() )
{
pEntry->pBoxNumAttr = o3tl::make_unique<SfxItemSet>( rDoc.GetAttrPool(),
- RES_BOXATR_FORMAT, RES_BOXATR_VALUE,
- RES_VERT_ORIENT, RES_VERT_ORIENT, 0 );
+ svl::Items<RES_BOXATR_FORMAT, RES_BOXATR_VALUE,
+ RES_VERT_ORIENT, RES_VERT_ORIENT>{} );
pEntry->pBoxNumAttr->Put( aTmpSet );
}
@@ -2620,8 +2620,8 @@ void SwUndoTableCpyTable::RedoImpl(::sw::UndoRedoContext & rContext)
aInsIdx = rBox.GetSttIdx() + 1;
rDoc.GetNodes().Delete( aInsIdx );
- SfxItemSet aTmpSet( rDoc.GetAttrPool(), RES_BOXATR_FORMAT, RES_BOXATR_VALUE,
- RES_VERT_ORIENT, RES_VERT_ORIENT, 0 );
+ SfxItemSet aTmpSet( rDoc.GetAttrPool(), svl::Items<RES_BOXATR_FORMAT, RES_BOXATR_VALUE,
+ RES_VERT_ORIENT, RES_VERT_ORIENT>{} );
aTmpSet.Put( rBox.GetFrameFormat()->GetAttrSet() );
if( aTmpSet.Count() )
{
@@ -2638,8 +2638,8 @@ void SwUndoTableCpyTable::RedoImpl(::sw::UndoRedoContext & rContext)
if( aTmpSet.Count() )
{
pEntry->pBoxNumAttr = o3tl::make_unique<SfxItemSet>( rDoc.GetAttrPool(),
- RES_BOXATR_FORMAT, RES_BOXATR_VALUE,
- RES_VERT_ORIENT, RES_VERT_ORIENT, 0 );
+ svl::Items<RES_BOXATR_FORMAT, RES_BOXATR_VALUE,
+ RES_VERT_ORIENT, RES_VERT_ORIENT>{} );
pEntry->pBoxNumAttr->Put( aTmpSet );
}
@@ -2669,8 +2669,8 @@ void SwUndoTableCpyTable::AddBoxBefore( const SwTableBox& rBox, bool bDelContent
}
pEntry->pBoxNumAttr = o3tl::make_unique<SfxItemSet>( pDoc->GetAttrPool(),
- RES_BOXATR_FORMAT, RES_BOXATR_VALUE,
- RES_VERT_ORIENT, RES_VERT_ORIENT, 0 );
+ svl::Items<RES_BOXATR_FORMAT, RES_BOXATR_VALUE,
+ RES_VERT_ORIENT, RES_VERT_ORIENT>{} );
pEntry->pBoxNumAttr->Put( rBox.GetFrameFormat()->GetAttrSet() );
if( !pEntry->pBoxNumAttr->Count() )
{
diff --git a/sw/source/core/unocore/SwXTextDefaults.cxx b/sw/source/core/unocore/SwXTextDefaults.cxx
index 17b62c0afd98..e709ffdf8356 100644
--- a/sw/source/core/unocore/SwXTextDefaults.cxx
+++ b/sw/source/core/unocore/SwXTextDefaults.cxx
@@ -72,7 +72,7 @@ void SAL_CALL SwXTextDefaults::setPropertyValue( const OUString& rPropertyName,
const SfxPoolItem& rItem = m_pDoc->GetDefault(pMap->nWID);
if (RES_PAGEDESC == pMap->nWID && MID_PAGEDESC_PAGEDESCNAME == pMap->nMemberId)
{
- SfxItemSet aSet( m_pDoc->GetAttrPool(), RES_PAGEDESC, RES_PAGEDESC );
+ SfxItemSet aSet( m_pDoc->GetAttrPool(), svl::Items<RES_PAGEDESC, RES_PAGEDESC>{} );
aSet.Put(rItem);
SwUnoCursorHelper::SetPageDesc( aValue, *m_pDoc, aSet );
m_pDoc->SetDefault(aSet.Get(RES_PAGEDESC));
diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx
index 70cec6decfbd..7b26b283fcb7 100644
--- a/sw/source/core/unocore/unodraw.cxx
+++ b/sw/source/core/unocore/unodraw.cxx
@@ -596,8 +596,8 @@ void SwXDrawPage::add(const uno::Reference< drawing::XShape > & xShape)
// now evaluate the properties of SwShapeDescriptor_Impl
SwShapeDescriptor_Impl* pDesc = pShape->GetDescImpl();
- SfxItemSet aSet( pDoc->GetAttrPool(), RES_FRMATR_BEGIN,
- RES_FRMATR_END-1 );
+ SfxItemSet aSet( pDoc->GetAttrPool(), svl::Items<RES_FRMATR_BEGIN,
+ RES_FRMATR_END-1>{} );
SwFormatAnchor aAnchor( RndStdIds::FLY_AS_CHAR );
bool bOpaque = false;
if( pDesc )
@@ -1075,7 +1075,7 @@ void SwXShape::setPropertyValue(const OUString& rPropertyName, const uno::Any& a
{
UnoActionContext aCtx(pDoc);
SfxItemSet aItemSet( pDoc->GetAttrPool(),
- RES_FRMATR_BEGIN, RES_FRMATR_END - 1 );
+ svl::Items<RES_FRMATR_BEGIN, RES_FRMATR_END - 1>{} );
aItemSet.SetParent(&pFormat->GetAttrSet());
SwFormatAnchor aAnchor = static_cast<const SwFormatAnchor&>(aItemSet.Get(pEntry->nWID));
SwPosition aPos(*pFrame->GetFrameFormat()->GetContent().GetContentIdx());
@@ -1883,7 +1883,7 @@ void SwXShape::setPropertyToDefault( const OUString& rPropertyName )
if(pFormat)
{
const SfxItemSet& rSet = pFormat->GetAttrSet();
- SfxItemSet aSet(pFormat->GetDoc()->GetAttrPool(), pEntry->nWID, pEntry->nWID);
+ SfxItemSet aSet(pFormat->GetDoc()->GetAttrPool(), {{pEntry->nWID, pEntry->nWID}});
aSet.SetParent(&rSet);
aSet.ClearItem(pEntry->nWID);
pFormat->GetDoc()->SetAttr(aSet, *pFormat);
diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx
index a005091d1bbb..3e902cd9611f 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -1766,7 +1766,7 @@ void SwXFrame::setPropertyValue(const OUString& rPropertyName, const ::uno::Any&
if(pFrame && this != pFrame && pFrame->GetFrameFormat() && pFrame->GetFrameFormat()->GetDoc() == pDoc)
{
SfxItemSet aSet( pDoc->GetAttrPool(),
- RES_FRMATR_BEGIN, RES_FRMATR_END - 1 );
+ svl::Items<RES_FRMATR_BEGIN, RES_FRMATR_END - 1>{} );
aSet.SetParent(&pFormat->GetAttrSet());
SwFormatAnchor aAnchor = static_cast<const SwFormatAnchor&>(aSet.Get(pEntry->nWID));
@@ -1786,13 +1786,11 @@ void SwXFrame::setPropertyValue(const OUString& rPropertyName, const ::uno::Any&
// standard UNO API write attributes
// adapt former attr from SvxBrushItem::PutValue to new items XATTR_FILL_FIRST, XATTR_FILL_LAST
SfxItemSet aSet( pDoc->GetAttrPool(),
- RES_FRMATR_BEGIN, RES_FRMATR_END - 1,
+ svl::Items<RES_FRMATR_BEGIN, RES_FRMATR_END - 1,
RES_UNKNOWNATR_CONTAINER, RES_UNKNOWNATR_CONTAINER,
// FillAttribute support
- XATTR_FILL_FIRST, XATTR_FILL_LAST,
-
- 0L);
+ XATTR_FILL_FIRST, XATTR_FILL_LAST>{});
bool bDone(false);
aSet.SetParent(&pFormat->GetAttrSet());
@@ -2477,7 +2475,7 @@ void SwXFrame::setPropertyToDefault( const OUString& rPropertyName )
if(OWN_ATTR_FILLBMP_MODE == pEntry->nWID)
{
SwDoc* pDoc = pFormat->GetDoc();
- SfxItemSet aSet(pDoc->GetAttrPool(), XATTR_FILL_FIRST, XATTR_FILL_LAST);
+ SfxItemSet aSet(pDoc->GetAttrPool(), svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST>{});
aSet.SetParent(&pFormat->GetAttrSet());
aSet.ClearItem(XATTR_FILLBMP_STRETCH);
@@ -2523,7 +2521,7 @@ void SwXFrame::setPropertyToDefault( const OUString& rPropertyName )
{
SwDoc* pDoc = pFormat->GetDoc();
SfxItemSet aSet( pDoc->GetAttrPool(),
- RES_FRMATR_BEGIN, RES_FRMATR_END - 1 );
+ svl::Items<RES_FRMATR_BEGIN, RES_FRMATR_END - 1>{} );
aSet.SetParent(&pFormat->GetAttrSet());
aSet.ClearItem(pEntry->nWID);
if(rPropertyName != UNO_NAME_ANCHOR_TYPE)
@@ -2783,7 +2781,7 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan
{
pFormat->DelFrames();
pAnchorItem->SetAnchor( m_pCopySource->Start() );
- SfxItemSet aAnchorSet( pDoc->GetAttrPool(), RES_ANCHOR, RES_ANCHOR );
+ SfxItemSet aAnchorSet( pDoc->GetAttrPool(), svl::Items<RES_ANCHOR, RES_ANCHOR>{} );
aAnchorSet.Put( *pAnchorItem );
pDoc->SetFlyFrameAttr( *pFormat, aAnchorSet );
delete pAnchorItem;
@@ -3052,7 +3050,7 @@ void SwXFrame::attach(const uno::Reference< text::XTextRange > & xTextRange)
SwUnoInternalPaM aIntPam(*pDoc);
if (::sw::XTextRangeToSwPaM(aIntPam, xTextRange))
{
- SfxItemSet aSet( pDoc->GetAttrPool(), RES_ANCHOR, RES_ANCHOR );
+ SfxItemSet aSet( pDoc->GetAttrPool(), svl::Items<RES_ANCHOR, RES_ANCHOR>{} );
aSet.SetParent(&pFormat->GetAttrSet());
SwFormatAnchor aAnchor = static_cast<const SwFormatAnchor&>(aSet.Get(RES_ANCHOR));
aAnchor.SetAnchor( aIntPam.Start() );
diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx
index d2723423f23d..0fd4dca72244 100644
--- a/sw/source/core/unocore/unoobj.cxx
+++ b/sw/source/core/unocore/unoobj.cxx
@@ -386,7 +386,7 @@ lcl_setCharFormatSequence(SwPaM & rPam, uno::Any const& rValue)
aStyle <<= aCharStyles.getConstArray()[nStyle];
// create a local set and apply each format directly
SfxItemSet aSet(rPam.GetDoc()->GetAttrPool(),
- RES_TXTATR_CHARFMT, RES_TXTATR_CHARFMT);
+ svl::Items<RES_TXTATR_CHARFMT, RES_TXTATR_CHARFMT>{});
lcl_setCharStyle(rPam.GetDoc(), aStyle, aSet);
// the first style should replace the current attributes,
// all other have to be added
@@ -1739,10 +1739,9 @@ uno::Any SwUnoCursorHelper::GetPropertyValue(
if (!bDone)
{
SfxItemSet aSet(rPaM.GetDoc()->GetAttrPool(),
- RES_CHRATR_BEGIN, RES_FRMATR_END - 1,
+ svl::Items<RES_CHRATR_BEGIN, RES_FRMATR_END - 1,
RES_TXTATR_UNKNOWN_CONTAINER, RES_TXTATR_UNKNOWN_CONTAINER,
- RES_UNKNOWNATR_CONTAINER, RES_UNKNOWNATR_CONTAINER,
- 0L);
+ RES_UNKNOWNATR_CONTAINER, RES_UNKNOWNATR_CONTAINER>{});
SwUnoCursorHelper::GetCursorAttr(rPaM, aSet);
rPropSet.getPropertyValue(*pEntry, aSet, aAny);
@@ -1917,20 +1916,19 @@ SwUnoCursorHelper::GetPropertyStates(
case SW_PROPERTY_STATE_CALLER_SWX_TEXT_PORTION:
pSet.reset(
new SfxItemSet( rPaM.GetDoc()->GetAttrPool(),
- RES_CHRATR_BEGIN, RES_TXTATR_END ));
+ svl::Items<RES_CHRATR_BEGIN, RES_TXTATR_END>{} ));
break;
case SW_PROPERTY_STATE_CALLER_SINGLE_VALUE_ONLY:
pSet.reset(
new SfxItemSet( rPaM.GetDoc()->GetAttrPool(),
- pEntry->nWID, pEntry->nWID ));
+ {{pEntry->nWID, pEntry->nWID}} ));
break;
default:
pSet.reset( new SfxItemSet(
rPaM.GetDoc()->GetAttrPool(),
- RES_CHRATR_BEGIN, RES_FRMATR_END - 1,
+ svl::Items<RES_CHRATR_BEGIN, RES_FRMATR_END - 1,
RES_UNKNOWNATR_CONTAINER, RES_UNKNOWNATR_CONTAINER,
- RES_TXTATR_UNKNOWN_CONTAINER, RES_TXTATR_UNKNOWN_CONTAINER,
- 0L ));
+ RES_TXTATR_UNKNOWN_CONTAINER, RES_TXTATR_UNKNOWN_CONTAINER>{} ));
}
// #i63870#
SwUnoCursorHelper::GetCursorAttr( rPaM, *pSet );
diff --git a/sw/source/core/unocore/unoport.cxx b/sw/source/core/unocore/unoport.cxx
index b9769d58f91b..be26a3b937c5 100644
--- a/sw/source/core/unocore/unoport.cxx
+++ b/sw/source/core/unocore/unoport.cxx
@@ -362,10 +362,9 @@ void SwXTextPortion::GetPropertyValue(
if(!pSet)
{
pSet = o3tl::make_unique<SfxItemSet>(pUnoCursor->GetDoc()->GetAttrPool(),
- RES_CHRATR_BEGIN, RES_FRMATR_END - 1,
+ svl::Items<RES_CHRATR_BEGIN, RES_FRMATR_END - 1,
RES_UNKNOWNATR_CONTAINER, RES_UNKNOWNATR_CONTAINER,
- RES_TXTATR_UNKNOWN_CONTAINER, RES_TXTATR_UNKNOWN_CONTAINER,
- 0L);
+ RES_TXTATR_UNKNOWN_CONTAINER, RES_TXTATR_UNKNOWN_CONTAINER>{});
SwUnoCursorHelper::GetCursorAttr(*pUnoCursor, *pSet);
}
m_pPropSet->getPropertyValue(rEntry, *pSet, rVal);
diff --git a/sw/source/core/unocore/unosect.cxx b/sw/source/core/unocore/unosect.cxx
index da5af6a13e38..a9cf24f28943 100644
--- a/sw/source/core/unocore/unosect.cxx
+++ b/sw/source/core/unocore/unosect.cxx
@@ -352,12 +352,11 @@ SwXTextSection::attach(const uno::Reference< text::XTextRange > & xTextRange)
aSect.SetEditInReadonlyFlag(m_pImpl->m_pProps->m_bEditInReadonly);
SfxItemSet aSet(pDoc->GetAttrPool(),
- RES_COL, RES_COL,
+ svl::Items<RES_COL, RES_COL,
RES_BACKGROUND, RES_BACKGROUND,
RES_FTN_AT_TXTEND, RES_FRAMEDIR,
RES_LR_SPACE, RES_LR_SPACE,
- RES_UNKNOWNATR_CONTAINER,RES_UNKNOWNATR_CONTAINER,
- 0);
+ RES_UNKNOWNATR_CONTAINER,RES_UNKNOWNATR_CONTAINER>{});
if (m_pImpl->m_pProps->m_pBrushItem.get())
{
aSet.Put(*m_pImpl->m_pProps->m_pBrushItem);
@@ -811,7 +810,7 @@ void SwXTextSection::Impl::SetPropertyValues_Impl(
if (pFormat)
{
const SfxItemSet& rOldAttrSet = pFormat->GetAttrSet();
- pItemSet.reset( new SfxItemSet(*rOldAttrSet.GetPool(), pEntry->nWID, pEntry->nWID));
+ pItemSet.reset( new SfxItemSet(*rOldAttrSet.GetPool(), {{pEntry->nWID, pEntry->nWID}}));
pItemSet->Put(rOldAttrSet);
m_rPropSet.setPropertyValue(*pEntry,
pValues[nProperty], *pItemSet);
@@ -1541,7 +1540,7 @@ SwXTextSection::setPropertyToDefault(const OUString& rPropertyName)
if (pFormat)
{
const SfxItemSet& rOldAttrSet = pFormat->GetAttrSet();
- pNewAttrSet.reset( new SfxItemSet(*rOldAttrSet.GetPool(), pEntry->nWID, pEntry->nWID));
+ pNewAttrSet.reset( new SfxItemSet(*rOldAttrSet.GetPool(), {{pEntry->nWID, pEntry->nWID}}));
pNewAttrSet->ClearItem(pEntry->nWID);
}
else
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index 2cce53ca24b6..165466e80fce 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -1565,7 +1565,7 @@ void SwXStyle::SetPropertyValue<HINT_BEGIN>(const SfxItemPropertySimpleEntry& rE
{
// default ItemSet handling
SfxItemSet& rStyleSet = o_rStyleBase.GetItemSet();
- SfxItemSet aSet(*rStyleSet.GetPool(), rEntry.nWID, rEntry.nWID);
+ SfxItemSet aSet(*rStyleSet.GetPool(), {{rEntry.nWID, rEntry.nWID}});
aSet.SetParent(&rStyleSet);
rPropSet.setPropertyValue(rEntry, rValue, aSet);
rStyleSet.Put(aSet);
@@ -1675,7 +1675,7 @@ void SwXStyle::SetPropertyValue<RES_PAPER_BIN>(const SfxItemPropertySimpleEntry&
if(nBin == std::numeric_limits<printeridx_t>::max())
throw lang::IllegalArgumentException();
SfxItemSet& rStyleSet = o_rStyleBase.GetItemSet();
- SfxItemSet aSet(*rStyleSet.GetPool(), rEntry.nWID, rEntry.nWID);
+ SfxItemSet aSet(*rStyleSet.GetPool(), {{rEntry.nWID, rEntry.nWID}});
aSet.SetParent(&rStyleSet);
rPropSet.setPropertyValue(rEntry, uno::makeAny(static_cast<sal_Int8>(nBin == std::numeric_limits<printeridx_t>::max()-1 ? -1 : nBin)), aSet);
rStyleSet.Put(aSet);
@@ -2602,7 +2602,7 @@ void SAL_CALL SwXStyle::setPropertiesToDefault(const uno::Sequence<OUString>& aP
{
//
SwDoc* pDoc = pTargetFormat->GetDoc();
- SfxItemSet aSet(pDoc->GetAttrPool(), XATTR_FILL_FIRST, XATTR_FILL_LAST);
+ SfxItemSet aSet(pDoc->GetAttrPool(), svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST>{});
aSet.SetParent(&pTargetFormat->GetAttrSet());
aSet.ClearItem(XATTR_FILLBMP_STRETCH);
@@ -2873,7 +2873,7 @@ void SwXPageStyle::SetPropertyValues_Impl(const uno::Sequence<OUString>& rProper
{
// Header/footer gets switched on, create defaults and the needed SfxSetItem
SfxItemSet aTempSet(*aBaseImpl.GetItemSet().GetPool(),
- RES_FRMATR_BEGIN,RES_FRMATR_END - 1, // [82
+ svl::Items<RES_FRMATR_BEGIN,RES_FRMATR_END - 1, // [82
// FillAttribute support
XATTR_FILL_FIRST, XATTR_FILL_LAST, // [1014
@@ -2881,8 +2881,7 @@ void SwXPageStyle::SetPropertyValues_Impl(const uno::Sequence<OUString>& rProper
SID_ATTR_BORDER_INNER,SID_ATTR_BORDER_INNER, // [10023
SID_ATTR_PAGE_SIZE,SID_ATTR_PAGE_SIZE, // [10051
SID_ATTR_PAGE_ON,SID_ATTR_PAGE_SHARED, // [10060
- SID_ATTR_PAGE_SHARED_FIRST,SID_ATTR_PAGE_SHARED_FIRST,
- 0);
+ SID_ATTR_PAGE_SHARED_FIRST,SID_ATTR_PAGE_SHARED_FIRST>{});
// set correct parent to get the XFILL_NONE FillStyle as needed
aTempSet.SetParent(&GetDoc()->GetDfltFrameFormat()->GetAttrSet());
@@ -3275,7 +3274,7 @@ void SwXFrameStyle::SetItem(enum RES_FRMATR eAtr, const SfxPoolItem& rItem)
return;
rtl::Reference<SwDocStyleSheet> xStyle(new SwDocStyleSheet(*static_cast<SwDocStyleSheet*>(pBase)));
SfxItemSet& rStyleSet = xStyle->GetItemSet();
- SfxItemSet aSet(*rStyleSet.GetPool(), eAtr, eAtr);
+ SfxItemSet aSet(*rStyleSet.GetPool(), {{sal_uInt16(eAtr), sal_uInt16(eAtr)}});
aSet.Put(rItem);
xStyle->SetItemSet(aSet);
}
@@ -3719,7 +3718,7 @@ SwAutoStylesEnumImpl::SwAutoStylesEnumImpl( SwDoc* pInitDoc, IStyleAccess::SwAut
if ( aRubyMap.find( aPair ) == aRubyMap.end() )
{
aRubyMap.insert( aPair );
- std::shared_ptr<SfxItemSet> pItemSet( new SfxItemSet( rAttrPool, RES_TXTATR_CJK_RUBY, RES_TXTATR_CJK_RUBY ) );
+ std::shared_ptr<SfxItemSet> pItemSet( new SfxItemSet( rAttrPool, svl::Items<RES_TXTATR_CJK_RUBY, RES_TXTATR_CJK_RUBY>{} ) );
pItemSet->Put( *pItem );
mAutoStyles.push_back( pItemSet );
}
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index e35c6185c2db..2d1c91e219fe 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -733,7 +733,7 @@ void sw_setValue( SwXCell &rCell, double nVal )
SwDoc* pDoc = rCell.GetDoc();
UnoActionContext aAction(pDoc);
SwFrameFormat* pBoxFormat = rCell.pBox->ClaimFrameFormat();
- SfxItemSet aSet(pDoc->GetAttrPool(), RES_BOXATR_FORMAT, RES_BOXATR_VALUE);
+ SfxItemSet aSet(pDoc->GetAttrPool(), svl::Items<RES_BOXATR_FORMAT, RES_BOXATR_VALUE>{});
const SfxPoolItem* pItem;
//!! do we need to set a new number format? Yes, if
@@ -909,7 +909,7 @@ void SwXCell::setFormula(const OUString& rFormula)
SwTableBoxFormula aFormula( sFormula );
SwDoc* pMyDoc = GetDoc();
UnoActionContext aAction(pMyDoc);
- SfxItemSet aSet(pMyDoc->GetAttrPool(), RES_BOXATR_FORMAT, RES_BOXATR_FORMULA);
+ SfxItemSet aSet(pMyDoc->GetAttrPool(), svl::Items<RES_BOXATR_FORMAT, RES_BOXATR_FORMULA>{});
const SfxPoolItem* pItem;
SwFrameFormat* pBoxFormat = pBox->GetFrameFormat();
if(SfxItemState::SET != pBoxFormat->GetAttrSet().GetItemState(RES_BOXATR_FORMAT, true, &pItem)
@@ -1701,7 +1701,7 @@ void SwXTextTableCursor::setPropertyValue(const OUString& rPropertyName, const u
break;
default:
{
- SfxItemSet aItemSet(pDoc->GetAttrPool(), pEntry->nWID, pEntry->nWID);
+ SfxItemSet aItemSet(pDoc->GetAttrPool(), {{pEntry->nWID, pEntry->nWID}});
SwUnoCursorHelper::GetCursorAttr(rTableCursor.GetSelRing(),
aItemSet);
@@ -1754,9 +1754,8 @@ uno::Any SwXTextTableCursor::getPropertyValue(const OUString& rPropertyName)
default:
{
SfxItemSet aSet(rTableCursor.GetDoc()->GetAttrPool(),
- RES_CHRATR_BEGIN, RES_FRMATR_END-1,
- RES_UNKNOWNATR_CONTAINER, RES_UNKNOWNATR_CONTAINER,
- 0L);
+ svl::Items<RES_CHRATR_BEGIN, RES_FRMATR_END-1,
+ RES_UNKNOWNATR_CONTAINER, RES_UNKNOWNATR_CONTAINER>{});
SwUnoCursorHelper::GetCursorAttr(rTableCursor.GetSelRing(), aSet);
m_pPropSet->getPropertyValue(*pEntry, aSet, aResult);
}
@@ -1827,15 +1826,14 @@ void SwTableProperties_Impl::AddItemToSet(SfxItemSet& rSet, std::function<Tpooli
void SwTableProperties_Impl::ApplyTableAttr(const SwTable& rTable, SwDoc& rDoc)
{
SfxItemSet aSet(rDoc.GetAttrPool(),
- RES_LAYOUT_SPLIT, RES_LAYOUT_SPLIT,
+ svl::Items<RES_LAYOUT_SPLIT, RES_LAYOUT_SPLIT,
RES_BACKGROUND, RES_BACKGROUND,
RES_FRM_SIZE, RES_UL_SPACE,
RES_HORI_ORIENT, RES_HORI_ORIENT,
RES_BREAK, RES_BREAK,
RES_KEEP, RES_KEEP,
RES_SHADOW, RES_SHADOW,
- RES_PAGEDESC, RES_PAGEDESC,
- 0
+ RES_PAGEDESC, RES_PAGEDESC>{}
);
const uno::Any* pRepHead;
const SwFrameFormat &rFrameFormat = *rTable.GetFrameFormat();
@@ -2629,9 +2627,8 @@ void SwXTextTable::setPropertyValue(const OUString& rPropertyName, const uno::An
rCursor.MakeBoxSels();
SfxItemSet aSet(pDoc->GetAttrPool(),
- RES_BOX, RES_BOX,
- SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER,
- 0);
+ svl::Items<RES_BOX, RES_BOX,
+ SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER>{});
SvxBoxItem aBox( RES_BOX );
SvxBoxInfoItem aBoxInfo( SID_ATTR_BORDER_INNER );
@@ -2828,9 +2825,8 @@ uno::Any SwXTextTable::getPropertyValue(const OUString& rPropertyName)
rCursor.MakeBoxSels();
SfxItemSet aSet(pDoc->GetAttrPool(),
- RES_BOX, RES_BOX,
- SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER,
- 0);
+ svl::Items<RES_BOX, RES_BOX,
+ SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER>{});
aSet.Put(SvxBoxInfoItem( SID_ATTR_BORDER_INNER ));
SwDoc::GetTabBorders(rCursor, aSet);
const SvxBoxInfoItem& rBoxInfoItem =
@@ -3419,9 +3415,8 @@ SwXCellRange::setPropertyValue(const OUString& rPropertyName, const uno::Any& aV
case RES_BOX :
{
SfxItemSet aSet(pDoc->GetAttrPool(),
- RES_BOX, RES_BOX,
- SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER,
- 0);
+ svl::Items<RES_BOX, RES_BOX,
+ SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER>{});
SvxBoxInfoItem aBoxInfo( SID_ATTR_BORDER_INNER );
aBoxInfo.SetValid(SvxBoxInfoItemValidFlags::ALL, false);
SvxBoxInfoItemValidFlags nValid = SvxBoxInfoItemValidFlags::NONE;
@@ -3487,7 +3482,7 @@ SwXCellRange::setPropertyValue(const OUString& rPropertyName, const uno::Any& aV
break;
default:
{
- SfxItemSet aItemSet( pDoc->GetAttrPool(), pEntry->nWID, pEntry->nWID );
+ SfxItemSet aItemSet( pDoc->GetAttrPool(), {{pEntry->nWID, pEntry->nWID}} );
SwUnoCursorHelper::GetCursorAttr(rCursor.GetSelRing(),
aItemSet);
@@ -3531,9 +3526,8 @@ uno::Any SAL_CALL SwXCellRange::getPropertyValue(const OUString& rPropertyName)
{
SwDoc *const pDoc = m_pImpl->m_pTableCursor->GetDoc();
SfxItemSet aSet(pDoc->GetAttrPool(),
- RES_BOX, RES_BOX,
- SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER,
- 0);
+ svl::Items<RES_BOX, RES_BOX,
+ SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER>{});
aSet.Put(SvxBoxInfoItem( SID_ATTR_BORDER_INNER ));
SwDoc::GetTabBorders(*m_pImpl->m_pTableCursor, aSet);
const SvxBoxItem& rBoxItem = static_cast<const SvxBoxItem&>(aSet.Get(RES_BOX));
@@ -3571,10 +3565,9 @@ uno::Any SAL_CALL SwXCellRange::getPropertyValue(const OUString& rPropertyName)
default:
{
SfxItemSet aSet(m_pImpl->m_pTableCursor->GetDoc()->GetAttrPool(),
- RES_CHRATR_BEGIN, RES_FRMATR_END -1,
+ svl::Items<RES_CHRATR_BEGIN, RES_FRMATR_END -1,
RES_TXTATR_UNKNOWN_CONTAINER, RES_TXTATR_UNKNOWN_CONTAINER,
- RES_UNKNOWNATR_CONTAINER, RES_UNKNOWNATR_CONTAINER,
- 0L);
+ RES_UNKNOWNATR_CONTAINER, RES_UNKNOWNATR_CONTAINER>{});
// first look at the attributes of the cursor
SwUnoTableCursor *const pCursor =
dynamic_cast<SwUnoTableCursor*>(&(*m_pImpl->m_pTableCursor));
diff --git a/sw/source/filter/ascii/parasc.cxx b/sw/source/filter/ascii/parasc.cxx
index 0479c74e9769..e03ae3921ae0 100644
--- a/sw/source/filter/ascii/parasc.cxx
+++ b/sw/source/filter/ascii/parasc.cxx
@@ -102,10 +102,9 @@ SwASCIIParser::SwASCIIParser(SwDoc* pD, const SwPaM& rCursor, SvStream& rIn,
pArr = new sal_Char [ ASC_BUFFLEN + 2 ];
pItemSet = o3tl::make_unique<SfxItemSet>( pDoc->GetAttrPool(),
- RES_CHRATR_FONT, RES_CHRATR_LANGUAGE,
+ svl::Items<RES_CHRATR_FONT, RES_CHRATR_LANGUAGE,
RES_CHRATR_CJK_FONT, RES_CHRATR_CJK_LANGUAGE,
- RES_CHRATR_CTL_FONT, RES_CHRATR_CTL_LANGUAGE,
- 0 );
+ RES_CHRATR_CTL_FONT, RES_CHRATR_CTL_LANGUAGE>{} );
// set defaults from the options
if( rOpt.GetLanguage() )
diff --git a/sw/source/filter/basflt/fltshell.cxx b/sw/source/filter/basflt/fltshell.cxx
index 039a1c39a0ea..cb0991bf426c 100644
--- a/sw/source/filter/basflt/fltshell.cxx
+++ b/sw/source/filter/basflt/fltshell.cxx
@@ -671,7 +671,7 @@ void SwFltControlStack::SetAttrInDoc(const SwPosition& rTmpPos,
// test if on this node there had been a pagebreak BEFORE the
// tox attribute was put on the stack
- SfxItemSet aBkSet( pDoc->GetAttrPool(), RES_PAGEDESC, RES_BREAK );
+ SfxItemSet aBkSet( pDoc->GetAttrPool(), svl::Items<RES_PAGEDESC, RES_BREAK>{} );
SwContentNode* pNd = nullptr;
if( !pTOXAttr->HadBreakItem() || !pTOXAttr->HadPageDescItem() )
{
diff --git a/sw/source/filter/html/SwAppletImpl.cxx b/sw/source/filter/html/SwAppletImpl.cxx
index 11fba7e16641..8d3a8858c9da 100644
--- a/sw/source/filter/html/SwAppletImpl.cxx
+++ b/sw/source/filter/html/SwAppletImpl.cxx
@@ -106,7 +106,7 @@ SwHtmlOptType SwApplet_Impl::GetOptionType( const OUString& rName, bool bApplet
return nType;
}
SwApplet_Impl::SwApplet_Impl( SfxItemPool& rPool ) :
- aItemSet( rPool, RES_FRMATR_BEGIN, RES_FRMATR_END-1 )
+ aItemSet( rPool, svl::Items<RES_FRMATR_BEGIN, RES_FRMATR_END-1>{} )
{
}
diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx
index bb80e234df7d..8505dc0a4bf6 100644
--- a/sw/source/filter/html/css1atr.cxx
+++ b/sw/source/filter/html/css1atr.cxx
@@ -1224,14 +1224,13 @@ bool SwHTMLWriter::HasScriptDependentItems( const SfxItemSet& rItemSet,
//sequence of (start, end) property ranges we want to
//query
SfxItemSet aTstItemSet( *pDCCharFormat->GetAttrSet().GetPool(),
- RES_CHRATR_FONT, RES_CHRATR_FONT,
+ svl::Items<RES_CHRATR_FONT, RES_CHRATR_FONT,
RES_CHRATR_POSTURE, RES_CHRATR_POSTURE,
RES_CHRATR_WEIGHT, RES_CHRATR_WEIGHT,
RES_CHRATR_CJK_FONT, RES_CHRATR_CJK_FONT,
RES_CHRATR_CJK_POSTURE, RES_CHRATR_CJK_WEIGHT,
RES_CHRATR_CTL_FONT, RES_CHRATR_CTL_FONT,
- RES_CHRATR_CTL_POSTURE, RES_CHRATR_CTL_WEIGHT,
- 0 );
+ RES_CHRATR_CTL_POSTURE, RES_CHRATR_CTL_WEIGHT>{} );
aTstItemSet.Set( pDCCharFormat->GetAttrSet() );
return HasScriptDependentItems( aTstItemSet, false );
}
@@ -1275,11 +1274,10 @@ static bool OutCSS1Rule( SwHTMLWriter& rHTMLWrt, const OUString& rSelector,
//sequence of (start, end) property ranges we want to
//query
SfxItemSet aScriptItemSet( *rItemSet.GetPool(),
- RES_CHRATR_FONT, RES_CHRATR_FONTSIZE,
+ svl::Items<RES_CHRATR_FONT, RES_CHRATR_FONTSIZE,
RES_CHRATR_LANGUAGE, RES_CHRATR_POSTURE,
RES_CHRATR_WEIGHT, RES_CHRATR_WEIGHT,
- RES_CHRATR_CJK_FONT, RES_CHRATR_CTL_WEIGHT,
- 0 );
+ RES_CHRATR_CJK_FONT, RES_CHRATR_CTL_WEIGHT>{} );
aScriptItemSet.Put( rItemSet );
OUString aNewSelector( aSelector );
@@ -1378,11 +1376,10 @@ static void OutCSS1DropCapRule(
}
SfxItemSet aScriptItemSet( rHTMLWrt.pDoc->GetAttrPool(),
- RES_CHRATR_FONT, RES_CHRATR_FONTSIZE,
+ svl::Items<RES_CHRATR_FONT, RES_CHRATR_FONTSIZE,
RES_CHRATR_LANGUAGE, RES_CHRATR_POSTURE,
RES_CHRATR_WEIGHT, RES_CHRATR_WEIGHT,
- RES_CHRATR_CJK_FONT, RES_CHRATR_CTL_WEIGHT,
- 0 );
+ RES_CHRATR_CJK_FONT, RES_CHRATR_CTL_WEIGHT>{} );
if( pDCCharFormat )
aScriptItemSet.Set( pDCCharFormat->GetAttrSet() );
@@ -1697,7 +1694,7 @@ static Writer& OutCSS1_SwPageDesc( Writer& rWrt, const SwPageDesc& rPageDesc,
// Export the distance-Attributes as normally
const SwFrameFormat &rMaster = rPageDesc.GetMaster();
SfxItemSet aItemSet( *rMaster.GetAttrSet().GetPool(),
- RES_LR_SPACE, RES_UL_SPACE );
+ svl::Items<RES_LR_SPACE, RES_UL_SPACE>{} );
aItemSet.Set( rMaster.GetAttrSet() );
if( pRefPageDesc )
diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx
index 1eef03d8a148..0a61af5dbc77 100644
--- a/sw/source/filter/html/htmlatr.cxx
+++ b/sw/source/filter/html/htmlatr.cxx
@@ -590,7 +590,7 @@ void OutHTML_SwFormat( Writer& rWrt, const SwFormat& rFormat,
if (!rInfo.pItemSet.get())
{
- rInfo.pItemSet.reset(new SfxItemSet(*rFormat.GetAttrSet().GetPool(), RES_UL_SPACE, RES_UL_SPACE));
+ rInfo.pItemSet.reset(new SfxItemSet(*rFormat.GetAttrSet().GetPool(), svl::Items<RES_UL_SPACE, RES_UL_SPACE>{}));
}
rInfo.pItemSet->Put( aULSpaceItem );
}
@@ -1835,8 +1835,8 @@ void HTMLEndPosLst::Insert( const SwDrawFrameFormat& rFormat, sal_Int32 nPos,
// insert them as hints. Because of the amount of Hints the styles
// are not considered!
const SfxItemSet& rFormatItemSet = rFormat.GetAttrSet();
- SfxItemSet aItemSet( *rFormatItemSet.GetPool(), RES_CHRATR_BEGIN,
- RES_CHRATR_END );
+ SfxItemSet aItemSet( *rFormatItemSet.GetPool(), svl::Items<RES_CHRATR_BEGIN,
+ RES_CHRATR_END>{} );
SwHTMLWriter::GetEEAttrsFromDrwObj( aItemSet, pTextObj, true );
bool bOutStylesOld = bOutStyles;
bOutStyles = false;
diff --git a/sw/source/filter/html/htmlctxt.cxx b/sw/source/filter/html/htmlctxt.cxx
index c575f209e6bb..0646803f9c92 100644
--- a/sw/source/filter/html/htmlctxt.cxx
+++ b/sw/source/filter/html/htmlctxt.cxx
@@ -409,7 +409,7 @@ bool SwHTMLParser::DoPositioning( SfxItemSet &rItemSet,
if( SwCSS1Parser::MayBePositioned( rPropInfo ) )
{
SfxItemSet aFrameItemSet( m_xDoc->GetAttrPool(),
- RES_FRMATR_BEGIN, RES_FRMATR_END-1 );
+ svl::Items<RES_FRMATR_BEGIN, RES_FRMATR_END-1>{} );
if( !IsNewDoc() )
Reader::ResetFrameFormatAttrs(aFrameItemSet );
@@ -704,7 +704,7 @@ SfxItemSet *HTMLAttrContext::GetFrameItemSet( SwDoc *pCreateDoc )
{
if( !pFrameItemSet && pCreateDoc )
pFrameItemSet = o3tl::make_unique<SfxItemSet>( pCreateDoc->GetAttrPool(),
- RES_FRMATR_BEGIN, RES_FRMATR_END-1 );
+ svl::Items<RES_FRMATR_BEGIN, RES_FRMATR_END-1>{} );
return pFrameItemSet.get();
}
diff --git a/sw/source/filter/html/htmldrawreader.cxx b/sw/source/filter/html/htmldrawreader.cxx
index f2800093088c..7654a703bdf5 100644
--- a/sw/source/filter/html/htmldrawreader.cxx
+++ b/sw/source/filter/html/htmldrawreader.cxx
@@ -83,7 +83,7 @@ void SwHTMLParser::InsertDrawObject( SdrObject* pNewDrawObj,
pNewDrawObj->SetLayer( m_xDoc->getIDocumentDrawModelAccess().GetInvisibleHeavenId() );
SfxItemSet aFrameSet( m_xDoc->GetAttrPool(),
- RES_FRMATR_BEGIN, RES_FRMATR_END-1 );
+ svl::Items<RES_FRMATR_BEGIN, RES_FRMATR_END-1>{} );
if( !IsNewDoc() )
Reader::ResetFrameFormatAttrs( aFrameSet );
diff --git a/sw/source/filter/html/htmlfldw.cxx b/sw/source/filter/html/htmlfldw.cxx
index 2f1f82609c8c..601d1113fcb1 100644
--- a/sw/source/filter/html/htmlfldw.cxx
+++ b/sw/source/filter/html/htmlfldw.cxx
@@ -327,11 +327,10 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pField,
//sequence of (start, end) property ranges we want to
//query
SfxItemSet aScriptItemSet( rWrt.pDoc->GetAttrPool(),
- RES_CHRATR_FONT, RES_CHRATR_FONTSIZE,
+ svl::Items<RES_CHRATR_FONT, RES_CHRATR_FONTSIZE,
RES_CHRATR_POSTURE, RES_CHRATR_POSTURE,
RES_CHRATR_WEIGHT, RES_CHRATR_WEIGHT,
- RES_CHRATR_CJK_FONT, RES_CHRATR_CTL_WEIGHT,
- 0 );
+ RES_CHRATR_CJK_FONT, RES_CHRATR_CTL_WEIGHT>{} );
rTextNd.GetAttr( aScriptItemSet, nFieldPos, nFieldPos+1 );
sal_uInt16 aWesternWhichIds[4] =
diff --git a/sw/source/filter/html/htmlflywriter.cxx b/sw/source/filter/html/htmlflywriter.cxx
index 69320ce63047..9a736f05822a 100644
--- a/sw/source/filter/html/htmlflywriter.cxx
+++ b/sw/source/filter/html/htmlflywriter.cxx
@@ -1829,8 +1829,8 @@ static Writer& OutHTML_FrameFormatAsMarquee( Writer& rWrt, const SwFrameFormat&
// get the edit engine attributes of the object as SW attributes and
// sort them as Hints
const SfxItemSet& rFormatItemSet = rFrameFormat.GetAttrSet();
- SfxItemSet aItemSet( *rFormatItemSet.GetPool(), RES_CHRATR_BEGIN,
- RES_CHRATR_END );
+ SfxItemSet aItemSet( *rFormatItemSet.GetPool(), svl::Items<RES_CHRATR_BEGIN,
+ RES_CHRATR_END>{} );
SwHTMLWriter::GetEEAttrsFromDrwObj( aItemSet, &rSdrObj, true );
bool bCfgOutStylesOld = rHTMLWrt.m_bCfgOutStyles;
rHTMLWrt.m_bCfgOutStyles = false;
diff --git a/sw/source/filter/html/htmlforw.cxx b/sw/source/filter/html/htmlforw.cxx
index 6ec96beded12..a963de30fb44 100644
--- a/sw/source/filter/html/htmlforw.cxx
+++ b/sw/source/filter/html/htmlforw.cxx
@@ -1041,8 +1041,8 @@ Writer& OutHTML_DrawFrameFormatAsControl( Writer& rWrt,
bool bEdit = TAG_TEXTAREA == eTag || TYPE_FILE == eType ||
TYPE_TEXT == eType;
- SfxItemSet aItemSet( rHTMLWrt.pDoc->GetAttrPool(), RES_CHRATR_BEGIN,
- RES_CHRATR_END );
+ SfxItemSet aItemSet( rHTMLWrt.pDoc->GetAttrPool(), svl::Items<RES_CHRATR_BEGIN,
+ RES_CHRATR_END>{} );
if( xPropSetInfo->hasPropertyByName( "BackgroundColor" ) )
{
aTmp = xPropSet->getPropertyValue( "BackgroundColor" );
diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx
index 12f035d83b76..b9a0cf6e26b5 100644
--- a/sw/source/filter/html/htmlgrin.cxx
+++ b/sw/source/filter/html/htmlgrin.cxx
@@ -487,7 +487,7 @@ IMAGE_SETEVENT:
ParseStyleOptions( aStyle, aId, aClass, aItemSet, aPropInfo );
SfxItemSet aFrameSet( m_xDoc->GetAttrPool(),
- RES_FRMATR_BEGIN, RES_FRMATR_END-1 );
+ svl::Items<RES_FRMATR_BEGIN, RES_FRMATR_END-1>{} );
if( !IsNewDoc() )
Reader::ResetFrameFormatAttrs( aFrameSet );
diff --git a/sw/source/filter/html/htmlplug.cxx b/sw/source/filter/html/htmlplug.cxx
index 136a8550fd56..98f48eccc608 100644
--- a/sw/source/filter/html/htmlplug.cxx
+++ b/sw/source/filter/html/htmlplug.cxx
@@ -430,7 +430,7 @@ void SwHTMLParser::InsertEmbed()
}
SfxItemSet aFrameSet( m_xDoc->GetAttrPool(),
- RES_FRMATR_BEGIN, RES_FRMATR_END-1 );
+ svl::Items<RES_FRMATR_BEGIN, RES_FRMATR_END-1>{} );
if( !IsNewDoc() )
Reader::ResetFrameFormatAttrs( aFrameSet );
@@ -922,7 +922,7 @@ void SwHTMLParser::InsertFloatingFrame()
// den Itemset holen
SfxItemSet aFrameSet( m_xDoc->GetAttrPool(),
- RES_FRMATR_BEGIN, RES_FRMATR_END-1 );
+ svl::Items<RES_FRMATR_BEGIN, RES_FRMATR_END-1>{} );
if( !IsNewDoc() )
Reader::ResetFrameFormatAttrs( aFrameSet );
diff --git a/sw/source/filter/html/htmlsect.cxx b/sw/source/filter/html/htmlsect.cxx
index b1151ca37313..38333bbf487c 100644
--- a/sw/source/filter/html/htmlsect.cxx
+++ b/sw/source/filter/html/htmlsect.cxx
@@ -309,7 +309,7 @@ void SwHTMLParser::NewDivision( HtmlTokenId nToken )
}
SfxItemSet aFrameItemSet( m_xDoc->GetAttrPool(),
- RES_FRMATR_BEGIN, RES_FRMATR_END-1 );
+ svl::Items<RES_FRMATR_BEGIN, RES_FRMATR_END-1>{} );
if( !IsNewDoc() )
Reader::ResetFrameFormatAttrs(aFrameItemSet );
@@ -613,7 +613,7 @@ void SwHTMLParser::NewMultiCol( sal_uInt16 columnsFromCss )
if( bInCntnr || SwCSS1Parser::MayBePositioned( aPropInfo, true ) )
{
SfxItemSet aFrameItemSet( m_xDoc->GetAttrPool(),
- RES_FRMATR_BEGIN, RES_FRMATR_END-1 );
+ svl::Items<RES_FRMATR_BEGIN, RES_FRMATR_END-1>{} );
if( !IsNewDoc() )
Reader::ResetFrameFormatAttrs(aFrameItemSet );
@@ -685,7 +685,7 @@ void SwHTMLParser::NewMultiCol( sal_uInt16 columnsFromCss )
SwSectionData aSection( CONTENT_SECTION, aName );
SfxItemSet aFrameItemSet( m_xDoc->GetAttrPool(),
- RES_FRMATR_BEGIN, RES_FRMATR_END-1 );
+ svl::Items<RES_FRMATR_BEGIN, RES_FRMATR_END-1>{} );
if( !IsNewDoc() )
Reader::ResetFrameFormatAttrs(aFrameItemSet );
diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx
index 2f1daece276a..a8550415f72f 100644
--- a/sw/source/filter/html/htmltab.cxx
+++ b/sw/source/filter/html/htmltab.cxx
@@ -1426,7 +1426,7 @@ void HTMLTable::FixFrameFormat( SwTableBox *pBox,
bool bLock = pFrameFormat->GetDoc()->GetNumberFormatter()
->IsTextFormat( nNumFormat );
SfxItemSet aItemSet( *pFrameFormat->GetAttrSet().GetPool(),
- RES_BOXATR_FORMAT, RES_BOXATR_VALUE );
+ svl::Items<RES_BOXATR_FORMAT, RES_BOXATR_VALUE>{} );
SvxAdjust eAdjust = SvxAdjust::End;
SwContentNode *pCNd = nullptr;
if( !bLock )
@@ -2819,8 +2819,8 @@ SvxBrushItem* SwHTMLParser::CreateBrushItem( const Color *pColor,
if( !rStyle.isEmpty() || !rId.isEmpty() || !rClass.isEmpty() )
{
- SfxItemSet aItemSet( m_xDoc->GetAttrPool(), RES_BACKGROUND,
- RES_BACKGROUND );
+ SfxItemSet aItemSet( m_xDoc->GetAttrPool(), svl::Items<RES_BACKGROUND,
+ RES_BACKGROUND>{} );
SvxCSS1PropertyInfo aPropInfo;
if( !rClass.isEmpty() )
@@ -3524,7 +3524,7 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions,
// the table should be put in a text frame
SfxItemSet aFrameSet( m_xDoc->GetAttrPool(),
- RES_FRMATR_BEGIN, RES_FRMATR_END-1 );
+ svl::Items<RES_FRMATR_BEGIN, RES_FRMATR_END-1>{} );
if( !pCurTable->IsNewDoc() )
Reader::ResetFrameFormatAttrs( aFrameSet );
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index 199e80dd6c09..3b4e77d6b937 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -2853,7 +2853,7 @@ void SwHTMLParser::SetAttr_( bool bChkEnd, bool bBeforeTable,
case RES_BACKGROUND:
{
const SvxBrushItem& rBrush = static_cast< SvxBrushItem& >(*pAttr->pItem);
- SfxItemSet aNewSet(m_xDoc->GetAttrPool(), XATTR_FILL_FIRST, XATTR_FILL_LAST);
+ SfxItemSet aNewSet(m_xDoc->GetAttrPool(), svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST>{});
setSvxBrushItemAsFillAttributesToTargetSet(rBrush, aNewSet);
m_xDoc->getIDocumentContentOperations().InsertItemSet(*pAttrPam, aNewSet, SetAttrMode::DONTREPLACE);
@@ -4835,7 +4835,7 @@ void SwHTMLParser::InsertSpacer()
// den Itemset holen
SfxItemSet aFrameSet( m_xDoc->GetAttrPool(),
- RES_FRMATR_BEGIN, RES_FRMATR_END-1 );
+ svl::Items<RES_FRMATR_BEGIN, RES_FRMATR_END-1>{} );
if( !IsNewDoc() )
Reader::ResetFrameFormatAttrs( aFrameSet );
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index ddf3a0c098be..37e38d5c52b4 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -398,7 +398,7 @@ void SwWW8AttrIter::OutAttr( sal_Int32 nSwPos, bool bRuby )
const SfxPoolItem *pGrabBag = nullptr;
SfxItemSet aExportSet(*rNd.GetSwAttrSet().GetPool(),
- RES_CHRATR_BEGIN, RES_TXTATR_END - 1);
+ svl::Items<RES_CHRATR_BEGIN, RES_TXTATR_END - 1>{});
//The hard formatting properties that affect the entire paragraph
if (rNd.HasSwAttrSet())
@@ -2784,7 +2784,7 @@ void MSWordExportBase::OutputTextNode( const SwTextNode& rNode )
// Exception: if there is a character style hint at the end of the
// paragraph only, then still go with 2), as RES_TXTATR_CHARFMT is always
// set as a hint.
- SfxItemSet aParagraphMarkerProperties(m_pDoc->GetAttrPool(), RES_CHRATR_BEGIN, RES_TXTATR_END);
+ SfxItemSet aParagraphMarkerProperties(m_pDoc->GetAttrPool(), svl::Items<RES_CHRATR_BEGIN, RES_TXTATR_END>{});
bool bCharFormatOnly = true;
if(const SwpHints* pTextAttrs = rNode.GetpSwpHints())
{
diff --git a/sw/source/filter/ww8/wrtw8num.cxx b/sw/source/filter/ww8/wrtw8num.cxx
index ca2e6fcf6da7..ecb31796f019 100644
--- a/sw/source/filter/ww8/wrtw8num.cxx
+++ b/sw/source/filter/ww8/wrtw8num.cxx
@@ -484,8 +484,8 @@ void MSWordExportBase::AbstractNumberingDefinitions()
const SfxItemSet* pOutSet = nullptr;
// cbGrpprlChpx
- SfxItemSet aSet( m_pDoc->GetAttrPool(), RES_CHRATR_BEGIN,
- RES_CHRATR_END );
+ SfxItemSet aSet( m_pDoc->GetAttrPool(), svl::Items<RES_CHRATR_BEGIN,
+ RES_CHRATR_END>{} );
if ( rFormat.GetCharFormat() || bWriteBullet )
{
if ( bWriteBullet )
diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx
index 7fd7459d5ec4..03cca10e99ae 100644
--- a/sw/source/filter/ww8/wrtw8sty.cxx
+++ b/sw/source/filter/ww8/wrtw8sty.cxx
@@ -1062,7 +1062,7 @@ sal_uInt16 MSWordSections::NumberOfColumns( const SwDoc &rDoc, const WW8_SepInfo
}
const SfxItemSet &rSet = pPd->GetMaster().GetAttrSet();
- SfxItemSet aSet( *rSet.GetPool(), RES_COL, RES_COL );
+ SfxItemSet aSet( *rSet.GetPool(), svl::Items<RES_COL, RES_COL>{} );
aSet.SetParent( &rSet );
//0xffffffff, what the hell is going on with that!, fixme most terribly
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index 0927c58eb81e..2048387249e8 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -2087,7 +2087,7 @@ static sal_uInt16 lcl_TCFlags(SwDoc &rDoc, const SwTableBox * pBox, sal_Int32 nR
const SwContentNode * pCNd = pSttNd->GetNodes().GoNext( &aIdx );
if( pCNd && pCNd->IsTextNode())
{
- SfxItemSet aCoreSet(rDoc.GetAttrPool(), RES_CHRATR_ROTATE, RES_CHRATR_ROTATE);
+ SfxItemSet aCoreSet(rDoc.GetAttrPool(), svl::Items<RES_CHRATR_ROTATE, RES_CHRATR_ROTATE>{});
static_cast<const SwTextNode*>(pCNd)->GetAttr( aCoreSet, 0, static_cast<const SwTextNode*>(pCNd)->GetText().getLength());
const SfxPoolItem * pRotItem;
if ( SfxItemState::SET == aCoreSet.GetItemState(RES_CHRATR_ROTATE, true, &pRotItem))
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 0caf73a064a1..da52344e2545 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -782,10 +782,9 @@ void MSWordExportBase::OutputFormat( const SwFormat& rFormat, bool bPapFormat, b
{
const SwFrameFormat &rFrameFormat = m_pParentFrame->GetFrameFormat();
- SfxItemSet aSet(m_pDoc->GetAttrPool(), RES_FRMATR_BEGIN,
+ SfxItemSet aSet(m_pDoc->GetAttrPool(), svl::Items<RES_FRMATR_BEGIN,
RES_FRMATR_END-1,
- XATTR_FILL_FIRST, XATTR_FILL_LAST,
- 0);
+ XATTR_FILL_FIRST, XATTR_FILL_LAST>{});
aSet.Set(rFrameFormat.GetAttrSet());
// Fly as character becomes a paragraph bound
@@ -3064,8 +3063,8 @@ void WW8Export::WriteFootnoteBegin( const SwFormatFootnote& rFootnote, ww::bytes
{
ww::bytes* pOld = pO;
pO = &aOutArr;
- SfxItemSet aSet( m_pDoc->GetAttrPool(), RES_CHRATR_FONT,
- RES_CHRATR_FONT );
+ SfxItemSet aSet( m_pDoc->GetAttrPool(), svl::Items<RES_CHRATR_FONT,
+ RES_CHRATR_FONT>{} );
pCFormat = pInfo->GetCharFormat( *m_pDoc );
aSet.Set( pCFormat->GetAttrSet() );
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index 7479e709577d..74c6a920b2c9 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -1124,7 +1124,7 @@ void SwWW8ImplReader::InsertTxbxText(SdrTextObj* pTextObj,
if( pRecord )
{
SfxItemSet aFlySet( m_rDoc.GetAttrPool(),
- RES_FRMATR_BEGIN, RES_FRMATR_END-1 );
+ svl::Items<RES_FRMATR_BEGIN, RES_FRMATR_END-1>{} );
tools::Rectangle aInnerDist( pRecord->nDxTextLeft,
pRecord->nDyTextTop,
@@ -2533,7 +2533,7 @@ SwFrameFormat* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp )
// when in a header or footer word appears to treat all elements as wrap through
// Umfluss-Modus ermitteln
- SfxItemSet aFlySet(m_rDoc.GetAttrPool(), RES_FRMATR_BEGIN, RES_FRMATR_END-1);
+ SfxItemSet aFlySet(m_rDoc.GetAttrPool(), svl::Items<RES_FRMATR_BEGIN, RES_FRMATR_END-1>{});
css::text::WrapTextMode eSurround = css::text::WrapTextMode_PARALLEL;
bool bContour = false;
switch (pF->nwr)
@@ -2849,7 +2849,7 @@ SwFrameFormat* SwWW8ImplReader::MungeTextIntoDrawBox(SdrObject* pTrueObject,
{
// use ww8-default border distance
SfxItemSet aItemSet(m_pDrawModel->GetItemPool(),
- SDRATTR_TEXT_LEFTDIST, SDRATTR_TEXT_LOWERDIST);
+ svl::Items<SDRATTR_TEXT_LEFTDIST, SDRATTR_TEXT_LOWERDIST>{});
aItemSet.Put( makeSdrTextLeftDistItem( pRecord->nDxTextLeft ) );
aItemSet.Put( makeSdrTextRightDistItem( pRecord->nDxTextRight ) );
aItemSet.Put( makeSdrTextUpperDistItem( pRecord->nDyTextTop ) );
@@ -2998,7 +2998,7 @@ SwFlyFrameFormat* SwWW8ImplReader::ImportReplaceableDrawables( SdrObject* &rpObj
rFlySet.Put(SwFormatFrameSize(ATT_FIX_SIZE, nWidthTw, nHeightTw));
- SfxItemSet aGrSet(m_rDoc.GetAttrPool(), RES_GRFATR_BEGIN, RES_GRFATR_END-1);
+ SfxItemSet aGrSet(m_rDoc.GetAttrPool(), svl::Items<RES_GRFATR_BEGIN, RES_GRFATR_END-1>{});
if (pRecord)
{
diff --git a/sw/source/filter/ww8/ww8graf2.cxx b/sw/source/filter/ww8/ww8graf2.cxx
index 5aa5d6fe0085..d34c32ca003e 100644
--- a/sw/source/filter/ww8/ww8graf2.cxx
+++ b/sw/source/filter/ww8/ww8graf2.cxx
@@ -558,8 +558,8 @@ SwFrameFormat* SwWW8ImplReader::ImportGraf(SdrTextObj* pTextObj,
if (pObject)
{
// for the frame
- SfxItemSet aAttrSet( m_rDoc.GetAttrPool(), RES_FRMATR_BEGIN,
- RES_FRMATR_END-1 );
+ SfxItemSet aAttrSet( m_rDoc.GetAttrPool(), svl::Items<RES_FRMATR_BEGIN,
+ RES_FRMATR_END-1>{} );
SvxMSDffImportRec const*const pRecord = (1 == aData.size())
? aData.begin()->get() : nullptr;
@@ -623,8 +623,8 @@ SwFrameFormat* SwWW8ImplReader::ImportGraf(SdrTextObj* pTextObj,
}
// for the graphic
- SfxItemSet aGrSet( m_rDoc.GetAttrPool(), RES_GRFATR_BEGIN,
- RES_GRFATR_END-1 );
+ SfxItemSet aGrSet( m_rDoc.GetAttrPool(), svl::Items<RES_GRFATR_BEGIN,
+ RES_GRFATR_END-1>{} );
if( aPD.nCL || aPD.nCR || aPD.nCT || aPD.nCB )
{
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index f80ce894dad6..22ca6889474d 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -1485,7 +1485,7 @@ const SfxPoolItem* SwWW8FltControlStack::GetFormatAttr(const SwPosition& rPos,
if (pNd->IsTextNode())
{
const sal_Int32 nPos = rPos.nContent.GetIndex();
- SfxItemSet aSet(pDoc->GetAttrPool(), nWhich, nWhich);
+ SfxItemSet aSet(pDoc->GetAttrPool(), {{nWhich, nWhich}});
if (pNd->GetTextNode()->GetAttr(aSet, nPos, nPos))
pItem = aSet.GetItem(nWhich);
}
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index 99feec026987..bd32af41ddae 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -1860,7 +1860,7 @@ WW8TabDesc::WW8TabDesc(SwWW8ImplReader* pIoClass, WW8_CP nStartCp) :
m_pTable(nullptr),
m_pParentPos(nullptr),
m_pFlyFormat(nullptr),
- m_aItemSet(m_pIo->m_rDoc.GetAttrPool(),RES_FRMATR_BEGIN,RES_FRMATR_END-1)
+ m_aItemSet(m_pIo->m_rDoc.GetAttrPool(),svl::Items<RES_FRMATR_BEGIN,RES_FRMATR_END-1>{})
{
m_pIo->m_bAktAND_fNumberAcross = false;
@@ -3537,7 +3537,7 @@ bool SwWW8ImplReader::StartTable(WW8_CP nStartCp)
{
m_pTableDesc->m_pParentPos = new SwPosition(*m_pPaM->GetPoint());
SfxItemSet aItemSet(m_rDoc.GetAttrPool(),
- RES_FRMATR_BEGIN, RES_FRMATR_END-1);
+ svl::Items<RES_FRMATR_BEGIN, RES_FRMATR_END-1>{});
// #i33818# - anchor the Writer fly frame for the nested table at-character.
// #i45301#
SwFormatAnchor aAnchor( eAnchor );
diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx
index 48809b436ced..811923bbd77f 100644
--- a/sw/source/filter/ww8/ww8par3.cxx
+++ b/sw/source/filter/ww8/ww8par3.cxx
@@ -678,7 +678,7 @@ bool WW8ListManager::ReadLVL(SwNumFormat& rNumFormat, std::unique_ptr<SfxItemSet
}
// create new Itemset for character attributes
- rpItemSet.reset(new SfxItemSet( rDoc.GetAttrPool(), RES_CHRATR_BEGIN, RES_CHRATR_END - 1));
+ rpItemSet.reset(new SfxItemSet( rDoc.GetAttrPool(), svl::Items<RES_CHRATR_BEGIN, RES_CHRATR_END - 1>{}));
// Set Reader-ItemSet-Pointer to the newly created set
rReader.SetAktItemSet(rpItemSet.get());
@@ -1852,8 +1852,8 @@ void SwWW8ImplReader::RegisterNumFormatOnTextNode(sal_uInt16 nActLFO,
if (bApplyListLevelIndentDirectlyAtPara)
{
- SfxItemSet aListIndent(m_rDoc.GetAttrPool(), RES_LR_SPACE,
- RES_LR_SPACE);
+ SfxItemSet aListIndent(m_rDoc.GetAttrPool(), svl::Items<RES_LR_SPACE,
+ RES_LR_SPACE>{});
const SvxLRSpaceItem *pItem = static_cast<const SvxLRSpaceItem*>(
GetFormatAttr(RES_LR_SPACE));
OSL_ENSURE(pItem, "impossible");
diff --git a/sw/source/filter/ww8/ww8par4.cxx b/sw/source/filter/ww8/ww8par4.cxx
index ac6d9d4c4525..4a859a7a09fb 100644
--- a/sw/source/filter/ww8/ww8par4.cxx
+++ b/sw/source/filter/ww8/ww8par4.cxx
@@ -257,8 +257,8 @@ SwFrameFormat* SwWW8ImplReader::ImportOle(const Graphic* pGrf,
SfxItemSet* pTempSet = nullptr;
if( !pFlySet )
{
- pTempSet = new SfxItemSet( m_rDoc.GetAttrPool(), RES_FRMATR_BEGIN,
- RES_FRMATR_END-1);
+ pTempSet = new SfxItemSet( m_rDoc.GetAttrPool(), svl::Items<RES_FRMATR_BEGIN,
+ RES_FRMATR_END-1>{});
pFlySet = pTempSet;
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index 67e7eb60a501..32acea9229c2 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -2307,7 +2307,7 @@ WW8PostProcessAttrsInfo::WW8PostProcessAttrsInfo(WW8_CP nCpStart, WW8_CP nCpEnd,
, mnCpStart(nCpStart)
, mnCpEnd(nCpEnd)
, mPaM(*rPaM.GetMark(), *rPaM.GetPoint())
- , mItemSet(rPaM.GetDoc()->GetAttrPool(), RES_CHRATR_BEGIN, RES_PARATR_END - 1)
+ , mItemSet(rPaM.GetDoc()->GetAttrPool(), svl::Items<RES_CHRATR_BEGIN, RES_PARATR_END - 1>{})
{
}
@@ -2396,8 +2396,8 @@ eF_ResT SwWW8ImplReader::Read_F_IncludePicture( WW8FieldDesc*, OUString& rStr )
that we have inserted a graphic link and the suiting SwAttrSet will be
inserted into the frame format.
*/
- SfxItemSet aFlySet( m_rDoc.GetAttrPool(), RES_FRMATR_BEGIN,
- RES_FRMATR_END-1 );
+ SfxItemSet aFlySet( m_rDoc.GetAttrPool(), svl::Items<RES_FRMATR_BEGIN,
+ RES_FRMATR_END-1>{} );
aFlySet.Put( SwFormatAnchor( RndStdIds::FLY_AS_CHAR ) );
aFlySet.Put( SwFormatVertOrient( 0, text::VertOrientation::TOP, text::RelOrientation::FRAME ));
m_pFlyFormatOfJustInsertedGraphic =
@@ -3400,7 +3400,7 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, OUString& rStr )
if ( nIndexCols > 1 )
{
// Set the column number for index
- SfxItemSet aSet( m_rDoc.GetAttrPool(), RES_COL, RES_COL );
+ SfxItemSet aSet( m_rDoc.GetAttrPool(), svl::Items<RES_COL, RES_COL>{} );
SwFormatCol aCol;
aCol.Init( nIndexCols, 708, USHRT_MAX );
aSet.Put( aCol );
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index e80a66cf1617..f5752a43481c 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -2045,7 +2045,7 @@ void WW8SwFlyPara::BoxUpWidth( long nInWidth )
// WW8FlySet-ctor for Apos and graphics Apos
WW8FlySet::WW8FlySet(SwWW8ImplReader& rReader, const WW8FlyPara* pFW,
const WW8SwFlyPara* pFS, bool bGraf)
- : SfxItemSet(rReader.m_rDoc.GetAttrPool(),RES_FRMATR_BEGIN,RES_FRMATR_END-1)
+ : SfxItemSet(rReader.m_rDoc.GetAttrPool(),svl::Items<RES_FRMATR_BEGIN,RES_FRMATR_END-1>{})
{
if (!rReader.m_bNewDoc)
Reader::ResetFrameFormatAttrs(*this); // remove distance/border
@@ -2101,7 +2101,7 @@ WW8FlySet::WW8FlySet(SwWW8ImplReader& rReader, const WW8FlyPara* pFW,
// WW8FlySet-ctor for character bound graphics
WW8FlySet::WW8FlySet( SwWW8ImplReader& rReader, const SwPaM* pPaM,
const WW8_PIC& rPic, long nWidth, long nHeight )
- : SfxItemSet(rReader.m_rDoc.GetAttrPool(),RES_FRMATR_BEGIN,RES_FRMATR_END-1)
+ : SfxItemSet(rReader.m_rDoc.GetAttrPool(),svl::Items<RES_FRMATR_BEGIN,RES_FRMATR_END-1>{})
{
Init(rReader, pPaM);
@@ -2154,8 +2154,8 @@ void WW8FlySet::Init(const SwWW8ImplReader& rReader, const SwPaM* pPaM)
WW8DupProperties::WW8DupProperties(SwDoc &rDoc, SwWW8FltControlStack *pStack)
: pCtrlStck(pStack),
- aChrSet(rDoc.GetAttrPool(), RES_CHRATR_BEGIN, RES_CHRATR_END - 1 ),
- aParSet(rDoc.GetAttrPool(), RES_PARATR_BEGIN, RES_PARATR_END - 1 )
+ aChrSet(rDoc.GetAttrPool(), svl::Items<RES_CHRATR_BEGIN, RES_CHRATR_END - 1>{} ),
+ aParSet(rDoc.GetAttrPool(), svl::Items<RES_PARATR_BEGIN, RES_PARATR_END - 1>{} )
{
//Close any open character properties and duplicate them inside the
//first table cell
@@ -2357,7 +2357,7 @@ bool SwWW8ImplReader::StartApo(const ApoTestResults &rApo, const WW8_TablePos *p
if (IsDropCap())
{
m_bDropCap = true;
- m_pAktItemSet = new SfxItemSet( m_rDoc.GetAttrPool(), RES_CHRATR_BEGIN, RES_PARATR_END - 1 );
+ m_pAktItemSet = new SfxItemSet( m_rDoc.GetAttrPool(), svl::Items<RES_CHRATR_BEGIN, RES_PARATR_END - 1>{} );
return false;
}
diff --git a/sw/source/filter/xml/xmlfmt.cxx b/sw/source/filter/xml/xmlfmt.cxx
index ec0ac4cb77d0..8f60091126c1 100644
--- a/sw/source/filter/xml/xmlfmt.cxx
+++ b/sw/source/filter/xml/xmlfmt.cxx
@@ -486,7 +486,7 @@ SvXMLImportContext *SwXMLItemSetStyleContext_Impl::CreateItemSetContext(
pItemSet.reset( new SfxItemSet( rItemPool, aTableSetRange ) );
break;
case XML_STYLE_FAMILY_TABLE_COLUMN:
- pItemSet.reset( new SfxItemSet( rItemPool, RES_FRM_SIZE, RES_FRM_SIZE, 0 ) );
+ pItemSet.reset( new SfxItemSet( rItemPool, svl::Items<RES_FRM_SIZE, RES_FRM_SIZE>{} ) );
break;
case XML_STYLE_FAMILY_TABLE_ROW:
pItemSet.reset( new SfxItemSet( rItemPool, aTableLineSetRange ) );
diff --git a/sw/source/filter/xml/xmltexti.cxx b/sw/source/filter/xml/xmltexti.cxx
index 410122a478c4..27ac77c0143b 100644
--- a/sw/source/filter/xml/xmltexti.cxx
+++ b/sw/source/filter/xml/xmltexti.cxx
@@ -233,8 +233,8 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOLEObject(
SAL_WARN_IF(!pTextCursor, "sw.uno", "SwXTextCursor missing");
SwDoc *pDoc = SwImport::GetDocFromXMLImport( rImport );
- SfxItemSet aItemSet( pDoc->GetAttrPool(), RES_FRMATR_BEGIN,
- RES_FRMATR_END );
+ SfxItemSet aItemSet( pDoc->GetAttrPool(), svl::Items<RES_FRMATR_BEGIN,
+ RES_FRMATR_END>{} );
Size aTwipSize( 0, 0 );
tools::Rectangle aVisArea( 0, 0, nWidth, nHeight );
lcl_putHeightAndWidth( aItemSet, nHeight, nWidth,
@@ -548,8 +548,8 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOOoLink(
OSL_ENSURE( pTextCursor, "SwXTextCursor missing" );
SwDoc *pDoc = SwImport::GetDocFromXMLImport( rImport );
- SfxItemSet aItemSet( pDoc->GetAttrPool(), RES_FRMATR_BEGIN,
- RES_FRMATR_END );
+ SfxItemSet aItemSet( pDoc->GetAttrPool(), svl::Items<RES_FRMATR_BEGIN,
+ RES_FRMATR_END>{} );
Size aTwipSize( 0, 0 );
lcl_putHeightAndWidth( aItemSet, nHeight, nWidth,
&aTwipSize.Height(), &aTwipSize.Width() );
@@ -636,8 +636,8 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertApplet(
OSL_ENSURE( pTextCursor, "SwXTextCursor missing" );
SwDoc *pDoc = pTextCursor->GetDoc();
- SfxItemSet aItemSet( pDoc->GetAttrPool(), RES_FRMATR_BEGIN,
- RES_FRMATR_END );
+ SfxItemSet aItemSet( pDoc->GetAttrPool(), svl::Items<RES_FRMATR_BEGIN,
+ RES_FRMATR_END>{} );
lcl_putHeightAndWidth( aItemSet, nHeight, nWidth);
SwApplet_Impl aAppletImpl ( aItemSet );
@@ -682,8 +682,8 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertPlugin(
OSL_ENSURE( pTextCursor, "SwXTextCursor missing" );
SwDoc *pDoc = pTextCursor->GetDoc();
- SfxItemSet aItemSet( pDoc->GetAttrPool(), RES_FRMATR_BEGIN,
- RES_FRMATR_END );
+ SfxItemSet aItemSet( pDoc->GetAttrPool(), svl::Items<RES_FRMATR_BEGIN,
+ RES_FRMATR_END>{} );
lcl_putHeightAndWidth( aItemSet, nHeight, nWidth);
// We'll need a (valid) URL, or we need a MIME type. If we don't have
@@ -765,8 +765,8 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertFloatingFra
OSL_ENSURE( pTextCursor, "SwXTextCursor missing" );
SwDoc *pDoc = pTextCursor->GetDoc();
- SfxItemSet aItemSet( pDoc->GetAttrPool(), RES_FRMATR_BEGIN,
- RES_FRMATR_END );
+ SfxItemSet aItemSet( pDoc->GetAttrPool(), svl::Items<RES_FRMATR_BEGIN,
+ RES_FRMATR_END>{} );
lcl_putHeightAndWidth( aItemSet, nHeight, nWidth);
ScrollingMode eScrollMode = ScrollingMode::Auto;
diff --git a/sw/source/ui/chrdlg/drpcps.cxx b/sw/source/ui/chrdlg/drpcps.cxx
index c2112d8fd994..e7a92eb8d293 100644
--- a/sw/source/ui/chrdlg/drpcps.cxx
+++ b/sw/source/ui/chrdlg/drpcps.cxx
@@ -252,7 +252,7 @@ bool SwDropCapsPict::GetNextScriptSegment(size_t &nIdx, sal_Int32 &start, sal_In
void SwDropCapsPict::GetFontSettings( const SwDropCapsPage& _rPage, vcl::Font& _rFont, sal_uInt16 _nWhich )
{
- SfxItemSet aSet( _rPage.rSh.GetAttrPool(), _nWhich, _nWhich);
+ SfxItemSet aSet( _rPage.rSh.GetAttrPool(), {{_nWhich, _nWhich}});
_rPage.rSh.GetCurAttr(aSet);
SvxFontItem aFormatFont(static_cast<const SvxFontItem &>( aSet.Get(_nWhich)));
diff --git a/sw/source/ui/chrdlg/pardlg.cxx b/sw/source/ui/chrdlg/pardlg.cxx
index 96616838f5bd..bd57bdd2d30c 100644
--- a/sw/source/ui/chrdlg/pardlg.cxx
+++ b/sw/source/ui/chrdlg/pardlg.cxx
@@ -266,8 +266,8 @@ void SwParaDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage)
else if (m_nAreaId == nId)
{
SfxItemSet aNew(*aSet.GetPool(),
- SID_COLOR_TABLE, SID_PATTERN_LIST,
- SID_OFFER_IMPORT, SID_OFFER_IMPORT, 0, 0);
+ svl::Items<SID_COLOR_TABLE, SID_PATTERN_LIST,
+ SID_OFFER_IMPORT, SID_OFFER_IMPORT>{});
aNew.Put(*GetInputSetImpl());
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index 83e249172f0e..4718cb12736f 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -812,9 +812,8 @@ void SwStdFontTabPage::Reset( const SfxItemSet* rSet)
else
{
auto pPrinterSet = o3tl::make_unique<SfxItemSet>( *rSet->GetPool(),
- SID_PRINTER_NOTFOUND_WARN, SID_PRINTER_NOTFOUND_WARN,
- SID_PRINTER_CHANGESTODOC, SID_PRINTER_CHANGESTODOC,
- 0 );
+ svl::Items<SID_PRINTER_NOTFOUND_WARN, SID_PRINTER_NOTFOUND_WARN,
+ SID_PRINTER_CHANGESTODOC, SID_PRINTER_CHANGESTODOC>{} );
m_pPrt = VclPtr<SfxPrinter>::Create(std::move(pPrinterSet));
}
delete m_pFontList;
diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx
index f76d612e3453..f1bb51abe791 100644
--- a/sw/source/ui/dbui/dbinsdlg.cxx
+++ b/sw/source/ui/dbui/dbinsdlg.cxx
@@ -1052,8 +1052,8 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
if( pSelection && pTableSet )
SetTabSet();
- SfxItemSet aTableSet( rSh.GetAttrPool(), RES_BOXATR_FORMAT,
- RES_BOXATR_VALUE );
+ SfxItemSet aTableSet( rSh.GetAttrPool(), svl::Items<RES_BOXATR_FORMAT,
+ RES_BOXATR_VALUE>{} );
bool bIsAutoUpdateCells = rSh.IsAutoUpdateCells();
rSh.SetAutoUpdateCells( false );
diff --git a/sw/source/ui/dbui/mmlayoutpage.cxx b/sw/source/ui/dbui/mmlayoutpage.cxx
index 6392e8418a72..0cd4bcaf7c02 100644
--- a/sw/source/ui/dbui/mmlayoutpage.cxx
+++ b/sw/source/ui/dbui/mmlayoutpage.cxx
@@ -283,13 +283,12 @@ SwFrameFormat* SwMailMergeLayoutPage::InsertAddressFrame(
bool bExample)
{
// insert the address block and the greeting line
- SfxItemSet aSet(rShell.GetAttrPool(), RES_ANCHOR, RES_ANCHOR,
+ SfxItemSet aSet(rShell.GetAttrPool(), svl::Items<RES_ANCHOR, RES_ANCHOR,
RES_VERT_ORIENT, RES_VERT_ORIENT,
RES_HORI_ORIENT, RES_HORI_ORIENT,
RES_BOX, RES_BOX,
RES_FRM_SIZE, RES_FRM_SIZE,
- RES_SURROUND, RES_SURROUND,
- 0 );
+ RES_SURROUND, RES_SURROUND>{} );
aSet.Put(SwFormatAnchor(RndStdIds::FLY_AT_PAGE, 1));
if(bAlignLeft)
aSet.Put(SwFormatHoriOrient( 0, text::HoriOrientation::NONE, text::RelOrientation::PAGE_PRINT_AREA ));
@@ -693,10 +692,9 @@ IMPL_LINK_NOARG(SwMailMergeLayoutPage, ChangeAddressHdl_Impl, SpinField&, void)
long nLeft = static_cast< long >(m_pLeftMF->Denormalize(m_pLeftMF->GetValue(FUNIT_TWIP)));
long nTop = static_cast< long >(m_pTopMF->Denormalize(m_pTopMF->GetValue(FUNIT_TWIP)));
- SfxItemSet aSet(m_pExampleWrtShell->GetAttrPool(), RES_ANCHOR, RES_ANCHOR,
+ SfxItemSet aSet(m_pExampleWrtShell->GetAttrPool(), svl::Items<RES_ANCHOR, RES_ANCHOR,
RES_VERT_ORIENT, RES_VERT_ORIENT,
- RES_HORI_ORIENT, RES_HORI_ORIENT,
- 0 );
+ RES_HORI_ORIENT, RES_HORI_ORIENT>{} );
if(m_pAlignToBodyCB->IsChecked())
aSet.Put(SwFormatHoriOrient( 0, text::HoriOrientation::NONE, text::RelOrientation::PAGE_PRINT_AREA ));
else
diff --git a/sw/source/ui/dialog/ascfldlg.cxx b/sw/source/ui/dialog/ascfldlg.cxx
index 665bd8d7a331..5eb68e8da9f3 100644
--- a/sw/source/ui/dialog/ascfldlg.cxx
+++ b/sw/source/ui/dialog/ascfldlg.cxx
@@ -183,9 +183,8 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( vcl::Window* pParent, SwDocShell& rDocSh,
if( !pPrt )
{
auto pSet = o3tl::make_unique<SfxItemSet>( rDocSh.GetPool(),
- SID_PRINTER_NOTFOUND_WARN, SID_PRINTER_NOTFOUND_WARN,
- SID_PRINTER_CHANGESTODOC, SID_PRINTER_CHANGESTODOC,
- 0 );
+ svl::Items<SID_PRINTER_NOTFOUND_WARN, SID_PRINTER_NOTFOUND_WARN,
+ SID_PRINTER_CHANGESTODOC, SID_PRINTER_CHANGESTODOC>{} );
pPrt = VclPtr<SfxPrinter>::Create( std::move(pSet) );
bDelPrinter = true;
}
diff --git a/sw/source/ui/dialog/macassgn.cxx b/sw/source/ui/dialog/macassgn.cxx
index e3474777369a..0a38fa43b0b9 100644
--- a/sw/source/ui/dialog/macassgn.cxx
+++ b/sw/source/ui/dialog/macassgn.cxx
@@ -108,7 +108,7 @@ bool SwMacroAssignDlg::INetFormatDlg( vcl::Window* pParent, SwWrtShell& rSh,
SvxMacroItem*& rpINetItem )
{
bool bRet = false;
- SfxItemSet aSet( rSh.GetAttrPool(), RES_FRMMACRO, RES_FRMMACRO, SID_EVENTCONFIG, SID_EVENTCONFIG, 0 );
+ SfxItemSet aSet( rSh.GetAttrPool(), svl::Items<RES_FRMMACRO, RES_FRMMACRO, SID_EVENTCONFIG, SID_EVENTCONFIG>{} );
SvxMacroItem aItem( RES_FRMMACRO );
if( !rpINetItem )
rpINetItem = new SvxMacroItem( RES_FRMMACRO );
diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx
index ec7da6517db6..bd659c941a1b 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -1049,14 +1049,13 @@ IMPL_LINK_NOARG(SwEditRegionDlg, OptionsHdl, Button*, void)
{
SectRepr* pSectRepr = static_cast<SectRepr*>(pEntry->GetUserData());
SfxItemSet aSet(rSh.GetView().GetPool(),
- RES_COL, RES_COL,
+ svl::Items<RES_COL, RES_COL,
RES_COLUMNBALANCE, RES_FRAMEDIR,
RES_BACKGROUND, RES_BACKGROUND,
RES_FRM_SIZE, RES_FRM_SIZE,
SID_ATTR_PAGE_SIZE, SID_ATTR_PAGE_SIZE,
RES_LR_SPACE, RES_LR_SPACE,
- RES_FTN_AT_TXTEND, RES_END_AT_TXTEND,
- 0);
+ RES_FTN_AT_TXTEND, RES_END_AT_TXTEND>{});
aSet.Put( pSectRepr->GetCol() );
aSet.Put( pSectRepr->GetBackground() );
diff --git a/sw/source/ui/fldui/fldedt.cxx b/sw/source/ui/fldui/fldedt.cxx
index c310348ccfdf..a08c6f7369e6 100644
--- a/sw/source/ui/fldui/fldedt.cxx
+++ b/sw/source/ui/fldui/fldedt.cxx
@@ -178,7 +178,7 @@ VclPtr<SfxTabPage> SwFieldEditDlg::CreatePage(sal_uInt16 nGroup)
case GRP_REG:
{
SfxObjectShell* pDocSh = SfxObjectShell::Current();
- SfxItemSet* pSet = new SfxItemSet( pDocSh->GetPool(), SID_DOCINFO, SID_DOCINFO );
+ SfxItemSet* pSet = new SfxItemSet( pDocSh->GetPool(), svl::Items<SID_DOCINFO, SID_DOCINFO>{} );
using namespace ::com::sun::star;
uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
pDocSh->GetModel(), uno::UNO_QUERY_THROW);
@@ -299,8 +299,7 @@ IMPL_LINK_NOARG(SwFieldEditDlg, AddressHdl, Button*, void)
SwField *pCurField = rMgr.GetCurField();
SfxItemSet aSet( pSh->GetAttrPool(),
- SID_FIELD_GRABFOCUS, SID_FIELD_GRABFOCUS,
- 0L );
+ svl::Items<SID_FIELD_GRABFOCUS, SID_FIELD_GRABFOCUS>{} );
EditPosition nEditPos = EditPosition::UNKNOWN;
diff --git a/sw/source/ui/fldui/fldtdlg.cxx b/sw/source/ui/fldui/fldtdlg.cxx
index 12a6cb4dbc92..f0cf404b3bf1 100644
--- a/sw/source/ui/fldui/fldtdlg.cxx
+++ b/sw/source/ui/fldui/fldtdlg.cxx
@@ -162,7 +162,7 @@ SfxItemSet* SwFieldDlg::CreateInputItemSet( sal_uInt16 nID )
SwDocShell *const pDocSh(static_cast<SwDocShell*>(SfxObjectShell::Current()));
if (nID == m_nDokInf && pDocSh) // might not have a shell if the dialog is restored on startup
{
- SfxItemSet* pISet = new SfxItemSet( pDocSh->GetPool(), SID_DOCINFO, SID_DOCINFO );
+ SfxItemSet* pISet = new SfxItemSet( pDocSh->GetPool(), svl::Items<SID_DOCINFO, SID_DOCINFO>{} );
using namespace ::com::sun::star;
uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
pDocSh->GetModel(), uno::UNO_QUERY_THROW);
diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx
index 1c6e913cca02..7a72564183be 100644
--- a/sw/source/ui/frmdlg/column.cxx
+++ b/sw/source/ui/frmdlg/column.cxx
@@ -145,10 +145,9 @@ SwColumnDlg::SwColumnDlg(vcl::Window* pParent, SwWrtShell& rSh)
if( pPageDesc )
{
pPageSet = new SfxItemSet( rWrtShell.GetAttrPool(),
- RES_COL, RES_COL,
+ svl::Items<RES_COL, RES_COL,
RES_FRM_SIZE, RES_FRM_SIZE,
- RES_LR_SPACE, RES_LR_SPACE,
- 0 );
+ RES_LR_SPACE, RES_LR_SPACE>{} );
const SwFrameFormat &rFormat = pPageDesc->GetMaster();
nPageWidth = rFormat.GetFrameSize().GetSize().Width();
@@ -318,7 +317,7 @@ IMPL_LINK_NOARG(SwColumnDlg, OkHdl, Button*, void)
}
if(pFrameSet && SfxItemState::SET == pFrameSet->GetItemState(RES_COL) && bFrameChanged)
{
- SfxItemSet aTmp(*pFrameSet->GetPool(), RES_COL, RES_COL);
+ SfxItemSet aTmp(*pFrameSet->GetPool(), svl::Items<RES_COL, RES_COL>{});
aTmp.Put(*pFrameSet);
rWrtShell.StartAction();
rWrtShell.Push();
diff --git a/sw/source/ui/frmdlg/frmdlg.cxx b/sw/source/ui/frmdlg/frmdlg.cxx
index 96282d5fc67b..5294a92f3e5a 100644
--- a/sw/source/ui/frmdlg/frmdlg.cxx
+++ b/sw/source/ui/frmdlg/frmdlg.cxx
@@ -194,8 +194,8 @@ void SwFrameDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
else if (nId == m_nAreaId)
{
SfxItemSet aNew(*GetInputSetImpl()->GetPool(),
- SID_COLOR_TABLE, SID_PATTERN_LIST,
- SID_OFFER_IMPORT, SID_OFFER_IMPORT, 0, 0);
+ svl::Items<SID_COLOR_TABLE, SID_PATTERN_LIST,
+ SID_OFFER_IMPORT, SID_OFFER_IMPORT>{});
aNew.Put(m_rSet);
diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx
index 1d07e066f894..a04f5c8fdc8c 100644
--- a/sw/source/ui/index/swuiidxmrk.cxx
+++ b/sw/source/ui/index/swuiidxmrk.cxx
@@ -345,7 +345,7 @@ void SwIndexMarkPane::UpdateLanguageDependenciesForPhoneticReading()
case SvtScriptType::COMPLEX:nWhich = RES_CHRATR_CTL_LANGUAGE; break;
default:nWhich = RES_CHRATR_LANGUAGE; break;
}
- SfxItemSet aLangSet(pSh->GetAttrPool(), nWhich, nWhich);
+ SfxItemSet aLangSet(pSh->GetAttrPool(), {{nWhich, nWhich}});
pSh->GetCurAttr(aLangSet);
nLangForPhoneticReading = static_cast<const SvxLanguageItem&>(aLangSet.Get(nWhich)).GetLanguage();
}
diff --git a/sw/source/ui/misc/docfnote.cxx b/sw/source/ui/misc/docfnote.cxx
index 755aeb4759f2..27fb6a2d1287 100644
--- a/sw/source/ui/misc/docfnote.cxx
+++ b/sw/source/ui/misc/docfnote.cxx
@@ -58,7 +58,7 @@ void SwFootNoteOptionDlg::PageCreated( sal_uInt16 /*nId*/, SfxTabPage &rPage )
IMPL_LINK( SwFootNoteOptionDlg, OkHdl, Button *, pBtn, void )
{
- SfxItemSet aDummySet(rSh.GetAttrPool(), 1, 1 );
+ SfxItemSet aDummySet(rSh.GetAttrPool(), svl::Items<1, 1>{} );
SfxTabPage *pPage = GetTabPage( m_nFootNoteId );
if ( pPage )
pPage->FillItemSet( &aDummySet );
diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx
index 7b5b3e80efcc..f1379fe97251 100644
--- a/sw/source/ui/misc/glossary.cxx
+++ b/sw/source/ui/misc/glossary.cxx
@@ -525,7 +525,7 @@ IMPL_LINK( SwGlossaryDlg, MenuHdl, Menu *, pMn, bool )
}
else if (sItemIdent == "macro")
{
- SfxItemSet aSet( pSh->GetAttrPool(), RES_FRMMACRO, RES_FRMMACRO, SID_EVENTCONFIG, SID_EVENTCONFIG, 0 );
+ SfxItemSet aSet( pSh->GetAttrPool(), svl::Items<RES_FRMMACRO, RES_FRMMACRO, SID_EVENTCONFIG, SID_EVENTCONFIG>{} );
SvxMacro aStart(aEmptyOUStr, aEmptyOUStr, STARBASIC);
SvxMacro aEnd(aEmptyOUStr, aEmptyOUStr, STARBASIC);
diff --git a/sw/source/ui/misc/insfnote.cxx b/sw/source/ui/misc/insfnote.cxx
index 13eef0bcc73e..e6c785e5051d 100644
--- a/sw/source/ui/misc/insfnote.cxx
+++ b/sw/source/ui/misc/insfnote.cxx
@@ -59,7 +59,7 @@ void SwInsFootNoteDlg::Apply()
if( rSh.SetCurFootnote( aNote ) && bExtCharAvailable )
{
rSh.Right(CRSR_SKIP_CHARS, true, 1, false );
- SfxItemSet aSet( rSh.GetAttrPool(), RES_CHRATR_FONT, RES_CHRATR_FONT );
+ SfxItemSet aSet( rSh.GetAttrPool(), svl::Items<RES_CHRATR_FONT, RES_CHRATR_FONT>{} );
rSh.GetCurAttr( aSet );
const SvxFontItem &rFont = static_cast<const SvxFontItem &>( aSet.Get( RES_CHRATR_FONT ));
SvxFontItem aFont( rFont.GetFamily(), m_aFontName,
@@ -102,7 +102,7 @@ IMPL_LINK_NOARG(SwInsFootNoteDlg, NumberExtCharHdl, Button*, void)
{
m_pNumberCharBtn->Check();
- SfxItemSet aSet( rSh.GetAttrPool(), RES_CHRATR_FONT, RES_CHRATR_FONT );
+ SfxItemSet aSet( rSh.GetAttrPool(), svl::Items<RES_CHRATR_FONT, RES_CHRATR_FONT>{} );
rSh.GetCurAttr( aSet );
const SvxFontItem &rFont = static_cast<const SvxFontItem &>( aSet.Get( RES_CHRATR_FONT ) );
@@ -231,7 +231,7 @@ void SwInsFootNoteDlg::Init()
sNumStr = aFootnoteNote.GetNumStr();
rSh.Right(CRSR_SKIP_CHARS, true, 1, false );
- SfxItemSet aSet( rSh.GetAttrPool(), RES_CHRATR_FONT, RES_CHRATR_FONT );
+ SfxItemSet aSet( rSh.GetAttrPool(), svl::Items<RES_CHRATR_FONT, RES_CHRATR_FONT>{} );
rSh.GetCurAttr( aSet );
const SvxFontItem &rFont = static_cast<const SvxFontItem &>( aSet.Get( RES_CHRATR_FONT ) );
diff --git a/sw/source/ui/misc/titlepage.cxx b/sw/source/ui/misc/titlepage.cxx
index 14751a4ecafa..5fcefe0451c6 100644
--- a/sw/source/ui/misc/titlepage.cxx
+++ b/sw/source/ui/misc/titlepage.cxx
@@ -32,7 +32,7 @@ namespace
bool lcl_GetPageDesc(SwWrtShell *pSh, sal_uInt16 &rPageNo, const SwFormatPageDesc **ppPageFormatDesc)
{
bool bRet = false;
- SfxItemSet aSet( pSh->GetAttrPool(), RES_PAGEDESC, RES_PAGEDESC );
+ SfxItemSet aSet( pSh->GetAttrPool(), svl::Items<RES_PAGEDESC, RES_PAGEDESC>{} );
if (pSh->GetCurAttr( aSet ))
{
const SfxPoolItem* pItem(nullptr);
diff --git a/sw/source/uibase/app/appenv.cxx b/sw/source/uibase/app/appenv.cxx
index 9d24de198036..de15a21570a6 100644
--- a/sw/source/uibase/app/appenv.cxx
+++ b/sw/source/uibase/app/appenv.cxx
@@ -183,7 +183,7 @@ void SwModule::InsertEnv( SfxRequest& rReq )
// Check if there's already an envelope.
bool bEnvChange = false;
- SfxItemSet aSet(GetPool(), FN_ENVELOP, FN_ENVELOP, 0);
+ SfxItemSet aSet(GetPool(), svl::Items<FN_ENVELOP, FN_ENVELOP>{});
aSet.Put(aEnvCfg.GetItem());
SfxPrinter* pTempPrinter = pSh->getIDocumentDeviceAccess().getPrinter( true );
@@ -302,7 +302,7 @@ void SwModule::InsertEnv( SfxRequest& rReq )
{
pSh->SplitNode();
pSh->Right( CRSR_SKIP_CHARS, false, 1, false );
- SfxItemSet aBreakSet( pSh->GetAttrPool(), RES_PAGEDESC, RES_PAGEDESC, 0 );
+ SfxItemSet aBreakSet( pSh->GetAttrPool(), svl::Items<RES_PAGEDESC, RES_PAGEDESC>{} );
aBreakSet.Put( SwFormatPageDesc( pFollow ) );
pSh->SetTableAttr( aBreakSet );
}
diff --git a/sw/source/uibase/app/applab.cxx b/sw/source/uibase/app/applab.cxx
index a55e3962592d..56c5cf609e4a 100644
--- a/sw/source/uibase/app/applab.cxx
+++ b/sw/source/uibase/app/applab.cxx
@@ -84,8 +84,8 @@ static const SwFrameFormat *lcl_InsertBCText( SwWrtShell& rSh, const SwLabItem&
SwFrameFormat &rFormat,
sal_uInt16 nCol, sal_uInt16 nRow )
{
- SfxItemSet aSet(rSh.GetAttrPool(), RES_ANCHOR, RES_ANCHOR,
- RES_VERT_ORIENT, RES_VERT_ORIENT, RES_HORI_ORIENT, RES_HORI_ORIENT, 0 );
+ SfxItemSet aSet(rSh.GetAttrPool(), svl::Items<RES_ANCHOR, RES_ANCHOR,
+ RES_VERT_ORIENT, RES_VERT_ORIENT, RES_HORI_ORIENT, RES_HORI_ORIENT>{} );
sal_uInt16 nPhyPageNum, nVirtPageNum;
rSh.GetPageNum( nPhyPageNum, nVirtPageNum );
@@ -121,8 +121,8 @@ static const SwFrameFormat *lcl_InsertLabText( SwWrtShell& rSh, const SwLabItem&
SwFrameFormat &rFormat, SwFieldMgr& rFieldMgr,
sal_uInt16 nCol, sal_uInt16 nRow, bool bLast )
{
- SfxItemSet aSet(rSh.GetAttrPool(), RES_ANCHOR, RES_ANCHOR,
- RES_VERT_ORIENT, RES_VERT_ORIENT, RES_HORI_ORIENT, RES_HORI_ORIENT, 0 );
+ SfxItemSet aSet(rSh.GetAttrPool(), svl::Items<RES_ANCHOR, RES_ANCHOR,
+ RES_VERT_ORIENT, RES_VERT_ORIENT, RES_HORI_ORIENT, RES_HORI_ORIENT>{} );
sal_uInt16 nPhyPageNum, nVirtPageNum;
rSh.GetPageNum( nPhyPageNum, nVirtPageNum );
@@ -165,7 +165,7 @@ void SwModule::InsertLab(SfxRequest& rReq, bool bLabel)
SwLabCfgItem aLabCfg(bLabel);
// Move up Dialog
- SfxItemSet aSet( GetPool(), FN_LABEL, FN_LABEL, 0 );
+ SfxItemSet aSet( GetPool(), svl::Items<FN_LABEL, FN_LABEL>{} );
aSet.Put( aLabCfg.GetItem() );
SwAbstractDialogFactory* pDialogFactory = SwAbstractDialogFactory::Create();
diff --git a/sw/source/uibase/app/appopt.cxx b/sw/source/uibase/app/appopt.cxx
index 9db1a4b61002..3db438e1e7c2 100644
--- a/sw/source/uibase/app/appopt.cxx
+++ b/sw/source/uibase/app/appopt.cxx
@@ -97,7 +97,7 @@ std::unique_ptr<SfxItemSet> SwModule::CreateItemSet( sal_uInt16 nId )
}
// Options/Edit
- auto pRet = o3tl::make_unique<SfxItemSet>(GetPool(), FN_PARAM_DOCDISP, FN_PARAM_ELEM,
+ auto pRet = o3tl::make_unique<SfxItemSet>(GetPool(), svl::Items<FN_PARAM_DOCDISP, FN_PARAM_ELEM,
SID_PRINTPREVIEW, SID_PRINTPREVIEW,
SID_ATTR_GRID_OPTIONS, SID_ATTR_GRID_OPTIONS,
FN_PARAM_PRINTER, FN_PARAM_STDFONTS,
@@ -113,11 +113,7 @@ std::unique_ptr<SfxItemSet> SwModule::CreateItemSet( sal_uInt16 nId )
FN_HSCROLL_METRIC, FN_VSCROLL_METRIC,
SID_ATTR_LANGUAGE, SID_ATTR_LANGUAGE,
SID_ATTR_CHAR_CJK_LANGUAGE, SID_ATTR_CHAR_CJK_LANGUAGE,
- SID_ATTR_CHAR_CTL_LANGUAGE, SID_ATTR_CHAR_CTL_LANGUAGE,
-#if OSL_DEBUG_LEVEL > 1
- FN_PARAM_SWTEST, FN_PARAM_SWTEST,
-#endif
- 0);
+ SID_ATTR_CHAR_CTL_LANGUAGE, SID_ATTR_CHAR_CTL_LANGUAGE>{});
pRet->Put( SwDocDisplayItem( aViewOpt ) );
pRet->Put( SwElemItem( aViewOpt ) );
diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx
index f5c6316ddbac..ad675dfd9b0c 100644
--- a/sw/source/uibase/app/docsh2.cxx
+++ b/sw/source/uibase/app/docsh2.cxx
@@ -363,7 +363,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
pAFlags->pSmartTagMgr = &SwSmartTagMgr::Get();
- SfxItemSet aSet( pApp->GetPool(), SID_AUTO_CORRECT_DLG, SID_AUTO_CORRECT_DLG, SID_OPEN_SMARTTAGOPTIONS, SID_OPEN_SMARTTAGOPTIONS, 0 );
+ SfxItemSet aSet( pApp->GetPool(), svl::Items<SID_AUTO_CORRECT_DLG, SID_AUTO_CORRECT_DLG, SID_OPEN_SMARTTAGOPTIONS, SID_OPEN_SMARTTAGOPTIONS>{} );
aSet.Put( aSwOptions );
const SfxPoolItem* pOpenSmartTagOptionsItem = nullptr;
diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx
index 55dab8a712ad..30b7a1da172e 100644
--- a/sw/source/uibase/app/docstyle.cxx
+++ b/sw/source/uibase/app/docstyle.cxx
@@ -462,7 +462,7 @@ SwDocStyleSheet::SwDocStyleSheet( SwDoc& rDocument,
pBoxFormat(nullptr),
rDoc(rDocument),
aCoreSet(GetPool().GetPool(), // sorted by indices, one double removed
- RES_CHRATR_BEGIN, RES_CHRATR_END - 1, // [1
+ svl::Items<RES_CHRATR_BEGIN, RES_CHRATR_END - 1, // [1
RES_PARATR_BEGIN, RES_PARATR_END - 1, // [60
RES_PARATR_LIST_BEGIN, RES_PARATR_LIST_END - 1, // [77
RES_FRMATR_BEGIN, RES_FRMATR_END - 1, // [82
@@ -488,8 +488,7 @@ SwDocStyleSheet::SwDocStyleSheet( SwDoc& rDocument,
SID_ATTR_NUMBERING_RULE, SID_ATTR_NUMBERING_RULE, // [10855
SID_ATTR_AUTO_STYLE_UPDATE, SID_ATTR_AUTO_STYLE_UPDATE, // [12065
FN_PARAM_FTN_INFO, FN_PARAM_FTN_INFO, // [21123
- FN_COND_COLL, FN_COND_COLL, // [22401
- 0),
+ FN_COND_COLL, FN_COND_COLL>{}), // [22401
bPhysical(false)
{
nHelpId = UCHAR_MAX;
diff --git a/sw/source/uibase/dialog/regionsw.cxx b/sw/source/uibase/dialog/regionsw.cxx
index ef18d8c2a52f..2402b661675d 100644
--- a/sw/source/uibase/dialog/regionsw.cxx
+++ b/sw/source/uibase/dialog/regionsw.cxx
@@ -62,14 +62,13 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq)
const SfxItemSet *pSet = rReq.GetArgs();
SfxItemSet aSet(GetPool(),
- RES_COL, RES_COL,
+ svl::Items<RES_COL, RES_COL,
RES_LR_SPACE, RES_LR_SPACE,
RES_COLUMNBALANCE, RES_FRAMEDIR,
RES_BACKGROUND, RES_BACKGROUND,
RES_FRM_SIZE, RES_FRM_SIZE,
RES_FTN_AT_TXTEND, RES_END_AT_TXTEND,
- SID_ATTR_PAGE_SIZE, SID_ATTR_PAGE_SIZE,
- 0);
+ SID_ATTR_PAGE_SIZE, SID_ATTR_PAGE_SIZE>{});
if (!pSet || pSet->Count()==0)
{
@@ -181,11 +180,10 @@ IMPL_LINK( SwWrtShell, InsertRegionDialog, void*, p, void )
if (xSectionData.get())
{
SfxItemSet aSet(GetView().GetPool(),
- RES_COL, RES_COL,
+ svl::Items<RES_COL, RES_COL,
RES_BACKGROUND, RES_BACKGROUND,
RES_FRM_SIZE, RES_FRM_SIZE,
- SID_ATTR_PAGE_SIZE, SID_ATTR_PAGE_SIZE,
- 0);
+ SID_ATTR_PAGE_SIZE, SID_ATTR_PAGE_SIZE>{});
SwRect aRect;
CalcBoundRect(aRect, RndStdIds::FLY_AS_CHAR);
long nWidth = aRect.Width();
diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx
index 0dd00ae68382..501d6fcd456d 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -470,7 +470,7 @@ bool SwTransferable::GetData( const DataFlavor& rFlavor, const OUString& rDestDo
}
if( m_pWrtShell->IsFrameSelected() )
{
- SfxItemSet aSet( m_pWrtShell->GetAttrPool(), RES_URL, RES_URL );
+ SfxItemSet aSet( m_pWrtShell->GetAttrPool(), svl::Items<RES_URL, RES_URL>{} );
m_pWrtShell->GetFlyFrameAttr( aSet );
const SwFormatURL& rURL = static_cast<const SwFormatURL&>(aSet.Get( RES_URL ));
if( rURL.GetMap() )
@@ -991,7 +991,7 @@ int SwTransferable::PrepareForCopy( bool bIsCut )
if( m_pWrtShell->IsFrameSelected() )
{
- SfxItemSet aSet( m_pWrtShell->GetAttrPool(), RES_URL, RES_URL );
+ SfxItemSet aSet( m_pWrtShell->GetAttrPool(), svl::Items<RES_URL, RES_URL>{} );
m_pWrtShell->GetFlyFrameAttr( aSet );
const SwFormatURL& rURL = static_cast<const SwFormatURL&>(aSet.Get( RES_URL ));
if( rURL.GetMap() )
@@ -1997,7 +1997,7 @@ bool SwTransferable::PasteTargetURL( TransferableDataHelper& rData,
if( bRet )
{
- SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL );
+ SfxItemSet aSet( rSh.GetAttrPool(), svl::Items<RES_URL, RES_URL>{} );
rSh.GetFlyFrameAttr( aSet );
SwFormatURL aURL( static_cast<const SwFormatURL&>(aSet.Get( RES_URL )) );
@@ -2387,7 +2387,7 @@ bool SwTransferable::PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh,
{
if( rSh.IsFrameSelected() )
{
- SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL );
+ SfxItemSet aSet( rSh.GetAttrPool(), svl::Items<RES_URL, RES_URL>{} );
rSh.GetFlyFrameAttr( aSet );
SwFormatURL aURL( static_cast<const SwFormatURL&>(aSet.Get( RES_URL )) );
aURL.SetURL( aBkmk.GetURL(), false );
@@ -2443,7 +2443,7 @@ bool SwTransferable::PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh,
aMap.Read( *pStream, IMAP_FORMAT_DETECT ) == IMAP_ERR_OK &&
aMap.GetIMapObjectCount() )
{
- SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL );
+ SfxItemSet aSet( rSh.GetAttrPool(), svl::Items<RES_URL, RES_URL>{} );
rSh.GetFlyFrameAttr( aSet );
SwFormatURL aURL( static_cast<const SwFormatURL&>(aSet.Get( RES_URL )) );
aURL.SetMap( &aMap );
@@ -2462,7 +2462,7 @@ bool SwTransferable::PasteImageMap( TransferableDataHelper& rData,
bool bRet = false;
if( rData.HasFormat( SotClipboardFormatId::SVIM ))
{
- SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL );
+ SfxItemSet aSet( rSh.GetAttrPool(), svl::Items<RES_URL, RES_URL>{} );
rSh.GetFlyFrameAttr( aSet );
SwFormatURL aURL( static_cast<const SwFormatURL&>(aSet.Get( RES_URL )) );
const ImageMap* pOld = aURL.GetMap();
@@ -2503,7 +2503,7 @@ bool SwTransferable::PasteAsHyperlink( TransferableDataHelper& rData,
case OBJCNT_GRF:
case OBJCNT_OLE:
{
- SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL );
+ SfxItemSet aSet( rSh.GetAttrPool(), svl::Items<RES_URL, RES_URL>{} );
rSh.GetFlyFrameAttr( aSet );
SwFormatURL aURL2( static_cast<const SwFormatURL&>(aSet.Get( RES_URL )) );
aURL2.SetURL( sFile, false );
@@ -2597,7 +2597,7 @@ bool SwTransferable::PasteFileName( TransferableDataHelper& rData,
case OBJCNT_GRF:
case OBJCNT_OLE:
{
- SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL );
+ SfxItemSet aSet( rSh.GetAttrPool(), svl::Items<RES_URL, RES_URL>{} );
rSh.GetFlyFrameAttr( aSet );
SwFormatURL aURL2( static_cast<const SwFormatURL&>(aSet.Get( RES_URL )) );
aURL2.SetURL( sFile, false );
@@ -3128,7 +3128,7 @@ void SwTransferable::SetDataForDragAndDrop( const Point& rSttPos )
if( m_pWrtShell->IsFrameSelected() )
{
- SfxItemSet aSet( m_pWrtShell->GetAttrPool(), RES_URL, RES_URL );
+ SfxItemSet aSet( m_pWrtShell->GetAttrPool(), svl::Items<RES_URL, RES_URL>{} );
m_pWrtShell->GetFlyFrameAttr( aSet );
const SwFormatURL& rURL = static_cast<const SwFormatURL&>(aSet.Get( RES_URL ));
if( rURL.GetMap() )
@@ -3338,7 +3338,7 @@ bool SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt,
// not yet consider Draw objects
if( SelectionType::Graphic & nSelection )
{
- SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL );
+ SfxItemSet aSet( rSh.GetAttrPool(), svl::Items<RES_URL, RES_URL>{} );
rSh.GetFlyFrameAttr( aSet );
SwFormatURL aURL( static_cast<const SwFormatURL&>(aSet.Get( RES_URL )) );
aURL.SetURL( aTmp.GetURL(), false );
diff --git a/sw/source/uibase/docvw/HeaderFooterWin.cxx b/sw/source/uibase/docvw/HeaderFooterWin.cxx
index f0097c6f2931..0feb53f1e972 100644
--- a/sw/source/uibase/docvw/HeaderFooterWin.cxx
+++ b/sw/source/uibase/docvw/HeaderFooterWin.cxx
@@ -419,10 +419,10 @@ void SwHeaderFooterWin::ExecuteCommand(const OString& rIdent)
SfxItemPool* pPool = pHFFormat->GetAttrSet().GetPool();
SfxItemSet aSet( *pPool,
- RES_BACKGROUND, RES_BACKGROUND,
+ svl::Items<RES_BACKGROUND, RES_BACKGROUND,
RES_BOX, RES_BOX,
SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER,
- RES_SHADOW, RES_SHADOW, 0 );
+ RES_SHADOW, RES_SHADOW>{} );
aSet.Put( pHFFormat->GetAttrSet() );
diff --git a/sw/source/uibase/docvw/PageBreakWin.cxx b/sw/source/uibase/docvw/PageBreakWin.cxx
index 6611f113f169..0aabe5fe728f 100644
--- a/sw/source/uibase/docvw/PageBreakWin.cxx
+++ b/sw/source/uibase/docvw/PageBreakWin.cxx
@@ -283,9 +283,8 @@ void SwPageBreakWin::Select()
pNd->GetDoc()->GetIDocumentUndoRedo( ).StartUndo( SwUndoId::UI_DELETE_PAGE_BREAK, nullptr );
SfxItemSet aSet( GetEditWin()->GetView().GetWrtShell().GetAttrPool(),
- RES_PAGEDESC, RES_PAGEDESC,
- RES_BREAK, RES_BREAK,
- nullptr );
+ svl::Items<RES_PAGEDESC, RES_PAGEDESC,
+ RES_BREAK, RES_BREAK>{} );
aSet.Put( SvxFormatBreakItem( SvxBreak::NONE, RES_BREAK ) );
aSet.Put( SwFormatPageDesc( nullptr ) );
diff --git a/sw/source/uibase/docvw/PostItMgr.cxx b/sw/source/uibase/docvw/PostItMgr.cxx
index 55b4ea914d4a..7b6cbccfa5f9 100644
--- a/sw/source/uibase/docvw/PostItMgr.cxx
+++ b/sw/source/uibase/docvw/PostItMgr.cxx
@@ -1580,7 +1580,7 @@ void SwPostItMgr::ExecuteFormatAllDialog(SwView& rView)
OutlinerView* pOLV = pWin->GetOutlinerView();
SfxItemSet aEditAttr(pOLV->GetAttribs());
SfxItemPool* pPool(SwAnnotationShell::GetAnnotationPool(rView));
- SfxItemSet aDlgAttr(*pPool, EE_ITEMS_START, EE_ITEMS_END);
+ SfxItemSet aDlgAttr(*pPool, svl::Items<EE_ITEMS_START, EE_ITEMS_END>{});
aDlgAttr.Put(aEditAttr);
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateSwCharDlg(rView.GetWindow(), rView, aDlgAttr, SwCharDlgMode::Ann));
diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx
index d1779e0b11b0..84daa3597987 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -787,7 +787,7 @@ static sal_uInt16 lcl_isNonDefaultLanguage(LanguageType eBufferLanguage, SwView&
}
if(bLang)
{
- SfxItemSet aLangSet(rView.GetPool(), nWhich, nWhich);
+ SfxItemSet aLangSet(rView.GetPool(), {{nWhich, nWhich}});
SwWrtShell& rSh = rView.GetWrtShell();
rSh.GetCurAttr(aLangSet);
if(SfxItemState::DEFAULT <= aLangSet.GetItemState(nWhich))
@@ -1010,11 +1010,11 @@ void SwEditWin::ChangeFly( sal_uInt8 nDir, bool bWeb )
rSh.IsSelObjProtected( FlyProtectFlags::Pos ) == FlyProtectFlags::NONE )
{
SfxItemSet aSet(rSh.GetAttrPool(),
- RES_FRM_SIZE, RES_FRM_SIZE,
+ svl::Items<RES_FRM_SIZE, RES_FRM_SIZE,
RES_VERT_ORIENT, RES_ANCHOR,
RES_COL, RES_COL,
RES_PROTECT, RES_PROTECT,
- RES_FOLLOW_TEXT_FLOW, RES_FOLLOW_TEXT_FLOW, 0);
+ RES_FOLLOW_TEXT_FLOW, RES_FOLLOW_TEXT_FLOW>{});
rSh.GetFlyFrameAttr( aSet );
RndStdIds eAnchorId = static_cast<const SwFormatAnchor&>(aSet.Get(RES_ANCHOR)).GetAnchorId();
Size aSnap;
@@ -2242,7 +2242,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
eKeyState = SwKeyState::GoIntoFly;
else
{
- SfxItemSet aSet(rSh.GetAttrPool(), RES_TXTATR_INETFMT, RES_TXTATR_INETFMT);
+ SfxItemSet aSet(rSh.GetAttrPool(), svl::Items<RES_TXTATR_INETFMT, RES_TXTATR_INETFMT>{});
rSh.GetCurAttr(aSet);
if(SfxItemState::SET == aSet.GetItemState(RES_TXTATR_INETFMT, false))
{
diff --git a/sw/source/uibase/fldui/fldmgr.cxx b/sw/source/uibase/fldui/fldmgr.cxx
index 2d275b3e5f29..f540d076c1a1 100644
--- a/sw/source/uibase/fldui/fldmgr.cxx
+++ b/sw/source/uibase/fldui/fldmgr.cxx
@@ -1259,7 +1259,7 @@ bool SwFieldMgr::InsertField(
}
SfxItemSet aBoxSet( pCurShell->GetAttrPool(),
- RES_BOXATR_FORMULA, RES_BOXATR_FORMULA );
+ svl::Items<RES_BOXATR_FORMULA, RES_BOXATR_FORMULA>{} );
OUString sFormula(comphelper::string::stripStart(rData.m_sPar2, ' '));
if ( sFormula.startsWith("=") )
diff --git a/sw/source/uibase/frmdlg/colex.cxx b/sw/source/uibase/frmdlg/colex.cxx
index 96a76fe4437e..3b9c1212159e 100644
--- a/sw/source/uibase/frmdlg/colex.cxx
+++ b/sw/source/uibase/frmdlg/colex.cxx
@@ -129,7 +129,7 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet )
{
// create FillAttributes from SvxBrushItem //SetHdColor(rItem.GetColor());
const SvxBrushItem& rItem = static_cast< const SvxBrushItem& >(rHeaderSet.Get(RES_BACKGROUND));
- SfxItemSet aTempSet(*rHeaderSet.GetPool(), XATTR_FILL_FIRST, XATTR_FILL_LAST);
+ SfxItemSet aTempSet(*rHeaderSet.GetPool(), svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST>{});
setSvxBrushItemAsFillAttributesToTargetSet(rItem, aTempSet);
setHeaderFillAttributes(
@@ -175,7 +175,7 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet )
{
// create FillAttributes from SvxBrushItem //SetFtColor(rItem.GetColor());
const SvxBrushItem& rItem = static_cast< const SvxBrushItem& >(rFooterSet.Get(RES_BACKGROUND));
- SfxItemSet aTempSet(*rFooterSet.GetPool(), XATTR_FILL_FIRST, XATTR_FILL_LAST);
+ SfxItemSet aTempSet(*rFooterSet.GetPool(), svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST>{});
setSvxBrushItemAsFillAttributesToTargetSet(rItem, aTempSet);
setFooterFillAttributes(
@@ -198,7 +198,7 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet )
{
// create FillAttributes from SvxBrushItem
const SvxBrushItem& rItem = static_cast< const SvxBrushItem& >(*pItem);
- SfxItemSet aTempSet(*rSet.GetPool(), XATTR_FILL_FIRST, XATTR_FILL_LAST);
+ SfxItemSet aTempSet(*rSet.GetPool(), svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST>{});
setSvxBrushItemAsFillAttributesToTargetSet(rItem, aTempSet);
setPageFillAttributes(
diff --git a/sw/source/uibase/frmdlg/frmmgr.cxx b/sw/source/uibase/frmdlg/frmmgr.cxx
index a710350cae40..61835e66bbc9 100644
--- a/sw/source/uibase/frmdlg/frmmgr.cxx
+++ b/sw/source/uibase/frmdlg/frmmgr.cxx
@@ -139,7 +139,7 @@ void SwFlyFrameAttrMgr::UpdateFlyFrame()
const SfxPoolItem *pGItem, *pItem;
if( SfxItemState::SET == m_aSet.GetItemState( RES_ANCHOR, false, &pItem ))
{
- SfxItemSet aGetSet( *m_aSet.GetPool(), RES_ANCHOR, RES_ANCHOR );
+ SfxItemSet aGetSet( *m_aSet.GetPool(), svl::Items<RES_ANCHOR, RES_ANCHOR>{} );
if( m_pOwnSh->GetFlyFrameAttr( aGetSet ) && 1 == aGetSet.Count() &&
SfxItemState::SET == aGetSet.GetItemState( RES_ANCHOR, false, &pGItem )
&& static_cast<const SwFormatAnchor*>(pGItem)->GetAnchorId() ==
diff --git a/sw/source/uibase/lingu/olmenu.cxx b/sw/source/uibase/lingu/olmenu.cxx
index dc336015eb51..140ab07814d8 100644
--- a/sw/source/uibase/lingu/olmenu.cxx
+++ b/sw/source/uibase/lingu/olmenu.cxx
@@ -597,7 +597,7 @@ void SwSpellPopup::checkRedline()
FN_REDLINE_PREV_CHANGE
};
SwDoc *pDoc = m_pSh->GetDoc();
- SfxItemSet aSet(pDoc->GetAttrPool(), FN_REDLINE_ACCEPT_DIRECT, FN_REDLINE_PREV_CHANGE);
+ SfxItemSet aSet(pDoc->GetAttrPool(), svl::Items<FN_REDLINE_ACCEPT_DIRECT, FN_REDLINE_PREV_CHANGE>{});
for (sal_uInt16 nWhich : pRedlineIds)
{
aSet.Put(SfxVoidItem(nWhich));
@@ -822,10 +822,9 @@ void SwSpellPopup::Execute( sal_uInt16 nId )
// Set language for selection or for paragraph...
SfxItemSet aCoreSet( m_pSh->GetView().GetPool(),
- RES_CHRATR_LANGUAGE, RES_CHRATR_LANGUAGE,
+ svl::Items<RES_CHRATR_LANGUAGE, RES_CHRATR_LANGUAGE,
RES_CHRATR_CJK_LANGUAGE, RES_CHRATR_CJK_LANGUAGE,
- RES_CHRATR_CTL_LANGUAGE, RES_CHRATR_CTL_LANGUAGE,
- 0 );
+ RES_CHRATR_CTL_LANGUAGE, RES_CHRATR_CTL_LANGUAGE>{} );
OUString aNewLangText;
if (MN_SET_LANGUAGE_SELECTION_START <= nId && nId <= MN_SET_LANGUAGE_SELECTION_END)
diff --git a/sw/source/uibase/misc/glshell.cxx b/sw/source/uibase/misc/glshell.cxx
index f9be5953fe7c..66125ad7189e 100644
--- a/sw/source/uibase/misc/glshell.cxx
+++ b/sw/source/uibase/misc/glshell.cxx
@@ -241,10 +241,9 @@ SwDocShellRef SwGlossaries::EditGroupDoc( const OUString& rGroup, const OUString
// we create a default SfxPrinter.
// ItemSet is deleted by Sfx!
auto pSet = o3tl::make_unique<SfxItemSet>( xDocSh->GetDoc()->GetAttrPool(),
- FN_PARAM_ADDPRINTER, FN_PARAM_ADDPRINTER,
+ svl::Items<FN_PARAM_ADDPRINTER, FN_PARAM_ADDPRINTER,
SID_PRINTER_NOTFOUND_WARN, SID_PRINTER_NOTFOUND_WARN,
- SID_PRINTER_CHANGESTODOC, SID_PRINTER_CHANGESTODOC,
- 0 );
+ SID_PRINTER_CHANGESTODOC, SID_PRINTER_CHANGESTODOC>{} );
VclPtr<SfxPrinter> pPrinter = VclPtr<SfxPrinter>::Create( std::move(pSet) );
// and append it to the document.
diff --git a/sw/source/uibase/ribbar/concustomshape.cxx b/sw/source/uibase/ribbar/concustomshape.cxx
index 755eb8074da3..31baef25178e 100644
--- a/sw/source/uibase/ribbar/concustomshape.cxx
+++ b/sw/source/uibase/ribbar/concustomshape.cxx
@@ -128,7 +128,7 @@ void ConstCustomShape::SetAttributes( SdrObject* pObj )
{
const SfxItemSet& rSource = pSourceObj->GetMergedItemSet();
SfxItemSet aDest( pObj->GetModel()->GetItemPool(), // ranges from SdrAttrObj
- SDRATTR_START, SDRATTR_SHADOW_LAST,
+ svl::Items<SDRATTR_START, SDRATTR_SHADOW_LAST,
SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST,
SDRATTR_TEXTDIRECTION, SDRATTR_TEXTDIRECTION,
// Graphic Attributes
@@ -138,9 +138,7 @@ void ConstCustomShape::SetAttributes( SdrObject* pObj )
// CustomShape properties
SDRATTR_CUSTOMSHAPE_FIRST, SDRATTR_CUSTOMSHAPE_LAST,
// range from SdrTextObj
- EE_ITEMS_START, EE_ITEMS_END,
- // end
- 0, 0);
+ EE_ITEMS_START, EE_ITEMS_END>{});
aDest.Set( rSource );
pObj->SetMergedItemSet( aDest );
sal_Int32 nAngle = pSourceObj->GetRotateAngle();
diff --git a/sw/source/uibase/ribbar/conrect.cxx b/sw/source/uibase/ribbar/conrect.cxx
index 5a8823501cf9..a07a14ced753 100644
--- a/sw/source/uibase/ribbar/conrect.cxx
+++ b/sw/source/uibase/ribbar/conrect.cxx
@@ -95,7 +95,7 @@ bool ConstRectangle::MouseButtonUp(const MouseEvent& rMEvt)
{
// Set the attributes needed for scrolling
SfxItemSet aItemSet( pSdrView->GetModel()->GetItemPool(),
- SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST);
+ svl::Items<SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST>{});
aItemSet.Put( makeSdrTextAutoGrowWidthItem( false ) );
aItemSet.Put( makeSdrTextAutoGrowHeightItem( false ) );
diff --git a/sw/source/uibase/ribbar/drawbase.cxx b/sw/source/uibase/ribbar/drawbase.cxx
index 5c02f9b3c32f..f4a1078a6b99 100644
--- a/sw/source/uibase/ribbar/drawbase.cxx
+++ b/sw/source/uibase/ribbar/drawbase.cxx
@@ -285,7 +285,7 @@ bool SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt)
bAutoCap = true;
if(m_pWin->GetFrameColCount() > 1)
{
- SfxItemSet aSet(m_pView->GetPool(),RES_COL,RES_COL);
+ SfxItemSet aSet(m_pView->GetPool(),svl::Items<RES_COL,RES_COL>{});
SwFormatCol aCol(static_cast<const SwFormatCol&>(aSet.Get(RES_COL)));
aCol.Init(m_pWin->GetFrameColCount(), aCol.GetGutterWidth(), aCol.GetWishWidth());
aSet.Put(aCol);
diff --git a/sw/source/uibase/ribbar/inputwin.cxx b/sw/source/uibase/ribbar/inputwin.cxx
index 488cd6ac3b1f..6bf68a3b9605 100644
--- a/sw/source/uibase/ribbar/inputwin.cxx
+++ b/sw/source/uibase/ribbar/inputwin.cxx
@@ -255,7 +255,7 @@ void SwInputWindow::ShowWin()
}
pWrtShell->DoUndo(false);
- SfxItemSet aSet( pWrtShell->GetAttrPool(), RES_BOXATR_FORMULA, RES_BOXATR_FORMULA );
+ SfxItemSet aSet( pWrtShell->GetAttrPool(), svl::Items<RES_BOXATR_FORMULA, RES_BOXATR_FORMULA>{} );
if( pWrtShell->GetTableBoxFormulaAttrs( aSet ))
sEdit += static_cast<const SwTableBoxFormula&>(aSet.Get( RES_BOXATR_FORMULA )).GetFormula();
}
diff --git a/sw/source/uibase/shells/annotsh.cxx b/sw/source/uibase/shells/annotsh.cxx
index 69fc95b59cae..1428a8c772dc 100644
--- a/sw/source/uibase/shells/annotsh.cxx
+++ b/sw/source/uibase/shells/annotsh.cxx
@@ -479,7 +479,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
FieldUnit eMetric = ::GetDfltMetric(dynamic_cast<SwWebView*>( pView) != nullptr );
SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, eMetric));
*/
- SfxItemSet aDlgAttr(GetPool(), EE_ITEMS_START, EE_ITEMS_END);
+ SfxItemSet aDlgAttr(GetPool(), svl::Items<EE_ITEMS_START, EE_ITEMS_END>{});
// util::Language does not exist in the EditEngine! Therefore not included in the set.
@@ -525,12 +525,11 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, eMetric));
*/
SfxItemSet aDlgAttr(GetPool(),
- EE_ITEMS_START, EE_ITEMS_END,
+ svl::Items<EE_ITEMS_START, EE_ITEMS_END,
SID_ATTR_PARA_HYPHENZONE, SID_ATTR_PARA_HYPHENZONE,
SID_ATTR_PARA_SPLIT, SID_ATTR_PARA_SPLIT,
SID_ATTR_PARA_WIDOWS, SID_ATTR_PARA_WIDOWS,
- SID_ATTR_PARA_ORPHANS, SID_ATTR_PARA_ORPHANS,
- 0);
+ SID_ATTR_PARA_ORPHANS, SID_ATTR_PARA_ORPHANS>{});
aDlgAttr.Put(aEditAttr);
@@ -576,9 +575,8 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
bLeftToRight = !bLeftToRight;
}
SfxItemSet aAttr( *aNewAttr.GetPool(),
- EE_PARA_JUST, EE_PARA_JUST,
- EE_PARA_WRITINGDIR, EE_PARA_WRITINGDIR,
- 0 );
+ svl::Items<EE_PARA_JUST, EE_PARA_JUST,
+ EE_PARA_WRITINGDIR, EE_PARA_WRITINGDIR>{} );
SvxAdjust nAdjust = SvxAdjust::Left;
if( SfxItemState::SET == aEditAttr.GetItemState(EE_PARA_JUST, true, &pPoolItem ) )
@@ -1793,10 +1791,9 @@ void SwAnnotationShell::InsertSymbol(SfxRequest& rReq)
SfxItemSet aOldSet( pOLV->GetAttribs() );
SfxItemSet aFontSet( *aOldSet.GetPool(),
- EE_CHAR_FONTINFO, EE_CHAR_FONTINFO,
+ svl::Items<EE_CHAR_FONTINFO, EE_CHAR_FONTINFO,
EE_CHAR_FONTINFO_CJK, EE_CHAR_FONTINFO_CJK,
- EE_CHAR_FONTINFO_CTL, EE_CHAR_FONTINFO_CTL,
- 0 );
+ EE_CHAR_FONTINFO_CTL, EE_CHAR_FONTINFO_CTL>{} );
aFontSet.Set( aOldSet );
// Insert string
diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx
index 465048dc32c9..9c43baea5d24 100644
--- a/sw/source/uibase/shells/basesh.cxx
+++ b/sw/source/uibase/shells/basesh.cxx
@@ -172,7 +172,7 @@ static void lcl_UpdateIMapDlg( SwWrtShell& rSh )
std::unique_ptr<TargetList> pList(new TargetList);
rSh.GetView().GetViewFrame()->GetFrame().GetTargetList(*pList);
- SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL );
+ SfxItemSet aSet( rSh.GetAttrPool(), svl::Items<RES_URL, RES_URL>{} );
rSh.GetFlyFrameAttr( aSet );
const SwFormatURL &rURL = static_cast<const SwFormatURL&>(aSet.Get( RES_URL ));
SvxIMapDlgChildWindow::UpdateIMapDlg(
@@ -985,7 +985,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
if ( rSh.IsFrameSelected() &&
pDlg->GetEditingObject() == rSh.GetIMapInventor() )
{
- SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL );
+ SfxItemSet aSet( rSh.GetAttrPool(), svl::Items<RES_URL, RES_URL>{} );
rSh.GetFlyFrameAttr( aSet );
SwFormatURL aURL( static_cast<const SwFormatURL&>(aSet.Get( RES_URL )) );
aURL.SetMap( &pDlg->GetImageMap() );
@@ -1020,7 +1020,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
if (pDlg && pDlg->GetEditingObject() == rSh.GetIMapInventor())
{
rSh.StartAction();
- SfxItemSet aSet( rSh.GetAttrPool(), RES_SURROUND, RES_SURROUND);
+ SfxItemSet aSet( rSh.GetAttrPool(), svl::Items<RES_SURROUND, RES_SURROUND>{});
rSh.GetFlyFrameAttr( aSet );
SwFormatSurround aSur( static_cast<const SwFormatSurround&>(aSet.Get( RES_SURROUND )) );
if ( !aSur.IsContour() )
@@ -1082,7 +1082,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
sal_uInt16 nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
if( nHtmlMode )
{
- SfxItemSet aSet(GetPool(), RES_SURROUND, RES_HORI_ORIENT);
+ SfxItemSet aSet(GetPool(), svl::Items<RES_SURROUND, RES_HORI_ORIENT>{});
rSh.GetFlyFrameAttr(aSet);
const SwFormatSurround& rSurround = static_cast<const SwFormatSurround&>(aSet.Get(RES_SURROUND));
@@ -1328,7 +1328,7 @@ IMPL_LINK_NOARG(SwBaseShell, GraphicArrivedHdl, SwCursorShell&, void)
case FN_FRAME_WRAP_CONTOUR:
if( !bProtect )
{
- SfxItemSet aSet(GetPool(), RES_SURROUND, RES_SURROUND);
+ SfxItemSet aSet(GetPool(), svl::Items<RES_SURROUND, RES_SURROUND>{});
rSh.GetFlyFrameAttr(aSet);
const SwFormatSurround& rWrap = static_cast<const SwFormatSurround&>(aSet.Get(RES_SURROUND));
bSetState = true;
@@ -1432,7 +1432,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
case RES_SHADOW:
{
SfxItemSet aSet( rSh.GetAttrPool(),
- RES_SHADOW, RES_SHADOW );
+ svl::Items<RES_SHADOW, RES_SHADOW>{} );
// Table cell(s) selected?
if ( rSh.IsTableMode() )
@@ -1614,7 +1614,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
if( !bParentCntProt && (bObj || rSh.IsFrameSelected()))
{
- SfxItemSet aSet(GetPool(), RES_ANCHOR, RES_ANCHOR);
+ SfxItemSet aSet(GetPool(), svl::Items<RES_ANCHOR, RES_ANCHOR>{});
if(bObj)
rSh.GetObjAttr(aSet);
else
@@ -1656,7 +1656,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
if( !bParentCntProt && (bObj || rSh.IsFrameSelected()))
{
- SfxItemSet aSet(GetPool(), RES_OPAQUE, RES_ANCHOR);
+ SfxItemSet aSet(GetPool(), svl::Items<RES_OPAQUE, RES_ANCHOR>{});
RndStdIds nAnchorType;
if(bObj)
{
@@ -1830,7 +1830,7 @@ void SwBaseShell::SetWrapMode( sal_uInt16 nSlot )
bool bObj = 0 != rSh.IsObjSelected();
if( bObj || rSh.IsFrameSelected())
{
- SfxItemSet aSet(GetPool(), RES_OPAQUE, RES_SURROUND);
+ SfxItemSet aSet(GetPool(), svl::Items<RES_OPAQUE, RES_SURROUND>{});
if(bObj)
rSh.GetObjAttr(aSet);
else
@@ -1967,10 +1967,9 @@ void SwBaseShell::ExecTextCtrl( SfxRequest& rReq )
SfxItemPool& rPool = rSh.GetAttrPool();
sal_uInt16 nWhich = rPool.GetWhich( nSlot );
SvtScriptType nScripts = SvtScriptType::LATIN | SvtScriptType::ASIAN | SvtScriptType::COMPLEX;
- SfxItemSet aHeightSet( GetPool(), RES_CHRATR_FONTSIZE, RES_CHRATR_FONTSIZE,
+ SfxItemSet aHeightSet( GetPool(), svl::Items<RES_CHRATR_FONTSIZE, RES_CHRATR_FONTSIZE,
RES_CHRATR_CJK_FONTSIZE, RES_CHRATR_CJK_FONTSIZE,
- RES_CHRATR_CTL_FONTSIZE, RES_CHRATR_CTL_FONTSIZE,
- 0L);
+ RES_CHRATR_CTL_FONTSIZE, RES_CHRATR_CTL_FONTSIZE>{});
switch( nSlot )
{
@@ -2012,10 +2011,9 @@ void SwBaseShell::ExecTextCtrl( SfxRequest& rReq )
sal_uInt32 nHeight = static_cast< const SvxFontHeightItem& >(pArgs->Get( nWhich )).GetHeight();
SwStdFontConfig* pStdFont = SW_MOD()->GetStdFontConfig();
- SfxItemSet aLangSet( GetPool(), RES_CHRATR_LANGUAGE, RES_CHRATR_LANGUAGE,
+ SfxItemSet aLangSet( GetPool(), svl::Items<RES_CHRATR_LANGUAGE, RES_CHRATR_LANGUAGE,
RES_CHRATR_CJK_LANGUAGE, RES_CHRATR_CJK_LANGUAGE,
- RES_CHRATR_CTL_LANGUAGE, RES_CHRATR_CTL_LANGUAGE,
- 0L);
+ RES_CHRATR_CTL_LANGUAGE, RES_CHRATR_CTL_LANGUAGE>{});
rSh.GetCurAttr( aLangSet );
sal_Int32 nWesternSize =
@@ -2107,7 +2105,7 @@ void SwBaseShell::GetTextFontCtrlState( SfxItemSet& rSet )
if( !pFntCoreSet )
{
pFntCoreSet.reset(new SfxItemSet( *rSet.GetPool(),
- RES_CHRATR_BEGIN, RES_CHRATR_END-1 ));
+ svl::Items<RES_CHRATR_BEGIN, RES_CHRATR_END-1>{} ));
rSh.GetCurAttr( *pFntCoreSet );
nScriptType = rSh.GetScriptType();
// #i42732# input language should be preferred over
@@ -2184,7 +2182,7 @@ void SwBaseShell::GetBckColState(SfxItemSet &rSet)
else
{
// Adapt to new DrawingLayer FillStyle; use a parent which has XFILL_NONE set
- SfxItemSet aCoreSet(GetPool(), XATTR_FILL_FIRST, XATTR_FILL_LAST);
+ SfxItemSet aCoreSet(GetPool(), svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST>{});
aCoreSet.SetParent(&GetView().GetDocShell()->GetDoc()->GetDfltFrameFormat()->GetAttrSet());
@@ -2244,7 +2242,7 @@ void SwBaseShell::ExecBckCol(SfxRequest& rReq)
else
{
// Adapt to new DrawingLayer FillStyle; use a parent which has XFILL_NONE set
- SfxItemSet aCoreSet(GetPool(), XATTR_FILL_FIRST, XATTR_FILL_LAST);
+ SfxItemSet aCoreSet(GetPool(), svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST>{});
aCoreSet.SetParent(&GetView().GetDocShell()->GetDoc()->GetDfltFrameFormat()->GetAttrSet());
@@ -2303,7 +2301,7 @@ void SwBaseShell::ExecBckCol(SfxRequest& rReq)
else
{
// Adapt to new DrawingLayer FillStyle; use a parent which has XFILL_NONE set
- SfxItemSet aCoreSet(GetPool(), XATTR_FILL_FIRST, XATTR_FILL_LAST);
+ SfxItemSet aCoreSet(GetPool(), svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST>{});
aCoreSet.SetParent(&GetView().GetDocShell()->GetDoc()->GetDfltFrameFormat()->GetAttrSet());
setSvxBrushItemAsFillAttributesToTargetSet(aBrushItem, aCoreSet);
@@ -2349,8 +2347,8 @@ void SwBaseShell::GetBorderState(SfxItemSet &rSet)
if ( bTableMode )
{
SfxItemSet aCoreSet( GetPool(),
- RES_BOX, RES_BOX,
- SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER, 0 );
+ svl::Items<RES_BOX, RES_BOX,
+ SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER>{} );
SvxBoxInfoItem aBoxInfo( SID_ATTR_BORDER_INNER );
aCoreSet.Put( aBoxInfo );
rSh.GetTabBorders( aCoreSet );
@@ -2427,9 +2425,8 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq)
case FN_FORMAT_BORDER_DLG:
{
SfxItemSet aSet( rSh.GetAttrPool(),
- RES_BOX , RES_SHADOW,
- SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER,
- 0 );
+ svl::Items<RES_BOX , RES_SHADOW,
+ SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER>{} );
ScopedVclPtr<SfxAbstractDialog> pDlg;
// Table cell(s) selected?
if ( rSh.IsTableMode() )
@@ -2493,7 +2490,7 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq)
case FN_FORMAT_BACKGROUND_DLG:
{
SfxItemSet aSet( rSh.GetAttrPool(),
- RES_BACKGROUND, RES_BACKGROUND );
+ svl::Items<RES_BACKGROUND, RES_BACKGROUND>{} );
ScopedVclPtr<SfxAbstractDialog> pDlg;
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
@@ -2824,7 +2821,7 @@ void SwBaseShell::ExecuteGallery(SfxRequest &rReq)
rSh.SetBoxBackground( aBrush );
else if ( nPos == nFramePos || nPos == nGraphicPos || nPos == nOlePos )
{
- SfxItemSet aCoreSet(GetPool(), RES_BACKGROUND, RES_BACKGROUND);
+ SfxItemSet aCoreSet(GetPool(), svl::Items<RES_BACKGROUND, RES_BACKGROUND>{});
aCoreSet.Put( aBrush );
rSh.SetFlyFrameAttr( aCoreSet );
}
diff --git a/sw/source/uibase/shells/drawsh.cxx b/sw/source/uibase/shells/drawsh.cxx
index b1b97df5368c..350181edf917 100644
--- a/sw/source/uibase/shells/drawsh.cxx
+++ b/sw/source/uibase/shells/drawsh.cxx
@@ -167,7 +167,7 @@ void SwDrawShell::InsertPictureFromFile(SdrObject& rObject)
{
pSdrView->AddUndo(new SdrUndoAttrObj(rObject));
- SfxItemSet aSet(pSdrView->GetModel()->GetItemPool(), XATTR_FILLSTYLE, XATTR_FILLBITMAP);
+ SfxItemSet aSet(pSdrView->GetModel()->GetItemPool(), svl::Items<XATTR_FILLSTYLE, XATTR_FILLBITMAP>{});
aSet.Put(XFillStyleItem(drawing::FillStyle_BITMAP));
aSet.Put(XFillBitmapItem(OUString(), aGraphic));
diff --git a/sw/source/uibase/shells/drwbassh.cxx b/sw/source/uibase/shells/drwbassh.cxx
index ec081a2919d1..e13780543c0a 100644
--- a/sw/source/uibase/shells/drwbassh.cxx
+++ b/sw/source/uibase/shells/drwbassh.cxx
@@ -124,12 +124,11 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList();
if( rMarkList.GetMark(0) != nullptr )
{
- SfxItemSet aSet(GetPool(), RES_SURROUND, RES_SURROUND,
+ SfxItemSet aSet(GetPool(), svl::Items<RES_SURROUND, RES_SURROUND,
RES_ANCHOR, RES_ANCHOR,
RES_LR_SPACE, RES_UL_SPACE,
SID_HTML_MODE, SID_HTML_MODE,
- FN_DRAW_WRAP_DLG, FN_DRAW_WRAP_DLG,
- 0);
+ FN_DRAW_WRAP_DLG, FN_DRAW_WRAP_DLG>{});
aSet.Put(SfxBoolItem(SID_HTML_MODE,
0 != ::GetHtmlMode(pSh->GetView().GetDocShell())));
@@ -260,7 +259,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
SfxItemState::SET != pOutSet->GetItemState(
SID_ATTR_TRANSFORM_POS_Y, false );
- SfxItemSet aFrameAttrSet(GetPool(), RES_FRMATR_BEGIN, RES_FRMATR_END - 1);
+ SfxItemSet aFrameAttrSet(GetPool(), svl::Items<RES_FRMATR_BEGIN, RES_FRMATR_END - 1>{});
bool bSingleSelection = rMarkList.GetMarkCount() == 1;
diff --git a/sw/source/uibase/shells/drwtxtex.cxx b/sw/source/uibase/shells/drwtxtex.cxx
index b875b49d721f..01ca59adb602 100644
--- a/sw/source/uibase/shells/drwtxtex.cxx
+++ b/sw/source/uibase/shells/drwtxtex.cxx
@@ -350,7 +350,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
SwView* pView = &GetView();
FieldUnit eMetric = ::GetDfltMetric(dynamic_cast<SwWebView*>( pView) != nullptr );
SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)) );
- SfxItemSet aDlgAttr(GetPool(), EE_ITEMS_START, EE_ITEMS_END);
+ SfxItemSet aDlgAttr(GetPool(), svl::Items<EE_ITEMS_START, EE_ITEMS_END>{});
// util::Language does not exists in the EditEngine! That is why not in set.
@@ -419,12 +419,11 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
FieldUnit eMetric = ::GetDfltMetric(dynamic_cast<SwWebView*>( pView) != nullptr );
SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)) );
SfxItemSet aDlgAttr(GetPool(),
- EE_ITEMS_START, EE_ITEMS_END,
+ svl::Items<EE_ITEMS_START, EE_ITEMS_END,
SID_ATTR_PARA_HYPHENZONE, SID_ATTR_PARA_HYPHENZONE,
SID_ATTR_PARA_SPLIT, SID_ATTR_PARA_SPLIT,
SID_ATTR_PARA_WIDOWS, SID_ATTR_PARA_WIDOWS,
- SID_ATTR_PARA_ORPHANS, SID_ATTR_PARA_ORPHANS,
- 0);
+ SID_ATTR_PARA_ORPHANS, SID_ATTR_PARA_ORPHANS>{});
aDlgAttr.Put(aEditAttr);
@@ -507,8 +506,8 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
pSdrView->SdrEndTextEdit(true);
SfxItemSet aAttr( *aNewAttr.GetPool(),
- SDRATTR_TEXTDIRECTION,
- SDRATTR_TEXTDIRECTION );
+ svl::Items<SDRATTR_TEXTDIRECTION,
+ SDRATTR_TEXTDIRECTION>{} );
aAttr.Put( SvxWritingModeItem(
nSlot == SID_TEXTDIRECTION_LEFT_TO_RIGHT ?
@@ -538,9 +537,8 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
bLeftToRight = !bLeftToRight;
}
SfxItemSet aAttr( *aNewAttr.GetPool(),
- EE_PARA_JUST, EE_PARA_JUST,
- EE_PARA_WRITINGDIR, EE_PARA_WRITINGDIR,
- 0 );
+ svl::Items<EE_PARA_JUST, EE_PARA_JUST,
+ EE_PARA_WRITINGDIR, EE_PARA_WRITINGDIR>{} );
SvxAdjust nAdjust = SvxAdjust::Left;
if( SfxItemState::SET == aEditAttr.GetItemState(EE_PARA_JUST, true, &pPoolItem ) )
diff --git a/sw/source/uibase/shells/drwtxtsh.cxx b/sw/source/uibase/shells/drwtxtsh.cxx
index f920fa1a21ad..e3777c565222 100644
--- a/sw/source/uibase/shells/drwtxtsh.cxx
+++ b/sw/source/uibase/shells/drwtxtsh.cxx
@@ -766,10 +766,9 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq)
SfxItemSet aOldSet( pOLV->GetAttribs() );
SfxItemSet aFontSet( *aOldSet.GetPool(),
- EE_CHAR_FONTINFO, EE_CHAR_FONTINFO,
+ svl::Items<EE_CHAR_FONTINFO, EE_CHAR_FONTINFO,
EE_CHAR_FONTINFO_CJK, EE_CHAR_FONTINFO_CJK,
- EE_CHAR_FONTINFO_CTL, EE_CHAR_FONTINFO_CTL,
- 0 );
+ EE_CHAR_FONTINFO_CTL, EE_CHAR_FONTINFO_CTL>{} );
aFontSet.Set( aOldSet );
// Insert string
diff --git a/sw/source/uibase/shells/frmsh.cxx b/sw/source/uibase/shells/frmsh.cxx
index 9a75265c5065..9ebe7f9810c5 100644
--- a/sw/source/uibase/shells/frmsh.cxx
+++ b/sw/source/uibase/shells/frmsh.cxx
@@ -166,7 +166,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
if(pArgs->GetItemState(SID_ATTR_COLUMNS, false, &pItem) == SfxItemState::SET)
nCols = static_cast<const SfxUInt16Item *>(pItem)->GetValue();
- SfxItemSet aSet(GetPool(),RES_COL,RES_COL);
+ SfxItemSet aSet(GetPool(),svl::Items<RES_COL,RES_COL>{});
rSh.GetFlyFrameAttr( aSet );
SwFormatCol aCol(static_cast<const SwFormatCol&>(aSet.Get(RES_COL)));
// GutterWidth will not always passed, hence get firstly
@@ -201,7 +201,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
const OUString& rURL = rHLinkItem.GetURL();
const OUString& rTarget = rHLinkItem.GetTargetFrame();
- SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL );
+ SfxItemSet aSet( rSh.GetAttrPool(), svl::Items<RES_URL, RES_URL>{} );
rSh.GetFlyFrameAttr( aSet );
SwFormatURL aURL( static_cast<const SwFormatURL&>(aSet.Get( RES_URL )) );
@@ -388,7 +388,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
else
{
SfxItemSet aSet(GetPool(), // sorted by indices
- RES_FRMATR_BEGIN, RES_FRMATR_END-1, // [82
+ svl::Items<RES_FRMATR_BEGIN, RES_FRMATR_END-1, // [82
// FillAttribute support
XATTR_FILL_FIRST, XATTR_FILL_LAST, // [1014
@@ -412,8 +412,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
FN_SET_FRM_ALT_NAME, FN_SET_FRM_ALT_NAME, // [21318
FN_UNO_DESCRIPTION, FN_UNO_DESCRIPTION, // [21320
FN_OLE_IS_MATH, FN_MATH_BASELINE_ALIGNMENT, // [22314
- FN_PARAM_CHAIN_PREVIOUS, FN_PARAM_CHAIN_NEXT, // [22420
- 0);
+ FN_PARAM_CHAIN_PREVIOUS, FN_PARAM_CHAIN_NEXT>{}); // [22420
// create needed items for XPropertyList entries from the DrawModel so that
// the Area TabPage can access them
@@ -512,11 +511,10 @@ void SwFrameShell::Execute(SfxRequest &rReq)
// Anything which is not supported by the format must be set hard.
if(SfxItemState::SET == pOutSet->GetItemState(FN_SET_FRM_NAME, false, &pItem))
rSh.SetFlyName(static_cast<const SfxStringItem*>(pItem)->GetValue());
- SfxItemSet aShellSet(GetPool(), RES_FRM_SIZE, RES_FRM_SIZE,
+ SfxItemSet aShellSet(GetPool(), svl::Items<RES_FRM_SIZE, RES_FRM_SIZE,
RES_SURROUND, RES_SURROUND,
RES_ANCHOR, RES_ANCHOR,
- RES_VERT_ORIENT,RES_HORI_ORIENT,
- 0);
+ RES_VERT_ORIENT,RES_HORI_ORIENT>{});
aShellSet.Put(*pOutSet);
aMgr.SetAttrSet(aShellSet);
if(SfxItemState::SET == pOutSet->GetItemState(FN_SET_FRM_NAME, false, &pItem))
@@ -608,7 +606,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
SwFormatHoriOrient aHori(aMgr.GetHoriOrient());
bool bMirror = !aHori.IsPosToggle();
aHori.SetPosToggle(bMirror);
- SfxItemSet aSet(GetPool(), RES_HORI_ORIENT, RES_HORI_ORIENT);
+ SfxItemSet aSet(GetPool(), svl::Items<RES_HORI_ORIENT, RES_HORI_ORIENT>{});
aSet.Put(aHori);
aMgr.SetAttrSet(aSet);
bCopyToFormat = true;
@@ -693,11 +691,10 @@ void SwFrameShell::GetState(SfxItemSet& rSet)
if (rSh.IsFrameSelected())
{
SfxItemSet aSet( rSh.GetAttrPool(),
- RES_LR_SPACE, RES_UL_SPACE,
+ svl::Items<RES_LR_SPACE, RES_UL_SPACE,
RES_PROTECT, RES_HORI_ORIENT,
RES_OPAQUE, RES_OPAQUE,
- RES_PRINT, RES_OPAQUE,
- 0 );
+ RES_PRINT, RES_OPAQUE>{} );
rSh.GetFlyFrameAttr( aSet );
bool bProtect = rSh.IsSelObjProtected(FlyProtectFlags::Pos) != FlyProtectFlags::NONE;
@@ -837,7 +834,7 @@ void SwFrameShell::GetState(SfxItemSet& rSet)
SvxHyperlinkItem aHLinkItem;
const SfxPoolItem* pItem;
- SfxItemSet aURLSet(GetPool(), RES_URL, RES_URL);
+ SfxItemSet aURLSet(GetPool(), svl::Items<RES_URL, RES_URL>{});
rSh.GetFlyFrameAttr( aURLSet );
if(SfxItemState::SET == aURLSet.GetItemState(RES_URL, true, &pItem))
@@ -992,7 +989,7 @@ void SwFrameShell::ExecFrameStyle(SfxRequest& rReq)
const SvxBoxItem* pPoolBoxItem = static_cast<const SvxBoxItem*>(::GetDfltAttr(RES_BOX));
const SfxItemSet *pArgs = rReq.GetArgs();
- SfxItemSet aFrameSet(rSh.GetAttrPool(), RES_BOX, RES_BOX);
+ SfxItemSet aFrameSet(rSh.GetAttrPool(), svl::Items<RES_BOX, RES_BOX>{});
rSh.GetFlyFrameAttr( aFrameSet );
const SvxBoxItem& rBoxItem = static_cast<const SvxBoxItem&>(aFrameSet.Get(RES_BOX));
@@ -1184,7 +1181,7 @@ void SwFrameShell::GetLineStyleState(SfxItemSet &rSet)
{
if (rSh.IsFrameSelected())
{
- SfxItemSet aFrameSet( rSh.GetAttrPool(), RES_BOX, RES_BOX );
+ SfxItemSet aFrameSet( rSh.GetAttrPool(), svl::Items<RES_BOX, RES_BOX>{} );
rSh.GetFlyFrameAttr(aFrameSet);
diff --git a/sw/source/uibase/shells/grfsh.cxx b/sw/source/uibase/shells/grfsh.cxx
index 2c8d69346959..8d228f5d17bc 100644
--- a/sw/source/uibase/shells/grfsh.cxx
+++ b/sw/source/uibase/shells/grfsh.cxx
@@ -151,7 +151,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
convertTwipToMm100(rSh.GetAnyCurRect(CurRectType::FlyEmbedded).Width()),
convertTwipToMm100(rSh.GetAnyCurRect(CurRectType::FlyEmbedded).Height()));
- SfxItemSet aSet( rSh.GetAttrPool(), RES_GRFATR_MIRRORGRF, RES_GRFATR_CROPGRF );
+ SfxItemSet aSet( rSh.GetAttrPool(), svl::Items<RES_GRFATR_MIRRORGRF, RES_GRFATR_CROPGRF>{} );
rSh.GetCurAttr( aSet );
SwMirrorGrf aMirror( static_cast<const SwMirrorGrf&>( aSet.Get(RES_GRFATR_MIRRORGRF)) );
SwCropGrf aCrop( static_cast<const SwCropGrf&>( aSet.Get(RES_GRFATR_CROPGRF)) );
@@ -220,7 +220,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
SfxItemSet aSet(GetPool(), // sorted by indices
- RES_FRMATR_BEGIN,RES_FRMATR_END - 1, // [ 82
+ svl::Items<RES_FRMATR_BEGIN,RES_FRMATR_END - 1, // [ 82
RES_GRFATR_MIRRORGRF,RES_GRFATR_CROPGRF, // [ 123
// FillAttribute support
@@ -244,8 +244,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
FN_SET_FRM_NAME,FN_KEEP_ASPECT_RATIO, // [21306
FN_SET_FRM_ALT_NAME,FN_SET_FRM_ALT_NAME, // [21318
SID_REFERER, SID_REFERER,
- FN_UNO_DESCRIPTION, FN_UNO_DESCRIPTION, // [21320
- 0);
+ FN_UNO_DESCRIPTION, FN_UNO_DESCRIPTION>{}); // [21320
// create needed items for XPropertyList entries from the DrawModel so that
// the Area TabPage can access them
@@ -329,7 +328,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
// get Mirror and Crop
{
SfxItemSet aTmpSet( rSh.GetAttrPool(),
- RES_GRFATR_MIRRORGRF, RES_GRFATR_CROPGRF );
+ svl::Items<RES_GRFATR_MIRRORGRF, RES_GRFATR_CROPGRF>{} );
rSh.GetCurAttr( aTmpSet );
aSet.Put( aTmpSet );
@@ -389,11 +388,10 @@ void SwGrfShell::Execute(SfxRequest &rReq)
if(pFormat && pFormat->IsAutoUpdateFormat())
{
pFormat->SetFormatAttr(*pSet);
- SfxItemSet aShellSet(GetPool(), RES_FRM_SIZE, RES_FRM_SIZE,
+ SfxItemSet aShellSet(GetPool(), svl::Items<RES_FRM_SIZE, RES_FRM_SIZE,
RES_SURROUND, RES_SURROUND,
RES_ANCHOR, RES_ANCHOR,
- RES_VERT_ORIENT,RES_HORI_ORIENT,
- 0);
+ RES_VERT_ORIENT,RES_HORI_ORIENT>{});
aShellSet.Put(*pSet);
aMgr.SetAttrSet(aShellSet);
}
@@ -461,8 +459,8 @@ void SwGrfShell::Execute(SfxRequest &rReq)
FN_UNO_DESCRIPTION, true, &pItem ))
rSh.SetObjDescription( static_cast<const SfxStringItem*>(pItem)->GetValue() );
- SfxItemSet aGrfSet( rSh.GetAttrPool(), RES_GRFATR_BEGIN,
- RES_GRFATR_END-1 );
+ SfxItemSet aGrfSet( rSh.GetAttrPool(), svl::Items<RES_GRFATR_BEGIN,
+ RES_GRFATR_END-1>{} );
aGrfSet.Put( *pSet );
if( aGrfSet.Count() )
rSh.SetAttrSet( aGrfSet );
@@ -475,7 +473,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
case FN_GRAPHIC_MIRROR_ON_EVEN_PAGES:
{
- SfxItemSet aSet(rSh.GetAttrPool(), RES_GRFATR_MIRRORGRF, RES_GRFATR_MIRRORGRF);
+ SfxItemSet aSet(rSh.GetAttrPool(), svl::Items<RES_GRFATR_MIRRORGRF, RES_GRFATR_MIRRORGRF>{});
rSh.GetCurAttr( aSet );
SwMirrorGrf aGrf(static_cast<const SwMirrorGrf &>(aSet.Get(RES_GRFATR_MIRRORGRF)));
aGrf.SetGrfToggle(!aGrf.IsGrfToggle());
@@ -506,8 +504,8 @@ void SwGrfShell::ExecAttr( SfxRequest &rReq )
if (GraphicType::Bitmap == nGrfType ||
GraphicType::GdiMetafile == nGrfType)
{
- SfxItemSet aGrfSet( GetShell().GetAttrPool(), RES_GRFATR_BEGIN,
- RES_GRFATR_END -1 );
+ SfxItemSet aGrfSet( GetShell().GetAttrPool(), svl::Items<RES_GRFATR_BEGIN,
+ RES_GRFATR_END -1>{} );
const SfxItemSet *pArgs = rReq.GetArgs();
const SfxPoolItem* pItem;
sal_uInt16 nSlot = rReq.GetSlot();
@@ -878,7 +876,7 @@ void SwGrfShell::ExecuteRotation(SfxRequest &rReq)
Size aSize(nRotatedWidth, nRotatedHeight);
aManager.SetSize(aSize);
aManager.UpdateFlyFrame();
- SfxItemSet aSet( rShell.GetAttrPool(), RES_GRFATR_CROPGRF, RES_GRFATR_CROPGRF );
+ SfxItemSet aSet( rShell.GetAttrPool(), svl::Items<RES_GRFATR_CROPGRF, RES_GRFATR_CROPGRF>{} );
rShell.GetCurAttr( aSet );
SwCropGrf aCrop( static_cast<const SwCropGrf&>( aSet.Get(RES_GRFATR_CROPGRF) ) );
tools::Rectangle aCropRectangle(aCrop.GetLeft(), aCrop.GetTop(), aCrop.GetRight(), aCrop.GetBottom());
diff --git a/sw/source/uibase/shells/langhelper.cxx b/sw/source/uibase/shells/langhelper.cxx
index 398105f7df71..547c6c389ea5 100644
--- a/sw/source/uibase/shells/langhelper.cxx
+++ b/sw/source/uibase/shells/langhelper.cxx
@@ -405,7 +405,7 @@ namespace SwLangHelper
/// RES_CHRATR_LANGUAGE, RES_CHRATR_CJK_LANGUAGE, RES_CHRATR_CTL_LANGUAGE,
LanguageType GetLanguage( SwWrtShell &rSh, sal_uInt16 nLangWhichId )
{
- SfxItemSet aSet( rSh.GetAttrPool(), nLangWhichId, nLangWhichId );
+ SfxItemSet aSet( rSh.GetAttrPool(), {{nLangWhichId, nLangWhichId}} );
rSh.GetCurAttr( aSet );
return GetLanguage(aSet,nLangWhichId);
diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx
index f049202a95d2..83fe0b2a458d 100644
--- a/sw/source/uibase/shells/tabsh.cxx
+++ b/sw/source/uibase/shells/tabsh.cxx
@@ -134,7 +134,7 @@ const sal_uInt16* SwuiGetUITableAttrRange()
static void lcl_SetAttr( SwWrtShell &rSh, const SfxPoolItem &rItem )
{
- SfxItemSet aSet( rSh.GetView().GetPool(), rItem.Which(), rItem.Which(), 0);
+ SfxItemSet aSet( rSh.GetView().GetPool(), {{rItem.Which(), rItem.Which()}});
aSet.Put( rItem );
rSh.SetTableAttr( aSet );
}
@@ -361,7 +361,7 @@ void ItemSetToTableParam( const SfxItemSet& rSet,
bool bTabCols = false;
SwTableRep* pRep = nullptr;
SwFrameFormat *pFormat = rSh.GetTableFormat();
- SfxItemSet aSet( rSh.GetAttrPool(), RES_FRMATR_BEGIN, RES_FRMATR_END-1 );
+ SfxItemSet aSet( rSh.GetAttrPool(), svl::Items<RES_FRMATR_BEGIN, RES_FRMATR_END-1>{} );
if(SfxItemState::SET == rSet.GetItemState( FN_TABLE_REP, false, &pItem ))
{
pRep = static_cast<SwTableRep*>(static_cast<const SwPtrItem*>(pItem)->GetValue());
@@ -474,9 +474,8 @@ void SwTableShell::Execute(SfxRequest &rReq)
// Create items, because we have to rework anyway.
SvxBoxItem aBox( RES_BOX );
SfxItemSet aCoreSet( GetPool(),
- RES_BOX, RES_BOX,
- SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER,
- 0);
+ svl::Items<RES_BOX, RES_BOX,
+ SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER>{});
SvxBoxInfoItem aCoreInfo( SID_ATTR_BORDER_INNER );
aCoreSet.Put(aCoreInfo);
rSh.GetTabBorders( aCoreSet );
@@ -641,14 +640,12 @@ void SwTableShell::Execute(SfxRequest &rReq)
SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)));
SvNumberFormatter* pFormatter = rSh.GetNumberFormatter();
SfxItemSet aCoreSet( GetPool(),
- SID_ATTR_NUMBERFORMAT_VALUE, SID_ATTR_NUMBERFORMAT_VALUE,
- SID_ATTR_NUMBERFORMAT_INFO, SID_ATTR_NUMBERFORMAT_INFO,
- 0 );
+ svl::Items<SID_ATTR_NUMBERFORMAT_VALUE, SID_ATTR_NUMBERFORMAT_VALUE,
+ SID_ATTR_NUMBERFORMAT_INFO, SID_ATTR_NUMBERFORMAT_INFO>{} );
SfxItemSet aBoxSet( *aCoreSet.GetPool(),
- RES_BOXATR_FORMAT, RES_BOXATR_FORMAT,
- RES_BOXATR_VALUE, RES_BOXATR_VALUE,
- 0 );
+ svl::Items<RES_BOXATR_FORMAT, RES_BOXATR_FORMAT,
+ RES_BOXATR_VALUE, RES_BOXATR_VALUE>{} );
rSh.GetTableBoxFormulaAttrs( aBoxSet );
SfxItemState eState = aBoxSet.GetItemState(RES_BOXATR_FORMAT);
@@ -695,7 +692,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
SID_ATTR_NUMBERFORMAT_VALUE, false, &pNumberFormatItem ))
{
SfxItemSet aBoxFormatSet( *aCoreSet.GetPool(),
- RES_BOXATR_FORMAT, RES_BOXATR_FORMAT );
+ svl::Items<RES_BOXATR_FORMAT, RES_BOXATR_FORMAT>{} );
aBoxFormatSet.Put( SwTableBoxNumFormat(
static_cast<const SfxUInt32Item*>(pNumberFormatItem)->GetValue() ));
rSh.SetTableBoxFormulaAttrs( aBoxFormatSet );
@@ -923,8 +920,8 @@ void SwTableShell::Execute(SfxRequest &rReq)
{
const SvxBoxInfoItem aBoxInfo(static_cast<const SvxBoxInfoItem&>(
aCoreSet.Get(SID_ATTR_BORDER_INNER)));
- SfxItemSet aSet( GetPool(), SID_ATTR_BORDER_INNER,
- SID_ATTR_BORDER_INNER, 0);
+ SfxItemSet aSet( GetPool(), svl::Items<SID_ATTR_BORDER_INNER,
+ SID_ATTR_BORDER_INNER>{});
aSet.Put( aBoxInfo );
ItemSetToTableParam( aSet, rSh );
rSh.EndUndo( nUndoId );
@@ -1139,8 +1136,8 @@ void SwTableShell::Execute(SfxRequest &rReq)
case SID_ATTR_LRSPACE:
if(pItem)
{
- SfxItemSet aSet( GetPool(), RES_LR_SPACE, RES_LR_SPACE,
- RES_HORI_ORIENT, RES_HORI_ORIENT, 0 );
+ SfxItemSet aSet( GetPool(), svl::Items<RES_LR_SPACE, RES_LR_SPACE,
+ RES_HORI_ORIENT, RES_HORI_ORIENT>{} );
SvxLRSpaceItem aLRSpace( *static_cast<const SvxLRSpaceItem*>(pItem) );
aLRSpace.SetWhich( RES_LR_SPACE );
aSet.Put( aLRSpace );
@@ -1174,7 +1171,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
if ( pItem )
{
SwFormatLayoutSplit aSplit( static_cast<const SvxFormatSplitItem*>(pItem)->GetValue());
- SfxItemSet aSet(GetPool(), RES_LAYOUT_SPLIT, RES_LAYOUT_SPLIT, 0 );
+ SfxItemSet aSet(GetPool(), svl::Items<RES_LAYOUT_SPLIT, RES_LAYOUT_SPLIT>{} );
aSet.Put(aSplit);
rSh.SetTableAttr(aSet);
}
@@ -1185,7 +1182,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
{
SvxFormatKeepItem aKeep( *static_cast<const SvxFormatKeepItem*>(pItem) );
aKeep.SetWhich( RES_KEEP );
- SfxItemSet aSet(GetPool(), RES_KEEP, RES_KEEP, 0 );
+ SfxItemSet aSet(GetPool(), svl::Items<RES_KEEP, RES_KEEP>{} );
aSet.Put(aKeep);
rSh.SetTableAttr(aSet);
}
@@ -1409,8 +1406,8 @@ SwTableShell::SwTableShell(SwView &_rView) :
void SwTableShell::GetFrameBorderState(SfxItemSet &rSet)
{
SfxItemSet aCoreSet( GetPool(),
- RES_BOX, RES_BOX,
- SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER, 0 );
+ svl::Items<RES_BOX, RES_BOX,
+ SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER>{} );
SvxBoxInfoItem aBoxInfo( SID_ATTR_BORDER_INNER );
aCoreSet.Put( aBoxInfo );
GetShell().GetTabBorders( aCoreSet );
@@ -1449,8 +1446,8 @@ void SwTableShell::ExecTableStyle(SfxRequest& rReq)
void SwTableShell::GetLineStyleState(SfxItemSet &rSet)
{
SfxItemSet aCoreSet( GetPool(),
- RES_BOX, RES_BOX,
- SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER, 0);
+ svl::Items<RES_BOX, RES_BOX,
+ SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER>{});
SvxBoxInfoItem aCoreInfo( SID_ATTR_BORDER_INNER );
aCoreSet.Put(aCoreInfo);
GetShell().GetTabBorders( aCoreSet );
@@ -1522,7 +1519,7 @@ void SwTableShell::ExecNumberFormat(SfxRequest& rReq)
if( NUMBERFORMAT_ENTRY_NOT_FOUND != nNumberFormat )
{
- SfxItemSet aBoxSet( GetPool(), RES_BOXATR_FORMAT, RES_BOXATR_FORMAT );
+ SfxItemSet aBoxSet( GetPool(), svl::Items<RES_BOXATR_FORMAT, RES_BOXATR_FORMAT>{} );
aBoxSet.Put( SwTableBoxNumFormat( nNumberFormat ));
rSh.SetTableBoxFormulaAttrs( aBoxSet );
}
diff --git a/sw/source/uibase/shells/textfld.cxx b/sw/source/uibase/shells/textfld.cxx
index 1fe73b0478ff..c8a963a0e7a9 100644
--- a/sw/source/uibase/shells/textfld.cxx
+++ b/sw/source/uibase/shells/textfld.cxx
@@ -903,7 +903,7 @@ void SwTextShell::InsertHyperlink(const SvxHyperlinkItem& rHlnkItem)
if( rSh.GetSelectionType() & SelectionType::Text )
{
rSh.StartAction();
- SfxItemSet aSet(GetPool(), RES_TXTATR_INETFMT, RES_TXTATR_INETFMT);
+ SfxItemSet aSet(GetPool(), svl::Items<RES_TXTATR_INETFMT, RES_TXTATR_INETFMT>{});
rSh.GetCurAttr( aSet );
const SfxPoolItem* pItem;
diff --git a/sw/source/uibase/shells/textidx.cxx b/sw/source/uibase/shells/textidx.cxx
index 259b381e7e14..3166b4a83b4a 100644
--- a/sw/source/uibase/shells/textidx.cxx
+++ b/sw/source/uibase/shells/textidx.cxx
@@ -106,13 +106,12 @@ void SwTextShell::ExecIdx(SfxRequest &rReq)
case FN_INSERT_MULTI_TOX:
{
SfxItemSet aSet(GetPool(),
- RES_COL, RES_COL,
+ svl::Items<RES_COL, RES_COL,
RES_BACKGROUND, RES_BACKGROUND,
RES_FRM_SIZE, RES_FRM_SIZE,
SID_ATTR_PAGE_SIZE, SID_ATTR_PAGE_SIZE,
RES_LR_SPACE, RES_LR_SPACE,
- FN_PARAM_TOX_TYPE, FN_PARAM_TOX_TYPE,
- 0 );
+ FN_PARAM_TOX_TYPE, FN_PARAM_TOX_TYPE>{} );
SwWrtShell& rSh = GetShell();
SwRect aRect;
rSh.CalcBoundRect(aRect, RndStdIds::FLY_AS_CHAR);
diff --git a/sw/source/uibase/shells/textsh.cxx b/sw/source/uibase/shells/textsh.cxx
index da3af66a4209..87bfca3b4d05 100644
--- a/sw/source/uibase/shells/textsh.cxx
+++ b/sw/source/uibase/shells/textsh.cxx
@@ -636,7 +636,7 @@ void SwTextShell::StateInsert( SfxItemSet &rSet )
case SID_HYPERLINK_GETLINK:
{
- SfxItemSet aSet(GetPool(), RES_TXTATR_INETFMT, RES_TXTATR_INETFMT);
+ SfxItemSet aSet(GetPool(), svl::Items<RES_TXTATR_INETFMT, RES_TXTATR_INETFMT>{});
rSh.GetCurAttr( aSet );
SvxHyperlinkItem aHLinkItem;
@@ -899,10 +899,9 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq )
}
SwWrtShell &rSh = GetShell();
- SfxItemSet aSet( GetPool(), RES_CHRATR_FONT, RES_CHRATR_FONT,
+ SfxItemSet aSet( GetPool(), svl::Items<RES_CHRATR_FONT, RES_CHRATR_FONT,
RES_CHRATR_CJK_FONT, RES_CHRATR_CJK_FONT,
- RES_CHRATR_CTL_FONT, RES_CHRATR_CTL_FONT,
- 0 );
+ RES_CHRATR_CTL_FONT, RES_CHRATR_CTL_FONT>{} );
rSh.GetCurAttr( aSet );
SvtScriptType nScript = rSh.GetScriptType();
@@ -999,9 +998,9 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq )
aNewFontItem.SetPitch( aNewFont.GetPitch());
aNewFontItem.SetCharSet( aNewFont.GetCharSet() );
- SfxItemSet aRestoreSet( GetPool(), RES_CHRATR_FONT, RES_CHRATR_FONT,
+ SfxItemSet aRestoreSet( GetPool(), svl::Items<RES_CHRATR_FONT, RES_CHRATR_FONT,
RES_CHRATR_CJK_FONT, RES_CHRATR_CJK_FONT,
- RES_CHRATR_CTL_FONT, RES_CHRATR_CTL_FONT, 0 );
+ RES_CHRATR_CTL_FONT, RES_CHRATR_CTL_FONT>{} );
nScript = g_pBreakIt->GetAllScriptsOfText( aChars );
if( SvtScriptType::LATIN & nScript )
diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx
index c5f284426d15..0d2cc4239296 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -126,7 +126,7 @@ void sw_CharDialog( SwWrtShell &rWrtSh, bool bUseDialog, sal_uInt16 nSlot,const
FieldUnit eMetric = ::GetDfltMetric(dynamic_cast<SwWebView*>( &rWrtSh.GetView()) != nullptr );
SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)));
SfxItemSet aCoreSet( rWrtSh.GetView().GetPool(),
- RES_CHRATR_BEGIN, RES_CHRATR_END-1,
+ svl::Items<RES_CHRATR_BEGIN, RES_CHRATR_END-1,
RES_TXTATR_INETFMT, RES_TXTATR_INETFMT,
RES_BACKGROUND, RES_BACKGROUND,
RES_BOX, RES_BOX,
@@ -134,8 +134,7 @@ void sw_CharDialog( SwWrtShell &rWrtSh, bool bUseDialog, sal_uInt16 nSlot,const
SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER,
FN_PARAM_SELECTION, FN_PARAM_SELECTION,
SID_HTML_MODE, SID_HTML_MODE,
- SID_ATTR_CHAR_WIDTH_FIT_TO_LINE, SID_ATTR_CHAR_WIDTH_FIT_TO_LINE,
- 0 );
+ SID_ATTR_CHAR_WIDTH_FIT_TO_LINE, SID_ATTR_CHAR_WIDTH_FIT_TO_LINE>{} );
rWrtSh.GetCurAttr( aCoreSet );
bool bSel = rWrtSh.HasSelection();
bool bSelectionPut = false;
@@ -359,10 +358,9 @@ void SwTextShell::Execute(SfxRequest &rReq)
const OUString aStrResetLangs("RESET_LANGUAGES");
SfxItemSet aCoreSet( GetPool(),
- RES_CHRATR_LANGUAGE, RES_CHRATR_LANGUAGE,
+ svl::Items<RES_CHRATR_LANGUAGE, RES_CHRATR_LANGUAGE,
RES_CHRATR_CJK_LANGUAGE, RES_CHRATR_CJK_LANGUAGE,
- RES_CHRATR_CTL_LANGUAGE, RES_CHRATR_CTL_LANGUAGE,
- 0 );
+ RES_CHRATR_CTL_LANGUAGE, RES_CHRATR_CTL_LANGUAGE>{} );
sal_Int32 nPos = 0;
bool bForSelection = true;
@@ -464,7 +462,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
if ( bFont )
{
rWrtSh.Left( CRSR_SKIP_CHARS, true, 1, false );
- SfxItemSet aSet( rWrtSh.GetAttrPool(), RES_CHRATR_FONT, RES_CHRATR_FONT );
+ SfxItemSet aSet( rWrtSh.GetAttrPool(), svl::Items<RES_CHRATR_FONT, RES_CHRATR_FONT>{} );
rWrtSh.GetCurAttr( aSet );
rWrtSh.SetAttrSet( aSet, SetAttrMode::DONTEXPAND );
rWrtSh.ResetSelect(nullptr, false);
@@ -782,7 +780,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
{
if( rWrtSh.IsCursorInTable() )
{
- SfxItemSet aSet( rWrtSh.GetAttrPool(), RES_BOXATR_FORMULA, RES_BOXATR_FORMULA );
+ SfxItemSet aSet( rWrtSh.GetAttrPool(), svl::Items<RES_BOXATR_FORMULA, RES_BOXATR_FORMULA>{} );
aSet.Put( SwTableBoxFormula( sFormula ));
rWrtSh.SetTableBoxFormulaAttrs( aSet );
rWrtSh.UpdateTable();
@@ -907,7 +905,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
SW_MOD()->PutItem(SfxBoolItem(SID_ATTR_APPLYCHARUNIT, bApplyCharUnit));
SfxItemSet aCoreSet( GetPool(), // sorted by indices, one group of three concatenated
- RES_PARATR_BEGIN, RES_PARATR_END - 1, // [60
+ svl::Items<RES_PARATR_BEGIN, RES_PARATR_END - 1, // [60
RES_PARATR_LIST_BEGIN, RES_PARATR_LIST_END - 1, // [77
RES_FRMATR_BEGIN, RES_FRMATR_END - 1, // [82
@@ -929,8 +927,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
SID_ATTR_PARA_PAGENUM, SID_ATTR_PARA_PAGENUM, // [10457
FN_PARAM_1, FN_PARAM_1, // [21160
FN_NUMBER_NEWSTART, FN_NUMBER_NEWSTART_AT, // [21738
- FN_DROP_TEXT, FN_DROP_CHAR_STYLE_NAME, // [22418
- 0);
+ FN_DROP_TEXT, FN_DROP_CHAR_STYLE_NAME>{});// [22418
// get also the list level indent values merged as LR-SPACE item, if needed.
rWrtSh.GetPaMAttr( pPaM, aCoreSet, true );
@@ -1211,7 +1208,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
rWrtSh.SetAttrItem( SvxBrushItem(RES_CHRATR_HIGHLIGHT) );
// Remove shading marker
- SfxItemSet aCoreSet( rWrtSh.GetView().GetPool(), RES_CHRATR_GRABBAG, RES_CHRATR_GRABBAG );
+ SfxItemSet aCoreSet( rWrtSh.GetView().GetPool(), svl::Items<RES_CHRATR_GRABBAG, RES_CHRATR_GRABBAG>{} );
rWrtSh.GetCurAttr( aCoreSet );
const SfxPoolItem *pTmpItem;
@@ -1311,8 +1308,8 @@ void SwTextShell::Execute(SfxRequest &rReq)
case FN_COPY_HYPERLINK_LOCATION:
{
SfxItemSet aSet(GetPool(),
- RES_TXTATR_INETFMT,
- RES_TXTATR_INETFMT);
+ svl::Items<RES_TXTATR_INETFMT,
+ RES_TXTATR_INETFMT>{});
rWrtSh.GetCurAttr(aSet);
if(SfxItemState::SET <= aSet.GetItemState( RES_TXTATR_INETFMT ))
{
@@ -1666,8 +1663,8 @@ void SwTextShell::GetState( SfxItemSet &rSet )
case FN_COPY_HYPERLINK_LOCATION:
{
SfxItemSet aSet(GetPool(),
- RES_TXTATR_INETFMT,
- RES_TXTATR_INETFMT);
+ svl::Items<RES_TXTATR_INETFMT,
+ RES_TXTATR_INETFMT>{});
rSh.GetCurAttr(aSet);
if(SfxItemState::SET > aSet.GetItemState( RES_TXTATR_INETFMT ) || rSh.HasReadonlySel())
{
@@ -1678,8 +1675,8 @@ void SwTextShell::GetState( SfxItemSet &rSet )
case FN_REMOVE_HYPERLINK:
{
SfxItemSet aSet(GetPool(),
- RES_TXTATR_INETFMT,
- RES_TXTATR_INETFMT);
+ svl::Items<RES_TXTATR_INETFMT,
+ RES_TXTATR_INETFMT>{});
rSh.GetCurAttr(aSet);
// If a hyperlink is selected, either alone or along with other text...
@@ -1721,8 +1718,8 @@ void SwTextShell::GetState( SfxItemSet &rSet )
case SID_OPEN_HYPERLINK:
{
SfxItemSet aSet(GetPool(),
- RES_TXTATR_INETFMT,
- RES_TXTATR_INETFMT);
+ svl::Items<RES_TXTATR_INETFMT,
+ RES_TXTATR_INETFMT>{});
rSh.GetCurAttr(aSet);
if(SfxItemState::SET > aSet.GetItemState( RES_TXTATR_INETFMT, false ))
rSet.DisableItem(nWhich);
diff --git a/sw/source/uibase/shells/txtattr.cxx b/sw/source/uibase/shells/txtattr.cxx
index a2313ff8bca3..647a733d93cd 100644
--- a/sw/source/uibase/shells/txtattr.cxx
+++ b/sw/source/uibase/shells/txtattr.cxx
@@ -78,7 +78,7 @@ void SwTextShell::ExecCharAttr(SfxRequest &rReq)
Get( nWhich )).GetValue() ? STATE_ON : STATE_OFF;
}
- SfxItemSet aSet( GetPool(), RES_CHRATR_BEGIN, RES_CHRATR_END-1 );
+ SfxItemSet aSet( GetPool(), svl::Items<RES_CHRATR_BEGIN, RES_CHRATR_END-1>{} );
if (STATE_TOGGLE == eState)
rSh.GetCurAttr( aSet );
@@ -312,9 +312,8 @@ void SwTextShell::ExecParaAttr(SfxRequest &rReq)
// Get both attributes immediately isn't more expensive!!
SfxItemSet aSet( GetPool(),
- RES_PARATR_LINESPACING, RES_PARATR_ADJUST,
- RES_FRAMEDIR, RES_FRAMEDIR,
- 0 );
+ svl::Items<RES_PARATR_LINESPACING, RES_PARATR_ADJUST,
+ RES_FRAMEDIR, RES_FRAMEDIR>{} );
sal_uInt16 nSlot = rReq.GetSlot();
switch (nSlot)
@@ -375,7 +374,7 @@ SET_LINESPACE:
case SID_ATTR_PARA_RIGHT_TO_LEFT :
{
SfxItemSet aAdjustSet( GetPool(),
- RES_PARATR_ADJUST, RES_PARATR_ADJUST );
+ svl::Items<RES_PARATR_ADJUST, RES_PARATR_ADJUST>{} );
GetShell().GetCurAttr(aAdjustSet);
bool bChgAdjust = false;
SfxItemState eAdjustState = aAdjustSet.GetItemState(RES_PARATR_ADJUST, false);
@@ -460,7 +459,7 @@ void SwTextShell::ExecParaAttrArgs(SfxRequest &rReq)
if( pItem )
{
OUString sCharStyleName = static_cast<const SfxStringItem*>(pItem)->GetValue();
- SfxItemSet aSet(GetPool(), RES_PARATR_DROP, RES_PARATR_DROP, 0L);
+ SfxItemSet aSet(GetPool(), svl::Items<RES_PARATR_DROP, RES_PARATR_DROP>{});
rSh.GetCurAttr(aSet);
SwFormatDrop aDropItem(static_cast<const SwFormatDrop&>(aSet.Get(RES_PARATR_DROP)));
SwCharFormat* pFormat = nullptr;
@@ -480,8 +479,8 @@ void SwTextShell::ExecParaAttrArgs(SfxRequest &rReq)
}
else
{
- SfxItemSet aSet(GetPool(), RES_PARATR_DROP, RES_PARATR_DROP,
- HINT_END, HINT_END, 0);
+ SfxItemSet aSet(GetPool(), svl::Items<RES_PARATR_DROP, RES_PARATR_DROP,
+ HINT_END, HINT_END>{});
rSh.GetCurAttr(aSet);
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
@@ -518,8 +517,8 @@ void SwTextShell::ExecParaAttrArgs(SfxRequest &rReq)
if(pItem)
{
SfxItemSet aCoreSet( GetPool(),
- RES_PAGEDESC, RES_PAGEDESC,
- SID_ATTR_PARA_MODEL, SID_ATTR_PARA_MODEL, 0);
+ svl::Items<RES_PAGEDESC, RES_PAGEDESC,
+ SID_ATTR_PARA_MODEL, SID_ATTR_PARA_MODEL>{});
aCoreSet.Put(*pItem);
SfxToSwPageDescAttr( rSh, aCoreSet);
rSh.SetAttrSet(aCoreSet);
@@ -787,9 +786,8 @@ void SwTextShell::GetAttrState(SfxItemSet &rSet)
case SID_ATTR_PARA_MODEL:
{
SfxItemSet aTemp(GetPool(),
- RES_PAGEDESC,RES_PAGEDESC,
- SID_ATTR_PARA_MODEL,SID_ATTR_PARA_MODEL,
- 0L);
+ svl::Items<RES_PAGEDESC,RES_PAGEDESC,
+ SID_ATTR_PARA_MODEL,SID_ATTR_PARA_MODEL>{});
aTemp.Put(aCoreSet);
::SwToSfxPageDescAttr(aTemp);
rSet.Put(aTemp.Get(SID_ATTR_PARA_MODEL));
@@ -798,7 +796,7 @@ void SwTextShell::GetAttrState(SfxItemSet &rSet)
break;
case RES_TXTATR_INETFMT:
{
- SfxItemSet aSet(GetPool(), RES_TXTATR_INETFMT, RES_TXTATR_INETFMT);
+ SfxItemSet aSet(GetPool(), svl::Items<RES_TXTATR_INETFMT, RES_TXTATR_INETFMT>{});
rSh.GetCurAttr(aSet);
const SfxPoolItem& rItem = aSet.Get(RES_TXTATR_INETFMT);
rSet.Put(rItem);
diff --git a/sw/source/uibase/shells/txtnum.cxx b/sw/source/uibase/shells/txtnum.cxx
index 2e19f7816ac7..a435c410e7a4 100644
--- a/sw/source/uibase/shells/txtnum.cxx
+++ b/sw/source/uibase/shells/txtnum.cxx
@@ -112,9 +112,8 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
case SID_OUTLINE_BULLET:
{
SfxItemSet aSet( GetPool(),
- SID_HTML_MODE, SID_HTML_MODE,
- SID_ATTR_NUMBERING_RULE, SID_PARAM_CUR_NUM_LEVEL,
- 0 );
+ svl::Items<SID_HTML_MODE, SID_HTML_MODE,
+ SID_ATTR_NUMBERING_RULE, SID_PARAM_CUR_NUM_LEVEL>{} );
SwDocShell* pDocSh = GetView().GetDocShell();
const bool bHtml = dynamic_cast<SwWebDocShell*>( pDocSh ) != nullptr;
const SwNumRule* pNumRuleAtCurrentSelection = GetShell().GetNumRuleAtCurrentSelection();
diff --git a/sw/source/uibase/uiview/formatclipboard.cxx b/sw/source/uibase/uiview/formatclipboard.cxx
index 6fe524d0fdb8..728d4f28df59 100644
--- a/sw/source/uibase/uiview/formatclipboard.cxx
+++ b/sw/source/uibase/uiview/formatclipboard.cxx
@@ -55,7 +55,7 @@ RES_COL, RES_KEEP, \
/* no RES_URL */ \
RES_EDIT_IN_READONLY, RES_LAYOUT_SPLIT, \
/* no RES_CHAIN */ \
-RES_TEXTGRID, RES_FRMATR_END-1,
+RES_TEXTGRID, RES_FRMATR_END-1
#define FORMAT_PAINTBRUSH_PARAGRAPH_IDS \
RES_PARATR_BEGIN, RES_PARATR_END -1, \
@@ -68,8 +68,7 @@ std::unique_ptr<SfxItemSet> lcl_CreateEmptyItemSet( SelectionType nSelectionType
if( nSelectionType & (SelectionType::Frame | SelectionType::Ole | SelectionType::Graphic) )
{
pItemSet = o3tl::make_unique<SfxItemSet>(rPool,
- FORMAT_PAINTBRUSH_FRAME_IDS
- 0);
+ svl::Items<FORMAT_PAINTBRUSH_FRAME_IDS>{});
}
else if( nSelectionType & SelectionType::DrawObject )
{
@@ -79,13 +78,11 @@ std::unique_ptr<SfxItemSet> lcl_CreateEmptyItemSet( SelectionType nSelectionType
{
if( bNoParagraphFormats )
pItemSet = o3tl::make_unique<SfxItemSet>(rPool,
- RES_CHRATR_BEGIN, RES_CHRATR_END - 1,
- 0);
+ svl::Items<RES_CHRATR_BEGIN, RES_CHRATR_END - 1>{});
else
pItemSet = o3tl::make_unique<SfxItemSet>(rPool,
- RES_CHRATR_BEGIN, RES_CHRATR_END - 1,
- FORMAT_PAINTBRUSH_PARAGRAPH_IDS
- 0);
+ svl::Items<RES_CHRATR_BEGIN, RES_CHRATR_END - 1,
+ FORMAT_PAINTBRUSH_PARAGRAPH_IDS>{});
}
return pItemSet;
}
@@ -376,7 +373,7 @@ void SwFormatClipboard::Copy( SwWrtShell& rWrtShell, SfxItemPool& rPool, bool bP
if( nSelectionType & SelectionType::TableCell )//only copy table attributes if really cells are selected (not only text in tables)
{
m_pTableItemSet = o3tl::make_unique<SfxItemSet>(rPool,
- SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_SHADOW, //SID_ATTR_BORDER_OUTER is inbetween
+ svl::Items<SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_SHADOW, //SID_ATTR_BORDER_OUTER is inbetween
RES_BACKGROUND, RES_SHADOW, //RES_BOX is inbetween
SID_ATTR_BRUSH_ROW, SID_ATTR_BRUSH_TABLE,
RES_BREAK, RES_BREAK,
@@ -387,8 +384,7 @@ void SwFormatClipboard::Copy( SwWrtShell& rWrtShell, SfxItemPool& rPool, bool bP
RES_FRAMEDIR, RES_FRAMEDIR,
FN_PARAM_TABLE_HEADLINE, FN_PARAM_TABLE_HEADLINE,
FN_TABLE_BOX_TEXTORIENTATION, FN_TABLE_BOX_TEXTORIENTATION,
- FN_TABLE_SET_VERT_ALIGN, FN_TABLE_SET_VERT_ALIGN,
- 0);
+ FN_TABLE_SET_VERT_ALIGN, FN_TABLE_SET_VERT_ALIGN>{});
lcl_getTableAttributes( *m_pTableItemSet, rWrtShell );
}
diff --git a/sw/source/uibase/uiview/pview.cxx b/sw/source/uibase/uiview/pview.cxx
index 7d1ed4da0564..2455df3c9c0e 100644
--- a/sw/source/uibase/uiview/pview.cxx
+++ b/sw/source/uibase/uiview/pview.cxx
@@ -761,7 +761,7 @@ void SwPagePreview::Execute( SfxRequest &rReq )
ScopedVclPtr<AbstractSvxZoomDialog> pDlg;
if(!pArgs)
{
- SfxItemSet aCoreSet(GetPool(), SID_ATTR_ZOOM, SID_ATTR_ZOOM);
+ SfxItemSet aCoreSet(GetPool(), svl::Items<SID_ATTR_ZOOM, SID_ATTR_ZOOM>{});
const SwViewOption* pVOpt = GetViewShell()->GetViewOptions();
SvxZoomItem aZoom( pVOpt->GetZoomType(), pVOpt->GetZoom() );
aZoom.SetValueSet(
@@ -1077,7 +1077,7 @@ void SwPagePreview::GetState( SfxItemSet& rSet )
// has the same status like the normal printing
{
const SfxPoolItem* pItem;
- SfxItemSet aSet( *rSet.GetPool(), SID_PRINTDOC, SID_PRINTDOC );
+ SfxItemSet aSet( *rSet.GetPool(), svl::Items<SID_PRINTDOC, SID_PRINTDOC>{} );
GetSlotState( SID_PRINTDOC, SfxViewShell::GetInterface(), &aSet );
if( SfxItemState::DISABLED == aSet.GetItemState( SID_PRINTDOC,
false, &pItem ))
diff --git a/sw/source/uibase/uiview/view0.cxx b/sw/source/uibase/uiview/view0.cxx
index 5a6f8ef17681..f6d6bdee9494 100644
--- a/sw/source/uibase/uiview/view0.cxx
+++ b/sw/source/uibase/uiview/view0.cxx
@@ -603,7 +603,7 @@ void SwView::ExecFormatFootnote()
void SwView::ExecNumberingOutline(SfxItemPool & rPool)
{
- SfxItemSet aTmp(rPool, FN_PARAM_1, FN_PARAM_1);
+ SfxItemSet aTmp(rPool, svl::Items<FN_PARAM_1, FN_PARAM_1>{});
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialog creation failed!");
ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateSwTabDialog( DLG_TAB_OUTLINE,
diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx
index 117dd7fbd969..1fc001e2830d 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -1524,7 +1524,7 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
if(!pNumRule->IsAutoRule())
{
SfxItemSet aSet(GetPool(),
- RES_PARATR_NUMRULE, RES_PARATR_NUMRULE);
+ svl::Items<RES_PARATR_NUMRULE, RES_PARATR_NUMRULE>{});
rShell.GetCurAttr(aSet);
if(SfxItemState::DEFAULT <=
aSet.GetItemState(RES_PARATR_NUMRULE))
@@ -1662,7 +1662,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
else
{
const SwViewOption& rViewOptions = *rSh.GetViewOptions();
- SfxItemSet aCoreSet(m_pShell->GetPool(), SID_ATTR_ZOOM, SID_ATTR_ZOOM, SID_ATTR_VIEWLAYOUT, SID_ATTR_VIEWLAYOUT, 0 );
+ SfxItemSet aCoreSet(m_pShell->GetPool(), svl::Items<SID_ATTR_ZOOM, SID_ATTR_ZOOM, SID_ATTR_VIEWLAYOUT, SID_ATTR_VIEWLAYOUT>{} );
SvxZoomItem aZoom( rViewOptions.GetZoomType(), rViewOptions.GetZoom() );
const bool bBrowseMode = rSh.GetViewOptions()->getBrowseMode();
diff --git a/sw/source/uibase/uiview/viewdraw.cxx b/sw/source/uibase/uiview/viewdraw.cxx
index 67a827b1f231..d639a566bd54 100644
--- a/sw/source/uibase/uiview/viewdraw.cxx
+++ b/sw/source/uibase/uiview/viewdraw.cxx
@@ -752,7 +752,7 @@ bool SwView::IsDrawTextHyphenate()
bool bHyphenate = false;
SfxItemSet aNewAttr( pSdrView->GetModel()->GetItemPool(),
- EE_PARA_HYPHENATE, EE_PARA_HYPHENATE );
+ svl::Items<EE_PARA_HYPHENATE, EE_PARA_HYPHENATE>{} );
if( pSdrView->GetAttributes( aNewAttr ) &&
aNewAttr.GetItemState( EE_PARA_HYPHENATE ) >= SfxItemState::DEFAULT )
bHyphenate = static_cast<const SfxBoolItem&>(aNewAttr.Get( EE_PARA_HYPHENATE )).
@@ -766,7 +766,7 @@ void SwView::HyphenateDrawText()
SdrView *pSdrView = m_pWrtShell->GetDrawView();
bool bHyphenate = IsDrawTextHyphenate();
- SfxItemSet aSet( GetPool(), EE_PARA_HYPHENATE, EE_PARA_HYPHENATE );
+ SfxItemSet aSet( GetPool(), svl::Items<EE_PARA_HYPHENATE, EE_PARA_HYPHENATE>{} );
aSet.Put( SfxBoolItem( EE_PARA_HYPHENATE, !bHyphenate ) );
pSdrView->SetAttributes( aSet );
GetViewFrame()->GetBindings().Invalidate(FN_HYPHENATE_OPT_DLG);
diff --git a/sw/source/uibase/uiview/viewprt.cxx b/sw/source/uibase/uiview/viewprt.cxx
index 448f192377bd..6a6f005bb413 100644
--- a/sw/source/uibase/uiview/viewprt.cxx
+++ b/sw/source/uibase/uiview/viewprt.cxx
@@ -314,11 +314,10 @@ void SetAppPrintOptions( SwViewShell* pSh, bool bWeb )
// Close application own printing options in SfxPrinter.
SwAddPrinterItem aAddPrinterItem(aPrtData);
SfxItemSet aSet( pSh->GetAttrPool(),
- FN_PARAM_ADDPRINTER, FN_PARAM_ADDPRINTER,
+ svl::Items<FN_PARAM_ADDPRINTER, FN_PARAM_ADDPRINTER,
SID_HTML_MODE, SID_HTML_MODE,
SID_PRINTER_NOTFOUND_WARN, SID_PRINTER_NOTFOUND_WARN,
- SID_PRINTER_CHANGESTODOC, SID_PRINTER_CHANGESTODOC,
- 0 );
+ SID_PRINTER_CHANGESTODOC, SID_PRINTER_CHANGESTODOC>{} );
utl::MiscCfg aMisc;
diff --git a/sw/source/uibase/uiview/viewtab.cxx b/sw/source/uibase/uiview/viewtab.cxx
index 60903b74a50c..cd38970c6bd9 100644
--- a/sw/source/uibase/uiview/viewtab.cxx
+++ b/sw/source/uibase/uiview/viewtab.cxx
@@ -279,9 +279,9 @@ void SwView::ExecTabWin( SfxRequest& rReq )
rRect.Right() - rPageRect.Right() + aLongLR.GetRight() :
rPageRect.Left() + aLongLR.GetLeft() - rRect.Left();
- SfxItemSet aSet( GetPool(), RES_FRM_SIZE, RES_FRM_SIZE,
+ SfxItemSet aSet( GetPool(), svl::Items<RES_FRM_SIZE, RES_FRM_SIZE,
RES_VERT_ORIENT, RES_HORI_ORIENT,
- RES_COL, RES_COL, 0 );
+ RES_COL, RES_COL>{} );
if(bVerticalFrame)
{
@@ -372,7 +372,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
SvxLRSpaceItem aLRTmp = pSectFormat->GetLRSpace();
aLRTmp.SetLeft(aLRTmp.GetLeft() + nLeftDiff);
aLRTmp.SetRight(aLRTmp.GetRight() + nRightDiff);
- SfxItemSet aSet(rSh.GetAttrPool(), RES_LR_SPACE, RES_LR_SPACE, RES_COL, RES_COL, 0L);
+ SfxItemSet aSet(rSh.GetAttrPool(), svl::Items<RES_LR_SPACE, RES_LR_SPACE, RES_COL, RES_COL>{});
aSet.Put(aLRTmp);
//change the first/last column
if(bSect)
@@ -428,8 +428,8 @@ void SwView::ExecTabWin( SfxRequest& rReq )
const long nDeltaY = rPageRect.Top() + aLongULSpace.GetUpper() - rRect.Top();
const long nHeight = nPageHeight - (aLongULSpace.GetUpper() + aLongULSpace.GetLower());
- SfxItemSet aSet( GetPool(), RES_FRM_SIZE, RES_FRM_SIZE,
- RES_VERT_ORIENT, RES_HORI_ORIENT, 0 );
+ SfxItemSet aSet( GetPool(), svl::Items<RES_FRM_SIZE, RES_FRM_SIZE,
+ RES_VERT_ORIENT, RES_HORI_ORIENT>{} );
//which of the orientation attributes is to be put depends on the frame's environment
bool bRTL;
bool bVertL2R;
@@ -485,7 +485,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
SvxLRSpaceItem aLR = pSectFormat->GetLRSpace();
aLR.SetLeft(aLR.GetLeft() + nLeftDiff);
aLR.SetRight(aLR.GetRight() + nRightDiff);
- SfxItemSet aSet(rSh.GetAttrPool(), RES_LR_SPACE, RES_LR_SPACE, RES_COL, RES_COL, 0L);
+ SfxItemSet aSet(rSh.GetAttrPool(), svl::Items<RES_LR_SPACE, RES_LR_SPACE, RES_COL, RES_COL>{});
aSet.Put(aLR);
//change the first/last column
if(bSect)
@@ -627,7 +627,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
static_cast<const SvxTabStopItem&>(rSh.GetDefault(RES_PARATR_TABSTOP));
// Default tab at pos 0
- SfxItemSet aSet( GetPool(), RES_LR_SPACE, RES_LR_SPACE );
+ SfxItemSet aSet( GetPool(), svl::Items<RES_LR_SPACE, RES_LR_SPACE>{} );
rSh.GetCurAttr( aSet );
const SvxLRSpaceItem& rLR = static_cast<const SvxLRSpaceItem&>(aSet.Get(RES_LR_SPACE));
@@ -643,7 +643,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
SwTextFormatColl* pColl = rSh.GetCurTextFormatColl();
if( pColl && pColl->IsAutoUpdateFormat() )
{
- SfxItemSet aTmp(GetPool(), RES_PARATR_TABSTOP, RES_PARATR_TABSTOP);
+ SfxItemSet aTmp(GetPool(), svl::Items<RES_PARATR_TABSTOP, RES_PARATR_TABSTOP>{});
aTmp.Put(aTabStops);
rSh.AutoUpdatePara( pColl, aTmp );
}
@@ -654,7 +654,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
case SID_HANGING_INDENT:
{
- SfxItemSet aLRSpaceSet( GetPool(), RES_LR_SPACE, RES_LR_SPACE );
+ SfxItemSet aLRSpaceSet( GetPool(), svl::Items<RES_LR_SPACE, RES_LR_SPACE>{} );
rSh.GetCurAttr( aLRSpaceSet );
SvxLRSpaceItem aParaMargin( static_cast<const SvxLRSpaceItem&>( aLRSpaceSet.Get( RES_LR_SPACE ) ) );
@@ -684,7 +684,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
{
// --> #i42922# Mouse move of numbering label
// has to consider the left indent of the paragraph
- SfxItemSet aSet( GetPool(), RES_LR_SPACE, RES_LR_SPACE );
+ SfxItemSet aSet( GetPool(), svl::Items<RES_LR_SPACE, RES_LR_SPACE>{} );
rSh.GetCurAttr( aSet );
const SvxLRSpaceItem& rLR =
static_cast<const SvxLRSpaceItem&>(aSet.Get(RES_LR_SPACE));
@@ -698,7 +698,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
}
else if( pColl && pColl->IsAutoUpdateFormat() )
{
- SfxItemSet aSet(GetPool(), RES_LR_SPACE, RES_LR_SPACE);
+ SfxItemSet aSet(GetPool(), svl::Items<RES_LR_SPACE, RES_LR_SPACE>{});
aSet.Put(aParaMargin);
rSh.AutoUpdatePara( pColl, aSet);
}
@@ -707,7 +707,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
if ( aParaMargin.GetTextFirstLineOfst() < 0 )
{
- SfxItemSet aSet( GetPool(), RES_PARATR_TABSTOP, RES_PARATR_TABSTOP );
+ SfxItemSet aSet( GetPool(), svl::Items<RES_PARATR_TABSTOP, RES_PARATR_TABSTOP>{} );
rSh.GetCurAttr( aSet );
const SvxTabStopItem& rTabStops = static_cast<const SvxTabStopItem&>(aSet.Get(RES_PARATR_TABSTOP));
@@ -736,7 +736,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
if( pColl && pColl->IsAutoUpdateFormat())
{
- SfxItemSet aSetTmp(GetPool(), RES_PARATR_TABSTOP, RES_PARATR_TABSTOP);
+ SfxItemSet aSetTmp(GetPool(), svl::Items<RES_PARATR_TABSTOP, RES_PARATR_TABSTOP>{});
aSetTmp.Put(aTabStops);
rSh.AutoUpdatePara( pColl, aSetTmp );
}
@@ -761,7 +761,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
SwTextFormatColl* pColl = rSh.GetCurTextFormatColl();
if( pColl && pColl->IsAutoUpdateFormat() )
{
- SfxItemSet aSet(GetPool(), RES_UL_SPACE, RES_UL_SPACE);
+ SfxItemSet aSet(GetPool(), svl::Items<RES_UL_SPACE, RES_UL_SPACE>{});
aSet.Put(aParaMargin);
rSh.AutoUpdatePara( pColl, aSet);
}
@@ -772,7 +772,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
case SID_PARASPACE_INCREASE:
case SID_PARASPACE_DECREASE:
{
- SfxItemSet aULSpaceSet( GetPool(), RES_UL_SPACE, RES_UL_SPACE );
+ SfxItemSet aULSpaceSet( GetPool(), svl::Items<RES_UL_SPACE, RES_UL_SPACE>{} );
rSh.GetCurAttr( aULSpaceSet );
SvxULSpaceItem aULSpace(
static_cast< const SvxULSpaceItem& >( aULSpaceSet.Get( RES_UL_SPACE ) ) );
@@ -877,7 +877,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
if ( bFrameSelection || nFrameType & FrameTypeFlags::FLY_ANY || bSect)
{
SwSectionFormat *pSectFormat = nullptr;
- SfxItemSet aSet( GetPool(), RES_COL, RES_COL );
+ SfxItemSet aSet( GetPool(), svl::Items<RES_COL, RES_COL>{} );
if(bSect)
{
SwSection *pSect = rSh.GetAnySection();
@@ -1216,8 +1216,8 @@ void SwView::StateTabWin(SfxItemSet& rSet)
SvxLRSpaceItem aPageLRSpace( rDesc.GetMaster().GetLRSpace() );
SwapPageMargin( rDesc, aPageLRSpace );
- SfxItemSet aCoreSet( GetPool(), RES_PARATR_TABSTOP, RES_PARATR_TABSTOP,
- RES_LR_SPACE, RES_UL_SPACE, 0 );
+ SfxItemSet aCoreSet( GetPool(), svl::Items<RES_PARATR_TABSTOP, RES_PARATR_TABSTOP,
+ RES_LR_SPACE, RES_UL_SPACE>{} );
// get also the list level indent values merged as LR-SPACE item, if needed.
rSh.GetCurAttr( aCoreSet, true );
const SelectionType nSelType = rSh.GetSelectionType();
@@ -1548,7 +1548,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
aDistLR.SetRight(rBox.GetDistance(SvxBoxItemLine::RIGHT));
//add the paragraph border distance
- SfxItemSet aCoreSet1( GetPool(), RES_BOX, RES_BOX );
+ SfxItemSet aCoreSet1( GetPool(), svl::Items<RES_BOX, RES_BOX>{} );
rSh.GetCurAttr( aCoreSet1 );
const SvxBoxItem& rParaBox = static_cast<const SvxBoxItem&>(aCoreSet1.Get(RES_BOX));
aDistLR.SetLeft(aDistLR.GetLeft() + rParaBox.GetDistance(SvxBoxItemLine::LEFT));
@@ -1563,8 +1563,8 @@ void SwView::StateTabWin(SfxItemSet& rSet)
!(nFrameType & FrameTypeFlags::COLSECT ) ) )
{
SfxItemSet aCoreSet2( GetPool(),
- RES_BOX, RES_BOX,
- SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER, 0 );
+ svl::Items<RES_BOX, RES_BOX,
+ SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER>{} );
SvxBoxInfoItem aBoxInfo( SID_ATTR_BORDER_INNER );
aBoxInfo.SetTable(false);
aBoxInfo.SetDist(true);
@@ -1575,7 +1575,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
aDistLR.SetRight(rBox.GetDistance(SvxBoxItemLine::RIGHT));
//add the border distance of the paragraph
- SfxItemSet aCoreSet1( GetPool(), RES_BOX, RES_BOX );
+ SfxItemSet aCoreSet1( GetPool(), svl::Items<RES_BOX, RES_BOX>{} );
rSh.GetCurAttr( aCoreSet1 );
const SvxBoxItem& rParaBox = static_cast<const SvxBoxItem&>(aCoreSet1.Get(RES_BOX));
aDistLR.SetLeft(aDistLR.GetLeft() + rParaBox.GetDistance(SvxBoxItemLine::LEFT));
@@ -1615,7 +1615,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
}
//add the border distance of the paragraph
- SfxItemSet aCoreSetTmp( GetPool(), RES_BOX, RES_BOX );
+ SfxItemSet aCoreSetTmp( GetPool(), svl::Items<RES_BOX, RES_BOX>{} );
rSh.GetCurAttr( aCoreSetTmp );
const SvxBoxItem& rParaBox = static_cast<const SvxBoxItem&>(aCoreSetTmp.Get(RES_BOX));
aDistLR.SetLeft(aDistLR.GetLeft() + rParaBox.GetDistance(SvxBoxItemLine::LEFT));
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
index 755d2497cf1d..73d89980092d 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -764,15 +764,13 @@ sal_Int32 SwXTextDocument::replaceAll(const Reference< util::XSearchDescriptor >
if(pSearch->HasSearchAttributes()||pSearch->HasReplaceAttributes())
{
SfxItemSet aSearch(pDocShell->GetDoc()->GetAttrPool(),
- RES_CHRATR_BEGIN, RES_CHRATR_END-1,
+ svl::Items<RES_CHRATR_BEGIN, RES_CHRATR_END-1,
RES_PARATR_BEGIN, RES_PARATR_END-1,
- RES_FRMATR_BEGIN, RES_FRMATR_END-1,
- 0);
+ RES_FRMATR_BEGIN, RES_FRMATR_END-1>{});
SfxItemSet aReplace(pDocShell->GetDoc()->GetAttrPool(),
- RES_CHRATR_BEGIN, RES_CHRATR_END-1,
+ svl::Items<RES_CHRATR_BEGIN, RES_CHRATR_END-1,
RES_PARATR_BEGIN, RES_PARATR_END-1,
- RES_FRMATR_BEGIN, RES_FRMATR_END-1,
- 0);
+ RES_FRMATR_BEGIN, RES_FRMATR_END-1>{});
pSearch->FillSearchItemSet(aSearch);
pSearch->FillReplaceItemSet(aReplace);
bool bCancel;
@@ -898,11 +896,10 @@ SwUnoCursor* SwXTextDocument::FindAny(const Reference< util::XSearchDescriptor >
if(pSearch->HasSearchAttributes())
{
SfxItemSet aSearch(pDocShell->GetDoc()->GetAttrPool(),
- RES_CHRATR_BEGIN, RES_CHRATR_END-1,
+ svl::Items<RES_CHRATR_BEGIN, RES_CHRATR_END-1,
RES_PARATR_BEGIN, RES_PARATR_END-1,
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
- RES_TXTATR_INETFMT, RES_TXTATR_CHARFMT,
- 0);
+ RES_TXTATR_INETFMT, RES_TXTATR_CHARFMT>{});
pSearch->FillSearchItemSet(aSearch);
bool bCancel;
nResult = (sal_Int32)pUnoCursor->Find( aSearch, !pSearch->m_bStyles,
diff --git a/sw/source/uibase/utlui/glbltree.cxx b/sw/source/uibase/utlui/glbltree.cxx
index a3095d534d74..9def934ce64f 100644
--- a/sw/source/uibase/utlui/glbltree.cxx
+++ b/sw/source/uibase/utlui/glbltree.cxx
@@ -866,13 +866,12 @@ void SwGlobalTree::ExecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry )
if(pContCopy)
{
SfxItemSet aSet(m_pActiveShell->GetView().GetPool(),
- RES_COL, RES_COL,
+ svl::Items<RES_COL, RES_COL,
RES_BACKGROUND, RES_BACKGROUND,
RES_FRM_SIZE, RES_FRM_SIZE,
SID_ATTR_PAGE_SIZE, SID_ATTR_PAGE_SIZE,
RES_LR_SPACE, RES_LR_SPACE,
- FN_PARAM_TOX_TYPE, FN_PARAM_TOX_TYPE,
- 0);
+ FN_PARAM_TOX_TYPE, FN_PARAM_TOX_TYPE>{});
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
assert(pFact && "Dialog creation failed!");
diff --git a/sw/source/uibase/utlui/numfmtlb.cxx b/sw/source/uibase/utlui/numfmtlb.cxx
index 3ce361976004..a8d1348f5af0 100644
--- a/sw/source/uibase/utlui/numfmtlb.cxx
+++ b/sw/source/uibase/utlui/numfmtlb.cxx
@@ -370,12 +370,11 @@ IMPL_LINK( NumFormatListBox, SelectHdl, ListBox&, rBox, void )
SvNumberFormatter* pFormatter = rSh.GetNumberFormatter();
SfxItemSet aCoreSet( rSh.GetAttrPool(),
- SID_ATTR_NUMBERFORMAT_VALUE, SID_ATTR_NUMBERFORMAT_VALUE,
+ svl::Items<SID_ATTR_NUMBERFORMAT_VALUE, SID_ATTR_NUMBERFORMAT_VALUE,
SID_ATTR_NUMBERFORMAT_INFO, SID_ATTR_NUMBERFORMAT_INFO,
SID_ATTR_NUMBERFORMAT_ONE_AREA, SID_ATTR_NUMBERFORMAT_ONE_AREA,
SID_ATTR_NUMBERFORMAT_NOLANGUAGE, SID_ATTR_NUMBERFORMAT_NOLANGUAGE,
- SID_ATTR_NUMBERFORMAT_ADD_AUTO, SID_ATTR_NUMBERFORMAT_ADD_AUTO,
- 0 );
+ SID_ATTR_NUMBERFORMAT_ADD_AUTO, SID_ATTR_NUMBERFORMAT_ADD_AUTO>{} );
double fValue = GetDefValue( nCurrFormatType);
diff --git a/sw/source/uibase/utlui/uitool.cxx b/sw/source/uibase/utlui/uitool.cxx
index 45afe60c1520..6cafada3d10d 100644
--- a/sw/source/uibase/utlui/uitool.cxx
+++ b/sw/source/uibase/utlui/uitool.cxx
@@ -465,7 +465,7 @@ void PageDescToItemSet( const SwPageDesc& rPageDesc, SfxItemSet& rSet)
// HeaderInfo, margins, background, border
SfxItemSet aHeaderSet(*rSet.GetPool(),
- RES_FRMATR_BEGIN,RES_FRMATR_END - 1, // [82
+ svl::Items<RES_FRMATR_BEGIN,RES_FRMATR_END - 1, // [82
// FillAttribute support
XATTR_FILL_FIRST, XATTR_FILL_LAST, // [1014
@@ -473,8 +473,7 @@ void PageDescToItemSet( const SwPageDesc& rPageDesc, SfxItemSet& rSet)
SID_ATTR_BORDER_INNER,SID_ATTR_BORDER_INNER, // [10023
SID_ATTR_PAGE_SIZE,SID_ATTR_PAGE_SIZE, // [10051
SID_ATTR_PAGE_ON,SID_ATTR_PAGE_SHARED, // [10060
- SID_ATTR_PAGE_SHARED_FIRST,SID_ATTR_PAGE_SHARED_FIRST,
- 0, 0);
+ SID_ATTR_PAGE_SHARED_FIRST,SID_ATTR_PAGE_SHARED_FIRST>{});
// set correct parent to get the XFILL_NONE FillStyle as needed
aHeaderSet.SetParent(&rMaster.GetDoc()->GetDfltFrameFormat()->GetAttrSet());
@@ -516,7 +515,7 @@ void PageDescToItemSet( const SwPageDesc& rPageDesc, SfxItemSet& rSet)
// FooterInfo, margins, background, border
SfxItemSet aFooterSet(*rSet.GetPool(),
- RES_FRMATR_BEGIN,RES_FRMATR_END - 1, // [82
+ svl::Items<RES_FRMATR_BEGIN,RES_FRMATR_END - 1, // [82
// FillAttribute support
XATTR_FILL_FIRST, XATTR_FILL_LAST, // [1014
@@ -524,8 +523,7 @@ void PageDescToItemSet( const SwPageDesc& rPageDesc, SfxItemSet& rSet)
SID_ATTR_BORDER_INNER,SID_ATTR_BORDER_INNER, // [10023
SID_ATTR_PAGE_SIZE,SID_ATTR_PAGE_SIZE, // [10051
SID_ATTR_PAGE_ON,SID_ATTR_PAGE_SHARED, // [10060
- SID_ATTR_PAGE_SHARED_FIRST,SID_ATTR_PAGE_SHARED_FIRST,
- 0, 0);
+ SID_ATTR_PAGE_SHARED_FIRST,SID_ATTR_PAGE_SHARED_FIRST>{});
// set correct parent to get the XFILL_NONE FillStyle as needed
aFooterSet.SetParent(&rMaster.GetDoc()->GetDfltFrameFormat()->GetAttrSet());
@@ -637,7 +635,7 @@ void SfxToSwPageDescAttr( const SwWrtShell& rShell, SfxItemSet& rSet )
}
else
{
- SfxItemSet aCoreSet(rShell.GetView().GetPool(), RES_PAGEDESC, RES_PAGEDESC );
+ SfxItemSet aCoreSet(rShell.GetView().GetPool(), svl::Items<RES_PAGEDESC, RES_PAGEDESC>{} );
rShell.GetCurAttr( aCoreSet );
if(SfxItemState::SET == aCoreSet.GetItemState( RES_PAGEDESC, true, &pItem ) )
{
diff --git a/sw/source/uibase/wrtsh/delete.cxx b/sw/source/uibase/wrtsh/delete.cxx
index 02540d95b22d..2f5969599c7c 100644
--- a/sw/source/uibase/wrtsh/delete.cxx
+++ b/sw/source/uibase/wrtsh/delete.cxx
@@ -47,7 +47,7 @@ bool SwWrtShell::TryRemoveIndent()
{
bool bResult = false;
- SfxItemSet aAttrSet(GetAttrPool(), RES_LR_SPACE, RES_LR_SPACE);
+ SfxItemSet aAttrSet(GetAttrPool(), svl::Items<RES_LR_SPACE, RES_LR_SPACE>{});
GetCurAttr(aAttrSet);
SvxLRSpaceItem aItem = static_cast<const SvxLRSpaceItem &>(aAttrSet.Get(RES_LR_SPACE));
diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx
index 9145fb223c37..08527aa134de 100644
--- a/sw/source/uibase/wrtsh/wrtsh1.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh1.cxx
@@ -1535,7 +1535,7 @@ void SwWrtShell::AutoUpdatePara(SwTextFormatColl* pColl, const SfxItemSet& rStyl
{
SwPaM* pCursor = pPaM ? pPaM : GetCursor( );
SfxItemSet aCoreSet( GetAttrPool(),
- RES_CHRATR_BEGIN, RES_CHRATR_END - 1,
+ svl::Items<RES_CHRATR_BEGIN, RES_CHRATR_END - 1,
RES_PARATR_BEGIN, RES_PARATR_END - 1,
RES_FRMATR_BEGIN, RES_FRMATR_END - 1,
SID_ATTR_TABSTOP_POS, SID_ATTR_TABSTOP_POS,
@@ -1543,8 +1543,7 @@ void SwWrtShell::AutoUpdatePara(SwTextFormatColl* pColl, const SfxItemSet& rStyl
SID_ATTR_TABSTOP_OFFSET, SID_ATTR_TABSTOP_OFFSET,
SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER,
SID_ATTR_PARA_MODEL, SID_ATTR_PARA_KEEP,
- SID_ATTR_PARA_PAGENUM, SID_ATTR_PARA_PAGENUM,
- 0 );
+ SID_ATTR_PARA_PAGENUM, SID_ATTR_PARA_PAGENUM>{} );
GetPaMAttr( pCursor, aCoreSet );
bool bReset = false;
SfxItemIter aParaIter( aCoreSet );