From 92125d0d669671ca0fd21408b93f89d0e3cf860c Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Sun, 26 Sep 2021 18:42:37 +0200 Subject: use SfxItemSetFixed in various Change-Id: Ie2472959dbab93ead20948245fca9644de834422 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122653 Tested-by: Jenkins Reviewed-by: Noel Grandin --- cui/source/dialogs/cuihyperdlg.cxx | 3 +-- cui/source/dialogs/hltpbase.cxx | 4 +--- cui/source/options/treeopt.cxx | 4 ++-- cui/source/tabpages/page.cxx | 10 +++++----- 4 files changed, 9 insertions(+), 12 deletions(-) (limited to 'cui/source') diff --git a/cui/source/dialogs/cuihyperdlg.cxx b/cui/source/dialogs/cuihyperdlg.cxx index cb48f126278b..350bdb6c6e14 100644 --- a/cui/source/dialogs/cuihyperdlg.cxx +++ b/cui/source/dialogs/cuihyperdlg.cxx @@ -184,8 +184,7 @@ void SvxHpLinkDlg::Close() void SvxHpLinkDlg::Apply() { - SfxItemSet aItemSet( SfxGetpApp()->GetPool(), svl::Items ); + SfxItemSetFixed aItemSet( SfxGetpApp()->GetPool() ); SvxHyperlinkTabPageBase* pCurrentPage = static_cast( GetTabPage( GetCurPageId() ) ); diff --git a/cui/source/dialogs/hltpbase.cxx b/cui/source/dialogs/hltpbase.cxx index 5dbacdeebb31..3f20145aafac 100644 --- a/cui/source/dialogs/hltpbase.cxx +++ b/cui/source/dialogs/hltpbase.cxx @@ -341,9 +341,7 @@ IMPL_LINK_NOARG(SvxHyperlinkTabPageBase, ClickScriptHdl_Impl, weld::Button&, voi aItem.SetMacroTable( *pMacroTbl ); // create empty itemset for macro-dlg - SfxItemSet aItemSet( SfxGetpApp()->GetPool(), - svl::Items ); + SfxItemSetFixed aItemSet( SfxGetpApp()->GetPool() ); aItemSet.Put ( aItem ); DisableClose( true ); diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index 533dc34edea1..153e0b260966 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -1045,7 +1045,7 @@ std::optional OfaTreeOptionsDialog::CreateItemSet( sal_uInt16 nId ) SID_ATTR_QUICKLAUNCHER, SID_ATTR_QUICKLAUNCHER, SID_ATTR_YEAR2000, SID_ATTR_YEAR2000> ); - SfxItemSet aOptSet( SfxGetpApp()->GetPool(), svl::Items ); + SfxItemSetFixed aOptSet( SfxGetpApp()->GetPool() ); SfxGetpApp()->GetOptions(aOptSet); pRet->Put(aOptSet); @@ -1189,7 +1189,7 @@ void OfaTreeOptionsDialog::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet std::shared_ptr batch(comphelper::ConfigurationChanges::create()); const SfxPoolItem* pItem = nullptr; - SfxItemSet aOptSet(SfxGetpApp()->GetPool(), svl::Items ); + SfxItemSetFixed aOptSet(SfxGetpApp()->GetPool()); aOptSet.Put(rSet); if(aOptSet.Count()) SfxGetpApp()->SetOptions( aOptSet ); diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx index ab79d9fadb10..0e29feaaeae6 100644 --- a/cui/source/tabpages/page.cxx +++ b/cui/source/tabpages/page.cxx @@ -1156,7 +1156,7 @@ void SvxPageDescPage::ResetBackground_Impl(const SfxItemSet& rSet) { // create FillAttributes from SvxBrushItem const SvxBrushItem& rItem = static_cast< const SvxBrushItem& >(rTmpSet.Get(nWhich)); - SfxItemSet aTempSet(*rTmpSet.GetPool(), svl::Items); + SfxItemSetFixed aTempSet(*rTmpSet.GetPool()); setSvxBrushItemAsFillAttributesToTargetSet(rItem, aTempSet); aHeaderFillAttributes = std::make_shared(aTempSet); @@ -1192,7 +1192,7 @@ void SvxPageDescPage::ResetBackground_Impl(const SfxItemSet& rSet) { // create FillAttributes from SvxBrushItem const SvxBrushItem& rItem = static_cast< const SvxBrushItem& >(rTmpSet.Get(nWhich)); - SfxItemSet aTempSet(*rTmpSet.GetPool(), svl::Items); + SfxItemSetFixed aTempSet(*rTmpSet.GetPool()); setSvxBrushItemAsFillAttributesToTargetSet(rItem, aTempSet); aFooterFillAttributes = std::make_shared(aTempSet); @@ -1218,7 +1218,7 @@ void SvxPageDescPage::ResetBackground_Impl(const SfxItemSet& rSet) { // create FillAttributes from SvxBrushItem const SvxBrushItem& rItem = static_cast< const SvxBrushItem& >(*pItem); - SfxItemSet aTempSet(*rSet.GetPool(), svl::Items); + SfxItemSetFixed aTempSet(*rSet.GetPool()); setSvxBrushItemAsFillAttributesToTargetSet(rItem, aTempSet); aPageFillAttributes = std::make_shared(aTempSet); @@ -1282,7 +1282,7 @@ void SvxPageDescPage::InitHeadFoot_Impl( const SfxItemSet& rSet ) { // aBspWin.SetHdColor(rItem.GetColor()); const SvxBrushItem& rItem = static_cast< const SvxBrushItem& >(rHeaderSet.Get(nWhich)); - SfxItemSet aTempSet(*rHeaderSet.GetPool(), svl::Items); + SfxItemSetFixed aTempSet(*rHeaderSet.GetPool()); setSvxBrushItemAsFillAttributesToTargetSet(rItem, aTempSet); aHeaderFillAttributes = std::make_shared(aTempSet); @@ -1337,7 +1337,7 @@ void SvxPageDescPage::InitHeadFoot_Impl( const SfxItemSet& rSet ) { // aBspWin.SetFtColor(rItem.GetColor()); const SvxBrushItem& rItem = static_cast(rFooterSet.Get(nWhich)); - SfxItemSet aTempSet(*rFooterSet.GetPool(), svl::Items); + SfxItemSetFixed aTempSet(*rFooterSet.GetPool()); setSvxBrushItemAsFillAttributesToTargetSet(rItem, aTempSet); aFooterFillAttributes = std::make_shared(aTempSet); -- cgit