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