diff options
Diffstat (limited to 'sw/source/filter')
30 files changed, 81 insertions, 87 deletions
diff --git a/sw/source/filter/ascii/parasc.cxx b/sw/source/filter/ascii/parasc.cxx index 0479c74e9769..e03ae3921ae0 100644 --- a/sw/source/filter/ascii/parasc.cxx +++ b/sw/source/filter/ascii/parasc.cxx @@ -102,10 +102,9 @@ SwASCIIParser::SwASCIIParser(SwDoc* pD, const SwPaM& rCursor, SvStream& rIn, pArr = new sal_Char [ ASC_BUFFLEN + 2 ]; pItemSet = o3tl::make_unique<SfxItemSet>( pDoc->GetAttrPool(), - RES_CHRATR_FONT, RES_CHRATR_LANGUAGE, + svl::Items<RES_CHRATR_FONT, RES_CHRATR_LANGUAGE, RES_CHRATR_CJK_FONT, RES_CHRATR_CJK_LANGUAGE, - RES_CHRATR_CTL_FONT, RES_CHRATR_CTL_LANGUAGE, - 0 ); + RES_CHRATR_CTL_FONT, RES_CHRATR_CTL_LANGUAGE>{} ); // set defaults from the options if( rOpt.GetLanguage() ) diff --git a/sw/source/filter/basflt/fltshell.cxx b/sw/source/filter/basflt/fltshell.cxx index 039a1c39a0ea..cb0991bf426c 100644 --- a/sw/source/filter/basflt/fltshell.cxx +++ b/sw/source/filter/basflt/fltshell.cxx @@ -671,7 +671,7 @@ void SwFltControlStack::SetAttrInDoc(const SwPosition& rTmpPos, // test if on this node there had been a pagebreak BEFORE the // tox attribute was put on the stack - SfxItemSet aBkSet( pDoc->GetAttrPool(), RES_PAGEDESC, RES_BREAK ); + SfxItemSet aBkSet( pDoc->GetAttrPool(), svl::Items<RES_PAGEDESC, RES_BREAK>{} ); SwContentNode* pNd = nullptr; if( !pTOXAttr->HadBreakItem() || !pTOXAttr->HadPageDescItem() ) { diff --git a/sw/source/filter/html/SwAppletImpl.cxx b/sw/source/filter/html/SwAppletImpl.cxx index 11fba7e16641..8d3a8858c9da 100644 --- a/sw/source/filter/html/SwAppletImpl.cxx +++ b/sw/source/filter/html/SwAppletImpl.cxx @@ -106,7 +106,7 @@ SwHtmlOptType SwApplet_Impl::GetOptionType( const OUString& rName, bool bApplet return nType; } SwApplet_Impl::SwApplet_Impl( SfxItemPool& rPool ) : - aItemSet( rPool, RES_FRMATR_BEGIN, RES_FRMATR_END-1 ) + aItemSet( rPool, svl::Items<RES_FRMATR_BEGIN, RES_FRMATR_END-1>{} ) { } diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx index bb80e234df7d..8505dc0a4bf6 100644 --- a/sw/source/filter/html/css1atr.cxx +++ b/sw/source/filter/html/css1atr.cxx @@ -1224,14 +1224,13 @@ bool SwHTMLWriter::HasScriptDependentItems( const SfxItemSet& rItemSet, //sequence of (start, end) property ranges we want to //query SfxItemSet aTstItemSet( *pDCCharFormat->GetAttrSet().GetPool(), - RES_CHRATR_FONT, RES_CHRATR_FONT, + svl::Items<RES_CHRATR_FONT, RES_CHRATR_FONT, RES_CHRATR_POSTURE, RES_CHRATR_POSTURE, RES_CHRATR_WEIGHT, RES_CHRATR_WEIGHT, RES_CHRATR_CJK_FONT, RES_CHRATR_CJK_FONT, RES_CHRATR_CJK_POSTURE, RES_CHRATR_CJK_WEIGHT, RES_CHRATR_CTL_FONT, RES_CHRATR_CTL_FONT, - RES_CHRATR_CTL_POSTURE, RES_CHRATR_CTL_WEIGHT, - 0 ); + RES_CHRATR_CTL_POSTURE, RES_CHRATR_CTL_WEIGHT>{} ); aTstItemSet.Set( pDCCharFormat->GetAttrSet() ); return HasScriptDependentItems( aTstItemSet, false ); } @@ -1275,11 +1274,10 @@ static bool OutCSS1Rule( SwHTMLWriter& rHTMLWrt, const OUString& rSelector, //sequence of (start, end) property ranges we want to //query SfxItemSet aScriptItemSet( *rItemSet.GetPool(), - RES_CHRATR_FONT, RES_CHRATR_FONTSIZE, + svl::Items<RES_CHRATR_FONT, RES_CHRATR_FONTSIZE, RES_CHRATR_LANGUAGE, RES_CHRATR_POSTURE, RES_CHRATR_WEIGHT, RES_CHRATR_WEIGHT, - RES_CHRATR_CJK_FONT, RES_CHRATR_CTL_WEIGHT, - 0 ); + RES_CHRATR_CJK_FONT, RES_CHRATR_CTL_WEIGHT>{} ); aScriptItemSet.Put( rItemSet ); OUString aNewSelector( aSelector ); @@ -1378,11 +1376,10 @@ static void OutCSS1DropCapRule( } SfxItemSet aScriptItemSet( rHTMLWrt.pDoc->GetAttrPool(), - RES_CHRATR_FONT, RES_CHRATR_FONTSIZE, + svl::Items<RES_CHRATR_FONT, RES_CHRATR_FONTSIZE, RES_CHRATR_LANGUAGE, RES_CHRATR_POSTURE, RES_CHRATR_WEIGHT, RES_CHRATR_WEIGHT, - RES_CHRATR_CJK_FONT, RES_CHRATR_CTL_WEIGHT, - 0 ); + RES_CHRATR_CJK_FONT, RES_CHRATR_CTL_WEIGHT>{} ); if( pDCCharFormat ) aScriptItemSet.Set( pDCCharFormat->GetAttrSet() ); @@ -1697,7 +1694,7 @@ static Writer& OutCSS1_SwPageDesc( Writer& rWrt, const SwPageDesc& rPageDesc, // Export the distance-Attributes as normally const SwFrameFormat &rMaster = rPageDesc.GetMaster(); SfxItemSet aItemSet( *rMaster.GetAttrSet().GetPool(), - RES_LR_SPACE, RES_UL_SPACE ); + svl::Items<RES_LR_SPACE, RES_UL_SPACE>{} ); aItemSet.Set( rMaster.GetAttrSet() ); if( pRefPageDesc ) diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx index 1eef03d8a148..0a61af5dbc77 100644 --- a/sw/source/filter/html/htmlatr.cxx +++ b/sw/source/filter/html/htmlatr.cxx @@ -590,7 +590,7 @@ void OutHTML_SwFormat( Writer& rWrt, const SwFormat& rFormat, if (!rInfo.pItemSet.get()) { - rInfo.pItemSet.reset(new SfxItemSet(*rFormat.GetAttrSet().GetPool(), RES_UL_SPACE, RES_UL_SPACE)); + rInfo.pItemSet.reset(new SfxItemSet(*rFormat.GetAttrSet().GetPool(), svl::Items<RES_UL_SPACE, RES_UL_SPACE>{})); } rInfo.pItemSet->Put( aULSpaceItem ); } @@ -1835,8 +1835,8 @@ void HTMLEndPosLst::Insert( const SwDrawFrameFormat& rFormat, sal_Int32 nPos, // insert them as hints. Because of the amount of Hints the styles // are not considered! const SfxItemSet& rFormatItemSet = rFormat.GetAttrSet(); - SfxItemSet aItemSet( *rFormatItemSet.GetPool(), RES_CHRATR_BEGIN, - RES_CHRATR_END ); + SfxItemSet aItemSet( *rFormatItemSet.GetPool(), svl::Items<RES_CHRATR_BEGIN, + RES_CHRATR_END>{} ); SwHTMLWriter::GetEEAttrsFromDrwObj( aItemSet, pTextObj, true ); bool bOutStylesOld = bOutStyles; bOutStyles = false; diff --git a/sw/source/filter/html/htmlctxt.cxx b/sw/source/filter/html/htmlctxt.cxx index c575f209e6bb..0646803f9c92 100644 --- a/sw/source/filter/html/htmlctxt.cxx +++ b/sw/source/filter/html/htmlctxt.cxx @@ -409,7 +409,7 @@ bool SwHTMLParser::DoPositioning( SfxItemSet &rItemSet, if( SwCSS1Parser::MayBePositioned( rPropInfo ) ) { SfxItemSet aFrameItemSet( m_xDoc->GetAttrPool(), - RES_FRMATR_BEGIN, RES_FRMATR_END-1 ); + svl::Items<RES_FRMATR_BEGIN, RES_FRMATR_END-1>{} ); if( !IsNewDoc() ) Reader::ResetFrameFormatAttrs(aFrameItemSet ); @@ -704,7 +704,7 @@ SfxItemSet *HTMLAttrContext::GetFrameItemSet( SwDoc *pCreateDoc ) { if( !pFrameItemSet && pCreateDoc ) pFrameItemSet = o3tl::make_unique<SfxItemSet>( pCreateDoc->GetAttrPool(), - RES_FRMATR_BEGIN, RES_FRMATR_END-1 ); + svl::Items<RES_FRMATR_BEGIN, RES_FRMATR_END-1>{} ); return pFrameItemSet.get(); } diff --git a/sw/source/filter/html/htmldrawreader.cxx b/sw/source/filter/html/htmldrawreader.cxx index f2800093088c..7654a703bdf5 100644 --- a/sw/source/filter/html/htmldrawreader.cxx +++ b/sw/source/filter/html/htmldrawreader.cxx @@ -83,7 +83,7 @@ void SwHTMLParser::InsertDrawObject( SdrObject* pNewDrawObj, pNewDrawObj->SetLayer( m_xDoc->getIDocumentDrawModelAccess().GetInvisibleHeavenId() ); SfxItemSet aFrameSet( m_xDoc->GetAttrPool(), - RES_FRMATR_BEGIN, RES_FRMATR_END-1 ); + svl::Items<RES_FRMATR_BEGIN, RES_FRMATR_END-1>{} ); if( !IsNewDoc() ) Reader::ResetFrameFormatAttrs( aFrameSet ); diff --git a/sw/source/filter/html/htmlfldw.cxx b/sw/source/filter/html/htmlfldw.cxx index 2f1f82609c8c..601d1113fcb1 100644 --- a/sw/source/filter/html/htmlfldw.cxx +++ b/sw/source/filter/html/htmlfldw.cxx @@ -327,11 +327,10 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pField, //sequence of (start, end) property ranges we want to //query SfxItemSet aScriptItemSet( rWrt.pDoc->GetAttrPool(), - RES_CHRATR_FONT, RES_CHRATR_FONTSIZE, + svl::Items<RES_CHRATR_FONT, RES_CHRATR_FONTSIZE, RES_CHRATR_POSTURE, RES_CHRATR_POSTURE, RES_CHRATR_WEIGHT, RES_CHRATR_WEIGHT, - RES_CHRATR_CJK_FONT, RES_CHRATR_CTL_WEIGHT, - 0 ); + RES_CHRATR_CJK_FONT, RES_CHRATR_CTL_WEIGHT>{} ); rTextNd.GetAttr( aScriptItemSet, nFieldPos, nFieldPos+1 ); sal_uInt16 aWesternWhichIds[4] = diff --git a/sw/source/filter/html/htmlflywriter.cxx b/sw/source/filter/html/htmlflywriter.cxx index 69320ce63047..9a736f05822a 100644 --- a/sw/source/filter/html/htmlflywriter.cxx +++ b/sw/source/filter/html/htmlflywriter.cxx @@ -1829,8 +1829,8 @@ static Writer& OutHTML_FrameFormatAsMarquee( Writer& rWrt, const SwFrameFormat& // get the edit engine attributes of the object as SW attributes and // sort them as Hints const SfxItemSet& rFormatItemSet = rFrameFormat.GetAttrSet(); - SfxItemSet aItemSet( *rFormatItemSet.GetPool(), RES_CHRATR_BEGIN, - RES_CHRATR_END ); + SfxItemSet aItemSet( *rFormatItemSet.GetPool(), svl::Items<RES_CHRATR_BEGIN, + RES_CHRATR_END>{} ); SwHTMLWriter::GetEEAttrsFromDrwObj( aItemSet, &rSdrObj, true ); bool bCfgOutStylesOld = rHTMLWrt.m_bCfgOutStyles; rHTMLWrt.m_bCfgOutStyles = false; diff --git a/sw/source/filter/html/htmlforw.cxx b/sw/source/filter/html/htmlforw.cxx index 6ec96beded12..a963de30fb44 100644 --- a/sw/source/filter/html/htmlforw.cxx +++ b/sw/source/filter/html/htmlforw.cxx @@ -1041,8 +1041,8 @@ Writer& OutHTML_DrawFrameFormatAsControl( Writer& rWrt, bool bEdit = TAG_TEXTAREA == eTag || TYPE_FILE == eType || TYPE_TEXT == eType; - SfxItemSet aItemSet( rHTMLWrt.pDoc->GetAttrPool(), RES_CHRATR_BEGIN, - RES_CHRATR_END ); + SfxItemSet aItemSet( rHTMLWrt.pDoc->GetAttrPool(), svl::Items<RES_CHRATR_BEGIN, + RES_CHRATR_END>{} ); if( xPropSetInfo->hasPropertyByName( "BackgroundColor" ) ) { aTmp = xPropSet->getPropertyValue( "BackgroundColor" ); diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx index 12f035d83b76..b9a0cf6e26b5 100644 --- a/sw/source/filter/html/htmlgrin.cxx +++ b/sw/source/filter/html/htmlgrin.cxx @@ -487,7 +487,7 @@ IMAGE_SETEVENT: ParseStyleOptions( aStyle, aId, aClass, aItemSet, aPropInfo ); SfxItemSet aFrameSet( m_xDoc->GetAttrPool(), - RES_FRMATR_BEGIN, RES_FRMATR_END-1 ); + svl::Items<RES_FRMATR_BEGIN, RES_FRMATR_END-1>{} ); if( !IsNewDoc() ) Reader::ResetFrameFormatAttrs( aFrameSet ); diff --git a/sw/source/filter/html/htmlplug.cxx b/sw/source/filter/html/htmlplug.cxx index 136a8550fd56..98f48eccc608 100644 --- a/sw/source/filter/html/htmlplug.cxx +++ b/sw/source/filter/html/htmlplug.cxx @@ -430,7 +430,7 @@ void SwHTMLParser::InsertEmbed() } SfxItemSet aFrameSet( m_xDoc->GetAttrPool(), - RES_FRMATR_BEGIN, RES_FRMATR_END-1 ); + svl::Items<RES_FRMATR_BEGIN, RES_FRMATR_END-1>{} ); if( !IsNewDoc() ) Reader::ResetFrameFormatAttrs( aFrameSet ); @@ -922,7 +922,7 @@ void SwHTMLParser::InsertFloatingFrame() // den Itemset holen SfxItemSet aFrameSet( m_xDoc->GetAttrPool(), - RES_FRMATR_BEGIN, RES_FRMATR_END-1 ); + svl::Items<RES_FRMATR_BEGIN, RES_FRMATR_END-1>{} ); if( !IsNewDoc() ) Reader::ResetFrameFormatAttrs( aFrameSet ); diff --git a/sw/source/filter/html/htmlsect.cxx b/sw/source/filter/html/htmlsect.cxx index b1151ca37313..38333bbf487c 100644 --- a/sw/source/filter/html/htmlsect.cxx +++ b/sw/source/filter/html/htmlsect.cxx @@ -309,7 +309,7 @@ void SwHTMLParser::NewDivision( HtmlTokenId nToken ) } SfxItemSet aFrameItemSet( m_xDoc->GetAttrPool(), - RES_FRMATR_BEGIN, RES_FRMATR_END-1 ); + svl::Items<RES_FRMATR_BEGIN, RES_FRMATR_END-1>{} ); if( !IsNewDoc() ) Reader::ResetFrameFormatAttrs(aFrameItemSet ); @@ -613,7 +613,7 @@ void SwHTMLParser::NewMultiCol( sal_uInt16 columnsFromCss ) if( bInCntnr || SwCSS1Parser::MayBePositioned( aPropInfo, true ) ) { SfxItemSet aFrameItemSet( m_xDoc->GetAttrPool(), - RES_FRMATR_BEGIN, RES_FRMATR_END-1 ); + svl::Items<RES_FRMATR_BEGIN, RES_FRMATR_END-1>{} ); if( !IsNewDoc() ) Reader::ResetFrameFormatAttrs(aFrameItemSet ); @@ -685,7 +685,7 @@ void SwHTMLParser::NewMultiCol( sal_uInt16 columnsFromCss ) SwSectionData aSection( CONTENT_SECTION, aName ); SfxItemSet aFrameItemSet( m_xDoc->GetAttrPool(), - RES_FRMATR_BEGIN, RES_FRMATR_END-1 ); + svl::Items<RES_FRMATR_BEGIN, RES_FRMATR_END-1>{} ); if( !IsNewDoc() ) Reader::ResetFrameFormatAttrs(aFrameItemSet ); diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx index 2f1daece276a..a8550415f72f 100644 --- a/sw/source/filter/html/htmltab.cxx +++ b/sw/source/filter/html/htmltab.cxx @@ -1426,7 +1426,7 @@ void HTMLTable::FixFrameFormat( SwTableBox *pBox, bool bLock = pFrameFormat->GetDoc()->GetNumberFormatter() ->IsTextFormat( nNumFormat ); SfxItemSet aItemSet( *pFrameFormat->GetAttrSet().GetPool(), - RES_BOXATR_FORMAT, RES_BOXATR_VALUE ); + svl::Items<RES_BOXATR_FORMAT, RES_BOXATR_VALUE>{} ); SvxAdjust eAdjust = SvxAdjust::End; SwContentNode *pCNd = nullptr; if( !bLock ) @@ -2819,8 +2819,8 @@ SvxBrushItem* SwHTMLParser::CreateBrushItem( const Color *pColor, if( !rStyle.isEmpty() || !rId.isEmpty() || !rClass.isEmpty() ) { - SfxItemSet aItemSet( m_xDoc->GetAttrPool(), RES_BACKGROUND, - RES_BACKGROUND ); + SfxItemSet aItemSet( m_xDoc->GetAttrPool(), svl::Items<RES_BACKGROUND, + RES_BACKGROUND>{} ); SvxCSS1PropertyInfo aPropInfo; if( !rClass.isEmpty() ) @@ -3524,7 +3524,7 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions, // the table should be put in a text frame SfxItemSet aFrameSet( m_xDoc->GetAttrPool(), - RES_FRMATR_BEGIN, RES_FRMATR_END-1 ); + svl::Items<RES_FRMATR_BEGIN, RES_FRMATR_END-1>{} ); if( !pCurTable->IsNewDoc() ) Reader::ResetFrameFormatAttrs( aFrameSet ); diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index 199e80dd6c09..3b4e77d6b937 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -2853,7 +2853,7 @@ void SwHTMLParser::SetAttr_( bool bChkEnd, bool bBeforeTable, case RES_BACKGROUND: { const SvxBrushItem& rBrush = static_cast< SvxBrushItem& >(*pAttr->pItem); - SfxItemSet aNewSet(m_xDoc->GetAttrPool(), XATTR_FILL_FIRST, XATTR_FILL_LAST); + SfxItemSet aNewSet(m_xDoc->GetAttrPool(), svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST>{}); setSvxBrushItemAsFillAttributesToTargetSet(rBrush, aNewSet); m_xDoc->getIDocumentContentOperations().InsertItemSet(*pAttrPam, aNewSet, SetAttrMode::DONTREPLACE); @@ -4835,7 +4835,7 @@ void SwHTMLParser::InsertSpacer() // den Itemset holen SfxItemSet aFrameSet( m_xDoc->GetAttrPool(), - RES_FRMATR_BEGIN, RES_FRMATR_END-1 ); + svl::Items<RES_FRMATR_BEGIN, RES_FRMATR_END-1>{} ); if( !IsNewDoc() ) Reader::ResetFrameFormatAttrs( aFrameSet ); diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index ddf3a0c098be..37e38d5c52b4 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -398,7 +398,7 @@ void SwWW8AttrIter::OutAttr( sal_Int32 nSwPos, bool bRuby ) const SfxPoolItem *pGrabBag = nullptr; SfxItemSet aExportSet(*rNd.GetSwAttrSet().GetPool(), - RES_CHRATR_BEGIN, RES_TXTATR_END - 1); + svl::Items<RES_CHRATR_BEGIN, RES_TXTATR_END - 1>{}); //The hard formatting properties that affect the entire paragraph if (rNd.HasSwAttrSet()) @@ -2784,7 +2784,7 @@ void MSWordExportBase::OutputTextNode( const SwTextNode& rNode ) // Exception: if there is a character style hint at the end of the // paragraph only, then still go with 2), as RES_TXTATR_CHARFMT is always // set as a hint. - SfxItemSet aParagraphMarkerProperties(m_pDoc->GetAttrPool(), RES_CHRATR_BEGIN, RES_TXTATR_END); + SfxItemSet aParagraphMarkerProperties(m_pDoc->GetAttrPool(), svl::Items<RES_CHRATR_BEGIN, RES_TXTATR_END>{}); bool bCharFormatOnly = true; if(const SwpHints* pTextAttrs = rNode.GetpSwpHints()) { diff --git a/sw/source/filter/ww8/wrtw8num.cxx b/sw/source/filter/ww8/wrtw8num.cxx index ca2e6fcf6da7..ecb31796f019 100644 --- a/sw/source/filter/ww8/wrtw8num.cxx +++ b/sw/source/filter/ww8/wrtw8num.cxx @@ -484,8 +484,8 @@ void MSWordExportBase::AbstractNumberingDefinitions() const SfxItemSet* pOutSet = nullptr; // cbGrpprlChpx - SfxItemSet aSet( m_pDoc->GetAttrPool(), RES_CHRATR_BEGIN, - RES_CHRATR_END ); + SfxItemSet aSet( m_pDoc->GetAttrPool(), svl::Items<RES_CHRATR_BEGIN, + RES_CHRATR_END>{} ); if ( rFormat.GetCharFormat() || bWriteBullet ) { if ( bWriteBullet ) diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx index 7fd7459d5ec4..03cca10e99ae 100644 --- a/sw/source/filter/ww8/wrtw8sty.cxx +++ b/sw/source/filter/ww8/wrtw8sty.cxx @@ -1062,7 +1062,7 @@ sal_uInt16 MSWordSections::NumberOfColumns( const SwDoc &rDoc, const WW8_SepInfo } const SfxItemSet &rSet = pPd->GetMaster().GetAttrSet(); - SfxItemSet aSet( *rSet.GetPool(), RES_COL, RES_COL ); + SfxItemSet aSet( *rSet.GetPool(), svl::Items<RES_COL, RES_COL>{} ); aSet.SetParent( &rSet ); //0xffffffff, what the hell is going on with that!, fixme most terribly diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index 0927c58eb81e..2048387249e8 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -2087,7 +2087,7 @@ static sal_uInt16 lcl_TCFlags(SwDoc &rDoc, const SwTableBox * pBox, sal_Int32 nR const SwContentNode * pCNd = pSttNd->GetNodes().GoNext( &aIdx ); if( pCNd && pCNd->IsTextNode()) { - SfxItemSet aCoreSet(rDoc.GetAttrPool(), RES_CHRATR_ROTATE, RES_CHRATR_ROTATE); + SfxItemSet aCoreSet(rDoc.GetAttrPool(), svl::Items<RES_CHRATR_ROTATE, RES_CHRATR_ROTATE>{}); static_cast<const SwTextNode*>(pCNd)->GetAttr( aCoreSet, 0, static_cast<const SwTextNode*>(pCNd)->GetText().getLength()); const SfxPoolItem * pRotItem; if ( SfxItemState::SET == aCoreSet.GetItemState(RES_CHRATR_ROTATE, true, &pRotItem)) diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index 0caf73a064a1..da52344e2545 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -782,10 +782,9 @@ void MSWordExportBase::OutputFormat( const SwFormat& rFormat, bool bPapFormat, b { const SwFrameFormat &rFrameFormat = m_pParentFrame->GetFrameFormat(); - SfxItemSet aSet(m_pDoc->GetAttrPool(), RES_FRMATR_BEGIN, + SfxItemSet aSet(m_pDoc->GetAttrPool(), svl::Items<RES_FRMATR_BEGIN, RES_FRMATR_END-1, - XATTR_FILL_FIRST, XATTR_FILL_LAST, - 0); + XATTR_FILL_FIRST, XATTR_FILL_LAST>{}); aSet.Set(rFrameFormat.GetAttrSet()); // Fly as character becomes a paragraph bound @@ -3064,8 +3063,8 @@ void WW8Export::WriteFootnoteBegin( const SwFormatFootnote& rFootnote, ww::bytes { ww::bytes* pOld = pO; pO = &aOutArr; - SfxItemSet aSet( m_pDoc->GetAttrPool(), RES_CHRATR_FONT, - RES_CHRATR_FONT ); + SfxItemSet aSet( m_pDoc->GetAttrPool(), svl::Items<RES_CHRATR_FONT, + RES_CHRATR_FONT>{} ); pCFormat = pInfo->GetCharFormat( *m_pDoc ); aSet.Set( pCFormat->GetAttrSet() ); diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx index 7479e709577d..74c6a920b2c9 100644 --- a/sw/source/filter/ww8/ww8graf.cxx +++ b/sw/source/filter/ww8/ww8graf.cxx @@ -1124,7 +1124,7 @@ void SwWW8ImplReader::InsertTxbxText(SdrTextObj* pTextObj, if( pRecord ) { SfxItemSet aFlySet( m_rDoc.GetAttrPool(), - RES_FRMATR_BEGIN, RES_FRMATR_END-1 ); + svl::Items<RES_FRMATR_BEGIN, RES_FRMATR_END-1>{} ); tools::Rectangle aInnerDist( pRecord->nDxTextLeft, pRecord->nDyTextTop, @@ -2533,7 +2533,7 @@ SwFrameFormat* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp ) // when in a header or footer word appears to treat all elements as wrap through // Umfluss-Modus ermitteln - SfxItemSet aFlySet(m_rDoc.GetAttrPool(), RES_FRMATR_BEGIN, RES_FRMATR_END-1); + SfxItemSet aFlySet(m_rDoc.GetAttrPool(), svl::Items<RES_FRMATR_BEGIN, RES_FRMATR_END-1>{}); css::text::WrapTextMode eSurround = css::text::WrapTextMode_PARALLEL; bool bContour = false; switch (pF->nwr) @@ -2849,7 +2849,7 @@ SwFrameFormat* SwWW8ImplReader::MungeTextIntoDrawBox(SdrObject* pTrueObject, { // use ww8-default border distance SfxItemSet aItemSet(m_pDrawModel->GetItemPool(), - SDRATTR_TEXT_LEFTDIST, SDRATTR_TEXT_LOWERDIST); + svl::Items<SDRATTR_TEXT_LEFTDIST, SDRATTR_TEXT_LOWERDIST>{}); aItemSet.Put( makeSdrTextLeftDistItem( pRecord->nDxTextLeft ) ); aItemSet.Put( makeSdrTextRightDistItem( pRecord->nDxTextRight ) ); aItemSet.Put( makeSdrTextUpperDistItem( pRecord->nDyTextTop ) ); @@ -2998,7 +2998,7 @@ SwFlyFrameFormat* SwWW8ImplReader::ImportReplaceableDrawables( SdrObject* &rpObj rFlySet.Put(SwFormatFrameSize(ATT_FIX_SIZE, nWidthTw, nHeightTw)); - SfxItemSet aGrSet(m_rDoc.GetAttrPool(), RES_GRFATR_BEGIN, RES_GRFATR_END-1); + SfxItemSet aGrSet(m_rDoc.GetAttrPool(), svl::Items<RES_GRFATR_BEGIN, RES_GRFATR_END-1>{}); if (pRecord) { diff --git a/sw/source/filter/ww8/ww8graf2.cxx b/sw/source/filter/ww8/ww8graf2.cxx index 5aa5d6fe0085..d34c32ca003e 100644 --- a/sw/source/filter/ww8/ww8graf2.cxx +++ b/sw/source/filter/ww8/ww8graf2.cxx @@ -558,8 +558,8 @@ SwFrameFormat* SwWW8ImplReader::ImportGraf(SdrTextObj* pTextObj, if (pObject) { // for the frame - SfxItemSet aAttrSet( m_rDoc.GetAttrPool(), RES_FRMATR_BEGIN, - RES_FRMATR_END-1 ); + SfxItemSet aAttrSet( m_rDoc.GetAttrPool(), svl::Items<RES_FRMATR_BEGIN, + RES_FRMATR_END-1>{} ); SvxMSDffImportRec const*const pRecord = (1 == aData.size()) ? aData.begin()->get() : nullptr; @@ -623,8 +623,8 @@ SwFrameFormat* SwWW8ImplReader::ImportGraf(SdrTextObj* pTextObj, } // for the graphic - SfxItemSet aGrSet( m_rDoc.GetAttrPool(), RES_GRFATR_BEGIN, - RES_GRFATR_END-1 ); + SfxItemSet aGrSet( m_rDoc.GetAttrPool(), svl::Items<RES_GRFATR_BEGIN, + RES_GRFATR_END-1>{} ); if( aPD.nCL || aPD.nCR || aPD.nCT || aPD.nCB ) { diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index f80ce894dad6..22ca6889474d 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -1485,7 +1485,7 @@ const SfxPoolItem* SwWW8FltControlStack::GetFormatAttr(const SwPosition& rPos, if (pNd->IsTextNode()) { const sal_Int32 nPos = rPos.nContent.GetIndex(); - SfxItemSet aSet(pDoc->GetAttrPool(), nWhich, nWhich); + SfxItemSet aSet(pDoc->GetAttrPool(), {{nWhich, nWhich}}); if (pNd->GetTextNode()->GetAttr(aSet, nPos, nPos)) pItem = aSet.GetItem(nWhich); } diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx index 99feec026987..bd32af41ddae 100644 --- a/sw/source/filter/ww8/ww8par2.cxx +++ b/sw/source/filter/ww8/ww8par2.cxx @@ -1860,7 +1860,7 @@ WW8TabDesc::WW8TabDesc(SwWW8ImplReader* pIoClass, WW8_CP nStartCp) : m_pTable(nullptr), m_pParentPos(nullptr), m_pFlyFormat(nullptr), - m_aItemSet(m_pIo->m_rDoc.GetAttrPool(),RES_FRMATR_BEGIN,RES_FRMATR_END-1) + m_aItemSet(m_pIo->m_rDoc.GetAttrPool(),svl::Items<RES_FRMATR_BEGIN,RES_FRMATR_END-1>{}) { m_pIo->m_bAktAND_fNumberAcross = false; @@ -3537,7 +3537,7 @@ bool SwWW8ImplReader::StartTable(WW8_CP nStartCp) { m_pTableDesc->m_pParentPos = new SwPosition(*m_pPaM->GetPoint()); SfxItemSet aItemSet(m_rDoc.GetAttrPool(), - RES_FRMATR_BEGIN, RES_FRMATR_END-1); + svl::Items<RES_FRMATR_BEGIN, RES_FRMATR_END-1>{}); // #i33818# - anchor the Writer fly frame for the nested table at-character. // #i45301# SwFormatAnchor aAnchor( eAnchor ); diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx index 48809b436ced..811923bbd77f 100644 --- a/sw/source/filter/ww8/ww8par3.cxx +++ b/sw/source/filter/ww8/ww8par3.cxx @@ -678,7 +678,7 @@ bool WW8ListManager::ReadLVL(SwNumFormat& rNumFormat, std::unique_ptr<SfxItemSet } // create new Itemset for character attributes - rpItemSet.reset(new SfxItemSet( rDoc.GetAttrPool(), RES_CHRATR_BEGIN, RES_CHRATR_END - 1)); + rpItemSet.reset(new SfxItemSet( rDoc.GetAttrPool(), svl::Items<RES_CHRATR_BEGIN, RES_CHRATR_END - 1>{})); // Set Reader-ItemSet-Pointer to the newly created set rReader.SetAktItemSet(rpItemSet.get()); @@ -1852,8 +1852,8 @@ void SwWW8ImplReader::RegisterNumFormatOnTextNode(sal_uInt16 nActLFO, if (bApplyListLevelIndentDirectlyAtPara) { - SfxItemSet aListIndent(m_rDoc.GetAttrPool(), RES_LR_SPACE, - RES_LR_SPACE); + SfxItemSet aListIndent(m_rDoc.GetAttrPool(), svl::Items<RES_LR_SPACE, + RES_LR_SPACE>{}); const SvxLRSpaceItem *pItem = static_cast<const SvxLRSpaceItem*>( GetFormatAttr(RES_LR_SPACE)); OSL_ENSURE(pItem, "impossible"); diff --git a/sw/source/filter/ww8/ww8par4.cxx b/sw/source/filter/ww8/ww8par4.cxx index ac6d9d4c4525..4a859a7a09fb 100644 --- a/sw/source/filter/ww8/ww8par4.cxx +++ b/sw/source/filter/ww8/ww8par4.cxx @@ -257,8 +257,8 @@ SwFrameFormat* SwWW8ImplReader::ImportOle(const Graphic* pGrf, SfxItemSet* pTempSet = nullptr; if( !pFlySet ) { - pTempSet = new SfxItemSet( m_rDoc.GetAttrPool(), RES_FRMATR_BEGIN, - RES_FRMATR_END-1); + pTempSet = new SfxItemSet( m_rDoc.GetAttrPool(), svl::Items<RES_FRMATR_BEGIN, + RES_FRMATR_END-1>{}); pFlySet = pTempSet; diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx index 67e7eb60a501..32acea9229c2 100644 --- a/sw/source/filter/ww8/ww8par5.cxx +++ b/sw/source/filter/ww8/ww8par5.cxx @@ -2307,7 +2307,7 @@ WW8PostProcessAttrsInfo::WW8PostProcessAttrsInfo(WW8_CP nCpStart, WW8_CP nCpEnd, , mnCpStart(nCpStart) , mnCpEnd(nCpEnd) , mPaM(*rPaM.GetMark(), *rPaM.GetPoint()) - , mItemSet(rPaM.GetDoc()->GetAttrPool(), RES_CHRATR_BEGIN, RES_PARATR_END - 1) + , mItemSet(rPaM.GetDoc()->GetAttrPool(), svl::Items<RES_CHRATR_BEGIN, RES_PARATR_END - 1>{}) { } @@ -2396,8 +2396,8 @@ eF_ResT SwWW8ImplReader::Read_F_IncludePicture( WW8FieldDesc*, OUString& rStr ) that we have inserted a graphic link and the suiting SwAttrSet will be inserted into the frame format. */ - SfxItemSet aFlySet( m_rDoc.GetAttrPool(), RES_FRMATR_BEGIN, - RES_FRMATR_END-1 ); + SfxItemSet aFlySet( m_rDoc.GetAttrPool(), svl::Items<RES_FRMATR_BEGIN, + RES_FRMATR_END-1>{} ); aFlySet.Put( SwFormatAnchor( RndStdIds::FLY_AS_CHAR ) ); aFlySet.Put( SwFormatVertOrient( 0, text::VertOrientation::TOP, text::RelOrientation::FRAME )); m_pFlyFormatOfJustInsertedGraphic = @@ -3400,7 +3400,7 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, OUString& rStr ) if ( nIndexCols > 1 ) { // Set the column number for index - SfxItemSet aSet( m_rDoc.GetAttrPool(), RES_COL, RES_COL ); + SfxItemSet aSet( m_rDoc.GetAttrPool(), svl::Items<RES_COL, RES_COL>{} ); SwFormatCol aCol; aCol.Init( nIndexCols, 708, USHRT_MAX ); aSet.Put( aCol ); diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx index e80a66cf1617..f5752a43481c 100644 --- a/sw/source/filter/ww8/ww8par6.cxx +++ b/sw/source/filter/ww8/ww8par6.cxx @@ -2045,7 +2045,7 @@ void WW8SwFlyPara::BoxUpWidth( long nInWidth ) // WW8FlySet-ctor for Apos and graphics Apos WW8FlySet::WW8FlySet(SwWW8ImplReader& rReader, const WW8FlyPara* pFW, const WW8SwFlyPara* pFS, bool bGraf) - : SfxItemSet(rReader.m_rDoc.GetAttrPool(),RES_FRMATR_BEGIN,RES_FRMATR_END-1) + : SfxItemSet(rReader.m_rDoc.GetAttrPool(),svl::Items<RES_FRMATR_BEGIN,RES_FRMATR_END-1>{}) { if (!rReader.m_bNewDoc) Reader::ResetFrameFormatAttrs(*this); // remove distance/border @@ -2101,7 +2101,7 @@ WW8FlySet::WW8FlySet(SwWW8ImplReader& rReader, const WW8FlyPara* pFW, // WW8FlySet-ctor for character bound graphics WW8FlySet::WW8FlySet( SwWW8ImplReader& rReader, const SwPaM* pPaM, const WW8_PIC& rPic, long nWidth, long nHeight ) - : SfxItemSet(rReader.m_rDoc.GetAttrPool(),RES_FRMATR_BEGIN,RES_FRMATR_END-1) + : SfxItemSet(rReader.m_rDoc.GetAttrPool(),svl::Items<RES_FRMATR_BEGIN,RES_FRMATR_END-1>{}) { Init(rReader, pPaM); @@ -2154,8 +2154,8 @@ void WW8FlySet::Init(const SwWW8ImplReader& rReader, const SwPaM* pPaM) WW8DupProperties::WW8DupProperties(SwDoc &rDoc, SwWW8FltControlStack *pStack) : pCtrlStck(pStack), - aChrSet(rDoc.GetAttrPool(), RES_CHRATR_BEGIN, RES_CHRATR_END - 1 ), - aParSet(rDoc.GetAttrPool(), RES_PARATR_BEGIN, RES_PARATR_END - 1 ) + aChrSet(rDoc.GetAttrPool(), svl::Items<RES_CHRATR_BEGIN, RES_CHRATR_END - 1>{} ), + aParSet(rDoc.GetAttrPool(), svl::Items<RES_PARATR_BEGIN, RES_PARATR_END - 1>{} ) { //Close any open character properties and duplicate them inside the //first table cell @@ -2357,7 +2357,7 @@ bool SwWW8ImplReader::StartApo(const ApoTestResults &rApo, const WW8_TablePos *p if (IsDropCap()) { m_bDropCap = true; - m_pAktItemSet = new SfxItemSet( m_rDoc.GetAttrPool(), RES_CHRATR_BEGIN, RES_PARATR_END - 1 ); + m_pAktItemSet = new SfxItemSet( m_rDoc.GetAttrPool(), svl::Items<RES_CHRATR_BEGIN, RES_PARATR_END - 1>{} ); return false; } diff --git a/sw/source/filter/xml/xmlfmt.cxx b/sw/source/filter/xml/xmlfmt.cxx index ec0ac4cb77d0..8f60091126c1 100644 --- a/sw/source/filter/xml/xmlfmt.cxx +++ b/sw/source/filter/xml/xmlfmt.cxx @@ -486,7 +486,7 @@ SvXMLImportContext *SwXMLItemSetStyleContext_Impl::CreateItemSetContext( pItemSet.reset( new SfxItemSet( rItemPool, aTableSetRange ) ); break; case XML_STYLE_FAMILY_TABLE_COLUMN: - pItemSet.reset( new SfxItemSet( rItemPool, RES_FRM_SIZE, RES_FRM_SIZE, 0 ) ); + pItemSet.reset( new SfxItemSet( rItemPool, svl::Items<RES_FRM_SIZE, RES_FRM_SIZE>{} ) ); break; case XML_STYLE_FAMILY_TABLE_ROW: pItemSet.reset( new SfxItemSet( rItemPool, aTableLineSetRange ) ); diff --git a/sw/source/filter/xml/xmltexti.cxx b/sw/source/filter/xml/xmltexti.cxx index 410122a478c4..27ac77c0143b 100644 --- a/sw/source/filter/xml/xmltexti.cxx +++ b/sw/source/filter/xml/xmltexti.cxx @@ -233,8 +233,8 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOLEObject( SAL_WARN_IF(!pTextCursor, "sw.uno", "SwXTextCursor missing"); SwDoc *pDoc = SwImport::GetDocFromXMLImport( rImport ); - SfxItemSet aItemSet( pDoc->GetAttrPool(), RES_FRMATR_BEGIN, - RES_FRMATR_END ); + SfxItemSet aItemSet( pDoc->GetAttrPool(), svl::Items<RES_FRMATR_BEGIN, + RES_FRMATR_END>{} ); Size aTwipSize( 0, 0 ); tools::Rectangle aVisArea( 0, 0, nWidth, nHeight ); lcl_putHeightAndWidth( aItemSet, nHeight, nWidth, @@ -548,8 +548,8 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOOoLink( OSL_ENSURE( pTextCursor, "SwXTextCursor missing" ); SwDoc *pDoc = SwImport::GetDocFromXMLImport( rImport ); - SfxItemSet aItemSet( pDoc->GetAttrPool(), RES_FRMATR_BEGIN, - RES_FRMATR_END ); + SfxItemSet aItemSet( pDoc->GetAttrPool(), svl::Items<RES_FRMATR_BEGIN, + RES_FRMATR_END>{} ); Size aTwipSize( 0, 0 ); lcl_putHeightAndWidth( aItemSet, nHeight, nWidth, &aTwipSize.Height(), &aTwipSize.Width() ); @@ -636,8 +636,8 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertApplet( OSL_ENSURE( pTextCursor, "SwXTextCursor missing" ); SwDoc *pDoc = pTextCursor->GetDoc(); - SfxItemSet aItemSet( pDoc->GetAttrPool(), RES_FRMATR_BEGIN, - RES_FRMATR_END ); + SfxItemSet aItemSet( pDoc->GetAttrPool(), svl::Items<RES_FRMATR_BEGIN, + RES_FRMATR_END>{} ); lcl_putHeightAndWidth( aItemSet, nHeight, nWidth); SwApplet_Impl aAppletImpl ( aItemSet ); @@ -682,8 +682,8 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertPlugin( OSL_ENSURE( pTextCursor, "SwXTextCursor missing" ); SwDoc *pDoc = pTextCursor->GetDoc(); - SfxItemSet aItemSet( pDoc->GetAttrPool(), RES_FRMATR_BEGIN, - RES_FRMATR_END ); + SfxItemSet aItemSet( pDoc->GetAttrPool(), svl::Items<RES_FRMATR_BEGIN, + RES_FRMATR_END>{} ); lcl_putHeightAndWidth( aItemSet, nHeight, nWidth); // We'll need a (valid) URL, or we need a MIME type. If we don't have @@ -765,8 +765,8 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertFloatingFra OSL_ENSURE( pTextCursor, "SwXTextCursor missing" ); SwDoc *pDoc = pTextCursor->GetDoc(); - SfxItemSet aItemSet( pDoc->GetAttrPool(), RES_FRMATR_BEGIN, - RES_FRMATR_END ); + SfxItemSet aItemSet( pDoc->GetAttrPool(), svl::Items<RES_FRMATR_BEGIN, + RES_FRMATR_END>{} ); lcl_putHeightAndWidth( aItemSet, nHeight, nWidth); ScrollingMode eScrollMode = ScrollingMode::Auto; |