summaryrefslogtreecommitdiff
path: root/sw/source/uibase
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/uibase')
-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
49 files changed, 234 insertions, 285 deletions
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 );