chart2/source/controller/main/DrawCommandDispatch.cxx   |    7 --
 chart2/source/controller/main/ShapeController.cxx       |    6 -
 sw/inc/fesh.hxx                                         |    2 
 sw/source/core/access/accpara.cxx                       |   26 +++----
 sw/source/core/attr/format.cxx                          |    2 
 sw/source/core/crsr/crstrvl.cxx                         |    9 --
 sw/source/core/crsr/findattr.cxx                        |    3 
 sw/source/core/crsr/viscrs.cxx                          |    5 -
 sw/source/core/doc/DocumentContentOperationsManager.cxx |   43 +++++-------
 sw/source/core/doc/DocumentDeviceManager.cxx            |   12 +--
 sw/source/core/doc/DocumentFieldsManager.cxx            |    3 
 sw/source/core/doc/DocumentRedlineManager.cxx           |    7 --
 sw/source/core/doc/docfly.cxx                           |    4 -
 sw/source/core/doc/docfmt.cxx                           |   19 ++---
 sw/source/core/doc/docnew.cxx                           |    2 
 sw/source/core/doc/docsort.cxx                          |    7 --
 sw/source/core/doc/tblcpy.cxx                           |    3 
 sw/source/core/doc/tblrwcl.cxx                          |    3 
 sw/source/core/docnode/ndtbl.cxx                        |   22 +++---
 sw/source/core/docnode/node.cxx                         |    8 +-
 sw/source/core/draw/dcontact.cxx                        |   14 +---
 sw/source/core/draw/dflyobj.cxx                         |    2 
 sw/source/core/edit/acorrect.cxx                        |    4 -
 sw/source/core/edit/autofmt.cxx                         |   11 +--
 sw/source/core/edit/edfmt.cxx                           |    3 
 sw/source/core/fields/cellfml.cxx                       |    3 
 sw/source/core/frmedt/fecopy.cxx                        |    5 -
 sw/source/core/frmedt/fefly1.cxx                        |    4 -
 sw/source/core/frmedt/feshview.cxx                      |   12 +--
 sw/source/core/layout/anchoreddrawobject.cxx            |    2 
 sw/source/core/layout/fly.cxx                           |    3 
 sw/source/core/text/redlnitr.cxx                        |    2 
 sw/source/core/text/txtfld.cxx                          |    2 
 sw/source/core/text/txtfrm.cxx                          |    9 +-
 sw/source/core/txtnode/ndtxt.cxx                        |   30 +++-----
 sw/source/core/txtnode/thints.cxx                       |    5 -
 sw/source/core/undo/untbl.cxx                           |   37 +++-------
 sw/source/core/unocore/SwXTextDefaults.cxx              |    2 
 sw/source/core/unocore/unodraw.cxx                      |    6 -
 sw/source/core/unocore/unoframe.cxx                     |   32 ++++-----
 sw/source/core/unocore/unoobj.cxx                       |   18 ++---
 sw/source/core/unocore/unoport.cxx                      |    6 -
 sw/source/core/unocore/unosect.cxx                      |    7 --
 sw/source/core/unocore/unostyle.cxx                     |   11 +--
 sw/source/core/unocore/unotbl.cxx                       |   49 ++++++--------
 sw/source/filter/basflt/fltshell.cxx                    |    2 
 sw/source/filter/html/css1atr.cxx                       |   26 +++----
 sw/source/filter/html/htmlatr.cxx                       |    3 
 sw/source/filter/html/htmlctxt.cxx                      |    7 --
 sw/source/filter/html/htmldrawreader.cxx                |    9 +-
 sw/source/filter/html/htmlfldw.cxx                      |   10 +-
 sw/source/filter/html/htmlflywriter.cxx                 |    3 
 sw/source/filter/html/htmlforw.cxx                      |    3 
 sw/source/filter/html/htmlgrin.cxx                      |    3 
 sw/source/filter/html/htmlplug.cxx                      |    6 -
 sw/source/filter/html/htmlsect.cxx                      |    9 --
 sw/source/filter/html/htmltab.cxx                       |   17 ++--
 sw/source/filter/html/swhtml.cxx                        |    5 -
 sw/source/filter/ww8/wrtw8nds.cxx                       |    7 --
 sw/source/filter/ww8/wrtw8num.cxx                       |    3 
 sw/source/filter/ww8/wrtw8sty.cxx                       |    2 
 sw/source/filter/ww8/wrtww8.cxx                         |    2 
 sw/source/filter/ww8/ww8atr.cxx                         |    8 --
 sw/source/filter/ww8/ww8graf.cxx                        |   12 +--
 sw/source/filter/ww8/ww8graf2.cxx                       |    6 -
 sw/source/filter/ww8/ww8par.cxx                         |    6 -
 sw/source/filter/ww8/ww8par2.cxx                        |    5 -
 sw/source/filter/ww8/ww8par2.hxx                        |    4 -
 sw/source/filter/ww8/ww8par3.cxx                        |    5 -
 sw/source/filter/ww8/ww8par5.cxx                        |    5 -
 sw/source/filter/ww8/ww8par6.cxx                        |   10 +-
 sw/source/filter/xml/xmltexti.cxx                       |   15 +---
 sw/source/ui/chrdlg/pardlg.cxx                          |    6 -
 sw/source/ui/config/optpage.cxx                         |    6 -
 sw/source/ui/dbui/dbinsdlg.cxx                          |    3 
 sw/source/ui/dbui/mmlayoutpage.cxx                      |   11 +--
 sw/source/ui/dialog/ascfldlg.cxx                        |    6 -
 sw/source/ui/dialog/macassgn.cxx                        |    2 
 sw/source/ui/dialog/uiregionsw.cxx                      |    6 -
 sw/source/ui/fldui/fldedt.cxx                           |    5 -
 sw/source/ui/fldui/fldtdlg.cxx                          |    2 
 sw/source/ui/frmdlg/column.cxx                          |    8 --
 sw/source/ui/frmdlg/frmdlg.cxx                          |    6 -
 sw/source/ui/misc/docfnote.cxx                          |    2 
 sw/source/ui/misc/glossary.cxx                          |    2 
 sw/source/ui/misc/insfnote.cxx                          |    6 -
 sw/source/ui/misc/titlepage.cxx                         |    2 
 sw/source/uibase/app/appenv.cxx                         |    4 -
 sw/source/uibase/app/applab.cxx                         |    8 --
 sw/source/uibase/app/appopt.cxx                         |    7 --
 sw/source/uibase/app/docsh2.cxx                         |    2 
 sw/source/uibase/dialog/regionsw.cxx                    |   14 +---
 sw/source/uibase/dochdl/swdtflvr.cxx                    |   20 ++---
 sw/source/uibase/docvw/PageBreakWin.cxx                 |    5 -
 sw/source/uibase/docvw/PostItMgr.cxx                    |    2 
 sw/source/uibase/docvw/UnfloatTableButton.cxx           |    4 -
 sw/source/uibase/docvw/edtwin.cxx                       |    9 +-
 sw/source/uibase/fldui/fldmgr.cxx                       |    3 
 sw/source/uibase/frmdlg/colex.cxx                       |    6 -
 sw/source/uibase/frmdlg/frmmgr.cxx                      |    2 
 sw/source/uibase/lingu/hhcwrp.cxx                       |   10 +-
 sw/source/uibase/lingu/olmenu.cxx                       |    2 
 sw/source/uibase/misc/glshell.cxx                       |    7 --
 sw/source/uibase/ribbar/concustomshape.cxx              |    7 --
 sw/source/uibase/ribbar/conrect.cxx                     |    4 -
 sw/source/uibase/ribbar/drawbase.cxx                    |    2 
 sw/source/uibase/ribbar/inputwin.cxx                    |    2 
 sw/source/uibase/shells/annotsh.cxx                     |   23 ++----
 sw/source/uibase/shells/basesh.cxx                      |   56 +++++++---------
 sw/source/uibase/shells/drawsh.cxx                      |    2 
 sw/source/uibase/shells/drwbassh.cxx                    |    9 +-
 sw/source/uibase/shells/drwtxtex.cxx                    |   19 ++---
 sw/source/uibase/shells/drwtxtsh.cxx                    |    6 -
 sw/source/uibase/shells/frmsh.cxx                       |   32 +++------
 sw/source/uibase/shells/grfsh.cxx                       |   33 +++------
 sw/source/uibase/shells/tabsh.cxx                       |   50 ++++++--------
 sw/source/uibase/shells/textfld.cxx                     |    2 
 sw/source/uibase/shells/textidx.cxx                     |    6 -
 sw/source/uibase/shells/textsh.cxx                      |   14 ++--
 sw/source/uibase/shells/textsh1.cxx                     |   47 ++++---------
 sw/source/uibase/shells/txtattr.cxx                     |   30 ++++----
 sw/source/uibase/shells/txtnum.cxx                      |    5 -
 sw/source/uibase/uiview/formatclipboard.cxx             |   22 ++----
 sw/source/uibase/uiview/pview.cxx                       |    4 -
 sw/source/uibase/uiview/view0.cxx                       |    2 
 sw/source/uibase/uiview/view2.cxx                       |    5 -
 sw/source/uibase/uiview/viewdraw.cxx                    |    5 -
 sw/source/uibase/uiview/viewprt.cxx                     |    6 -
 sw/source/uibase/uiview/viewtab.cxx                     |   53 +++++++--------
 sw/source/uibase/uno/SwXDocumentSettings.cxx            |    4 -
 sw/source/uibase/uno/unotxdoc.cxx                       |    7 --
 sw/source/uibase/utlui/glbltree.cxx                     |    7 --
 sw/source/uibase/utlui/numfmtlb.cxx                     |    6 -
 sw/source/uibase/wrtsh/wrtsh1.cxx                       |    6 -
 134 files changed, 568 insertions(+), 751 deletions(-)

New commits:
commit dbd49cf90b175a3c3d7a4f25ad366f9bc4c716db
Author:     Noel Grandin <noelgran...@gmail.com>
AuthorDate: Wed Oct 6 16:17:38 2021 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Sun Oct 10 11:33:38 2021 +0200

    use SfxItemSetFixed in sw
    
    Change-Id: I69e188d7599b7fc439f613cec0a0967ccb748b7e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123313
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/chart2/source/controller/main/DrawCommandDispatch.cxx 
b/chart2/source/controller/main/DrawCommandDispatch.cxx
index 1de375c1f281..06fcf0ac4e57 100644
--- a/chart2/source/controller/main/DrawCommandDispatch.cxx
+++ b/chart2/source/controller/main/DrawCommandDispatch.cxx
@@ -124,9 +124,7 @@ void DrawCommandDispatch::setAttributes( SdrObject* pObj )
                         if ( pSourceObj )
                         {
                             const SfxItemSet& rSource = 
pSourceObj->GetMergedItemSet();
-                            SfxItemSet aDest(
-                                pObj->getSdrModelFromSdrObject().GetItemPool(),
-                                svl::Items<
+                            SfxItemSetFixed<
                                     // Ranges from SdrAttrObj:
                                     SDRATTR_START, SDRATTR_SHADOW_LAST,
                                     SDRATTR_MISC_FIRST,
@@ -139,7 +137,8 @@ void DrawCommandDispatch::setAttributes( SdrObject* pObj )
                                     SDRATTR_GRAF_FIRST,
                                         SDRATTR_CUSTOMSHAPE_LAST,
                                     // Range from SdrTextObj:
-                                    EE_ITEMS_START, EE_ITEMS_END>);
+                                    EE_ITEMS_START, EE_ITEMS_END>
+                                
aDest(pObj->getSdrModelFromSdrObject().GetItemPool());
                             aDest.Set( rSource );
                             pObj->SetMergedItemSet( aDest );
                             Degree100 nAngle = pSourceObj->GetRotateAngle();
diff --git a/chart2/source/controller/main/ShapeController.cxx 
b/chart2/source/controller/main/ShapeController.cxx
index f2ea87f399f7..a526abc60527 100644
--- a/chart2/source/controller/main/ShapeController.cxx
+++ b/chart2/source/controller/main/ShapeController.cxx
@@ -533,11 +533,9 @@ void ShapeController::executeDispatch_ParagraphDialog()
     SfxItemSet aAttr( rPool );
     pDrawViewWrapper->GetAttributes( aAttr );
 
-    SfxItemSet aNewAttr(
-        rPool,
-        svl::Items<
+    SfxItemSetFixed<
             EE_ITEMS_START, EE_ITEMS_END,
-            SID_ATTR_PARA_PAGEBREAK, SID_ATTR_PARA_WIDOWS>);
+            SID_ATTR_PARA_PAGEBREAK, SID_ATTR_PARA_WIDOWS>  aNewAttr(rPool);
     aNewAttr.Put( aAttr );
     aNewAttr.Put( SvxHyphenZoneItem( false, SID_ATTR_PARA_HYPHENZONE ) );
     aNewAttr.Put( SvxFormatBreakItem( SvxBreak::NONE, SID_ATTR_PARA_PAGEBREAK 
) );
diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx
index 281098a9e6a0..b7fff37b5ee4 100644
--- a/sw/inc/fesh.hxx
+++ b/sw/inc/fesh.hxx
@@ -382,7 +382,7 @@ public:
     bool IsFrameSelected() const;
     bool GetFlyFrameAttr( SfxItemSet &rSet ) const;
     bool SetFlyFrameAttr( SfxItemSet &rSet );
-    static SfxItemSet makeItemSetFromFormatAnchor(SfxItemPool& rPool, const 
SwFormatAnchor &rAnchor);
+    static SfxItemSetFixed<RES_VERT_ORIENT, RES_ANCHOR> 
makeItemSetFromFormatAnchor(SfxItemPool& rPool, const SwFormatAnchor &rAnchor);
     void ResetFlyFrameAttr( const SfxItemSet* pSet );
     const SwFrameFormat *NewFlyFrame( const SfxItemSet &rSet, bool bAnchValid 
= false,
                          SwFrameFormat *pParent = nullptr );
diff --git a/sw/source/core/access/accpara.cxx 
b/sw/source/core/access/accpara.cxx
index 6d75fe4abf86..e31c343d321d 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -1465,9 +1465,9 @@ void SwAccessibleParagraph::_getDefaultAttributesImpl(
     // get default paragraph attributes, if needed, and merge these into <pSet>
     if ( !bOnlyCharAttrs )
     {
-        SfxItemSet aParaSet( 
const_cast<SwAttrPool&>(pTextNode->GetDoc().GetAttrPool()),
-                             svl::Items<RES_PARATR_BEGIN, RES_PARATR_END - 1,
-                             RES_FRMATR_BEGIN, RES_FRMATR_END - 1> );
+        SfxItemSetFixed<RES_PARATR_BEGIN, RES_PARATR_END - 1,
+                        RES_FRMATR_BEGIN, RES_FRMATR_END - 1>
+             aParaSet( 
const_cast<SwAttrPool&>(pTextNode->GetDoc().GetAttrPool()) );
         pTextNode->SwContentNode::GetAttr( aParaSet );
         pSet->Put( aParaSet );
     }
@@ -1476,8 +1476,8 @@ void SwAccessibleParagraph::_getDefaultAttributesImpl(
             "<SwAccessibleParagraph::_getDefaultAttributesImpl(..)> - missing 
paragraph style. Serious defect!" );
     if ( pTextNode->GetTextColl() )
     {
-        SfxItemSet aCharSet( 
const_cast<SwAttrPool&>(pTextNode->GetDoc().GetAttrPool()),
-                             svl::Items<RES_CHRATR_BEGIN, RES_CHRATR_END - 1> 
);
+        SfxItemSetFixed<RES_CHRATR_BEGIN, RES_CHRATR_END - 1>
+            aCharSet( 
const_cast<SwAttrPool&>(pTextNode->GetDoc().GetAttrPool()) );
         SetPutRecursive( aCharSet, pTextNode->GetTextColl()->GetAttrSet() );
         pSet->Put( aCharSet );
     }
@@ -1644,8 +1644,7 @@ void SwAccessibleParagraph::_getRunAttributesImpl(
     }
 
     // retrieve character attributes for the created PaM <pPaM>
-    SfxItemSet aSet( pPaM->GetDoc().GetAttrPool(),
-                     svl::Items<RES_CHRATR_BEGIN, RES_CHRATR_END -1> );
+    SfxItemSetFixed<RES_CHRATR_BEGIN, RES_CHRATR_END -1> aSet( 
pPaM->GetDoc().GetAttrPool() );
     // #i82637#
     // From the perspective of the a11y API the character attributes, which
     // are set at the automatic paragraph style of the paragraph, are treated
@@ -1655,16 +1654,14 @@ void SwAccessibleParagraph::_getRunAttributesImpl(
     {
         if ( pTextNode->HasSwAttrSet() )
         {
-            SfxItemSet aAutomaticParaStyleCharAttrs( 
pPaM->GetDoc().GetAttrPool(),
-                                                     
svl::Items<RES_CHRATR_BEGIN, RES_CHRATR_END -1> );
+            SfxItemSetFixed<RES_CHRATR_BEGIN, RES_CHRATR_END -1> 
aAutomaticParaStyleCharAttrs( pPaM->GetDoc().GetAttrPool());
             aAutomaticParaStyleCharAttrs.Put( *(pTextNode->GetpSwAttrSet()), 
false );
             aSet.Put( aAutomaticParaStyleCharAttrs );
         }
     }
     // get character attributes at <pPaM> and merge these into <aSet>
     {
-        SfxItemSet aCharAttrsAtPaM( pPaM->GetDoc().GetAttrPool(),
-                                    svl::Items<RES_CHRATR_BEGIN, 
RES_CHRATR_END -1> );
+        SfxItemSetFixed<RES_CHRATR_BEGIN, RES_CHRATR_END -1> aCharAttrsAtPaM( 
pPaM->GetDoc().GetAttrPool() );
         SwUnoCursorHelper::GetCursorAttr(*pPaM, aCharAttrsAtPaM, true);
         aSet.Put( aCharAttrsAtPaM );
     }
@@ -1752,14 +1749,13 @@ void 
SwAccessibleParagraph::_getSupplementalAttributesImpl(
 {
     SwTextFrame const*const pFrame(static_cast<SwTextFrame 
const*>(GetFrame()));
     const SwTextNode *const pTextNode(pFrame->GetTextNodeForParaProps());
-    SfxItemSet aSet(
-            const_cast<SwAttrPool&>(pTextNode->GetDoc().GetAttrPool()),
-            svl::Items<
+    SfxItemSetFixed<
                 RES_PARATR_LINESPACING, RES_PARATR_ADJUST,
                 RES_PARATR_TABSTOP, RES_PARATR_TABSTOP,
                 RES_PARATR_NUMRULE, RES_PARATR_NUMRULE,
                 RES_PARATR_LIST_BEGIN, RES_PARATR_LIST_END - 1,
-                RES_LR_SPACE, RES_UL_SPACE>);
+                RES_LR_SPACE, RES_UL_SPACE>
+        aSet( const_cast<SwAttrPool&>(pTextNode->GetDoc().GetAttrPool()) );
 
     if ( pTextNode->HasBullet() || pTextNode->HasNumber() )
     {
diff --git a/sw/source/core/attr/format.cxx b/sw/source/core/attr/format.cxx
index 6e5ba61cf13d..a878f3bf8f36 100644
--- a/sw/source/core/attr/format.cxx
+++ b/sw/source/core/attr/format.cxx
@@ -459,7 +459,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(), svl::Items<XATTR_FILL_FIRST, 
XATTR_FILL_LAST>);
+        SfxItemSetFixed<XATTR_FILL_FIRST, XATTR_FILL_LAST> 
aTempSet(*m_aSet.GetPool());
         const SvxBrushItem& rSource = rAttr.StaticWhichCast(RES_BACKGROUND);
 
         // fill a local ItemSet with the attributes corresponding as good as 
possible
diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index 03f94624aae2..d241ba739bf8 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -1788,8 +1788,7 @@ bool SwCursorShell::GetContentAtPos( const Point& rPt,
             if( !bRet && IsAttrAtPos::CurrAttrs & rContentAtPos.eContentAtPos )
             {
                 const sal_Int32 n = aPos.nContent.GetIndex();
-                SfxItemSet aSet( GetDoc()->GetAttrPool(), 
svl::Items<POOLATTR_BEGIN,
-                    POOLATTR_END - 1> );
+                SfxItemSetFixed<POOLATTR_BEGIN, POOLATTR_END - 1>  aSet( 
GetDoc()->GetAttrPool() );
                 if( pTextNd->GetpSwpHints() )
                 {
                     for( size_t i = 0; i < pTextNd->GetSwpHints().Count(); ++i 
)
@@ -2147,11 +2146,9 @@ bool SwCursorShell::SetShadowCursorPos( const Point& 
rPt, SwFillMode eFillMode )
             case SwFillMode::Indent:
                 if( nullptr != (pCNd = aPos.nNode.GetNode().GetContentNode() ))
                 {
-                    SfxItemSet aSet(
-                        GetDoc()->GetAttrPool(),
-                        svl::Items<
+                    SfxItemSetFixed<
                             RES_PARATR_ADJUST, RES_PARATR_ADJUST,
-                            RES_LR_SPACE, RES_LR_SPACE>);
+                            RES_LR_SPACE, RES_LR_SPACE>  aSet( 
GetDoc()->GetAttrPool() );
                     SvxLRSpaceItem 
aLR(pCNd->GetAttr(RES_LR_SPACE).StaticWhichCast(RES_LR_SPACE));
                     aLR.SetTextLeft( aFPos.nTabCnt );
                     aLR.SetTextFirstLineOffset( 0 );
diff --git a/sw/source/core/crsr/findattr.cxx b/sw/source/core/crsr/findattr.cxx
index a9bb69fe17ed..ba5e6ac56d08 100644
--- a/sw/source/core/crsr/findattr.cxx
+++ b/sw/source/core/crsr/findattr.cxx
@@ -1054,8 +1054,7 @@ static bool FindAttrsImpl(SwPaM & rSearchPam,
 
     // check which text/char attributes are searched
     SwAttrCheckArr aCmpArr( rSet, bSrchForward, bNoColls );
-    SfxItemSet aOtherSet( rSearchPam.GetDoc().GetAttrPool(),
-                            svl::Items<RES_PARATR_BEGIN, RES_GRFATR_END-1> );
+    SfxItemSetFixed<RES_PARATR_BEGIN, RES_GRFATR_END-1> aOtherSet( 
rSearchPam.GetDoc().GetAttrPool() );
     aOtherSet.Put( rSet, false );   // got all invalid items
 
     FnSearchAttr fnSearch = bSrchForward
diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx
index 5dd731471828..a1fe74191499 100644
--- a/sw/source/core/crsr/viscrs.cxx
+++ b/sw/source/core/crsr/viscrs.cxx
@@ -272,9 +272,8 @@ void SwVisibleCursor::SetPosAndShow(SfxViewShell const * 
pViewShell)
 
             if (pShell)
             {
-                SfxItemSet aSet(m_pCursorShell->GetSfxViewShell()->GetPool(),
-                    svl::Items<RES_TXTATR_INETFMT,
-                    RES_TXTATR_INETFMT>);
+                SfxItemSetFixed<RES_TXTATR_INETFMT, RES_TXTATR_INETFMT>
+                     aSet(m_pCursorShell->GetSfxViewShell()->GetPool());
                 pShell->GetCurAttr(aSet);
                 if(SfxItemState::SET <= aSet.GetItemState( RES_TXTATR_INETFMT 
))
                 {
diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx 
b/sw/source/core/doc/DocumentContentOperationsManager.cxx
index dd0541fae84c..36c7f33d1c17 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -1268,9 +1268,8 @@ namespace //local functions originally from docfmt.cxx
             if (!xExtra)
             {
                 // Apply the first character's attributes to the ReplaceText
-                SfxItemSet aSet( rDoc.GetAttrPool(),
-                            svl::Items<RES_CHRATR_BEGIN,     
RES_TXTATR_WITHEND_END - 1,
-                            RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1> );
+                SfxItemSetFixed<RES_CHRATR_BEGIN,     RES_TXTATR_WITHEND_END - 
1,
+                            RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1>  aSet( 
rDoc.GetAttrPool() );
                 SwTextNode * pNode = 
rRg.Start()->nNode.GetNode().GetTextNode();
                 pNode->GetParaAttr( aSet, rRg.Start()->nContent.GetIndex() + 
1, rRg.End()->nContent.GetIndex() );
 
@@ -1423,21 +1422,17 @@ namespace //local functions originally from docfmt.cxx
         // - The attribute in rChgSet does not belong to one of the above 
categories
         if ( !bCharAttr && !bOtherAttr )
         {
-            SfxItemSet* pTmpCharItemSet = new SfxItemSet(
-                rDoc.GetAttrPool(),
-                svl::Items<
+            SfxItemSet* pTmpCharItemSet = new SfxItemSetFixed<
                     RES_CHRATR_BEGIN, RES_CHRATR_END - 1,
                     RES_TXTATR_AUTOFMT, RES_TXTATR_CHARFMT,
                     RES_TXTATR_UNKNOWN_CONTAINER,
-                        RES_TXTATR_UNKNOWN_CONTAINER>);
+                        RES_TXTATR_UNKNOWN_CONTAINER>( rDoc.GetAttrPool() );
 
-            SfxItemSet* pTmpOtherItemSet = new SfxItemSet(
-                rDoc.GetAttrPool(),
-                svl::Items<
+            SfxItemSet* pTmpOtherItemSet = new SfxItemSetFixed<
                     RES_PARATR_BEGIN, RES_GRFATR_END - 1,
                     RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END - 1,
                     // FillAttribute support:
-                    XATTR_FILL_FIRST, XATTR_FILL_LAST>);
+                    XATTR_FILL_FIRST, XATTR_FILL_LAST>( rDoc.GetAttrPool() );
 
             pTmpCharItemSet->Put( rChgSet );
             pTmpOtherItemSet->Put( rChgSet );
@@ -1526,8 +1521,8 @@ namespace //local functions originally from docfmt.cxx
             // Attributes without an end do not have a range
             if ( !bCharAttr && !bOtherAttr )
             {
-                SfxItemSet aTextSet( rDoc.GetAttrPool(),
-                            svl::Items<RES_TXTATR_NOEND_BEGIN, 
RES_TXTATR_NOEND_END-1> );
+                SfxItemSetFixed<RES_TXTATR_NOEND_BEGIN, RES_TXTATR_NOEND_END-1>
+                    aTextSet( rDoc.GetAttrPool() );
                 aTextSet.Put( rChgSet );
                 if( aTextSet.Count() )
                 {
@@ -1557,12 +1552,11 @@ namespace //local functions originally from docfmt.cxx
             {
                 // CharFormat and URL attributes are treated separately!
                 // TEST_TEMP ToDo: AutoFormat!
-                SfxItemSet aTextSet(
-                    rDoc.GetAttrPool(),
-                    svl::Items<
+                SfxItemSetFixed<
                         RES_TXTATR_REFMARK, RES_TXTATR_METAFIELD,
                         RES_TXTATR_CJK_RUBY, RES_TXTATR_CJK_RUBY,
-                        RES_TXTATR_INPUTFIELD, RES_TXTATR_INPUTFIELD>);
+                        RES_TXTATR_INPUTFIELD, RES_TXTATR_INPUTFIELD>
+                     aTextSet(rDoc.GetAttrPool());
 
                 aTextSet.Put( rChgSet );
                 if( aTextSet.Count() )
@@ -1695,16 +1689,15 @@ namespace //local functions originally from docfmt.cxx
             }
         }
 
-        SfxItemSet firstSet(rDoc.GetAttrPool(),
-                svl::Items<RES_PAGEDESC, RES_BREAK>);
+        SfxItemSetFixed<RES_PAGEDESC, RES_BREAK> firstSet(rDoc.GetAttrPool());
         if (pOtherSet && pOtherSet->Count())
         {   // actually only RES_BREAK is possible here...
             firstSet.Put(*pOtherSet);
         }
-        SfxItemSet propsSet(rDoc.GetAttrPool(),
-            svl::Items<RES_PARATR_BEGIN, RES_PAGEDESC,
+        SfxItemSetFixed
+            <RES_PARATR_BEGIN, RES_PAGEDESC,
                        RES_BREAK+1, RES_FRMATR_END,
-                       XATTR_FILL_FIRST, XATTR_FILL_LAST+1>);
+                       XATTR_FILL_FIRST, XATTR_FILL_LAST+1> 
propsSet(rDoc.GetAttrPool());
         if (pOtherSet && pOtherSet->Count())
         {
             propsSet.Put(*pOtherSet);
@@ -4482,9 +4475,9 @@ bool DocumentContentOperationsManager::ReplaceRangeImpl( 
SwPaM& rPam, const OUSt
             if( !sRepl.isEmpty() )
             {
                 // Apply the first character's attributes to the ReplaceText
-                SfxItemSet aSet( m_rDoc.GetAttrPool(),
-                            svl::Items<RES_CHRATR_BEGIN,     
RES_TXTATR_WITHEND_END - 1,
-                            RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1> );
+                SfxItemSetFixed
+                            <RES_CHRATR_BEGIN,     RES_TXTATR_WITHEND_END - 1,
+                            RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1>  aSet( 
m_rDoc.GetAttrPool() );
                 pTextNd->GetParaAttr( 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 5719a26e6076..a53a3ada86f2 100644
--- a/sw/source/core/doc/DocumentDeviceManager.cxx
+++ b/sw/source/core/doc/DocumentDeviceManager.cxx
@@ -205,13 +205,11 @@ void DocumentDeviceManager::setJobsetup(/*[in]*/ const 
JobSetup &rJobSetup )
     if( !mpPrt )
     {
         //The ItemSet is deleted by Sfx!
-        auto pSet = std::make_unique<SfxItemSet>(
-            m_rDoc.GetAttrPool(),
-            svl::Items<
+        auto pSet = std::make_unique<SfxItemSetFixed<
                 SID_PRINTER_NOTFOUND_WARN, SID_PRINTER_NOTFOUND_WARN,
                 SID_PRINTER_CHANGESTODOC, SID_PRINTER_CHANGESTODOC,
                 SID_HTML_MODE, SID_HTML_MODE,
-                FN_PARAM_ADDPRINTER, FN_PARAM_ADDPRINTER>);
+                FN_PARAM_ADDPRINTER, 
FN_PARAM_ADDPRINTER>>(m_rDoc.GetAttrPool());
         VclPtr<SfxPrinter> p = VclPtr<SfxPrinter>::Create( std::move(pSet), 
rJobSetup );
         if ( bCheckPageDescs )
             setPrinter( p, true, true );
@@ -290,13 +288,11 @@ SfxPrinter& DocumentDeviceManager::CreatePrinter_() const
 
     // We create a default SfxPrinter.
     // The ItemSet is deleted by Sfx!
-    auto pSet = std::make_unique<SfxItemSet>(
-        m_rDoc.GetAttrPool(),
-        svl::Items<
+    auto pSet = std::make_unique<SfxItemSetFixed<
             SID_PRINTER_NOTFOUND_WARN, SID_PRINTER_NOTFOUND_WARN,
             SID_PRINTER_CHANGESTODOC, SID_PRINTER_CHANGESTODOC,
             SID_HTML_MODE, SID_HTML_MODE,
-            FN_PARAM_ADDPRINTER, FN_PARAM_ADDPRINTER>);
+            FN_PARAM_ADDPRINTER, FN_PARAM_ADDPRINTER>>(m_rDoc.GetAttrPool());
 
     VclPtr<SfxPrinter> pNewPrt = VclPtr<SfxPrinter>::Create( std::move(pSet) );
 
diff --git a/sw/source/core/doc/DocumentFieldsManager.cxx 
b/sw/source/core/doc/DocumentFieldsManager.cxx
index 6a190e9fb21c..ff2f5168fa1e 100644
--- a/sw/source/core/doc/DocumentFieldsManager.cxx
+++ b/sw/source/core/doc/DocumentFieldsManager.cxx
@@ -854,8 +854,7 @@ void DocumentFieldsManager::UpdateTableFields( SfxPoolItem* 
pHt )
                     }
 
                     SwFrameFormat* pFormat = pBox->ClaimFrameFormat();
-                    SfxItemSet aTmp( m_rDoc.GetAttrPool(),
-                                    
svl::Items<RES_BOXATR_BEGIN,RES_BOXATR_END-1> );
+                    SfxItemSetFixed<RES_BOXATR_BEGIN,RES_BOXATR_END-1> aTmp( 
m_rDoc.GetAttrPool() );
 
                     if( pCalc->IsCalcError() )
                         nValue = DBL_MAX;
diff --git a/sw/source/core/doc/DocumentRedlineManager.cxx 
b/sw/source/core/doc/DocumentRedlineManager.cxx
index 73e775f667e2..6dfac2b67012 100644
--- a/sw/source/core/doc/DocumentRedlineManager.cxx
+++ b/sw/source/core/doc/DocumentRedlineManager.cxx
@@ -403,12 +403,11 @@ namespace
 
             // using Undo, remove direct paragraph formatting of the "To" 
paragraph,
             // and apply here direct paragraph formatting of the "From" 
paragraph
-            SfxItemSet aTmp(
-                rDoc.GetAttrPool(),
-                svl::Items<
+            SfxItemSetFixed<
                     RES_PARATR_BEGIN, RES_PARATR_END - 3, // skip RSID and 
GRABBAG
                     RES_PARATR_LIST_BEGIN, RES_UL_SPACE,  // skip PAGEDESC and 
BREAK
-                    RES_CNTNT, RES_FRMATR_END - 1>);
+                    RES_CNTNT, RES_FRMATR_END - 1>
+                 aTmp(rDoc.GetAttrPool());
             SfxItemSet aTmp2(aTmp);
 
             pToNode->GetParaAttr(aTmp, 0, 0);
diff --git a/sw/source/core/doc/docfly.cxx b/sw/source/core/doc/docfly.cxx
index f8b0a15e942a..8293ef06bc31 100644
--- a/sw/source/core/doc/docfly.cxx
+++ b/sw/source/core/doc/docfly.cxx
@@ -1118,8 +1118,8 @@ SwChainRet SwDoc::Chain( SwFrameFormat &rSource, const 
SwFrameFormat &rDest )
         aChain.SetPrev( &static_cast<SwFlyFrameFormat&>(rSource) );
         SetAttr( aChain, rDestFormat );
 
-        SfxItemSet aSet( GetAttrPool(), svl::Items<RES_FRM_SIZE, RES_FRM_SIZE,
-                                        RES_CHAIN,  RES_CHAIN> );
+        SfxItemSetFixed<RES_FRM_SIZE, RES_FRM_SIZE,
+                        RES_CHAIN,  RES_CHAIN> aSet( GetAttrPool() );
 
         // 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 4b5d592e87c9..194c863ee746 100644
--- a/sw/source/core/doc/docfmt.cxx
+++ b/sw/source/core/doc/docfmt.cxx
@@ -112,18 +112,16 @@ static bool lcl_RstAttr( SwNode* pNd, void* pArgs )
 
         // remove unused attribute RES_LR_SPACE
         // add list attributes
-        SfxItemSet aSavedAttrsSet(
-            rDoc.GetAttrPool(),
-            svl::Items<
+        SfxItemSetFixed<
                 RES_PARATR_NUMRULE, RES_PARATR_NUMRULE,
                 RES_PARATR_LIST_BEGIN, RES_PARATR_LIST_END - 1,
-                RES_PAGEDESC, RES_BREAK>);
+                RES_PAGEDESC, RES_BREAK>  aSavedAttrsSet(rDoc.GetAttrPool());
         const SfxItemSet* pAttrSetOfNode = pNode->GetpSwAttrSet();
 
         std::vector<sal_uInt16> aClearWhichIds;
         // restoring all paragraph list attributes
         {
-            SfxItemSet aListAttrSet( rDoc.GetAttrPool(), 
svl::Items<RES_PARATR_LIST_BEGIN, RES_PARATR_LIST_END - 1> );
+            SfxItemSetFixed<RES_PARATR_LIST_BEGIN, RES_PARATR_LIST_END - 1> 
aListAttrSet( rDoc.GetAttrPool() );
             aListAttrSet.Set(*pAttrSetOfNode);
             if ( aListAttrSet.Count() )
             {
@@ -321,10 +319,11 @@ void SwDoc::ResetAttrs( const SwPaM &rRg,
             pStt, pEnd, pHst, nullptr, pLayout);
 
     // mst: not including META here; it seems attrs with CH_TXTATR are omitted
-    SfxItemSet aDelSet(GetAttrPool(), svl::Items<RES_CHRATR_BEGIN, 
RES_CHRATR_END - 1,
-                                                 RES_TXTATR_INETFMT, 
RES_TXTATR_UNKNOWN_CONTAINER,
-                                                 RES_PARATR_BEGIN, 
RES_FRMATR_END - 1,
-                                                 RES_UNKNOWNATR_BEGIN, 
RES_UNKNOWNATR_END - 1>);
+    SfxItemSetFixed<RES_CHRATR_BEGIN, RES_CHRATR_END - 1,
+                     RES_TXTATR_INETFMT, RES_TXTATR_UNKNOWN_CONTAINER,
+                     RES_PARATR_BEGIN, RES_FRMATR_END - 1,
+                     RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END - 1>
+        aDelSet(GetAttrPool());
     for( auto it = rAttrs.rbegin(); it != rAttrs.rend(); ++it )
     {
         if( POOLATTR_END > *it )
@@ -416,7 +415,7 @@ void 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(), svl::Items<RES_CHRATR_RSID, 
RES_CHRATR_RSID>);
+    SfxItemSetFixed<RES_CHRATR_RSID, RES_CHRATR_RSID> aSet(GetAttrPool());
     aSet.Put(aRsid);
     bool const bRet(pTextNode->SetAttr(aSet, nStart,
         rRg.GetPoint()->nContent.GetIndex()));
diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx
index d75392ba3205..1c2d6b3f3f96 100644
--- a/sw/source/core/doc/docnew.cxx
+++ b/sw/source/core/doc/docnew.cxx
@@ -351,7 +351,7 @@ SwDoc::SwDoc()
     // pass empty item set containing the paragraph's list attributes
     // as ignorable items to the stype manager.
     {
-        SfxItemSet aIgnorableParagraphItems( GetAttrPool(), 
svl::Items<RES_PARATR_LIST_BEGIN, RES_PARATR_LIST_END-1>);
+        SfxItemSetFixed<RES_PARATR_LIST_BEGIN, RES_PARATR_LIST_END-1> 
aIgnorableParagraphItems( GetAttrPool() );
         mpStyleAccess = createStyleManager( &aIgnorableParagraphItems );
     }
 
diff --git a/sw/source/core/doc/docsort.cxx b/sw/source/core/doc/docsort.cxx
index fbd7ff9e9bcb..38626edb3198 100644
--- a/sw/source/core/doc/docsort.cxx
+++ b/sw/source/core/doc/docsort.cxx
@@ -881,11 +881,10 @@ void FlatFndBox::FillFlat(const FndBox_& rBox, bool 
bLastBox)
                     SfxItemState::SET == pFormat->GetItemState( 
RES_BOXATR_FORMULA ) ||
                     SfxItemState::SET == pFormat->GetItemState( 
RES_BOXATR_VALUE ) )
                 {
-                    SfxItemSet aSet(
-                        m_pDoc->GetAttrPool(),
-                        svl::Items<
+                    SfxItemSetFixed<
                             RES_VERT_ORIENT, RES_VERT_ORIENT,
-                            RES_BOXATR_FORMAT, RES_BOXATR_VALUE>);
+                            RES_BOXATR_FORMAT, RES_BOXATR_VALUE>
+                        aSet(m_pDoc->GetAttrPool());
                     aSet.Put( pFormat->GetAttrSet() );
                     if( m_vItemSets.empty() )
                     {
diff --git a/sw/source/core/doc/tblcpy.cxx b/sw/source/core/doc/tblcpy.cxx
index e5b4c8f8095a..e0db7464470f 100644
--- a/sw/source/core/doc/tblcpy.cxx
+++ b/sw/source/core/doc/tblcpy.cxx
@@ -618,8 +618,7 @@ static void lcl_CpyBox( const SwTable& rCpyTable, const 
SwTableBox* pCpyBox,
     if( !pCpyBox )
         return;
 
-    SfxItemSet aBoxAttrSet( pCpyDoc->GetAttrPool(), 
svl::Items<RES_BOXATR_FORMAT,
-                                                    RES_BOXATR_VALUE> );
+    SfxItemSetFixed<RES_BOXATR_FORMAT, RES_BOXATR_VALUE> aBoxAttrSet( 
pCpyDoc->GetAttrPool() );
     aBoxAttrSet.Put( pCpyBox->GetFrameFormat()->GetAttrSet() );
     if( !aBoxAttrSet.Count() )
         return;
diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx
index 2273ec51c12f..d32e9f2af3e0 100644
--- a/sw/source/core/doc/tblrwcl.cxx
+++ b/sw/source/core/doc/tblrwcl.cxx
@@ -1904,8 +1904,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->rDoc.GetAttrPool(),
-                                            svl::Items<RES_BOXATR_FORMAT, 
RES_BOXATR_VALUE> );
+                    SfxItemSetFixed<RES_BOXATR_FORMAT, RES_BOXATR_VALUE> 
aBoxAttrSet( pCpyPara->rDoc.GetAttrPool() );
                     
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 aeaa4042a6f2..87cbdfd5db70 100644
--- a/sw/source/core/docnode/ndtbl.cxx
+++ b/sw/source/core/docnode/ndtbl.cxx
@@ -484,7 +484,7 @@ const SwTable* SwDoc::InsertTable( const 
SwInsertTableOptions& rInsTableOpts,
         const sal_uInt16 nBoxArrLen = pTAFormat ? 16 : 4;
         aBoxFormatArr.resize( nBoxArrLen, nullptr );
     }
-    SfxItemSet aCharSet( GetAttrPool(), svl::Items<RES_CHRATR_BEGIN, 
RES_PARATR_LIST_END-1> );
+    SfxItemSetFixed<RES_CHRATR_BEGIN, RES_PARATR_LIST_END-1> aCharSet( 
GetAttrPool() );
 
     SwNodeIndex aNdIdx( *pTableNd, 1 ); // Set to StartNode of first Box
     SwTableLines& rLines = rNdTable.GetTabLines();
@@ -770,7 +770,7 @@ const SwTable* SwDoc::TextToTable( const 
SwInsertTableOptions& rInsTableOpts,
             aBoxFormatArr2 = std::vector<SwTableBoxFormat*>( nBoxArrLen, 
nullptr );
         }
 
-        SfxItemSet aCharSet( GetAttrPool(), svl::Items<RES_CHRATR_BEGIN, 
RES_PARATR_LIST_END-1> );
+        SfxItemSetFixed<RES_CHRATR_BEGIN, RES_PARATR_LIST_END-1> aCharSet( 
GetAttrPool() );
 
         SwHistory* pHistory = pUndo ? &pUndo->GetHistory() : nullptr;
 
@@ -3056,11 +3056,11 @@ void sw_BoxSetSplitBoxFormats( SwTableBox* pBox, 
SwCollectTableLineBoxes* pSplPa
         }
         else
         {
-            SfxItemSet aTmpSet( pFormat->GetDoc()->GetAttrPool(),
-                                svl::Items<RES_LR_SPACE,    RES_UL_SPACE,
-                                           RES_PROTECT,     RES_PROTECT,
-                                           RES_VERT_ORIENT, RES_VERT_ORIENT,
-                                           RES_BACKGROUND,  RES_SHADOW> );
+            SfxItemSetFixed<RES_LR_SPACE,    RES_UL_SPACE,
+                           RES_PROTECT,     RES_PROTECT,
+                           RES_VERT_ORIENT, RES_VERT_ORIENT,
+                           RES_BACKGROUND,  RES_SHADOW>
+                aTmpSet( pFormat->GetDoc()->GetAttrPool() );
             aTmpSet.Put( pFormat->GetAttrSet() );
             if( aTmpSet.Count() )
                 pBox->ClaimFrameFormat()->SetFormatAttr( aTmpSet );
@@ -3676,7 +3676,7 @@ static bool lcl_SetAFormatBox(FndBox_ & rBox, 
SetAFormatTabPara *pSetPara, bool
                 pSetBox->SetDirectFormatting(false);
 
             SwDoc* pDoc = pSetBox->GetFrameFormat()->GetDoc();
-            SfxItemSet aCharSet(pDoc->GetAttrPool(), 
svl::Items<RES_CHRATR_BEGIN, RES_PARATR_LIST_END-1>);
+            SfxItemSetFixed<RES_CHRATR_BEGIN, RES_PARATR_LIST_END-1> 
aCharSet(pDoc->GetAttrPool());
             SfxItemSet aBoxSet(pDoc->GetAttrPool(), aTableBoxSetRange);
             sal_uInt8 nPos = pSetPara->nAFormatLine * 4 + 
pSetPara->nAFormatBox;
             const bool bSingleRowTable = pSetPara->bSingleRowTable;
@@ -4064,7 +4064,7 @@ void SwDoc::ChkBoxNumFormat( SwTableBox& rBox, bool 
bCallUpdate )
             }
 
             SwTableBoxFormat* pBoxFormat = 
static_cast<SwTableBoxFormat*>(rBox.GetFrameFormat());
-            SfxItemSet aBoxSet( GetAttrPool(), svl::Items<RES_BOXATR_FORMAT, 
RES_BOXATR_VALUE> );
+            SfxItemSetFixed<RES_BOXATR_FORMAT, RES_BOXATR_VALUE> aBoxSet( 
GetAttrPool() );
 
             bool bLockModify = true;
             bool bSetNumberFormat = IsInsTableFormatNum();
@@ -4217,8 +4217,8 @@ void SwDoc::ClearLineNumAttrs( SwPosition const & rPos )
         return;
 
     const SfxPoolItem* pFormatItem = nullptr;
-    SfxItemSet rSet( pTextNode->GetDoc().GetAttrPool(),
-                svl::Items<RES_PARATR_BEGIN, RES_PARATR_END - 1>);
+    SfxItemSetFixed<RES_PARATR_BEGIN, RES_PARATR_END - 1>
+        rSet( pTextNode->GetDoc().GetAttrPool() );
     pTextNode->SwContentNode::GetAttr( rSet );
     if ( SfxItemState::SET != rSet.GetItemState( RES_PARATR_NUMRULE , false , 
&pFormatItem ) )
         return;
diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx
index 7d7ff10ed73d..7c0403239130 100644
--- a/sw/source/core/docnode/node.cxx
+++ b/sw/source/core/docnode/node.cxx
@@ -154,10 +154,10 @@ static bool Put( std::shared_ptr<const SfxItemSet>& 
rpAttrSet, const SwContentNo
     SwAttrSet aNewSet( static_cast<const SwAttrSet&>(*rpAttrSet) );
 
     // #i76273# Robust
-    std::optional<SfxItemSet> pStyleNames;
+    std::optional<SfxItemSetFixed<RES_FRMATR_STYLE_NAME, 
RES_FRMATR_CONDITIONAL_STYLE_NAME>> pStyleNames;
     if ( SfxItemState::SET == rSet.GetItemState( RES_FRMATR_STYLE_NAME, false 
) )
     {
-        pStyleNames.emplace( *aNewSet.GetPool(), 
svl::Items<RES_FRMATR_STYLE_NAME, RES_FRMATR_CONDITIONAL_STYLE_NAME> );
+        pStyleNames.emplace( *aNewSet.GetPool() );
         pStyleNames->Put( aNewSet );
     }
 
@@ -201,10 +201,10 @@ static bool Put_BC( std::shared_ptr<const SfxItemSet>& 
rpAttrSet,
     SwAttrSet aNewSet( static_cast<const SwAttrSet&>(*rpAttrSet) );
 
     // #i76273# Robust
-    std::optional<SfxItemSet> pStyleNames;
+    std::optional<SfxItemSetFixed<RES_FRMATR_STYLE_NAME, 
RES_FRMATR_CONDITIONAL_STYLE_NAME>> pStyleNames;
     if ( SfxItemState::SET == rSet.GetItemState( RES_FRMATR_STYLE_NAME, false 
) )
     {
-        pStyleNames.emplace( *aNewSet.GetPool(), 
svl::Items<RES_FRMATR_STYLE_NAME, RES_FRMATR_CONDITIONAL_STYLE_NAME> );
+        pStyleNames.emplace( *aNewSet.GetPool() );
         pStyleNames->Put( aNewSet );
     }
 
diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx
index 762b27251cbe..cb9618c44e8b 100644
--- a/sw/source/core/draw/dcontact.cxx
+++ b/sw/source/core/draw/dcontact.cxx
@@ -1088,7 +1088,7 @@ static 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(), 
svl::Items<RES_FRM_SIZE, RES_FRM_SIZE>);
+        SfxItemSetFixed<RES_FRM_SIZE, RES_FRM_SIZE> 
aResizeSet(pFormat->GetDoc()->GetAttrPool());
         SwFormatFrameSize aSize;
         aResizeSet.Put(aSize);
         SwTextBoxHelper::syncFlyFrameAttr(*pFormat, aResizeSet, 
pFormat->FindRealSdrObject());
@@ -1283,8 +1283,7 @@ void SwDrawContact::Changed_( const SdrObject& rObj,
                         assert(!"<SwDrawContact::Changed_(..)> - unsupported 
layout direction");
                     }
                 }
-                SfxItemSet aSet( GetFormat()->GetDoc()->GetAttrPool(),
-                                 svl::Items<RES_VERT_ORIENT, RES_HORI_ORIENT> 
);
+                SfxItemSetFixed<RES_VERT_ORIENT, RES_HORI_ORIENT> aSet( 
GetFormat()->GetDoc()->GetAttrPool() );
                 const SwFormatVertOrient& rVert = GetFormat()->GetVertOrient();
                 if ( nYPosDiff != 0 )
                 {
@@ -1354,9 +1353,8 @@ void SwDrawContact::Changed_( const SdrObject& rObj,
                 const bool bEnableSetModified = 
pDoc->getIDocumentState().IsEnableSetModified();
                 pDoc->getIDocumentState().SetEnableSetModified(false);
 
-                SfxItemSet aSyncSet(
-                    pDoc->GetAttrPool(),
-                    svl::Items<RES_VERT_ORIENT, RES_HORI_ORIENT, RES_ANCHOR, 
RES_ANCHOR>);
+                SfxItemSetFixed<RES_VERT_ORIENT, RES_HORI_ORIENT, RES_ANCHOR, 
RES_ANCHOR>
+                    aSyncSet( pDoc->GetAttrPool() );
                 aSyncSet.Put(GetFormat()->GetHoriOrient());
                 bool bRelToTableCell(false);
                 
aSyncSet.Put(SwFormatVertOrient(pAnchoredDrawObj->GetRelPosToPageFrame(false, 
bRelToTableCell).getY(),
@@ -1367,9 +1365,7 @@ void SwDrawContact::Changed_( const SdrObject& rObj,
                 auto pSdrObj = const_cast<SdrObject*>(&rObj);
                 if (pSdrObj != GetFormat()->FindRealSdrObject())
                 {
-                    SfxItemSet aSet(
-                        pDoc->GetAttrPool(),
-                        svl::Items<RES_FRM_SIZE, RES_FRM_SIZE>);
+                    SfxItemSetFixed<RES_FRM_SIZE, RES_FRM_SIZE>  aSet( 
pDoc->GetAttrPool() );
 
                     aSet.Put(aSyncSet);
                     aSet.Put(pSdrObj->GetMergedItem(RES_FRM_SIZE));
diff --git a/sw/source/core/draw/dflyobj.cxx b/sw/source/core/draw/dflyobj.cxx
index 6d0a1ee0d917..d5497f9f2098 100644
--- a/sw/source/core/draw/dflyobj.cxx
+++ b/sw/source/core/draw/dflyobj.cxx
@@ -867,7 +867,7 @@ void SwVirtFlyDrawObj::NbcCrop(const basegfx::B2DPoint& 
rRef, double fxFact, dou
         Fraction(fyFact));
 
     // Get old values for crop in 10th of mm
-    SfxItemSet aSet( pSh->GetAttrPool(), svl::Items<RES_GRFATR_CROPGRF, 
RES_GRFATR_CROPGRF> );
+    SfxItemSetFixed<RES_GRFATR_CROPGRF, RES_GRFATR_CROPGRF> aSet( 
pSh->GetAttrPool() );
     pSh->GetCurAttr( aSet );
     SwCropGrf aCrop( aSet.Get(RES_GRFATR_CROPGRF) );
 
diff --git a/sw/source/core/edit/acorrect.cxx b/sw/source/core/edit/acorrect.cxx
index 5a2db8a5753d..5ee956672643 100644
--- a/sw/source/core/edit/acorrect.cxx
+++ b/sw/source/core/edit/acorrect.cxx
@@ -320,8 +320,8 @@ bool SwAutoCorrDoc::SetINetAttr( sal_Int32 nStt, sal_Int32 
nEnd, const OUString&
     SwPaM aPam(pFrame->MapViewToModelPos(TextFrameIndex(nStt)),
                pFrame->MapViewToModelPos(TextFrameIndex(nEnd)));
 
-    SfxItemSet aSet( m_rEditSh.GetDoc()->GetAttrPool(),
-                        svl::Items<RES_TXTATR_INETFMT, RES_TXTATR_INETFMT> );
+    SfxItemSetFixed<RES_TXTATR_INETFMT, RES_TXTATR_INETFMT>
+        aSet( m_rEditSh.GetDoc()->GetAttrPool() );
     aSet.Put( SwFormatINetFormat( rURL, OUString() ));
     m_rEditSh.GetDoc()->SetFormatItemByAutoFormat( aPam, aSet );
     if( m_bUndoIdInitialized )
diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx
index a5d8d64c4a27..e4f226bfe535 100644
--- a/sw/source/core/edit/autofmt.cxx
+++ b/sw/source/core/edit/autofmt.cxx
@@ -588,9 +588,8 @@ bool SwAutoFormat::DoUnderline()
             aLine.SetWidth( DEF_LINE_WIDTH_2 );
             break;
         }
-        SfxItemSet aSet(m_pDoc->GetAttrPool(),
-                    svl::Items<RES_PARATR_CONNECT_BORDER, 
RES_PARATR_CONNECT_BORDER,
-                    RES_BOX, RES_BOX>);
+        SfxItemSetFixed<RES_PARATR_CONNECT_BORDER, RES_PARATR_CONNECT_BORDER,
+                    RES_BOX, RES_BOX>  aSet(m_pDoc->GetAttrPool());
         aSet.Put( SwParaConnectBorderItem( false ) );
         SvxBoxItem aBox( RES_BOX );
         aBox.SetLine( &aLine, SvxBoxItemLine::BOTTOM );
@@ -1003,13 +1002,11 @@ void SwAutoFormat::SetColl( sal_uInt16 nId, bool 
bHdLineOrText )
     
m_aDelPam.GetPoint()->nContent.Assign(m_aDelPam.GetPoint()->nNode.GetNode().GetContentNode(),
 0);
 
     // keep hard tabs, alignment, language, hyphenation, DropCaps and nearly 
all frame attributes
-    SfxItemSet aSet(
-        m_pDoc->GetAttrPool(),
-        svl::Items<
+    SfxItemSetFixed<
             RES_CHRATR_LANGUAGE, RES_CHRATR_LANGUAGE,
             RES_PARATR_ADJUST, RES_PARATR_ADJUST,
             RES_PARATR_TABSTOP, RES_PARATR_DROP,
-            RES_BACKGROUND, RES_SHADOW>);
+            RES_BACKGROUND, RES_SHADOW>  aSet(m_pDoc->GetAttrPool());
 
     if (m_aDelPam.GetPoint()->nNode.GetNode().GetTextNode()->HasSwAttrSet())
     {
diff --git a/sw/source/core/edit/edfmt.cxx b/sw/source/core/edit/edfmt.cxx
index f579862ae362..ea9bd667110f 100644
--- a/sw/source/core/edit/edfmt.cxx
+++ b/sw/source/core/edit/edfmt.cxx
@@ -40,8 +40,7 @@ SwCharFormat& SwEditShell::GetCharFormat(sal_uInt16 nFormat) 
const
 SwCharFormat* SwEditShell::GetCurCharFormat() const
 {
     SwCharFormat *pFormat = nullptr;
-    SfxItemSet aSet( GetDoc()->GetAttrPool(), svl::Items<RES_TXTATR_CHARFMT,
-                                                RES_TXTATR_CHARFMT> );
+    SfxItemSetFixed<RES_TXTATR_CHARFMT, RES_TXTATR_CHARFMT> aSet( 
GetDoc()->GetAttrPool() );
     const SfxPoolItem* pItem;
     if( GetCurAttr( aSet ) && SfxItemState::SET ==
         aSet.GetItemState( RES_TXTATR_CHARFMT, false, &pItem ) )
diff --git a/sw/source/core/fields/cellfml.cxx 
b/sw/source/core/fields/cellfml.cxx
index 9babd5487905..f74b80401596 100644
--- a/sw/source/core/fields/cellfml.cxx
+++ b/sw/source/core/fields/cellfml.cxx
@@ -124,8 +124,7 @@ double SwTableBox::GetValue( SwTableCalcPara& rCalcPara ) 
const
                 if( !rCalcPara.IsStackOverflow() )
                 {
                     SwFrameFormat* pFormat = pBox->ClaimFrameFormat();
-                    SfxItemSet aTmp( pDoc->GetAttrPool(),
-                                        
svl::Items<RES_BOXATR_BEGIN,RES_BOXATR_END-1> );
+                    SfxItemSetFixed<RES_BOXATR_BEGIN,RES_BOXATR_END-1> aTmp( 
pDoc->GetAttrPool() );
                     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 b5fcb696ec24..b77effcf9b49 100644
--- a/sw/source/core/frmedt/fecopy.cxx
+++ b/sw/source/core/frmedt/fecopy.cxx
@@ -1416,8 +1416,7 @@ void SwFEShell::Paste( SvStream& rStrm, SwPasteSdr 
nAction, const Point* pPt )
                 if( dynamic_cast<const SwVirtFlyDrawObj*>( pOldObj) !=  
nullptr )
                 {
                     // store attributes, then set SdrObject
-                    SfxItemSet aFrameSet( mxDoc->GetAttrPool(),
-                                            svl::Items<RES_SURROUND, 
RES_ANCHOR> );
+                    SfxItemSetFixed<RES_SURROUND, RES_ANCHOR> aFrameSet( 
mxDoc->GetAttrPool() );
                     aFrameSet.Set( pFormat->GetAttrSet() );
 
                     Point aNullPt;
@@ -1594,7 +1593,7 @@ bool SwFEShell::Paste(const Graphic &rGrf, const 
OUString& rURL)
         {
             pView->AddUndo(std::make_unique<SdrUndoAttrObj>(*pObj));
 
-            SfxItemSet aSet(pView->GetModel()->GetItemPool(), 
svl::Items<XATTR_FILLSTYLE, XATTR_FILLBITMAP>);
+            SfxItemSetFixed<XATTR_FILLSTYLE, XATTR_FILLBITMAP> 
aSet(pView->GetModel()->GetItemPool());
 
             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 280f901cc5d3..7043681704d9 100644
--- a/sw/source/core/frmedt/fefly1.cxx
+++ b/sw/source/core/frmedt/fefly1.cxx
@@ -1136,12 +1136,12 @@ bool SwFEShell::SetFlyFrameAttr( SfxItemSet& rSet )
     return bRet;
 }
 
-SfxItemSet SwFEShell::makeItemSetFromFormatAnchor(SfxItemPool& rPool, const 
SwFormatAnchor &rAnchor)
+SfxItemSetFixed<RES_VERT_ORIENT, RES_ANCHOR> 
SwFEShell::makeItemSetFromFormatAnchor(SfxItemPool& rPool, const SwFormatAnchor 
&rAnchor)
 {
     // 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, svl::Items<RES_VERT_ORIENT, RES_ANCHOR>);
+    SfxItemSetFixed<RES_VERT_ORIENT, RES_ANCHOR> aSet(rPool);
     aSet.Put(rAnchor);
     return aSet;
 }
diff --git a/sw/source/core/frmedt/feshview.cxx 
b/sw/source/core/frmedt/feshview.cxx
index 81b8becdc24a..24a9655945f3 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -2023,8 +2023,8 @@ bool SwFEShell::ImpEndCreate()
         }
     }
 
-    SfxItemSet aSet( GetDoc()->GetAttrPool(), svl::Items<RES_FRM_SIZE, 
RES_FRM_SIZE,
-                                            RES_SURROUND, RES_ANCHOR> );
+    SfxItemSetFixed<RES_FRM_SIZE, RES_FRM_SIZE,
+                    RES_SURROUND, RES_ANCHOR>  aSet( GetDoc()->GetAttrPool() );
     aSet.Put( aAnch );
 
     // OD 2004-03-30 #i26791# - determine relative object position
@@ -2098,7 +2098,7 @@ bool SwFEShell::ImpEndCreate()
             ::GetHtmlMode( GetDoc()->GetDocShell() ) &&
             nullptr != ( pFlyFrame = GetSelectedFlyFrame() ))
         {
-            SfxItemSet aHtmlSet( GetDoc()->GetAttrPool(), 
svl::Items<RES_VERT_ORIENT, RES_HORI_ORIENT> );
+            SfxItemSetFixed<RES_VERT_ORIENT, RES_HORI_ORIENT> aHtmlSet( 
GetDoc()->GetAttrPool() );
             // horizontal orientation:
             const bool bLeftFrame = aFlyRect.Left() <
                                       pAnch->getFrameArea().Left() + 
pAnch->getFramePrintArea().Left(),
@@ -2840,8 +2840,8 @@ void SwFEShell::CheckUnboundObjects()
             // First the action here, to assure GetCharRect delivers current 
values.
             StartAllAction();
 
-            SfxItemSet aSet( GetAttrPool(), svl::Items<RES_FRM_SIZE, 
RES_FRM_SIZE,
-                                            RES_SURROUND, RES_ANCHOR> );
+            SfxItemSetFixed<RES_FRM_SIZE, RES_FRM_SIZE,
+                            RES_SURROUND, RES_ANCHOR>  aSet( GetAttrPool() );
             aSet.Put( aAnch );
             aSet.Put( SwFormatSurround( css::text::WrapTextMode_THROUGH ) );
             SwFrameFormat* pFormat = 
getIDocumentLayoutAccess().MakeLayoutFormat( RndStdIds::DRAW_OBJECT, &aSet );
@@ -3202,7 +3202,7 @@ void SwFEShell::CreateDefaultShape( SdrObjKind 
eSdrObjectKind, const tools::Rect
 
             if(bMarquee)
             {
-                SfxItemSet aSet(pDrawModel->GetItemPool(), 
svl::Items<SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST>);
+                SfxItemSetFixed<SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST> 
aSet(pDrawModel->GetItemPool());
                 aSet.Put( makeSdrTextAutoGrowWidthItem( false ) );
                 aSet.Put( makeSdrTextAutoGrowHeightItem( false ) );
                 aSet.Put( SdrTextAniKindItem( SdrTextAniKind::Slide ) );
diff --git a/sw/source/core/layout/anchoreddrawobject.cxx 
b/sw/source/core/layout/anchoreddrawobject.cxx
index f0458f300bdc..3e37961dffd6 100644
--- a/sw/source/core/layout/anchoreddrawobject.cxx
+++ b/sw/source/core/layout/anchoreddrawobject.cxx
@@ -795,7 +795,7 @@ void SwAnchoredDrawObject::AdjustPositioningAttr( const 
SwFrame* _pNewAnchorFram
 
     SwFormatHoriOrient hori(nHoriRelPos, text::HoriOrientation::NONE, 
text::RelOrientation::FRAME);
     SwFormatVertOrient vert(nVertRelPos, text::VertOrientation::NONE, 
text::RelOrientation::FRAME);
-    SfxItemSet items(GetFrameFormat().GetDoc()->GetAttrPool(), 
svl::Items<RES_VERT_ORIENT, RES_HORI_ORIENT>);
+    SfxItemSetFixed<RES_VERT_ORIENT, RES_HORI_ORIENT> 
items(GetFrameFormat().GetDoc()->GetAttrPool());
     items.Put(hori);
     items.Put(vert);
     GetFrameFormat().GetDoc()->SetAttr(items, GetFrameFormat());
diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
index e5588ed10f7a..b4c6c58ee06d 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -1128,8 +1128,7 @@ void SwFlyFrame::ChgRelPos( const Point &rNewPos )
     SwTwips nTmpY = nNewY == LONG_MAX ? 0 : nNewY;
     if( bVert )
         nTmpY = -nTmpY;
-    SfxItemSet aSet( pFormat->GetDoc()->GetAttrPool(),
-                     svl::Items<RES_VERT_ORIENT, RES_HORI_ORIENT>);
+    SfxItemSetFixed<RES_VERT_ORIENT, RES_HORI_ORIENT> aSet( 
pFormat->GetDoc()->GetAttrPool() );
 
     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 1440c08a7e89..258b31b6d058 100644
--- a/sw/source/core/text/redlnitr.cxx
+++ b/sw/source/core/text/redlnitr.cxx
@@ -721,7 +721,7 @@ short SwRedlineItr::Seek(SwFont& rFnt,
                     {
                         SwAttrPool& rPool =
                             const_cast<SwDoc&>(m_rDoc).GetAttrPool();
-                        m_pSet = std::make_unique<SfxItemSet>(rPool, 
svl::Items<RES_CHRATR_BEGIN, RES_CHRATR_END-1>);
+                        m_pSet = 
std::make_unique<SfxItemSetFixed<RES_CHRATR_BEGIN, RES_CHRATR_END-1>>(rPool);
                     }
 
                     if( 1 < pRed->GetStackCount() )
diff --git a/sw/source/core/text/txtfld.cxx b/sw/source/core/text/txtfld.cxx
index bfcb5ef57c05..ee9cd7668d12 100644
--- a/sw/source/core/text/txtfld.cxx
+++ b/sw/source/core/text/txtfld.cxx
@@ -568,7 +568,7 @@ static void lcl_setRedlineAttr( SwTextFormatInfo &rInf, 
const SwTextNode& rTextN
         return;
 
     SwAttrPool& rPool = rInf.GetVsh()->GetDoc()->GetAttrPool();
-    SfxItemSet aSet(rPool, svl::Items<RES_CHRATR_BEGIN, RES_CHRATR_END-1>);
+    SfxItemSetFixed<RES_CHRATR_BEGIN, RES_CHRATR_END-1> aSet(rPool);
 
     std::size_t aAuthor = (1 < pRedlineNum->GetStackCount())
             ? pRedlineNum->GetAuthor( 1 )
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index 326300f9a8ad..ebc777ee5219 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -383,8 +383,7 @@ namespace sw {
                     rFormatSet.ClearItem(RES_BREAK);
                     static_assert(RES_PAGEDESC + 1 == sal_uInt16(RES_BREAK),
                             "first-node items must be adjacent");
-                    SfxItemSet firstSet(*rFormatSet.GetPool(),
-                            svl::Items<RES_PAGEDESC, RES_BREAK>);
+                    SfxItemSetFixed<RES_PAGEDESC, RES_BREAK> 
firstSet(*rFormatSet.GetPool());
                     pMerged->pFirstNode->SwContentNode::GetAttr(firstSet);
                     rFormatSet.Put(firstSet);
 
@@ -402,10 +401,10 @@ namespace sw {
                     {
                         rFormatSet.ClearItem(i);
                     }
-                    SfxItemSet propsSet(*rFormatSet.GetPool(),
-                        svl::Items<RES_PARATR_BEGIN, RES_PAGEDESC,
+                    SfxItemSetFixed<RES_PARATR_BEGIN, RES_PAGEDESC,
                                    RES_BREAK+1, RES_FRMATR_END,
-                                   XATTR_FILL_FIRST, XATTR_FILL_LAST+1>);
+                                   XATTR_FILL_FIRST, XATTR_FILL_LAST+1>
+                         propsSet(*rFormatSet.GetPool());
                     pMerged->pParaPropsNode->SwContentNode::GetAttr(propsSet);
                     rFormatSet.Put(propsSet);
                     return *pMerged->pParaPropsNode;
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index 8d5a58eccb25..6ca45bf97a7d 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -1994,12 +1994,11 @@ void SwTextNode::CopyText( SwTextNode *const pDest,
                    pDest->HasSwAttrSet() ||
                    nLen != pDest->GetText().getLength()))
             {
-                SfxItemSet aCharSet(
-                    pDest->GetDoc().GetAttrPool(),
-                    svl::Items<
+                SfxItemSetFixed<
                         RES_CHRATR_BEGIN, RES_CHRATR_END - 1,
                         RES_TXTATR_INETFMT, RES_TXTATR_CHARFMT,
-                        RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END - 1> );
+                        RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END - 1>
+                    aCharSet( pDest->GetDoc().GetAttrPool() );
                 aCharSet.Put( *GetpSwAttrSet() );
                 if( aCharSet.Count() )
                 {
@@ -2037,12 +2036,11 @@ void SwTextNode::CopyText( SwTextNode *const pDest,
                pDest->HasSwAttrSet() ||
                nLen != pDest->GetText().getLength()))
         {
-            SfxItemSet aCharSet(
-                pDest->GetDoc().GetAttrPool(),
-                svl::Items<
+            SfxItemSetFixed<
                     RES_CHRATR_BEGIN, RES_CHRATR_END - 1,
                     RES_TXTATR_INETFMT, RES_TXTATR_CHARFMT,
-                    RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END - 1>);
+                    RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END - 1>
+                 aCharSet( pDest->GetDoc().GetAttrPool() );
             aCharSet.Put( *GetpSwAttrSet() );
             if( aCharSet.Count() )
             {
@@ -2460,12 +2458,11 @@ void SwTextNode::CutImpl( SwTextNode * const pDest, 
const SwIndex & rDestStart,
         if( nInitSize || hasSwAttrSet ||
             nLen != pDest->GetText().getLength())
         {
-            SfxItemSet aCharSet(
-                pDest->GetDoc().GetAttrPool(),
-                svl::Items<
+            SfxItemSetFixed<
                     RES_CHRATR_BEGIN, RES_CHRATR_END - 1,
                     RES_TXTATR_INETFMT, RES_TXTATR_CHARFMT,
-                    RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END - 1>);
+                    RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END - 1>
+                 aCharSet( pDest->GetDoc().GetAttrPool() );
             aCharSet.Put( *GetpSwAttrSet() );
             if( aCharSet.Count() )
                 pDest->SetAttr( aCharSet, nDestStart, nDestStart + nLen );
@@ -2474,10 +2471,9 @@ void SwTextNode::CutImpl( SwTextNode * const pDest, 
const SwIndex & rDestStart,
         {
             // Copy all attrs except RES_PARATR_LIST_LEVEL: it was initialized 
before
             // and current SwTextNode can contain not suitable for pDest value
-            SfxItemSet aCharSet(
-                pDest->GetDoc().GetAttrPool(),
-                                svl::Items<RES_CHRATR_BEGIN, 
RES_PARATR_LIST_LEVEL - 1,
-                                           RES_PARATR_LIST_LEVEL + 1, 
HINT_END>);
+            SfxItemSetFixed<RES_CHRATR_BEGIN, RES_PARATR_LIST_LEVEL - 1,
+                   RES_PARATR_LIST_LEVEL + 1, HINT_END>
+                 aCharSet(pDest->GetDoc().GetAttrPool());
             aCharSet.Put(*GetpSwAttrSet());
             if (aCharSet.Count())
                 pDest->SetAttr(aCharSet, nDestStart, nDestStart + nLen);
@@ -5159,7 +5155,7 @@ void SwTextNode::dumpAsXml(xmlTextWriterPtr pWriter) const
 
 sal_uInt32 SwTextNode::GetRsid( sal_Int32 nStt, sal_Int32 nEnd ) const
 {
-    SfxItemSet aSet( const_cast<SwAttrPool&>((GetDoc().GetAttrPool())), 
svl::Items<RES_CHRATR_RSID, RES_CHRATR_RSID> );
+    SfxItemSetFixed<RES_CHRATR_RSID, RES_CHRATR_RSID> aSet( 
const_cast<SwAttrPool&>((GetDoc().GetAttrPool())) );
     if (GetParaAttr(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 2464bc9d6860..f2e394b76e8b 100644
--- a/sw/source/core/txtnode/thints.cxx
+++ b/sw/source/core/txtnode/thints.cxx
@@ -1026,8 +1026,7 @@ SwTextAttr* MakeTextAttr(
         // Somebody wants to build a SwTextAttr for a character attribute.
         // Sorry, this is not allowed any longer.
         // You'll get a brand new autostyle attribute:
-        SfxItemSet aItemSet( rDoc.GetAttrPool(),
-                svl::Items<RES_CHRATR_BEGIN, RES_CHRATR_END> );
+        SfxItemSetFixed<RES_CHRATR_BEGIN, RES_CHRATR_END> aItemSet( 
rDoc.GetAttrPool() );
         aItemSet.Put( rAttr );
         return MakeTextAttr( rDoc, aItemSet, nStt, nEnd );
     }
@@ -1835,7 +1834,7 @@ bool SwTextNode::SetAttr(
 
     // split sets (for selection in nodes)
     const SfxItemSet* pSet = &rSet;
-    SfxItemSet aTextSet( *rSet.GetPool(), svl::Items<RES_TXTATR_BEGIN, 
RES_TXTATR_END-1> );
+    SfxItemSetFixed<RES_TXTATR_BEGIN, RES_TXTATR_END-1> aTextSet( 
*rSet.GetPool() );
 
     // entire paragraph
     if ( !nStt && (nEnd == m_Text.getLength()) &&
diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx
index 7d26e27ee56d..3e0ad953c45c 100644
--- a/sw/source/core/undo/untbl.cxx
+++ b/sw/source/core/undo/untbl.cxx
@@ -2217,8 +2217,7 @@ void SwUndoTableNumFormat::RedoImpl(::sw::UndoRedoContext 
& rContext)
     SwFrameFormat* pBoxFormat = pBox->ClaimFrameFormat();
     if( m_bNewFormat || m_bNewFormula || m_bNewValue )
     {
-        SfxItemSet aBoxSet( rDoc.GetAttrPool(),
-                                svl::Items<RES_BOXATR_FORMAT, 
RES_BOXATR_VALUE> );
+        SfxItemSetFixed<RES_BOXATR_FORMAT, RES_BOXATR_VALUE> aBoxSet( 
rDoc.GetAttrPool() );
 
         // Resetting attributes is not enough. In addition, take care that the
         // text will be also formatted correctly.
@@ -2246,8 +2245,7 @@ void SwUndoTableNumFormat::RedoImpl(::sw::UndoRedoContext 
& rContext)
     }
     else if( getSwDefaultTextFormat() != m_nFormatIdx )
     {
-        SfxItemSet aBoxSet( rDoc.GetAttrPool(),
-                            svl::Items<RES_BOXATR_FORMAT, RES_BOXATR_VALUE> );
+        SfxItemSetFixed<RES_BOXATR_FORMAT, RES_BOXATR_VALUE> aBoxSet( 
rDoc.GetAttrPool() );
 
         aBoxSet.Put( SwTableBoxNumFormat( m_nFormatIdx ));
         aBoxSet.Put( SwTableBoxValue( m_fNum ));
@@ -2463,11 +2461,10 @@ void 
SwUndoTableCpyTable::UndoImpl(::sw::UndoRedoContext & rContext)
         aInsIdx = rBox.GetSttIdx() + 1;
         rDoc.GetNodes().Delete( aInsIdx );
 
-        SfxItemSet aTmpSet(
-            rDoc.GetAttrPool(),
-            svl::Items<
+        SfxItemSetFixed<
                 RES_VERT_ORIENT, RES_VERT_ORIENT,
-                RES_BOXATR_FORMAT, RES_BOXATR_VALUE>);
+                RES_BOXATR_FORMAT, RES_BOXATR_VALUE>
+             aTmpSet(rDoc.GetAttrPool());
         aTmpSet.Put( rBox.GetFrameFormat()->GetAttrSet() );
         if( aTmpSet.Count() )
         {
@@ -2484,11 +2481,9 @@ void SwUndoTableCpyTable::UndoImpl(::sw::UndoRedoContext 
& rContext)
 
         if( aTmpSet.Count() )
         {
-            pEntry->pBoxNumAttr = std::make_unique<SfxItemSet>(
-                rDoc.GetAttrPool(),
-                svl::Items<
+            pEntry->pBoxNumAttr = std::make_unique<SfxItemSetFixed<
                     RES_VERT_ORIENT, RES_VERT_ORIENT,
-                    RES_BOXATR_FORMAT, RES_BOXATR_VALUE>);
+                    RES_BOXATR_FORMAT, RES_BOXATR_VALUE>>(rDoc.GetAttrPool());
             pEntry->pBoxNumAttr->Put( aTmpSet );
         }
 
@@ -2559,11 +2554,9 @@ void SwUndoTableCpyTable::RedoImpl(::sw::UndoRedoContext 
& rContext)
         aInsIdx = rBox.GetSttIdx() + 1;
         rDoc.GetNodes().Delete( aInsIdx );
 
-        SfxItemSet aTmpSet(
-            rDoc.GetAttrPool(),
-            svl::Items<
+        SfxItemSetFixed<
                 RES_VERT_ORIENT, RES_VERT_ORIENT,
-                RES_BOXATR_FORMAT, RES_BOXATR_VALUE>);
+                RES_BOXATR_FORMAT, RES_BOXATR_VALUE> 
aTmpSet(rDoc.GetAttrPool());
         aTmpSet.Put( rBox.GetFrameFormat()->GetAttrSet() );
         if( aTmpSet.Count() )
         {
@@ -2579,11 +2572,9 @@ void SwUndoTableCpyTable::RedoImpl(::sw::UndoRedoContext 
& rContext)
 
         if( aTmpSet.Count() )
         {
-            pEntry->pBoxNumAttr = std::make_unique<SfxItemSet>(
-                rDoc.GetAttrPool(),
-                svl::Items<
+            pEntry->pBoxNumAttr = std::make_unique<SfxItemSetFixed<
                     RES_VERT_ORIENT, RES_VERT_ORIENT,
-                    RES_BOXATR_FORMAT, RES_BOXATR_VALUE>);
+                    RES_BOXATR_FORMAT, RES_BOXATR_VALUE>>(rDoc.GetAttrPool());
             pEntry->pBoxNumAttr->Put( aTmpSet );
         }
 
@@ -2612,11 +2603,9 @@ void SwUndoTableCpyTable::AddBoxBefore( const 
SwTableBox& rBox, bool bDelContent
             pEntry->pUndo = std::make_unique<SwUndoDelete>( aPam, true );
     }
 
-    pEntry->pBoxNumAttr = std::make_unique<SfxItemSet>(
-        pDoc->GetAttrPool(),
-        svl::Items<
+    pEntry->pBoxNumAttr = std::make_unique<SfxItemSetFixed<
             RES_VERT_ORIENT, RES_VERT_ORIENT,
-            RES_BOXATR_FORMAT, RES_BOXATR_VALUE>);
+            RES_BOXATR_FORMAT, RES_BOXATR_VALUE>>(pDoc->GetAttrPool());
     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 603999eaee9b..cc6177bbb154 100644
--- a/sw/source/core/unocore/SwXTextDefaults.cxx
+++ b/sw/source/core/unocore/SwXTextDefaults.cxx
@@ -73,7 +73,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(), svl::Items<RES_PAGEDESC, 
RES_PAGEDESC> );
+        SfxItemSetFixed<RES_PAGEDESC, RES_PAGEDESC> aSet( 
m_pDoc->GetAttrPool() );
         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 580553dbf8a2..56111d9817ef 100644
--- a/sw/source/core/unocore/unodraw.cxx
+++ b/sw/source/core/unocore/unodraw.cxx
@@ -584,8 +584,7 @@ void SwXDrawPage::add(const uno::Reference< drawing::XShape 
> & xShape)
     // now evaluate the properties of SwShapeDescriptor_Impl
     SwShapeDescriptor_Impl* pDesc = pShape->GetDescImpl();
 
-    SfxItemSet aSet( m_pDoc->GetAttrPool(), svl::Items<RES_FRMATR_BEGIN,
-                                        RES_FRMATR_END-1> );
+    SfxItemSetFixed<RES_FRMATR_BEGIN, RES_FRMATR_END-1> aSet( 
m_pDoc->GetAttrPool() );
     SwFormatAnchor aAnchor( RndStdIds::FLY_AS_CHAR );
     bool bOpaque = false;
     if( pDesc )
@@ -1056,8 +1055,7 @@ void SwXShape::setPropertyValue(const OUString& 
rPropertyName, const uno::Any& a
                         pFrame->GetFrameFormat()->GetDoc() == pDoc)
                     {
                         UnoActionContext aCtx(pDoc);
-                        SfxItemSet aItemSet( pDoc->GetAttrPool(),
-                                    svl::Items<RES_FRMATR_BEGIN, 
RES_FRMATR_END - 1> );
+                        SfxItemSetFixed<RES_FRMATR_BEGIN, RES_FRMATR_END - 1> 
aItemSet( pDoc->GetAttrPool() );
                         aItemSet.SetParent(&pFormat->GetAttrSet());
                         SwFormatAnchor aAnchor = static_cast<const 
SwFormatAnchor&>(aItemSet.Get(pEntry->nWID));
                         SwPosition 
aPos(*pFrame->GetFrameFormat()->GetContent().GetContentIdx());
diff --git a/sw/source/core/unocore/unoframe.cxx 
b/sw/source/core/unocore/unoframe.cxx
index 02886fbb7b76..85b38f9053e5 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -1732,8 +1732,7 @@ void SwXFrame::setPropertyValue(const OUString& 
rPropertyName, const ::uno::Any&
                 SwXFrame* pFrame = 
comphelper::getFromUnoTunnel<SwXFrame>(xFrame);
                 if(pFrame && this != pFrame && pFrame->GetFrameFormat() && 
pFrame->GetFrameFormat()->GetDoc() == pDoc)
                 {
-                    SfxItemSet aSet( pDoc->GetAttrPool(),
-                                svl::Items<RES_FRMATR_BEGIN, RES_FRMATR_END - 
1> );
+                    SfxItemSetFixed<RES_FRMATR_BEGIN, RES_FRMATR_END - 1> 
aSet( pDoc->GetAttrPool() );
                     aSet.SetParent(&pFormat->GetAttrSet());
                     SwFormatAnchor aAnchor = static_cast<const 
SwFormatAnchor&>(aSet.Get(pEntry->nWID));
 
@@ -1752,12 +1751,13 @@ 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(),
-                svl::Items<RES_FRMATR_BEGIN, RES_FRMATR_END - 1,
+            SfxItemSetFixed
+                <RES_FRMATR_BEGIN, RES_FRMATR_END - 1,
                 RES_UNKNOWNATR_CONTAINER, RES_UNKNOWNATR_CONTAINER,
 
                 // FillAttribute support
-                XATTR_FILL_FIRST, XATTR_FILL_LAST>);
+                XATTR_FILL_FIRST, XATTR_FILL_LAST>
+                    aSet( pDoc->GetAttrPool());
             bool bDone(false);
 
             aSet.SetParent(&pFormat->GetAttrSet());
@@ -2480,7 +2480,7 @@ void SwXFrame::setPropertyToDefault( const OUString& 
rPropertyName )
         if(OWN_ATTR_FILLBMP_MODE == pEntry->nWID)
         {
             SwDoc* pDoc = pFormat->GetDoc();
-            SfxItemSet aSet(pDoc->GetAttrPool(), svl::Items<XATTR_FILL_FIRST, 
XATTR_FILL_LAST>);
+            SfxItemSetFixed<XATTR_FILL_FIRST, XATTR_FILL_LAST> 
aSet(pDoc->GetAttrPool());
             aSet.SetParent(&pFormat->GetAttrSet());
 
             aSet.ClearItem(XATTR_FILLBMP_STRETCH);
@@ -2525,8 +2525,7 @@ void SwXFrame::setPropertyToDefault( const OUString& 
rPropertyName )
             else
             {
                 SwDoc* pDoc = pFormat->GetDoc();
-                SfxItemSet aSet( pDoc->GetAttrPool(),
-                    svl::Items<RES_FRMATR_BEGIN, RES_FRMATR_END - 1> );
+                SfxItemSetFixed<RES_FRMATR_BEGIN, RES_FRMATR_END - 1> aSet( 
pDoc->GetAttrPool() );
                 aSet.SetParent(&pFormat->GetAttrSet());
                 aSet.ClearItem(pEntry->nWID);
                 if(rPropertyName != UNO_NAME_ANCHOR_TYPE)
@@ -2702,19 +2701,18 @@ void 
SwXFrame::attachToRange(uno::Reference<text::XTextRange> const& xTextRange,
     SwNode& rNode = pDoc->GetNodes().GetEndOfContent();
     SwPaM aPam(rNode);
     aPam.Move( fnMoveBackward, GoInDoc );
-    static WhichRangesContainer const aFrameAttrRange(svl::Items<
+
+    SfxItemSetFixed<RES_GRFATR_BEGIN, RES_GRFATR_END-1> 
aGrSet(pDoc->GetAttrPool());
+
+    SfxItemSetFixed<
         RES_FRMATR_BEGIN,       RES_FRMATR_END-1,
         RES_UNKNOWNATR_CONTAINER, RES_UNKNOWNATR_CONTAINER,
 
         // FillAttribute support
         XATTR_FILL_FIRST, XATTR_FILL_LAST,
 
-        SID_ATTR_BORDER_INNER,  SID_ATTR_BORDER_INNER>);
-    static WhichRangesContainer const aGrAttrRange(svl::Items<
-        RES_GRFATR_BEGIN,       RES_GRFATR_END-1>);
-    SfxItemSet aGrSet(pDoc->GetAttrPool(), aGrAttrRange );
-
-    SfxItemSet aFrameSet(pDoc->GetAttrPool(), aFrameAttrRange );
+        SID_ATTR_BORDER_INNER,  SID_ATTR_BORDER_INNER>
+            aFrameSet(pDoc->GetAttrPool() );
 
     // set correct parent to get the XFILL_NONE FillStyle as needed
     aFrameSet.SetParent(&pDoc->GetDfltFrameFormat()->GetAttrSet());
@@ -2794,7 +2792,7 @@ void 
SwXFrame::attachToRange(uno::Reference<text::XTextRange> const& xTextRange,
             {
                 pFormat->DelFrames();
                 pAnchorItem->SetAnchor( pCopySource->Start() );
-                SfxItemSet aAnchorSet( pDoc->GetAttrPool(), 
svl::Items<RES_ANCHOR, RES_ANCHOR> );
+                SfxItemSetFixed<RES_ANCHOR, RES_ANCHOR> aAnchorSet( 
pDoc->GetAttrPool() );
                 aAnchorSet.Put( *pAnchorItem );
                 pDoc->SetFlyFrameAttr( *pFormat, aAnchorSet );
             }
@@ -3108,7 +3106,7 @@ void SwXFrame::attach(const uno::Reference< 
text::XTextRange > & xTextRange)
     if (!::sw::XTextRangeToSwPaM(aIntPam, xTextRange))
         throw lang::IllegalArgumentException();
 
-    SfxItemSet aSet( pDoc->GetAttrPool(), svl::Items<RES_ANCHOR, RES_ANCHOR> );
+    SfxItemSetFixed<RES_ANCHOR, RES_ANCHOR> aSet( pDoc->GetAttrPool() );
     aSet.SetParent(&pFormat->GetAttrSet());
     SwFormatAnchor aAnchor = aSet.Get(RES_ANCHOR);
 
diff --git a/sw/source/core/unocore/unoobj.cxx 
b/sw/source/core/unocore/unoobj.cxx
index b7c6cab3d7ed..c5e28f738dbb 100644
--- a/sw/source/core/unocore/unoobj.cxx
+++ b/sw/source/core/unocore/unoobj.cxx
@@ -349,8 +349,7 @@ lcl_setCharFormatSequence(SwPaM & rPam, uno::Any const& 
rValue)
         rPam.GetDoc().GetIDocumentUndoRedo().StartUndo(SwUndoId::START, 
nullptr);
         aStyle <<= aCharStyles.getConstArray()[nStyle];
         // create a local set and apply each format directly
-        SfxItemSet aSet(rPam.GetDoc().GetAttrPool(),
-                svl::Items<RES_TXTATR_CHARFMT, RES_TXTATR_CHARFMT>);
+        SfxItemSetFixed<RES_TXTATR_CHARFMT, RES_TXTATR_CHARFMT> 
aSet(rPam.GetDoc().GetAttrPool());
         lcl_setCharStyle(rPam.GetDoc(), aStyle, aSet);
         // the first style should replace the current attributes,
         // all other have to be added
@@ -519,10 +518,11 @@ SwUnoCursorHelper::SetCursorPropertyValue(
                     // TODO create own map for this, it contains 
UNO_NAME_DISPLAY_NAME? or make property readable so ODF export can map it to a 
automatic style?
                     SfxItemPropertySet const& 
rPropSet(*aSwMapProvider.GetPropertySet(PROPERTY_MAP_CHAR_AUTO_STYLE));
                     SfxItemPropertyMap const& rMap(rPropSet.getPropertyMap());
-                    SfxItemSet items( rPam.GetDoc().GetAttrPool(),
-                        svl::Items<RES_CHRATR_BEGIN, RES_CHRATR_END-1,
+                    SfxItemSetFixed
+                        <RES_CHRATR_BEGIN, RES_CHRATR_END-1,
                             RES_TXTATR_CHARFMT, RES_TXTATR_CHARFMT,
-                            RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1> );
+                            RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1>
+                         items( rPam.GetDoc().GetAttrPool() );
 
                     for (beans::NamedValue const & prop : std::as_const(props))
                     {
@@ -1716,11 +1716,11 @@ uno::Any SwUnoCursorHelper::GetPropertyValue(
 
     if (!bDone)
     {
-        SfxItemSet aSet(
-            rPaM.GetDoc().GetAttrPool(),
-            svl::Items<
+        SfxItemSetFixed<
                 RES_CHRATR_BEGIN, RES_FRMATR_END - 1,
-                RES_UNKNOWNATR_CONTAINER, RES_UNKNOWNATR_CONTAINER>);
+                RES_UNKNOWNATR_CONTAINER, RES_UNKNOWNATR_CONTAINER>
+            aSet(rPaM.GetDoc().GetAttrPool());
+
         SwUnoCursorHelper::GetCursorAttr(rPaM, aSet);
 
         rPropSet.getPropertyValue(*pEntry, aSet, aAny);
diff --git a/sw/source/core/unocore/unoport.cxx 
b/sw/source/core/unocore/unoport.cxx
index 7431ffbc06a3..fea1e27749ef 100644
--- a/sw/source/core/unocore/unoport.cxx
+++ b/sw/source/core/unocore/unoport.cxx
@@ -356,12 +356,10 @@ void SwXTextPortion::GetPropertyValue(
             {
                 if(!pSet)
                 {
-                    pSet = std::make_unique<SfxItemSet>(
-                        pUnoCursor->GetDoc().GetAttrPool(),
-                        svl::Items<
+                    pSet = std::make_unique<SfxItemSetFixed<
                             RES_CHRATR_BEGIN, RES_FRMATR_END - 1,
                             RES_UNKNOWNATR_CONTAINER,
-                                RES_UNKNOWNATR_CONTAINER>);
+                                
RES_UNKNOWNATR_CONTAINER>>(pUnoCursor->GetDoc().GetAttrPool());
                     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 52853bf6448d..116524f89822 100644
--- a/sw/source/core/unocore/unosect.cxx
+++ b/sw/source/core/unocore/unosect.cxx
@@ -350,14 +350,13 @@ SwXTextSection::attach(const uno::Reference< 
text::XTextRange > & xTextRange)
     aSect.SetProtectFlag(m_pImpl->m_pProps->m_bProtect);
     aSect.SetEditInReadonlyFlag(m_pImpl->m_pProps->m_bEditInReadonly);
 
-    SfxItemSet aSet(
-        pDoc->GetAttrPool(),
-        svl::Items<
+    SfxItemSetFixed<
             RES_LR_SPACE, RES_LR_SPACE,
             RES_BACKGROUND, RES_BACKGROUND,
             RES_COL, RES_COL,
             RES_FTN_AT_TXTEND, RES_FRAMEDIR,
-            RES_UNKNOWNATR_CONTAINER,RES_UNKNOWNATR_CONTAINER>);
+            RES_UNKNOWNATR_CONTAINER,RES_UNKNOWNATR_CONTAINER>
+        aSet(pDoc->GetAttrPool());
     if (m_pImpl->m_pProps->m_pBrushItem)
     {
         aSet.Put(*m_pImpl->m_pProps->m_pBrushItem);
diff --git a/sw/source/core/unocore/unostyle.cxx 
b/sw/source/core/unocore/unostyle.cxx
index a7ab270c6eb3..a0de46793064 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -2671,7 +2671,7 @@ void SAL_CALL SwXStyle::setPropertiesToDefault(const 
uno::Sequence<OUString>& aP
         {
             //
             SwDoc* pDoc = pTargetFormat->GetDoc();
-            SfxItemSet aSet(pDoc->GetAttrPool(), svl::Items<XATTR_FILL_FIRST, 
XATTR_FILL_LAST>);
+            SfxItemSetFixed<XATTR_FILL_FIRST, XATTR_FILL_LAST> 
aSet(pDoc->GetAttrPool());
             aSet.SetParent(&pTargetFormat->GetAttrSet());
 
             aSet.ClearItem(XATTR_FILLBMP_STRETCH);
@@ -2933,8 +2933,8 @@ void SwXPageStyle::SetPropertyValues_Impl(const 
uno::Sequence<OUString>& rProper
                     else if(pEntry->nWID == SID_ATTR_PAGE_ON && 
rValues[nProp].get<bool>())
                     {
                         // Header/footer gets switched on, create defaults and 
the needed SfxSetItem
-                        SfxItemSet aTempSet(*aBaseImpl.GetItemSet().GetPool(),
-                            svl::Items<RES_FRMATR_BEGIN,RES_FRMATR_END - 1,    
        // [82
+                        SfxItemSetFixed
+                            <RES_FRMATR_BEGIN,RES_FRMATR_END - 1,            
// [82
 
                             // FillAttribute support
                             XATTR_FILL_FIRST, XATTR_FILL_LAST,              // 
[1014
@@ -2942,7 +2942,8 @@ 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>);
+                            
SID_ATTR_PAGE_SHARED_FIRST,SID_ATTR_PAGE_SHARED_FIRST>
+                                aTempSet(*aBaseImpl.GetItemSet().GetPool());
 
                         // set correct parent to get the XFILL_NONE FillStyle 
as needed
                         
aTempSet.SetParent(&GetDoc()->GetDfltFrameFormat()->GetAttrSet());
@@ -3814,7 +3815,7 @@ SwAutoStylesEnumImpl::SwAutoStylesEnumImpl( SwDoc& 
rInitDoc, IStyleAccess::SwAut
             std::pair< sal_uInt16, text::RubyAdjust > aPair( 
pRubyItem->GetPosition(), pRubyItem->GetAdjustment() );
             if ( aRubyMap.insert( aPair ).second )
             {
-                auto pItemSet = std::make_shared<SfxItemSet>( rAttrPool, 
svl::Items<RES_TXTATR_CJK_RUBY, RES_TXTATR_CJK_RUBY> );
+                auto pItemSet = 
std::make_shared<SfxItemSetFixed<RES_TXTATR_CJK_RUBY, RES_TXTATR_CJK_RUBY>>( 
rAttrPool );
                 pItemSet->Put( *pRubyItem );
                 mAutoStyles.push_back( pItemSet );
             }
diff --git a/sw/source/core/unocore/unotbl.cxx 
b/sw/source/core/unocore/unotbl.cxx
index c0048eff38e1..5c8f9ae31ba8 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -704,7 +704,7 @@ void sw_setValue( SwXCell &rCell, double nVal )
     SwDoc* pDoc = rCell.GetDoc();
     UnoActionContext aAction(pDoc);
     SwFrameFormat* pBoxFormat = rCell.m_pBox->ClaimFrameFormat();
-    SfxItemSet aSet(pDoc->GetAttrPool(), svl::Items<RES_BOXATR_FORMAT, 
RES_BOXATR_VALUE>);
+    SfxItemSetFixed<RES_BOXATR_FORMAT, RES_BOXATR_VALUE> 
aSet(pDoc->GetAttrPool());
     const SfxPoolItem* pItem;
 
     //!! do we need to set a new number format? Yes, if
@@ -862,7 +862,7 @@ void SwXCell::setFormula(const OUString& rFormula)
     SwTableBoxFormula aFormula( sFormula );
     SwDoc* pMyDoc = GetDoc();
     UnoActionContext aAction(pMyDoc);
-    SfxItemSet aSet(pMyDoc->GetAttrPool(), svl::Items<RES_BOXATR_FORMAT, 
RES_BOXATR_FORMULA>);
+    SfxItemSetFixed<RES_BOXATR_FORMAT, RES_BOXATR_FORMULA> 
aSet(pMyDoc->GetAttrPool());
     const SfxPoolItem* pItem;
     SwFrameFormat* pBoxFormat = m_pBox->GetFrameFormat();
     if(SfxItemState::SET != 
pBoxFormat->GetAttrSet().GetItemState(RES_BOXATR_FORMAT, true, &pItem)
@@ -1719,9 +1719,10 @@ uno::Any SwXTextTableCursor::getPropertyValue(const 
OUString& rPropertyName)
         break;
         default:
         {
-            SfxItemSet aSet(rTableCursor.GetDoc().GetAttrPool(),
-                svl::Items<RES_CHRATR_BEGIN, RES_FRMATR_END-1,
-                RES_UNKNOWNATR_CONTAINER, RES_UNKNOWNATR_CONTAINER>);
+            SfxItemSetFixed
+                <RES_CHRATR_BEGIN, RES_FRMATR_END-1,
+                RES_UNKNOWNATR_CONTAINER, RES_UNKNOWNATR_CONTAINER>
+                    aSet(rTableCursor.GetDoc().GetAttrPool());
             SwUnoCursorHelper::GetCursorAttr(rTableCursor.GetSelRing(), aSet);
             m_pPropSet->getPropertyValue(*pEntry, aSet, aResult);
         }
@@ -1803,15 +1804,14 @@ void SwTableProperties_Impl::AddItemToSet(SfxItemSet& 
rSet,
 }
 void SwTableProperties_Impl::ApplyTableAttr(const SwTable& rTable, SwDoc& rDoc)
 {
-    SfxItemSet aSet(
-        rDoc.GetAttrPool(),
-        svl::Items<
+    SfxItemSetFixed<
             RES_FRM_SIZE, RES_BREAK,
             RES_HORI_ORIENT, RES_HORI_ORIENT,
             RES_BACKGROUND, RES_BACKGROUND,
             RES_SHADOW, RES_SHADOW,
             RES_KEEP, RES_KEEP,
-            RES_LAYOUT_SPLIT, RES_LAYOUT_SPLIT>);
+            RES_LAYOUT_SPLIT, RES_LAYOUT_SPLIT>
+        aSet(rDoc.GetAttrPool());
     const uno::Any* pRepHead;
     const SwFrameFormat &rFrameFormat = *rTable.GetFrameFormat();
     if(GetProperty(FN_TABLE_HEADLINE_REPEAT, 0xff, pRepHead ))
@@ -2593,9 +2593,9 @@ void SwXTextTable::setPropertyValue(const OUString& 
rPropertyName, const uno::An
                     UnoActionRemoveContext aRemoveContext(rCursor);
                     rCursor.MakeBoxSels();
 
-                    SfxItemSet aSet(pDoc->GetAttrPool(),
-                                    svl::Items<RES_BOX, RES_BOX,
-                                    SID_ATTR_BORDER_INNER, 
SID_ATTR_BORDER_INNER>);
+                    SfxItemSetFixed<RES_BOX, RES_BOX,
+                                    SID_ATTR_BORDER_INNER, 
SID_ATTR_BORDER_INNER>
+                         aSet(pDoc->GetAttrPool());
 
                     SvxBoxItem aBox( RES_BOX );
                     SvxBoxInfoItem aBoxInfo( SID_ATTR_BORDER_INNER );
@@ -2792,9 +2792,9 @@ uno::Any SwXTextTable::getPropertyValue(const OUString& 
rPropertyName)
                     UnoActionRemoveContext aRemoveContext(rCursor);
                     rCursor.MakeBoxSels();
 
-                    SfxItemSet aSet(pDoc->GetAttrPool(),
-                                    svl::Items<RES_BOX, RES_BOX,
-                                    SID_ATTR_BORDER_INNER, 
SID_ATTR_BORDER_INNER>);
+                    SfxItemSetFixed<RES_BOX, RES_BOX,
+                                    SID_ATTR_BORDER_INNER, 
SID_ATTR_BORDER_INNER>
+                        aSet(pDoc->GetAttrPool());
                     aSet.Put(SvxBoxInfoItem( SID_ATTR_BORDER_INNER ));
                     SwDoc::GetTabBorders(rCursor, aSet);
                     const SvxBoxInfoItem& rBoxInfoItem = 
aSet.Get(SID_ATTR_BORDER_INNER);
@@ -3373,9 +3373,9 @@ SwXCellRange::setPropertyValue(const OUString& 
rPropertyName, const uno::Any& aV
         break;
         case RES_BOX :
         {
-            SfxItemSet aSet(rDoc.GetAttrPool(),
-                            svl::Items<RES_BOX, RES_BOX,
-                            SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER>);
+            SfxItemSetFixed<RES_BOX, RES_BOX,
+                            SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER>
+                aSet(rDoc.GetAttrPool());
             SvxBoxInfoItem aBoxInfo( SID_ATTR_BORDER_INNER );
             aBoxInfo.SetValid(SvxBoxInfoItemValidFlags::ALL, false);
             SvxBoxInfoItemValidFlags nValid = SvxBoxInfoItemValidFlags::NONE;
@@ -3481,9 +3481,9 @@ uno::Any SAL_CALL SwXCellRange::getPropertyValue(const 
OUString& rPropertyName)
             case RES_BOX :
             {
                 SwDoc& rDoc = m_pImpl->m_pTableCursor->GetDoc();
-                SfxItemSet aSet(rDoc.GetAttrPool(),
-                                svl::Items<RES_BOX, RES_BOX,
-                                SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER>);
+                SfxItemSetFixed<RES_BOX, RES_BOX,
+                                SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER>
+                    aSet(rDoc.GetAttrPool());
                 aSet.Put(SvxBoxInfoItem( SID_ATTR_BORDER_INNER ));
                 SwDoc::GetTabBorders(*m_pImpl->m_pTableCursor, aSet);
                 const SvxBoxItem& rBoxItem = aSet.Get(RES_BOX);
@@ -3521,12 +3521,11 @@ uno::Any SAL_CALL SwXCellRange::getPropertyValue(const 
OUString& rPropertyName)
             break;
             default:
             {
-                SfxItemSet aSet(
-                    m_pImpl->m_pTableCursor->GetDoc().GetAttrPool(),
-                    svl::Items<
+                SfxItemSetFixed<
                         RES_CHRATR_BEGIN, RES_FRMATR_END - 1,
                         RES_UNKNOWNATR_CONTAINER,
-                            RES_UNKNOWNATR_CONTAINER>);
+                            RES_UNKNOWNATR_CONTAINER>
+                    aSet(m_pImpl->m_pTableCursor->GetDoc().GetAttrPool());
                 // first look at the attributes of the cursor
                 SwUnoTableCursor *const pCursor =
                     
dynamic_cast<SwUnoTableCursor*>(&(*m_pImpl->m_pTableCursor));
diff --git a/sw/source/filter/basflt/fltshell.cxx 
b/sw/source/filter/basflt/fltshell.cxx
index 3d551ae475a1..c79946ea44db 100644
--- a/sw/source/filter/basflt/fltshell.cxx
+++ b/sw/source/filter/basflt/fltshell.cxx
@@ -660,7 +660,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( m_rDoc.GetAttrPool(), svl::Items<RES_PAGEDESC, 
RES_BREAK> );
+            SfxItemSetFixed<RES_PAGEDESC, RES_BREAK> aBkSet( 
m_rDoc.GetAttrPool() );
             SwContentNode* pNd = nullptr;
             if( !pTOXAttr->HadBreakItem() || !pTOXAttr->HadPageDescItem() )
             {
diff --git a/sw/source/filter/html/css1atr.cxx 
b/sw/source/filter/html/css1atr.cxx
index ff3817eeeb00..6618a5479165 100644
--- a/sw/source/filter/html/css1atr.cxx
+++ b/sw/source/filter/html/css1atr.cxx
@@ -1203,15 +1203,14 @@ bool SwHTMLWriter::HasScriptDependentItems( const 
SfxItemSet& rItemSet,
         {
             //sequence of (start, end) property ranges we want to
             //query
-            SfxItemSet aTstItemSet(
-                *pDCCharFormat->GetAttrSet().GetPool(),
-                svl::Items<
+            SfxItemSetFixed<
                     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_CTL_FONT,
-                    RES_CHRATR_CTL_POSTURE, RES_CHRATR_CTL_WEIGHT>);
+                    RES_CHRATR_CTL_POSTURE, RES_CHRATR_CTL_WEIGHT>
+                 aTstItemSet(*pDCCharFormat->GetAttrSet().GetPool());
             aTstItemSet.Set( pDCCharFormat->GetAttrSet() );
             return HasScriptDependentItems( aTstItemSet, false );
         }
@@ -1254,11 +1253,11 @@ static bool OutCSS1Rule( SwHTMLWriter& rHTMLWrt, const 
OUString& rSelector,
 
             //sequence of (start, end) property ranges we want to
             //query
-            SfxItemSet aScriptItemSet( *rItemSet.GetPool(),
-                                       svl::Items<RES_CHRATR_FONT, 
RES_CHRATR_FONTSIZE,
+            SfxItemSetFixed<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> );
+                                       RES_CHRATR_CJK_FONT, 
RES_CHRATR_CTL_WEIGHT>
+                aScriptItemSet( *rItemSet.GetPool() );
             aScriptItemSet.Put( rItemSet );
 
             OUString aNewSelector = aSelector + ".western" + aPseudo;
@@ -1354,11 +1353,11 @@ static void OutCSS1DropCapRule(
                 OutCSS1_SwFormatDropAttrs( rHTMLWrt, rDrop );
             }
 
-            SfxItemSet aScriptItemSet( rHTMLWrt.m_pDoc->GetAttrPool(),
-                                       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> );
+            SfxItemSetFixed<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>
+                aScriptItemSet( rHTMLWrt.m_pDoc->GetAttrPool() );
             if( pDCCharFormat )
                 aScriptItemSet.Set( pDCCharFormat->GetAttrSet() );
 
@@ -1667,8 +1666,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(),
-                         svl::Items<RES_LR_SPACE, RES_UL_SPACE> );
+    SfxItemSetFixed<RES_LR_SPACE, RES_UL_SPACE> aItemSet( 
*rMaster.GetAttrSet().GetPool() );
     aItemSet.Set( rMaster.GetAttrSet() );
 
     if( pRefPageDesc )
diff --git a/sw/source/filter/html/htmlatr.cxx 
b/sw/source/filter/html/htmlatr.cxx
index 938ea1656473..ae2e4bb69611 100644
--- a/sw/source/filter/html/htmlatr.cxx
+++ b/sw/source/filter/html/htmlatr.cxx
@@ -1847,8 +1847,7 @@ 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(), 
svl::Items<RES_CHRATR_BEGIN,
-                                                 RES_CHRATR_END> );
+    SfxItemSetFixed<RES_CHRATR_BEGIN, RES_CHRATR_END> aItemSet( 
*rFormatItemSet.GetPool() );
     SwHTMLWriter::GetEEAttrsFromDrwObj( aItemSet, pTextObj );
     bool bOutStylesOld = m_bOutStyles;
     m_bOutStyles = false;
diff --git a/sw/source/filter/html/htmlctxt.cxx 
b/sw/source/filter/html/htmlctxt.cxx
index 4d4f23ad3085..218cb300722a 100644
--- a/sw/source/filter/html/htmlctxt.cxx
+++ b/sw/source/filter/html/htmlctxt.cxx
@@ -476,8 +476,7 @@ bool SwHTMLParser::DoPositioning( SfxItemSet &rItemSet,
     // - there's a given width
     if( SwCSS1Parser::MayBePositioned( rPropInfo ) )
     {
-        SfxItemSet aFrameItemSet( m_xDoc->GetAttrPool(),
-                                svl::Items<RES_FRMATR_BEGIN, RES_FRMATR_END-1> 
);
+        SfxItemSetFixed<RES_FRMATR_BEGIN, RES_FRMATR_END-1> aFrameItemSet( 
m_xDoc->GetAttrPool() );
         if( !IsNewDoc() )
             Reader::ResetFrameFormatAttrs(aFrameItemSet );
 
@@ -767,8 +766,8 @@ void SwHTMLParser::SplitPREListingXMP( HTMLAttrContext 
*pCntxt )
 SfxItemSet *HTMLAttrContext::GetFrameItemSet( SwDoc *pCreateDoc )
 {
     if( !m_pFrameItemSet && pCreateDoc )
-        m_pFrameItemSet = std::make_unique<SfxItemSet>( 
pCreateDoc->GetAttrPool(),
-                        svl::Items<RES_FRMATR_BEGIN, RES_FRMATR_END-1> );
+        m_pFrameItemSet = std::make_unique<SfxItemSetFixed<RES_FRMATR_BEGIN, 
RES_FRMATR_END-1>>
+                            ( pCreateDoc->GetAttrPool() );
     return m_pFrameItemSet.get();
 }
 
diff --git a/sw/source/filter/html/htmldrawreader.cxx 
b/sw/source/filter/html/htmldrawreader.cxx
index 23f422844168..2839a2febe4d 100644
--- a/sw/source/filter/html/htmldrawreader.cxx
+++ b/sw/source/filter/html/htmldrawreader.cxx
@@ -82,8 +82,7 @@ void SwHTMLParser::InsertDrawObject( SdrObject* pNewDrawObj,
     // to the visible layer.
     pNewDrawObj->SetLayer( 
m_xDoc->getIDocumentDrawModelAccess().GetInvisibleHeavenId() );
 
-    SfxItemSet aFrameSet( m_xDoc->GetAttrPool(),
-                        svl::Items<RES_FRMATR_BEGIN, RES_FRMATR_END-1> );
+    SfxItemSetFixed<RES_FRMATR_BEGIN, RES_FRMATR_END-1> aFrameSet( 
m_xDoc->GetAttrPool() );
     if( !IsNewDoc() )
         Reader::ResetFrameFormatAttrs( aFrameSet );
 
@@ -368,11 +367,11 @@ void SwHTMLParser::NewMarquee( HTMLTable *pCurTable )
         eAniDir = SdrTextAniDirection::Right;
 
     // re set the attributes needed for scrolling
-    static WhichRangesContainer const aWhichMap(svl::Items<
+    SfxItemSetFixed<
             XATTR_FILL_FIRST,   XATTR_FILL_LAST,
             SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST,
-            EE_CHAR_START,      EE_CHAR_END>);
-    SfxItemSet aItemSet( pModel->GetItemPool(), aWhichMap );
+            EE_CHAR_START,      EE_CHAR_END>
+        aItemSet( pModel->GetItemPool() );
     aItemSet.Put( makeSdrTextAutoGrowWidthItem( false ) );
     aItemSet.Put( makeSdrTextAutoGrowHeightItem( true ) );
     aItemSet.Put( SdrTextAniKindItem( eAniKind ) );
diff --git a/sw/source/filter/html/htmlfldw.cxx 
b/sw/source/filter/html/htmlfldw.cxx
index bc5073c11d38..dbe4fe8d9092 100644
--- a/sw/source/filter/html/htmlfldw.cxx
+++ b/sw/source/filter/html/htmlfldw.cxx
@@ -333,11 +333,11 @@ static Writer& OutHTML_SwField( Writer& rWrt, const 
SwField* pField,
     {
         //sequence of (start, end) property ranges we want to
         //query
-        SfxItemSet aScriptItemSet( rWrt.m_pDoc->GetAttrPool(),
-                                   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> 
);
+        SfxItemSetFixed<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>
+            aScriptItemSet( rWrt.m_pDoc->GetAttrPool() );
         rTextNd.GetParaAttr(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 5cc282bf69b0..6c7d9003ceb3 100644
--- a/sw/source/filter/html/htmlflywriter.cxx
+++ b/sw/source/filter/html/htmlflywriter.cxx
@@ -2038,8 +2038,7 @@ 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(), 
svl::Items<RES_CHRATR_BEGIN,
-                                                 RES_CHRATR_END> );
+    SfxItemSetFixed<RES_CHRATR_BEGIN, RES_CHRATR_END> aItemSet( 
*rFormatItemSet.GetPool() );
     SwHTMLWriter::GetEEAttrsFromDrwObj( aItemSet, &rSdrObj );
     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 cd13fe78819f..3e30352f326b 100644
--- a/sw/source/filter/html/htmlforw.cxx
+++ b/sw/source/filter/html/htmlforw.cxx
@@ -1043,8 +1043,7 @@ Writer& OutHTML_DrawFrameFormatAsControl( Writer& rWrt,
         bool bEdit = TAG_TEXTAREA == eTag || TYPE_FILE == eType ||
                      TYPE_TEXT == eType;
 
-        SfxItemSet aItemSet( rHTMLWrt.m_pDoc->GetAttrPool(), 
svl::Items<RES_CHRATR_BEGIN,
-                             RES_CHRATR_END> );
+        SfxItemSetFixed<RES_CHRATR_BEGIN, RES_CHRATR_END> aItemSet( 
rHTMLWrt.m_pDoc->GetAttrPool() );
         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 be5677999462..592475dfa3cd 100644
--- a/sw/source/filter/html/htmlgrin.cxx
+++ b/sw/source/filter/html/htmlgrin.cxx
@@ -532,8 +532,7 @@ IMAGE_SETEVENT:
     if( HasStyleOptions( aStyle, aId, aClass ) )
         ParseStyleOptions( aStyle, aId, aClass, aItemSet, aPropInfo );
 
-    SfxItemSet aFrameSet( m_xDoc->GetAttrPool(),
-                        svl::Items<RES_FRMATR_BEGIN, RES_FRMATR_END-1> );
+    SfxItemSetFixed<RES_FRMATR_BEGIN, RES_FRMATR_END-1> aFrameSet( 
m_xDoc->GetAttrPool() );
     if( !IsNewDoc() )
         Reader::ResetFrameFormatAttrs( aFrameSet );
 
diff --git a/sw/source/filter/html/htmlplug.cxx 
b/sw/source/filter/html/htmlplug.cxx
index 3bdf379e06f0..cc10834228e9 100644
--- a/sw/source/filter/html/htmlplug.cxx
+++ b/sw/source/filter/html/htmlplug.cxx
@@ -622,8 +622,7 @@ bool SwHTMLParser::InsertEmbed()
         }
     }
 
-    SfxItemSet aFrameSet( m_xDoc->GetAttrPool(),
-                        svl::Items<RES_FRMATR_BEGIN, RES_FRMATR_END-1> );
+    SfxItemSetFixed<RES_FRMATR_BEGIN, RES_FRMATR_END-1> aFrameSet( 
m_xDoc->GetAttrPool() );
     if( !IsNewDoc() )
         Reader::ResetFrameFormatAttrs( aFrameSet );
 
@@ -1132,8 +1131,7 @@ void SwHTMLParser::InsertFloatingFrame()
         ParseStyleOptions( aStyle, aId, aClass, aItemSet, aPropInfo );
 
     // fetch the ItemSet
-    SfxItemSet aFrameSet( m_xDoc->GetAttrPool(),
-                        svl::Items<RES_FRMATR_BEGIN, RES_FRMATR_END-1> );
+    SfxItemSetFixed<RES_FRMATR_BEGIN, RES_FRMATR_END-1> aFrameSet( 
m_xDoc->GetAttrPool() );
     if( !IsNewDoc() )
         Reader::ResetFrameFormatAttrs( aFrameSet );
 
diff --git a/sw/source/filter/html/htmlsect.cxx 
b/sw/source/filter/html/htmlsect.cxx
index cafd7718cdb6..82f02d613587 100644
--- a/sw/source/filter/html/htmlsect.cxx
+++ b/sw/source/filter/html/htmlsect.cxx
@@ -324,8 +324,7 @@ void SwHTMLParser::NewDivision( HtmlTokenId nToken )
             aSection.SetProtectFlag(true);
         }
 
-        SfxItemSet aFrameItemSet( m_xDoc->GetAttrPool(),
-                                svl::Items<RES_FRMATR_BEGIN, RES_FRMATR_END-1> 
);
+        SfxItemSetFixed<RES_FRMATR_BEGIN, RES_FRMATR_END-1> aFrameItemSet( 
m_xDoc->GetAttrPool() );
         if( !IsNewDoc() )
             Reader::ResetFrameFormatAttrs(aFrameItemSet );
 
@@ -628,8 +627,7 @@ void SwHTMLParser::NewMultiCol( sal_uInt16 columnsFromCss )
     bool bPositioned = false;
     if( bInCntnr || SwCSS1Parser::MayBePositioned( aPropInfo, true ) )
     {
-        SfxItemSet aFrameItemSet( m_xDoc->GetAttrPool(),
-                                svl::Items<RES_FRMATR_BEGIN, RES_FRMATR_END-1> 
);
+        SfxItemSetFixed<RES_FRMATR_BEGIN, RES_FRMATR_END-1> aFrameItemSet( 
m_xDoc->GetAttrPool() );
         if( !IsNewDoc() )
             Reader::ResetFrameFormatAttrs(aFrameItemSet );
 
@@ -700,8 +698,7 @@ void SwHTMLParser::NewMultiCol( sal_uInt16 columnsFromCss )
         OUString aName( m_xDoc->GetUniqueSectionName( !aId.isEmpty() ? &aId : 
nullptr ) );
         SwSectionData aSection( SectionType::Content, aName );
 
-        SfxItemSet aFrameItemSet( m_xDoc->GetAttrPool(),
-                                svl::Items<RES_FRMATR_BEGIN, RES_FRMATR_END-1> 
);
+        SfxItemSetFixed<RES_FRMATR_BEGIN, RES_FRMATR_END-1> aFrameItemSet( 
m_xDoc->GetAttrPool() );
         if( !IsNewDoc() )
             Reader::ResetFrameFormatAttrs(aFrameItemSet );
 
diff --git a/sw/source/filter/html/htmltab.cxx 
b/sw/source/filter/html/htmltab.cxx
index 5b81d63bf145..cbba52c6f119 100644
--- a/sw/source/filter/html/htmltab.cxx
+++ b/sw/source/filter/html/htmltab.cxx
@@ -1403,8 +1403,8 @@ void HTMLTable::FixFrameFormat( SwTableBox *pBox,
             {
                 bool bLock = pFrameFormat->GetDoc()->GetNumberFormatter()
                                      ->IsTextFormat( nNumFormat );
-                SfxItemSet aItemSet( *pFrameFormat->GetAttrSet().GetPool(),
-                                     svl::Items<RES_BOXATR_FORMAT, 
RES_BOXATR_VALUE> );
+                SfxItemSetFixed<RES_BOXATR_FORMAT, RES_BOXATR_VALUE>
+                    aItemSet( *pFrameFormat->GetAttrSet().GetPool() );
                 SvxAdjust eAdjust = SvxAdjust::End;
                 SwContentNode *pCNd = nullptr;
                 if( !bLock )
@@ -2691,8 +2691,7 @@ SvxBrushItem* SwHTMLParser::CreateBrushItem( const Color 
*pColor,
 
     if( !rStyle.isEmpty() || !rId.isEmpty() || !rClass.isEmpty() )
     {
-        SfxItemSet aItemSet( m_xDoc->GetAttrPool(), svl::Items<RES_BACKGROUND,
-                                                  RES_BACKGROUND> );
+        SfxItemSetFixed<RES_BACKGROUND, RES_BACKGROUND> aItemSet( 
m_xDoc->GetAttrPool() );
         SvxCSS1PropertyInfo aPropInfo;
 
         if( !rClass.isEmpty() )
@@ -3212,7 +3211,7 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, 
bool bReadOptions,
             // the table has no content yet, this means the actual table needs
             // to be created first
 
-            static const WhichRangesContainer aWhichIds(svl::Items<
+            SfxItemSetFixed<
                 RES_PARATR_SPLIT,   RES_PARATR_SPLIT,
                 RES_PAGEDESC,       RES_PAGEDESC,
                 RES_BREAK,          RES_BREAK,
@@ -3220,9 +3219,7 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, 
bool bReadOptions,
                 RES_KEEP,           RES_KEEP,
                 RES_LAYOUT_SPLIT,   RES_LAYOUT_SPLIT,
                 RES_FRAMEDIR,       RES_FRAMEDIR
-            >);
-
-            SfxItemSet aItemSet( m_xDoc->GetAttrPool(), aWhichIds );
+            > aItemSet( m_xDoc->GetAttrPool() );
             SvxCSS1PropertyInfo aPropInfo;
 
             bool bStyleParsed = ParseStyleOptions( pCurTable->GetStyle(),
@@ -3394,8 +3391,8 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, 
bool bReadOptions,
                 {
                     // the table should be put in a text frame
 
-                    SfxItemSet aFrameSet( m_xDoc->GetAttrPool(),
-                                        svl::Items<RES_FRMATR_BEGIN, 
RES_FRMATR_END-1> );
+                    SfxItemSetFixed<RES_FRMATR_BEGIN, RES_FRMATR_END-1>
+                        aFrameSet( m_xDoc->GetAttrPool() );
                     if( !pCurTable->IsNewDoc() )
                         Reader::ResetFrameFormatAttrs( aFrameSet );
 
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index df8abc1e65d9..25627a3f2d82 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -2972,7 +2972,7 @@ void SwHTMLParser::SetAttr_( bool bChkEnd, bool 
bBeforeTable,
                 case RES_BACKGROUND:
                 {
                     const SvxBrushItem& rBrush = static_cast< SvxBrushItem& 
>(*pAttr->m_pItem);
-                    SfxItemSet aNewSet(m_xDoc->GetAttrPool(), 
svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST>);
+                    SfxItemSetFixed<XATTR_FILL_FIRST, XATTR_FILL_LAST> 
aNewSet(m_xDoc->GetAttrPool());
 
                     setSvxBrushItemAsFillAttributesToTargetSet(rBrush, 
aNewSet);
                     
m_xDoc->getIDocumentContentOperations().InsertItemSet(aAttrPam, aNewSet, 
SetAttrMode::DONTREPLACE);
@@ -4943,8 +4943,7 @@ void SwHTMLParser::InsertSpacer()
             // create an empty text frame
 
             // fetch the ItemSet
-            SfxItemSet aFrameSet( m_xDoc->GetAttrPool(),
-                                svl::Items<RES_FRMATR_BEGIN, RES_FRMATR_END-1> 
);
+            SfxItemSetFixed<RES_FRMATR_BEGIN, RES_FRMATR_END-1> aFrameSet( 
m_xDoc->GetAttrPool() );
             if( !IsNewDoc() )
                 Reader::ResetFrameFormatAttrs( aFrameSet );
 
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx 
b/sw/source/filter/ww8/wrtw8nds.cxx
index 68bd7654f5f9..43c3d9ba3c53 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -412,8 +412,7 @@ void SwWW8AttrIter::OutAttr(sal_Int32 nSwPos, bool 
bWriteCombChars, bool bPostpo
     const SvxFontItem *pFont = &rParentFont;
     const SfxPoolItem *pGrabBag = nullptr;
 
-    SfxItemSet aExportSet(*rNd.GetSwAttrSet().GetPool(),
-        svl::Items<RES_CHRATR_BEGIN, RES_TXTATR_END - 1>);
+    SfxItemSetFixed<RES_CHRATR_BEGIN, RES_TXTATR_END - 1> 
aExportSet(*rNd.GetSwAttrSet().GetPool());
 
     //The hard formatting properties that affect the entire paragraph
     if (rNd.HasSwAttrSet())
@@ -2608,7 +2607,7 @@ void MSWordExportBase::OutputTextNode( SwTextNode& rNode )
                 {
                     // Allow MSO to emulate LO footnote text starting at left 
margin - only meaningful with hanging indent
                     sal_Int32 nFirstLineIndent=0;
-                    SfxItemSet aSet( m_rDoc.GetAttrPool(), 
svl::Items<RES_LR_SPACE, RES_LR_SPACE> );

... etc. - the rest is truncated

Reply via email to