From adfdffa5001dd17da9ea3670a5dc23af559c17ba Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Sun, 26 Sep 2021 16:52:30 +0200 Subject: use SfxItemSetFixed in sw Change-Id: I1b7bfe92dc4ef61b26940ed02ccd8f359e8149e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122652 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sw/source/uibase/utlui/uitool.cxx | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'sw/source/uibase/utlui') diff --git a/sw/source/uibase/utlui/uitool.cxx b/sw/source/uibase/utlui/uitool.cxx index 6447862a44f0..5c34b89ca0a7 100644 --- a/sw/source/uibase/utlui/uitool.cxx +++ b/sw/source/uibase/utlui/uitool.cxx @@ -200,8 +200,7 @@ void ApplyCharBackground(const Color& rBackgroundColor, SwWrtShell& rShell) { rShell.StartUndo(SwUndoId::INSATTR); - SfxItemSet aCoreSet(rShell.GetView().GetPool(), svl::Items< - RES_CHRATR_GRABBAG, RES_CHRATR_GRABBAG>); + SfxItemSetFixed aCoreSet(rShell.GetView().GetPool()); rShell.GetCurAttr(aCoreSet); @@ -515,8 +514,7 @@ void PageDescToItemSet( const SwPageDesc& rPageDesc, SfxItemSet& rSet) OSL_ENSURE(pHeaderFormat != nullptr, "no header format"); // HeaderInfo, margins, background, border - SfxItemSet aHeaderSet(*rSet.GetPool(), - svl::Items); + SID_ATTR_PAGE_SHARED_FIRST,SID_ATTR_PAGE_SHARED_FIRST> aHeaderSet(*rSet.GetPool()); // set correct parent to get the XFILL_NONE FillStyle as needed aHeaderSet.SetParent(&rMaster.GetDoc()->GetDfltFrameFormat()->GetAttrSet()); @@ -565,8 +563,7 @@ void PageDescToItemSet( const SwPageDesc& rPageDesc, SfxItemSet& rSet) OSL_ENSURE(pFooterFormat != nullptr, "no footer format"); // FooterInfo, margins, background, border - SfxItemSet aFooterSet(*rSet.GetPool(), - svl::Items); + SID_ATTR_PAGE_SHARED_FIRST,SID_ATTR_PAGE_SHARED_FIRST> aFooterSet(*rSet.GetPool()); // set correct parent to get the XFILL_NONE FillStyle as needed aFooterSet.SetParent(&rMaster.GetDoc()->GetDfltFrameFormat()->GetAttrSet()); @@ -706,7 +703,7 @@ void SfxToSwPageDescAttr( const SwWrtShell& rShell, SfxItemSet& rSet ) } else { - SfxItemSet aCoreSet(rShell.GetView().GetPool(), svl::Items ); + SfxItemSetFixed aCoreSet(rShell.GetView().GetPool()); rShell.GetCurAttr( aCoreSet ); if(SfxItemState::SET == aCoreSet.GetItemState( RES_PAGEDESC, true, &pItem ) ) { -- cgit