[Libreoffice-commits] core.git: sd/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Wed Sep 29 07:41:50 UTC 2021
sd/source/core/sdpage.cxx | 4 ++--
sd/source/core/sdpage2.cxx | 2 +-
sd/source/core/stlsheet.cxx | 19 +++++++------------
sd/source/ui/app/sdmod2.cxx | 11 ++++-------
sd/source/ui/docshell/docshel4.cxx | 6 +++---
sd/source/ui/func/fubullet.cxx | 2 +-
sd/source/ui/func/fuchar.cxx | 2 +-
sd/source/ui/func/fuconcs.cxx | 6 ++----
sd/source/ui/func/fucopy.cxx | 7 +++----
sd/source/ui/func/fuexpand.cxx | 2 +-
sd/source/ui/func/fumorph.cxx | 2 +-
sd/source/ui/func/fuoaprms.cxx | 2 +-
sd/source/ui/func/fuolbull.cxx | 6 +++---
sd/source/ui/func/fupage.cxx | 24 ++++++++++++------------
sd/source/ui/func/fuparagr.cxx | 7 +++----
sd/source/ui/func/fuprlout.cxx | 2 +-
sd/source/ui/func/fuprobjs.cxx | 2 +-
sd/source/ui/func/fuscale.cxx | 2 +-
sd/source/ui/func/fusldlg.cxx | 2 +-
sd/source/ui/func/fusnapln.cxx | 2 +-
sd/source/ui/func/fusumry.cxx | 2 +-
sd/source/ui/func/futext.cxx | 5 ++---
sd/source/ui/unoidl/UnoDocumentSettings.cxx | 6 +++---
sd/source/ui/unoidl/unopage.cxx | 4 ++--
sd/source/ui/unoidl/unopback.cxx | 4 ++--
sd/source/ui/view/drtxtob.cxx | 2 +-
sd/source/ui/view/drtxtob1.cxx | 6 +++---
sd/source/ui/view/drviews2.cxx | 14 +++++++-------
sd/source/ui/view/drviews3.cxx | 26 +++++++++++---------------
sd/source/ui/view/drviews4.cxx | 6 ++----
sd/source/ui/view/drviews7.cxx | 6 +++---
sd/source/ui/view/drviewsf.cxx | 2 +-
sd/source/ui/view/drviewsi.cxx | 6 ++----
sd/source/ui/view/outlnvsh.cxx | 4 ++--
sd/source/ui/view/sdview.cxx | 4 ++--
sd/source/ui/view/sdview3.cxx | 4 ++--
sd/source/ui/view/sdview4.cxx | 2 +-
37 files changed, 97 insertions(+), 118 deletions(-)
New commits:
commit 00f77b86df915e675f6b0e4aa5d762fda14d9c32
Author: Noel Grandin <noelgrandin at gmail.com>
AuthorDate: Tue Sep 28 19:39:39 2021 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed Sep 29 09:41:13 2021 +0200
use SfxItemSetFixed in sd
Change-Id: Ia28372dbb82fdaaa282756118e0eeb207cfd5146
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122789
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index b6a5a2fd005e..fa34a33a094e 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -2105,7 +2105,7 @@ static SdrObject* convertPresentationObjectImpl(SdPage& rPage, SdrObject* pSourc
}
// Remove LRSpace item
- SfxItemSet aSet(rModel.GetPool(), svl::Items<EE_PARA_LRSPACE, EE_PARA_LRSPACE> );
+ SfxItemSetFixed<EE_PARA_LRSPACE, EE_PARA_LRSPACE> aSet(rModel.GetPool());
aSet.Put(pNewObj->GetMergedItemSet());
@@ -2142,7 +2142,7 @@ static SdrObject* convertPresentationObjectImpl(SdPage& rPage, SdrObject* pSourc
pNewObj->SetEmptyPresObj(false);
// reset left indent
- SfxItemSet aSet(rModel.GetPool(), svl::Items<EE_PARA_LRSPACE, EE_PARA_LRSPACE> );
+ SfxItemSetFixed<EE_PARA_LRSPACE, EE_PARA_LRSPACE> aSet(rModel.GetPool());
aSet.Put(pNewObj->GetMergedItemSet());
diff --git a/sd/source/core/sdpage2.cxx b/sd/source/core/sdpage2.cxx
index 29f1dc8d14d7..5e91be6accb5 100644
--- a/sd/source/core/sdpage2.cxx
+++ b/sd/source/core/sdpage2.cxx
@@ -448,7 +448,7 @@ SfxStyleSheet* SdPage::GetTextStyleSheetForObject( SdrObject* pObj ) const
SfxItemSet* SdPage::getOrCreateItems()
{
if( mpItems == nullptr )
- mpItems = std::make_unique<SfxItemSet>( getSdrModelFromSdrPage().GetItemPool(), svl::Items<SDRATTR_XMLATTRIBUTES, SDRATTR_XMLATTRIBUTES> );
+ mpItems = std::make_unique<SfxItemSetFixed<SDRATTR_XMLATTRIBUTES, SDRATTR_XMLATTRIBUTES>>( getSdrModelFromSdrPage().GetItemPool());
return mpItems.get();
}
diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx
index d0ea45f4c640..a7fe40a0a646 100644
--- a/sd/source/core/stlsheet.cxx
+++ b/sd/source/core/stlsheet.cxx
@@ -212,16 +212,14 @@ SfxItemSet& SdStyleSheet::GetItemSet()
// we create the ItemSet 'on demand' if necessary
if (!pSet)
{
- pSet = new SfxItemSet(
- GetPool()->GetPool(),
- svl::Items<
+ pSet = new SfxItemSetFixed<
XATTR_LINE_FIRST, XATTR_LINE_LAST,
XATTR_FILL_FIRST, XATTR_FILL_LAST,
SDRATTR_SHADOW_FIRST, SDRATTR_SHADOW_LAST,
SDRATTR_TEXT_MINFRAMEHEIGHT, SDRATTR_TEXT_WORDWRAP,
SDRATTR_EDGE_FIRST, SDRATTR_MEASURE_LAST,
SDRATTR_3D_FIRST, SDRATTR_3D_LAST,
- EE_PARA_START, EE_CHAR_END>);
+ EE_PARA_START, EE_CHAR_END>(GetPool()->GetPool());
bMySet = true;
}
@@ -232,16 +230,15 @@ SfxItemSet& SdStyleSheet::GetItemSet()
{
if (!pSet)
{
- pSet = new SfxItemSet(
- GetPool()->GetPool(),
- svl::Items<
+ pSet = new SfxItemSetFixed<
XATTR_LINE_FIRST, XATTR_LINE_LAST,
XATTR_FILL_FIRST, XATTR_FILL_LAST,
SDRATTR_SHADOW_FIRST, SDRATTR_SHADOW_LAST,
SDRATTR_TEXT_MINFRAMEHEIGHT, SDRATTR_XMLATTRIBUTES,
SDRATTR_TEXT_WORDWRAP, SDRATTR_TEXT_WORDWRAP,
SDRATTR_TABLE_FIRST, SDRATTR_TABLE_LAST,
- EE_PARA_START, EE_CHAR_END>);
+ EE_PARA_START, EE_CHAR_END>(GetPool()->GetPool());
+
bMySet = true;
}
@@ -263,16 +260,14 @@ SfxItemSet& SdStyleSheet::GetItemSet()
{
if (!pSet)
{
- pSet = new SfxItemSet(
- GetPool()->GetPool(),
- svl::Items<
+ pSet = new SfxItemSetFixed<
XATTR_LINE_FIRST, XATTR_LINE_LAST,
XATTR_FILL_FIRST, XATTR_FILL_LAST,
SDRATTR_SHADOW_FIRST, SDRATTR_SHADOW_LAST,
SDRATTR_TEXT_MINFRAMEHEIGHT, SDRATTR_TEXT_WORDWRAP,
SDRATTR_EDGE_FIRST, SDRATTR_MEASURE_LAST,
SDRATTR_3D_FIRST, SDRATTR_3D_LAST,
- EE_PARA_START, EE_CHAR_END>);
+ EE_PARA_START, EE_CHAR_END>(GetPool()->GetPool());
bMySet = true;
}
diff --git a/sd/source/ui/app/sdmod2.cxx b/sd/source/ui/app/sdmod2.cxx
index aaf21a621b62..16dd1af96af5 100644
--- a/sd/source/ui/app/sdmod2.cxx
+++ b/sd/source/ui/app/sdmod2.cxx
@@ -452,13 +452,11 @@ std::optional<SfxItemSet> SdModule::CreateItemSet( sal_uInt16 nSlot )
SfxItemPool& rPool = GetPool();
rPool.SetDefaultMetric( MapUnit::Map100thMM );
- SfxItemSet aRet(
- rPool,
- svl::Items<
+ SfxItemSetFixed<
SID_ATTR_GRID_OPTIONS, SID_ATTR_GRID_OPTIONS,
SID_ATTR_METRIC, SID_ATTR_METRIC,
SID_ATTR_DEFTABSTOP, SID_ATTR_DEFTABSTOP,
- ATTR_OPTIONS_LAYOUT, ATTR_OPTIONS_SCALE_END>);
+ ATTR_OPTIONS_LAYOUT, ATTR_OPTIONS_SCALE_END> aRet(rPool);
// TP_OPTIONS_LAYOUT:
aRet.Put( SdOptionsLayoutItem( pOptions, pFrameView ) );
@@ -627,10 +625,9 @@ void SdModule::ApplyItemSet( sal_uInt16 nSlot, const SfxItemSet& rSet )
pSnapItem->SetOptions( pOptions );
}
- SfxItemSet aPrintSet( GetPool(),
- svl::Items<SID_PRINTER_NOTFOUND_WARN, SID_PRINTER_NOTFOUND_WARN,
+ SfxItemSetFixed<SID_PRINTER_NOTFOUND_WARN, SID_PRINTER_NOTFOUND_WARN,
SID_PRINTER_CHANGESTODOC, SID_PRINTER_CHANGESTODOC,
- ATTR_OPTIONS_PRINT, ATTR_OPTIONS_PRINT> );
+ ATTR_OPTIONS_PRINT, ATTR_OPTIONS_PRINT> aPrintSet( GetPool() );
// Print
const SdOptionsPrintItem* pPrintItem = nullptr;
diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx
index c154340f0a6a..622d35c7f1eb 100644
--- a/sd/source/ui/docshell/docshel4.cxx
+++ b/sd/source/ui/docshell/docshel4.cxx
@@ -94,10 +94,10 @@ SfxPrinter* DrawDocShell::GetPrinter(bool bCreate)
if (bCreate && !mpPrinter)
{
// create ItemSet with special pool area
- auto pSet = std::make_unique<SfxItemSet>( GetPool(),
- svl::Items<SID_PRINTER_NOTFOUND_WARN, SID_PRINTER_NOTFOUND_WARN,
+ auto pSet = std::make_unique<SfxItemSetFixed<
+ SID_PRINTER_NOTFOUND_WARN, SID_PRINTER_NOTFOUND_WARN,
SID_PRINTER_CHANGESTODOC, SID_PRINTER_CHANGESTODOC,
- ATTR_OPTIONS_PRINT, ATTR_OPTIONS_PRINT> );
+ ATTR_OPTIONS_PRINT, ATTR_OPTIONS_PRINT>>( GetPool() );
// set PrintOptionsSet
SdOptionsPrintItem aPrintItem( SD_MOD()->GetSdOptions(mpDoc->GetDocumentType()) );
SfxFlagItem aFlagItem( SID_PRINTER_CHANGESTODOC );
diff --git a/sd/source/ui/func/fubullet.cxx b/sd/source/ui/func/fubullet.cxx
index 98c346bc8b85..da770da9f89c 100644
--- a/sd/source/ui/func/fubullet.cxx
+++ b/sd/source/ui/func/fubullet.cxx
@@ -239,7 +239,7 @@ void FuBullet::InsertSpecialCharacter( SfxRequest const & rReq )
empty string). */
pOV->InsertText( "" );
- SfxItemSet aOldSet( mpDoc->GetPool(), svl::Items<EE_CHAR_FONTINFO, EE_CHAR_FONTINFO> );
+ SfxItemSetFixed<EE_CHAR_FONTINFO, EE_CHAR_FONTINFO> aOldSet( mpDoc->GetPool() );
aOldSet.Put( pOV->GetAttribs() );
SfxUndoManager& rUndoMgr = pOL->GetUndoManager();
diff --git a/sd/source/ui/func/fuchar.cxx b/sd/source/ui/func/fuchar.cxx
index 145dcb993600..bc6f391f0f8a 100644
--- a/sd/source/ui/func/fuchar.cxx
+++ b/sd/source/ui/func/fuchar.cxx
@@ -62,7 +62,7 @@ void FuChar::DoExecute( SfxRequest& rReq )
SfxItemSet aEditAttr( mpDoc->GetPool() );
mpView->GetAttributes( aEditAttr );
- SfxItemSet aNewAttr(mpViewShell->GetPool(), svl::Items<XATTR_FILLSTYLE, XATTR_FILLCOLOR, EE_ITEMS_START, EE_ITEMS_END>);
+ SfxItemSetFixed<XATTR_FILLSTYLE, XATTR_FILLCOLOR, EE_ITEMS_START, EE_ITEMS_END> aNewAttr(mpViewShell->GetPool());
aNewAttr.Put( aEditAttr, false );
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
diff --git a/sd/source/ui/func/fuconcs.cxx b/sd/source/ui/func/fuconcs.cxx
index 2af3549e51d6..0fa62faec1fe 100644
--- a/sd/source/ui/func/fuconcs.cxx
+++ b/sd/source/ui/func/fuconcs.cxx
@@ -168,9 +168,7 @@ void FuConstructCustomShape::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, SDRATTR_MISC_LAST,
@@ -181,7 +179,7 @@ void FuConstructCustomShape::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 );
// Enables Word-wrap by default (tdf#134369)
diff --git a/sd/source/ui/func/fucopy.cxx b/sd/source/ui/func/fucopy.cxx
index 1e7a7457964a..b051e63695c5 100644
--- a/sd/source/ui/func/fucopy.cxx
+++ b/sd/source/ui/func/fucopy.cxx
@@ -74,8 +74,7 @@ void FuCopy::DoExecute( SfxRequest& rReq )
if( !pArgs )
{
- SfxItemSet aSet( mpViewShell->GetPool(),
- svl::Items<ATTR_COPY_START, ATTR_COPY_END> );
+ SfxItemSetFixed<ATTR_COPY_START, ATTR_COPY_END> aSet( mpViewShell->GetPool() );
// indicate color attribute
SfxItemSet aAttr( mpDoc->GetPool() );
@@ -204,7 +203,7 @@ void FuCopy::DoExecute( SfxRequest& rReq )
if( ( 1 == i ) && bColor )
{
- SfxItemSet aNewSet( mpViewShell->GetPool(), svl::Items<XATTR_FILLSTYLE, XATTR_FILLCOLOR> );
+ SfxItemSetFixed<XATTR_FILLSTYLE, XATTR_FILLCOLOR> aNewSet( mpViewShell->GetPool() );
aNewSet.Put( XFillStyleItem( drawing::FillStyle_SOLID ) );
aNewSet.Put( XFillColorItem( OUString(), aStartColor ) );
mpView->SetAttributes( aNewSet );
@@ -266,7 +265,7 @@ void FuCopy::DoExecute( SfxRequest& rReq )
sal_uInt8 nGreen = aStartColor.GetGreen() + static_cast<sal_uInt8>( ( static_cast<::tools::Long>(aEndColor.GetGreen()) - static_cast<::tools::Long>(aStartColor.GetGreen()) ) * static_cast<::tools::Long>(i) / static_cast<::tools::Long>(nNumber) );
sal_uInt8 nBlue = aStartColor.GetBlue() + static_cast<sal_uInt8>( ( static_cast<::tools::Long>(aEndColor.GetBlue()) - static_cast<::tools::Long>(aStartColor.GetBlue()) ) * static_cast<::tools::Long>(i) / static_cast<::tools::Long>(nNumber) );
Color aNewColor( nRed, nGreen, nBlue );
- SfxItemSet aNewSet( mpViewShell->GetPool(), svl::Items<XATTR_FILLSTYLE, XATTR_FILLCOLOR> );
+ SfxItemSetFixed<XATTR_FILLSTYLE, XATTR_FILLCOLOR> aNewSet( mpViewShell->GetPool() );
aNewSet.Put( XFillStyleItem( drawing::FillStyle_SOLID ) );
aNewSet.Put( XFillColorItem( OUString(), aNewColor ) );
mpView->SetAttributes( aNewSet );
diff --git a/sd/source/ui/func/fuexpand.cxx b/sd/source/ui/func/fuexpand.cxx
index 73c574395b74..822174ed94b4 100644
--- a/sd/source/ui/func/fuexpand.cxx
+++ b/sd/source/ui/func/fuexpand.cxx
@@ -114,7 +114,7 @@ void FuExpandPage::DoExecute( SfxRequest& )
aOutliner.SetText(*pParaObj);
// remove hard paragraph- and character attributes
- SfxItemSet aEmptyEEAttr(mpDoc->GetPool(), svl::Items<EE_ITEMS_START, EE_ITEMS_END>);
+ SfxItemSetFixed<EE_ITEMS_START, EE_ITEMS_END> aEmptyEEAttr(mpDoc->GetPool());
sal_Int32 nParaCount1 = aOutliner.GetParagraphCount();
for (sal_Int32 nPara = 0; nPara < nParaCount1; nPara++)
diff --git a/sd/source/ui/func/fumorph.cxx b/sd/source/ui/func/fumorph.cxx
index 9782c3f0c27e..0409f530384c 100644
--- a/sd/source/ui/func/fumorph.cxx
+++ b/sd/source/ui/func/fumorph.cxx
@@ -332,7 +332,7 @@ void FuMorph::ImpInsertPolygons(
::tools::Long nEndLineWidth = 0;
SdrPageView* pPageView = mpView->GetSdrPageView();
SfxItemPool & rPool = pObj1->GetObjectItemPool();
- SfxItemSet aSet1( rPool,svl::Items<SDRATTR_START,SDRATTR_NOTPERSIST_FIRST-1,EE_ITEMS_START,EE_ITEMS_END> );
+ SfxItemSetFixed<SDRATTR_START,SDRATTR_NOTPERSIST_FIRST-1,EE_ITEMS_START,EE_ITEMS_END> aSet1( rPool );
SfxItemSet aSet2( aSet1 );
bool bLineColor = false;
bool bFillColor = false;
diff --git a/sd/source/ui/func/fuoaprms.cxx b/sd/source/ui/func/fuoaprms.cxx
index 4d42aaa06a3c..2995f83712bf 100644
--- a/sd/source/ui/func/fuoaprms.cxx
+++ b/sd/source/ui/func/fuoaprms.cxx
@@ -336,7 +336,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq )
if(!pArgs)
{
// fill ItemSet for dialog
- SfxItemSet aSet(mpDoc->GetPool(), svl::Items<ATTR_ANIMATION_START, ATTR_ACTION_END>);
+ SfxItemSetFixed<ATTR_ANIMATION_START, ATTR_ACTION_END> aSet(mpDoc->GetPool());
// fill the set
if (nAnimationSet == ATTR_SET)
diff --git a/sd/source/ui/func/fuolbull.cxx b/sd/source/ui/func/fuolbull.cxx
index ba1c728616c7..6c6b9aef5b0f 100644
--- a/sd/source/ui/func/fuolbull.cxx
+++ b/sd/source/ui/func/fuolbull.cxx
@@ -79,7 +79,7 @@ void FuBulletAndPosition::DoExecute( SfxRequest& rReq )
SfxItemSet aEditAttr( mpDoc->GetPool() );
mpView->GetAttributes( aEditAttr );
- SfxItemSet aNewAttr( mpViewShell->GetPool(), svl::Items<EE_PARA_NUMBULLET, EE_PARA_BULLET> );
+ SfxItemSetFixed<EE_PARA_NUMBULLET, EE_PARA_BULLET> aNewAttr( mpViewShell->GetPool() );
aNewAttr.Put( aEditAttr, false );
auto pView = mpView;
@@ -117,7 +117,7 @@ void FuBulletAndPosition::SetCurrentBulletsNumbering(SfxRequest& rReq)
return;
}
- SfxItemSet aNewAttr( mpViewShell->GetPool(), svl::Items<EE_ITEMS_START, EE_ITEMS_END> );
+ SfxItemSetFixed<EE_ITEMS_START, EE_ITEMS_END> aNewAttr( mpViewShell->GetPool() );
{
SfxItemSet aEditAttr( mpDoc->GetPool() );
mpView->GetAttributes( aEditAttr );
@@ -233,7 +233,7 @@ void FuBulletAndPosition::SetCurrentBulletsNumbering(SfxRequest& rReq)
if (bInMasterView && pNumRule)
{
- SfxItemSet aSetAttr( mpViewShell->GetPool(), svl::Items<EE_ITEMS_START, EE_ITEMS_END> );
+ SfxItemSetFixed<EE_ITEMS_START, EE_ITEMS_END> aSetAttr( mpViewShell->GetPool() );
aSetAttr.Put(SvxNumBulletItem( *pNumRule, nNumItemId ));
mpView->SetAttributes(aSetAttr);
}
diff --git a/sd/source/ui/func/fupage.cxx b/sd/source/ui/func/fupage.cxx
index 076c63f95e67..366e99b691ff 100644
--- a/sd/source/ui/func/fupage.cxx
+++ b/sd/source/ui/func/fupage.cxx
@@ -200,15 +200,15 @@ const SfxItemSet* FuPage::ExecuteDialog(weld::Window* pParent, const SfxRequest&
if (!mpDrawViewShell)
return nullptr;
- SfxItemSet aNewAttr(mpDoc->GetPool(), svl::Items<
- XATTR_FILL_FIRST, XATTR_FILL_LAST,
- EE_PARA_WRITINGDIR, EE_PARA_WRITINGDIR,
- SID_ATTR_BORDER_OUTER, SID_ATTR_BORDER_OUTER,
- SID_ATTR_BORDER_SHADOW, SID_ATTR_BORDER_SHADOW,
- SID_ATTR_PAGE, SID_ATTR_PAGE_SHARED,
- SID_ATTR_CHAR_GRABBAG, SID_ATTR_CHAR_GRABBAG,
- SID_ATTR_PAGE_COLOR, SID_ATTR_PAGE_FILLSTYLE
- >);
+ SfxItemSetFixed<
+ XATTR_FILL_FIRST, XATTR_FILL_LAST,
+ EE_PARA_WRITINGDIR, EE_PARA_WRITINGDIR,
+ SID_ATTR_BORDER_OUTER, SID_ATTR_BORDER_OUTER,
+ SID_ATTR_BORDER_SHADOW, SID_ATTR_BORDER_SHADOW,
+ SID_ATTR_PAGE, SID_ATTR_PAGE_SHARED,
+ SID_ATTR_CHAR_GRABBAG, SID_ATTR_CHAR_GRABBAG,
+ SID_ATTR_PAGE_COLOR, SID_ATTR_PAGE_FILLSTYLE
+ > aNewAttr(mpDoc->GetPool());
// Keep it sorted
aNewAttr.MergeRange(mpDoc->GetPool().GetWhich(SID_ATTR_LRSPACE),
mpDoc->GetPool().GetWhich(SID_ATTR_ULSPACE));
@@ -335,7 +335,7 @@ const SfxItemSet* FuPage::ExecuteDialog(weld::Window* pParent, const SfxRequest&
pTempSet->Put( XFillStyleItem( drawing::FillStyle_BITMAP ) );
// MigrateItemSet makes sure the XFillBitmapItem will have a unique name
- SfxItemSet aMigrateSet( mpDoc->GetPool(), svl::Items<XATTR_FILLBITMAP, XATTR_FILLBITMAP> );
+ SfxItemSetFixed<XATTR_FILLBITMAP, XATTR_FILLBITMAP> aMigrateSet( mpDoc->GetPool() );
aMigrateSet.Put(XFillBitmapItem("background", aGraphic));
SdrModel::MigrateItemSet( &aMigrateSet, &*pTempSet, mpDoc );
@@ -396,7 +396,7 @@ const SfxItemSet* FuPage::ExecuteDialog(weld::Window* pParent, const SfxRequest&
if (pTempGradItem && pTempGradItem->GetName().isEmpty())
{
// MigrateItemSet guarantees unique gradient names
- SfxItemSet aMigrateSet( mpDoc->GetPool(), svl::Items<XATTR_FILLGRADIENT, XATTR_FILLGRADIENT> );
+ SfxItemSetFixed<XATTR_FILLGRADIENT, XATTR_FILLGRADIENT> aMigrateSet( mpDoc->GetPool() );
aMigrateSet.Put( XFillGradientItem("gradient", pTempGradItem->GetGradientValue()) );
SdrModel::MigrateItemSet( &aMigrateSet, &*pTempSet, mpDoc);
}
@@ -405,7 +405,7 @@ const SfxItemSet* FuPage::ExecuteDialog(weld::Window* pParent, const SfxRequest&
if (pTempHatchItem && pTempHatchItem->GetName().isEmpty())
{
// MigrateItemSet guarantees unique hatch names
- SfxItemSet aMigrateSet( mpDoc->GetPool(), svl::Items<XATTR_FILLHATCH, XATTR_FILLHATCH> );
+ SfxItemSetFixed<XATTR_FILLHATCH, XATTR_FILLHATCH> aMigrateSet( mpDoc->GetPool() );
aMigrateSet.Put( XFillHatchItem("hatch", pTempHatchItem->GetHatchValue()) );
SdrModel::MigrateItemSet( &aMigrateSet, &*pTempSet, mpDoc);
}
diff --git a/sd/source/ui/func/fuparagr.cxx b/sd/source/ui/func/fuparagr.cxx
index bd0d5c75c1fb..0caaa83647f9 100644
--- a/sd/source/ui/func/fuparagr.cxx
+++ b/sd/source/ui/func/fuparagr.cxx
@@ -67,10 +67,9 @@ void FuParagraph::DoExecute( SfxRequest& rReq )
SfxItemSet aEditAttr( mpDoc->GetPool() );
mpView->GetAttributes( aEditAttr );
SfxItemPool *pPool = aEditAttr.GetPool();
- SfxItemSet aNewAttr( *pPool,
- svl::Items<EE_ITEMS_START, EE_ITEMS_END,
- SID_ATTR_TABSTOP_OFFSET, SID_ATTR_TABSTOP_OFFSET,
- ATTR_PARANUMBERING_START, ATTR_PARANUMBERING_END> );
+ SfxItemSetFixed<EE_ITEMS_START, EE_ITEMS_END,
+ SID_ATTR_TABSTOP_OFFSET, SID_ATTR_TABSTOP_OFFSET,
+ ATTR_PARANUMBERING_START, ATTR_PARANUMBERING_END> aNewAttr( *pPool );
aNewAttr.Put( aEditAttr );
diff --git a/sd/source/ui/func/fuprlout.cxx b/sd/source/ui/func/fuprlout.cxx
index fa8eafd9ecf9..37120721c72d 100644
--- a/sd/source/ui/func/fuprlout.cxx
+++ b/sd/source/ui/func/fuprlout.cxx
@@ -128,7 +128,7 @@ void FuPresentationLayout::DoExecute( SfxRequest& rReq )
bool bLoad = false; // appear the new master pages?
OUString aFile;
- SfxItemSet aSet(mpDoc->GetPool(), svl::Items<ATTR_PRESLAYOUT_START, ATTR_PRESLAYOUT_END>);
+ SfxItemSetFixed<ATTR_PRESLAYOUT_START, ATTR_PRESLAYOUT_END> aSet(mpDoc->GetPool() );
aSet.Put( SfxBoolItem( ATTR_PRESLAYOUT_LOAD, bLoad));
aSet.Put( SfxBoolItem( ATTR_PRESLAYOUT_MASTER_PAGE, bMasterPage ) );
diff --git a/sd/source/ui/func/fuprobjs.cxx b/sd/source/ui/func/fuprobjs.cxx
index acb12f133612..c6e225acc27d 100644
--- a/sd/source/ui/func/fuprobjs.cxx
+++ b/sd/source/ui/func/fuprobjs.cxx
@@ -71,7 +71,7 @@ void FuPresentationObjects::DoExecute( SfxRequest& )
/* does the selections end in a unique presentation layout?
if not, it is not allowed to edit the templates */
- SfxItemSet aSet(mpDoc->GetItemPool(), svl::Items<SID_STATUS_LAYOUT, SID_STATUS_LAYOUT>);
+ SfxItemSetFixed<SID_STATUS_LAYOUT, SID_STATUS_LAYOUT> aSet(mpDoc->GetItemPool() );
pOutlineViewShell->GetStatusBarState( aSet );
OUString aLayoutName = static_cast<const SfxStringItem&>(aSet.Get(SID_STATUS_LAYOUT)).GetValue();
DBG_ASSERT(!aLayoutName.isEmpty(), "Layout not defined");
diff --git a/sd/source/ui/func/fuscale.cxx b/sd/source/ui/func/fuscale.cxx
index 1ea9a588c441..5d5c4c29d26a 100644
--- a/sd/source/ui/func/fuscale.cxx
+++ b/sd/source/ui/func/fuscale.cxx
@@ -66,7 +66,7 @@ void FuScale::DoExecute( SfxRequest& rReq )
if( !pArgs )
{
- SfxItemSet aNewAttr( mpDoc->GetPool(), svl::Items<SID_ATTR_ZOOM, SID_ATTR_ZOOM> );
+ SfxItemSetFixed<SID_ATTR_ZOOM, SID_ATTR_ZOOM> aNewAttr( mpDoc->GetPool() );
std::unique_ptr<SvxZoomItem> pZoomItem;
SvxZoomEnableFlags nZoomValues = SvxZoomEnableFlags::ALL;
diff --git a/sd/source/ui/func/fusldlg.cxx b/sd/source/ui/func/fusldlg.cxx
index 3f08f0f52d72..c0269b08a362 100644
--- a/sd/source/ui/func/fusldlg.cxx
+++ b/sd/source/ui/func/fusldlg.cxx
@@ -59,7 +59,7 @@ void FuSlideShowDlg::DoExecute( SfxRequest& )
{
PresentationSettings& rPresentationSettings = mpDoc->getPresentationSettings();
- SfxItemSet aDlgSet( mpDoc->GetPool(), svl::Items<ATTR_PRESENT_START, ATTR_PRESENT_END> );
+ SfxItemSetFixed<ATTR_PRESENT_START, ATTR_PRESENT_END> aDlgSet( mpDoc->GetPool() );
std::vector<OUString> aPageNameList(mpDoc->GetSdPageCount( PageKind::Standard ));
const OUString& rPresPage = rPresentationSettings.maPresPage;
OUString aFirstPage;
diff --git a/sd/source/ui/func/fusnapln.cxx b/sd/source/ui/func/fusnapln.cxx
index 80a5e35d8c1f..ee51d78cec88 100644
--- a/sd/source/ui/func/fusnapln.cxx
+++ b/sd/source/ui/func/fusnapln.cxx
@@ -69,7 +69,7 @@ void FuSnapLine::DoExecute( SfxRequest& rReq )
if (!pArgs)
{
- SfxItemSet aNewAttr(mpViewShell->GetPool(), svl::Items<ATTR_SNAPLINE_START, ATTR_SNAPLINE_END>);
+ SfxItemSetFixed<ATTR_SNAPLINE_START, ATTR_SNAPLINE_END> aNewAttr(mpViewShell->GetPool());
bool bLineExist (false);
Point aLinePos;
diff --git a/sd/source/ui/func/fusumry.cxx b/sd/source/ui/func/fusumry.cxx
index 522c30897dc7..9b160099cba0 100644
--- a/sd/source/ui/func/fusumry.cxx
+++ b/sd/source/ui/func/fusumry.cxx
@@ -193,7 +193,7 @@ void FuSummaryPage::DoExecute( SfxRequest& )
return;
// remove hard break- and character attributes
- SfxItemSet aEmptyEEAttr(mpDoc->GetPool(), svl::Items<EE_ITEMS_START, EE_ITEMS_END>);
+ SfxItemSetFixed<EE_ITEMS_START, EE_ITEMS_END> aEmptyEEAttr(mpDoc->GetPool());
sal_Int32 nParaCount = pOutl->GetParagraphCount();
for (sal_Int32 nPara = 0; nPara < nParaCount; nPara++)
diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx
index a3ff351337e4..cd60a1040bc6 100644
--- a/sd/source/ui/func/futext.cxx
+++ b/sd/source/ui/func/futext.cxx
@@ -565,7 +565,7 @@ void FuText::ImpSetAttributesForNewTextObject(SdrTextObj* pTxtObj)
void FuText::ImpSetAttributesFitToSize(SdrTextObj* pTxtObj)
{
// FitToSize (fit to frame)
- SfxItemSet aSet(mpViewShell->GetPool(), svl::Items<SDRATTR_TEXT_AUTOGROWHEIGHT, SDRATTR_TEXT_AUTOGROWWIDTH>);
+ SfxItemSetFixed<SDRATTR_TEXT_AUTOGROWHEIGHT, SDRATTR_TEXT_AUTOGROWWIDTH> aSet(mpViewShell->GetPool());
aSet.Put(SdrTextFitToSizeTypeItem(drawing::TextFitToSizeType_PROPORTIONAL));
aSet.Put(makeSdrTextAutoGrowHeightItem(false));
aSet.Put(makeSdrTextAutoGrowWidthItem(false));
@@ -575,8 +575,7 @@ void FuText::ImpSetAttributesFitToSize(SdrTextObj* pTxtObj)
void FuText::ImpSetAttributesFitToSizeVertical(SdrTextObj* pTxtObj)
{
- SfxItemSet aSet(mpViewShell->GetPool(),
- svl::Items<SDRATTR_TEXT_AUTOGROWHEIGHT, SDRATTR_TEXT_AUTOGROWWIDTH>);
+ SfxItemSetFixed<SDRATTR_TEXT_AUTOGROWHEIGHT, SDRATTR_TEXT_AUTOGROWWIDTH> aSet(mpViewShell->GetPool());
aSet.Put(SdrTextFitToSizeTypeItem(drawing::TextFitToSizeType_PROPORTIONAL));
aSet.Put(makeSdrTextAutoGrowHeightItem(false));
aSet.Put(makeSdrTextAutoGrowWidthItem(false));
diff --git a/sd/source/ui/unoidl/UnoDocumentSettings.cxx b/sd/source/ui/unoidl/UnoDocumentSettings.cxx
index 1f5554502412..24ac8f626dbe 100644
--- a/sd/source/ui/unoidl/UnoDocumentSettings.cxx
+++ b/sd/source/ui/unoidl/UnoDocumentSettings.cxx
@@ -776,10 +776,10 @@ DocumentSettings::_setPropertyValues(const PropertyMapEntry** ppEntries,
}
else
{
- pItemSet = std::make_unique<SfxItemSet>(pDoc->GetPool(),
- svl::Items<SID_PRINTER_NOTFOUND_WARN, SID_PRINTER_NOTFOUND_WARN,
+ pItemSet = std::make_unique<SfxItemSetFixed
+ <SID_PRINTER_NOTFOUND_WARN, SID_PRINTER_NOTFOUND_WARN,
SID_PRINTER_CHANGESTODOC, SID_PRINTER_CHANGESTODOC,
- ATTR_OPTIONS_PRINT, ATTR_OPTIONS_PRINT> );
+ ATTR_OPTIONS_PRINT, ATTR_OPTIONS_PRINT>>(pDoc->GetPool());
}
pPrinter = SfxPrinter::Create ( aStream, std::move(pItemSet) );
diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx
index e9ff103f34e0..51a7671578c3 100644
--- a/sd/source/ui/unoidl/unopage.cxx
+++ b/sd/source/ui/unoidl/unopage.cxx
@@ -2428,7 +2428,7 @@ void SdDrawPage::setBackground( const Any& rValue )
// is it our own implementation?
SdUnoPageBackground* pBack = comphelper::getFromUnoTunnel<SdUnoPageBackground>( xSet );
- SfxItemSet aSet( GetModel()->GetDoc()->GetPool(), svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST> );
+ SfxItemSetFixed<XATTR_FILL_FIRST, XATTR_FILL_LAST> aSet( GetModel()->GetDoc()->GetPool() );
if( pBack )
{
@@ -2796,7 +2796,7 @@ void SdMasterPage::setBackground( const Any& rValue )
// is it our own implementation?
SdUnoPageBackground* pBack = comphelper::getFromUnoTunnel<SdUnoPageBackground>( xInputSet );
- SfxItemSet aSet( GetModel()->GetDoc()->GetPool(), svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST> );
+ SfxItemSetFixed<XATTR_FILL_FIRST, XATTR_FILL_LAST> aSet( GetModel()->GetDoc()->GetPool() );
if( pBack )
{
diff --git a/sd/source/ui/unoidl/unopback.cxx b/sd/source/ui/unoidl/unopback.cxx
index 5f3911edaf0b..7faba9b450b6 100644
--- a/sd/source/ui/unoidl/unopback.cxx
+++ b/sd/source/ui/unoidl/unopback.cxx
@@ -57,7 +57,7 @@ SdUnoPageBackground::SdUnoPageBackground(
if( pDoc )
{
StartListening( *pDoc );
- mpSet = std::make_unique<SfxItemSet>( pDoc->GetPool(), svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST> );
+ mpSet = std::make_unique<SfxItemSetFixed<XATTR_FILL_FIRST, XATTR_FILL_LAST>>( pDoc->GetPool() );
if( pSet )
mpSet->Put(*pSet);
@@ -96,7 +96,7 @@ void SdUnoPageBackground::fillItemSet( SdDrawDocument* pDoc, SfxItemSet& rSet )
StartListening( *pDoc );
mpDoc = pDoc;
- mpSet = std::make_unique<SfxItemSet>( *rSet.GetPool(), svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST> );
+ mpSet = std::make_unique<SfxItemSetFixed<XATTR_FILL_FIRST, XATTR_FILL_LAST>>( *rSet.GetPool() );
if( maUsrAnys.AreThereOwnUsrAnys() )
{
diff --git a/sd/source/ui/view/drtxtob.cxx b/sd/source/ui/view/drtxtob.cxx
index 13980e1b4bab..b10af08289fa 100644
--- a/sd/source/ui/view/drtxtob.cxx
+++ b/sd/source/ui/view/drtxtob.cxx
@@ -120,7 +120,7 @@ void TextObjectBar::GetCharState( SfxItemSet& rSet )
SfxItemSet aCharAttrSet( mpView->GetDoc().GetPool() );
mpView->GetAttributes( aCharAttrSet );
- SfxItemSet aNewAttr( mpViewShell->GetPool(),svl::Items<EE_ITEMS_START,EE_ITEMS_END>);
+ SfxItemSetFixed<EE_ITEMS_START,EE_ITEMS_END> aNewAttr( mpViewShell->GetPool() );
aNewAttr.Put(aCharAttrSet, false);
rSet.Put(aNewAttr, false);
diff --git a/sd/source/ui/view/drtxtob1.cxx b/sd/source/ui/view/drtxtob1.cxx
index 1646df14d46b..7dd3f80be36c 100644
--- a/sd/source/ui/view/drtxtob1.cxx
+++ b/sd/source/ui/view/drtxtob1.cxx
@@ -357,7 +357,7 @@ void TextObjectBar::Execute( SfxRequest &rReq )
SvxLRSpaceItem aLRSpace = static_cast<const SvxLRSpaceItem&>(pArgs->Get(
GetPool().GetWhich(SID_ATTR_PARA_LRSPACE)));
- SfxItemSet aEditAttr( GetPool(), svl::Items<EE_PARA_LRSPACE, EE_PARA_LRSPACE> );
+ SfxItemSetFixed<EE_PARA_LRSPACE, EE_PARA_LRSPACE> aEditAttr( GetPool() );
aLRSpace.SetWhich( EE_PARA_LRSPACE );
aEditAttr.Put( aLRSpace );
@@ -369,7 +369,7 @@ void TextObjectBar::Execute( SfxRequest &rReq )
case SID_HANGING_INDENT:
{
- SfxItemSet aLRSpaceSet( GetPool(), svl::Items<EE_PARA_LRSPACE, EE_PARA_LRSPACE> );
+ SfxItemSetFixed<EE_PARA_LRSPACE, EE_PARA_LRSPACE> aLRSpaceSet( GetPool() );
mpView->GetAttributes( aLRSpaceSet );
SvxLRSpaceItem aParaMargin( aLRSpaceSet.Get( EE_PARA_LRSPACE ) );
@@ -417,7 +417,7 @@ void TextObjectBar::Execute( SfxRequest &rReq )
// tdf#131571: SdrEndTextEdit invalidates pTextEditOutlinerView, the pointer retrieved for pOLV
// so reinitialize pOLV
pOLV=mpView->GetTextEditOutlinerView();
- SfxItemSet aAttr( mpView->GetDoc().GetPool(), svl::Items<SDRATTR_TEXTDIRECTION, SDRATTR_TEXTDIRECTION> );
+ SfxItemSetFixed<SDRATTR_TEXTDIRECTION, SDRATTR_TEXTDIRECTION> aAttr( mpView->GetDoc().GetPool() );
aAttr.Put( SvxWritingModeItem(
nSlot == SID_TEXTDIRECTION_LEFT_TO_RIGHT ?
css::text::WritingMode_LR_TB : css::text::WritingMode_TB_RL,
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index 10ad17751f65..d73f2aa6ae2c 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -438,7 +438,7 @@ private:
nParagraph++;
pOutliner->Insert("");
- SfxItemSet aItemSet(m_rDrawViewShell.GetDoc()->GetPool(), svl::Items<EE_ITEMS_START, EE_ITEMS_END>);
+ SfxItemSetFixed<EE_ITEMS_START, EE_ITEMS_END> aItemSet(m_rDrawViewShell.GetDoc()->GetPool());
if (rResult.msName == "BOLD")
aItemSet.Put(SvxWeightItem(WEIGHT_BOLD, EE_CHAR_WEIGHT));
@@ -729,7 +729,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
if( pItem )
{
- SfxItemSet aSet( GetPool(), svl::Items<EE_PARA_HYPHENATE, EE_PARA_HYPHENATE> );
+ SfxItemSetFixed<EE_PARA_HYPHENATE, EE_PARA_HYPHENATE> aSet( GetPool() );
bool bValue = pItem->GetValue();
aSet.Put( SfxBoolItem( EE_PARA_HYPHENATE, bValue ) );
mpDrawView->SetAttributes( aSet );
@@ -737,7 +737,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
else // only for testing purpose
{
OSL_FAIL(" no value for hyphenation!");
- SfxItemSet aSet( GetPool(), svl::Items<EE_PARA_HYPHENATE, EE_PARA_HYPHENATE> );
+ SfxItemSetFixed<EE_PARA_HYPHENATE, EE_PARA_HYPHENATE> aSet( GetPool() );
aSet.Put( SfxBoolItem( EE_PARA_HYPHENATE, true ) );
mpDrawView->SetAttributes( aSet );
}
@@ -1263,7 +1263,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
if( pPresPage->IsPresObj( pObj ) )
{
- auto pNewSet = std::make_unique<SfxItemSet>( GetDoc()->GetPool(), svl::Items<SDRATTR_TEXT_MINFRAMEHEIGHT, SDRATTR_TEXT_AUTOGROWHEIGHT> );
+ auto pNewSet = std::make_unique<SfxItemSetFixed<SDRATTR_TEXT_MINFRAMEHEIGHT, SDRATTR_TEXT_AUTOGROWHEIGHT>>( GetDoc()->GetPool() );
pNewSet->Put(pObj->GetMergedItemSet());
aAttrList.emplace_back(std::move(pNewSet), pObj->GetUserCall());
}
@@ -1805,7 +1805,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
case SID_CONNECTION_NEW_ROUTING:
{
- SfxItemSet aDefAttr( GetPool(), svl::Items<SDRATTR_EDGELINE1DELTA, SDRATTR_EDGELINE3DELTA> );
+ SfxItemSetFixed<SDRATTR_EDGELINE1DELTA, SDRATTR_EDGELINE3DELTA> aDefAttr( GetPool() );
GetView()->SetAttributes( aDefAttr, true ); // (ReplaceAll)
Cancel();
@@ -1924,7 +1924,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
if (! pArgs)
{
- SfxItemSet aNewAttr( GetDoc()->GetPool(), svl::Items<ATTR_LAYER_START, ATTR_LAYER_END> );
+ SfxItemSetFixed<ATTR_LAYER_START, ATTR_LAYER_END> aNewAttr( GetDoc()->GetPool() );
aNewAttr.Put( makeSdAttrLayerName( aLayerName ) );
aNewAttr.Put( makeSdAttrLayerTitle() );
@@ -2077,7 +2077,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
if (! pArgs)
{
- SfxItemSet aNewAttr( GetDoc()->GetPool(), svl::Items<ATTR_LAYER_START, ATTR_LAYER_END> );
+ SfxItemSetFixed<ATTR_LAYER_START, ATTR_LAYER_END> aNewAttr( GetDoc()->GetPool() );
aNewAttr.Put( makeSdAttrLayerName( aLayerName ) );
aNewAttr.Put( makeSdAttrLayerTitle( aLayerTitle ) );
diff --git a/sd/source/ui/view/drviews3.cxx b/sd/source/ui/view/drviews3.cxx
index 158aacd1dad2..96cea2ab177d 100644
--- a/sd/source/ui/view/drviews3.cxx
+++ b/sd/source/ui/view/drviews3.cxx
@@ -714,7 +714,7 @@ void DrawViewShell::ExecRuler(SfxRequest& rReq)
{
const SvxTabStopItem& rItem = pArgs->Get( EE_PARA_TABS );
- SfxItemSet aEditAttr( GetPool(), svl::Items<EE_PARA_TABS, EE_PARA_TABS> );
+ SfxItemSetFixed<EE_PARA_TABS, EE_PARA_TABS> aEditAttr( GetPool() );
aEditAttr.Put( rItem );
mpDrawView->SetAttributes( aEditAttr );
@@ -728,7 +728,7 @@ void DrawViewShell::ExecRuler(SfxRequest& rReq)
SvxLineSpacingItem aParaLineSP = static_cast<const SvxLineSpacingItem&>(pArgs->Get(
GetPool().GetWhich(SID_ATTR_PARA_LINESPACE)));
- SfxItemSet aEditAttr( GetPool(), svl::Items<EE_PARA_SBL, EE_PARA_SBL> );
+ SfxItemSetFixed<EE_PARA_SBL, EE_PARA_SBL> aEditAttr( GetPool() );
aParaLineSP.SetWhich( EE_PARA_SBL );
aEditAttr.Put( aParaLineSP );
@@ -740,7 +740,7 @@ void DrawViewShell::ExecRuler(SfxRequest& rReq)
case SID_ATTR_PARA_ADJUST_LEFT:
{
SvxAdjustItem aItem( SvxAdjust::Left, EE_PARA_JUST );
- SfxItemSet aEditAttr( GetPool(), svl::Items<EE_PARA_JUST, EE_PARA_JUST> );
+ SfxItemSetFixed<EE_PARA_JUST, EE_PARA_JUST> aEditAttr( GetPool() );
aEditAttr.Put( aItem );
mpDrawView->SetAttributes( aEditAttr );
@@ -751,7 +751,7 @@ void DrawViewShell::ExecRuler(SfxRequest& rReq)
case SID_ATTR_PARA_ADJUST_CENTER:
{
SvxAdjustItem aItem( SvxAdjust::Center, EE_PARA_JUST );
- SfxItemSet aEditAttr( GetPool(), svl::Items<EE_PARA_JUST, EE_PARA_JUST> );
+ SfxItemSetFixed<EE_PARA_JUST, EE_PARA_JUST> aEditAttr( GetPool() );
aEditAttr.Put( aItem );
mpDrawView->SetAttributes( aEditAttr );
@@ -762,7 +762,7 @@ void DrawViewShell::ExecRuler(SfxRequest& rReq)
case SID_ATTR_PARA_ADJUST_RIGHT:
{
SvxAdjustItem aItem( SvxAdjust::Right, EE_PARA_JUST );
- SfxItemSet aEditAttr( GetPool(), svl::Items<EE_PARA_JUST, EE_PARA_JUST> );
+ SfxItemSetFixed<EE_PARA_JUST, EE_PARA_JUST> aEditAttr( GetPool() );
aEditAttr.Put( aItem );
mpDrawView->SetAttributes( aEditAttr );
@@ -773,7 +773,7 @@ void DrawViewShell::ExecRuler(SfxRequest& rReq)
case SID_ATTR_PARA_ADJUST_BLOCK:
{
SvxAdjustItem aItem( SvxAdjust::Block, EE_PARA_JUST );
- SfxItemSet aEditAttr( GetPool(), svl::Items<EE_PARA_JUST, EE_PARA_JUST> );
+ SfxItemSetFixed<EE_PARA_JUST, EE_PARA_JUST> aEditAttr( GetPool() );
aEditAttr.Put( aItem );
mpDrawView->SetAttributes( aEditAttr );
@@ -786,7 +786,7 @@ void DrawViewShell::ExecRuler(SfxRequest& rReq)
{
SvxULSpaceItem aULSP = static_cast<const SvxULSpaceItem&>(pArgs->Get(
GetPool().GetWhich(SID_ATTR_PARA_ULSPACE)));
- SfxItemSet aEditAttr( GetPool(), svl::Items<EE_PARA_ULSPACE, EE_PARA_ULSPACE> );
+ SfxItemSetFixed<EE_PARA_ULSPACE, EE_PARA_ULSPACE> aEditAttr( GetPool() );
aULSP.SetWhich( EE_PARA_ULSPACE );
aEditAttr.Put( aULSP );
@@ -801,7 +801,7 @@ void DrawViewShell::ExecRuler(SfxRequest& rReq)
SvxLRSpaceItem aLRSpace = static_cast<const SvxLRSpaceItem&>(pArgs->Get(
GetPool().GetWhich(SID_ATTR_PARA_LRSPACE)));
- SfxItemSet aEditAttr( GetPool(), svl::Items<EE_PARA_LRSPACE, EE_PARA_LRSPACE> );
+ SfxItemSetFixed<EE_PARA_LRSPACE, EE_PARA_LRSPACE> aEditAttr( GetPool() );
aLRSpace.SetWhich( EE_PARA_LRSPACE );
aEditAttr.Put( aLRSpace );
@@ -817,13 +817,10 @@ void DrawViewShell::ExecRuler(SfxRequest& rReq)
const SvxLRSpaceItem& rItem = static_cast<const SvxLRSpaceItem&>(
pArgs->Get( nId ));
- static const auto aWhichTable = svl::Items<
+ SfxItemSetFixed<
EE_PARA_NUMBULLET, EE_PARA_NUMBULLET,
EE_PARA_OUTLLEVEL, EE_PARA_OUTLLEVEL,
- EE_PARA_LRSPACE, EE_PARA_LRSPACE>;
-
- SfxItemSet aEditAttr( GetDoc()->GetPool(),
- aWhichTable );
+ EE_PARA_LRSPACE, EE_PARA_LRSPACE> aEditAttr( GetDoc()->GetPool() );
mpDrawView->GetAttributes( aEditAttr );
nId = EE_PARA_LRSPACE;
@@ -886,8 +883,7 @@ void DrawViewShell::ExecRuler(SfxRequest& rReq)
}
// only put lrSpace item
- SfxItemSet aEditAttrReduced( GetDoc()->GetPool(),
- svl::Items<EE_PARA_LRSPACE, EE_PARA_LRSPACE> );
+ SfxItemSetFixed<EE_PARA_LRSPACE, EE_PARA_LRSPACE> aEditAttrReduced( GetDoc()->GetPool() );
aEditAttrReduced.Put( aLRSpaceItem );
mpDrawView->SetAttributes( aEditAttrReduced );
diff --git a/sd/source/ui/view/drviews4.cxx b/sd/source/ui/view/drviews4.cxx
index 05fca2edad19..8c0a9282e33a 100644
--- a/sd/source/ui/view/drviews4.cxx
+++ b/sd/source/ui/view/drviews4.cxx
@@ -901,11 +901,9 @@ void DrawViewShell::ShowMousePosInfo(const ::tools::Rectangle& rRect,
if ( GetViewShell()->GetUIActiveClient() )
return;
- SfxItemSet aSet(
- GetPool(),
- svl::Items<
+ SfxItemSetFixed<
SID_CONTEXT, SID_CONTEXT,
- SID_ATTR_POSITION, SID_ATTR_SIZE>);
+ SID_ATTR_POSITION, SID_ATTR_SIZE> aSet(GetPool());
GetStatusBarState(aSet);
diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx
index 1a362508beab..d98a214aa524 100644
--- a/sd/source/ui/view/drviews7.cxx
+++ b/sd/source/ui/view/drviews7.cxx
@@ -1589,7 +1589,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
SdPage* pPage = GetActualPage();
if (pPage != nullptr && GetDoc() != nullptr)
{
- SfxItemSet aMergedAttr(GetDoc()->GetPool(), svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST>);
+ SfxItemSetFixed<XATTR_FILL_FIRST, XATTR_FILL_LAST> aMergedAttr(GetDoc()->GetPool());
SdStyleSheet* pStyleSheet = pPage->getPresentationStyle(HID_PSEUDOSHEET_BACKGROUND);
MergePageBackgroundFilling(pPage, pStyleSheet, meEditMode == EditMode::MasterPage, aMergedAttr);
if (drawing::FillStyle_BITMAP == aMergedAttr.Get(XATTR_FILLSTYLE).GetValue())
@@ -1837,7 +1837,7 @@ void DrawViewShell::SetPageProperties (SfxRequest& rReq)
XFillGradientItem aGradientItem( XGradient::fromJSON(pJSON->GetValue()) );
// MigrateItemSet guarantees unique gradient names
- SfxItemSet aMigrateSet( mpDrawView->GetModel()->GetItemPool(), svl::Items<XATTR_FILLGRADIENT, XATTR_FILLGRADIENT> );
+ SfxItemSetFixed<XATTR_FILLGRADIENT, XATTR_FILLGRADIENT> aMigrateSet( mpDrawView->GetModel()->GetItemPool() );
aMigrateSet.Put( aGradientItem );
SdrModel::MigrateItemSet( &aMigrateSet, pTempSet.get(), mpDrawView->GetModel() );
@@ -1849,7 +1849,7 @@ void DrawViewShell::SetPageProperties (SfxRequest& rReq)
XFillGradientItem aGradientItem( pArgs->Get( XATTR_FILLGRADIENT ) );
// MigrateItemSet guarantees unique gradient names
- SfxItemSet aMigrateSet( mpDrawView->GetModel()->GetItemPool(), svl::Items<XATTR_FILLGRADIENT, XATTR_FILLGRADIENT> );
+ SfxItemSetFixed<XATTR_FILLGRADIENT, XATTR_FILLGRADIENT> aMigrateSet( mpDrawView->GetModel()->GetItemPool() );
aMigrateSet.Put( aGradientItem );
SdrModel::MigrateItemSet( &aMigrateSet, pTempSet.get(), mpDrawView->GetModel() );
diff --git a/sd/source/ui/view/drviewsf.cxx b/sd/source/ui/view/drviewsf.cxx
index 9b67f5d89dbd..e21dd62caca6 100644
--- a/sd/source/ui/view/drviewsf.cxx
+++ b/sd/source/ui/view/drviewsf.cxx
@@ -611,7 +611,7 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet )
SfxItemSet aEditAttr( GetDoc()->GetPool() );
mpDrawView->GetAttributes( aEditAttr );
- SfxItemSet aNewAttr( GetPool(), svl::Items<EE_ITEMS_START, EE_ITEMS_END> );
+ SfxItemSetFixed<EE_ITEMS_START, EE_ITEMS_END> aNewAttr( GetPool() );
aNewAttr.Put( aEditAttr, false );
std::unique_ptr<SvxNumRule> pNumRule;
diff --git a/sd/source/ui/view/drviewsi.cxx b/sd/source/ui/view/drviewsi.cxx
index 832fad9e1b01..0398408249c0 100644
--- a/sd/source/ui/view/drviewsi.cxx
+++ b/sd/source/ui/view/drviewsi.cxx
@@ -107,8 +107,7 @@ void DrawViewShell::AssignFrom3DWindow()
if(!GetView()->IsPresObjSelected())
{
- SfxItemSet aSet( GetDoc()->GetPool(),
- svl::Items<SDRATTR_START, SDRATTR_END>);
+ SfxItemSetFixed<SDRATTR_START, SDRATTR_END> aSet( GetDoc()->GetPool() );
p3DWin->GetAttr( aSet );
// own UNDO-compounding also around transformation in 3D
@@ -117,8 +116,7 @@ void DrawViewShell::AssignFrom3DWindow()
if(GetView()->IsConvertTo3DObjPossible())
{
// assign only text-attribute
- SfxItemSet aTextSet( GetDoc()->GetPool(),
- svl::Items<EE_ITEMS_START, EE_ITEMS_END> );
+ SfxItemSetFixed<EE_ITEMS_START, EE_ITEMS_END> aTextSet( GetDoc()->GetPool() );
aTextSet.Put( aSet, false );
GetView()->SetAttributes( aTextSet );
diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx
index accd57ec4d22..a24f3596b290 100644
--- a/sd/source/ui/view/outlnvsh.cxx
+++ b/sd/source/ui/view/outlnvsh.cxx
@@ -819,7 +819,7 @@ void OutlineViewShell::GetMenuState( SfxItemSet &rSet )
// does the selection provide a unique presentation layout?
// if not, the templates must not be edited
- SfxItemSet aSet(*rSet.GetPool(), svl::Items<SID_STATUS_LAYOUT, SID_STATUS_LAYOUT>);
+ SfxItemSetFixed<SID_STATUS_LAYOUT, SID_STATUS_LAYOUT> aSet(*rSet.GetPool());
GetStatusBarState(aSet);
OUString aTest = static_cast<const SfxStringItem&>(aSet.Get(SID_STATUS_LAYOUT)).GetValue();
if (aTest.isEmpty())
@@ -1465,7 +1465,7 @@ void OutlineViewShell::GetAttrState( SfxItemSet& rSet )
SfxUInt16Item* pFamilyItem = dynamic_cast<SfxUInt16Item*>(pItem.get());
if (pFamilyItem && static_cast<SfxStyleFamily>(pFamilyItem->GetValue()) == SfxStyleFamily::Pseudo)
{
- SfxItemSet aSet(*rSet.GetPool(), svl::Items<SID_STATUS_LAYOUT, SID_STATUS_LAYOUT>);
+ SfxItemSetFixed<SID_STATUS_LAYOUT, SID_STATUS_LAYOUT> aSet(*rSet.GetPool());
GetStatusBarState(aSet);
OUString aRealStyle = static_cast<const SfxStringItem&>(aSet.Get(SID_STATUS_LAYOUT)).GetValue();
if (aRealStyle.isEmpty())
diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx
index 49b384b98e7b..50fe9e93b755 100644
--- a/sd/source/ui/view/sdview.cxx
+++ b/sd/source/ui/view/sdview.cxx
@@ -964,8 +964,8 @@ bool View::IsMorphingAllowed() const
( nKind1 != OBJ_CAPTION && nKind2 != OBJ_CAPTION ) &&
dynamic_cast< const E3dObject *>( pObj1 ) == nullptr && dynamic_cast< const E3dObject *>( pObj2 ) == nullptr )
{
- SfxItemSet aSet1( mrDoc.GetPool(), svl::Items<XATTR_FILLSTYLE, XATTR_FILLSTYLE> );
- SfxItemSet aSet2( mrDoc.GetPool(), svl::Items<XATTR_FILLSTYLE, XATTR_FILLSTYLE> );
+ SfxItemSetFixed<XATTR_FILLSTYLE, XATTR_FILLSTYLE> aSet1( mrDoc.GetPool() );
+ SfxItemSetFixed<XATTR_FILLSTYLE, XATTR_FILLSTYLE> aSet2( mrDoc.GetPool() );
aSet1.Put(pObj1->GetMergedItemSet());
aSet2.Put(pObj2->GetMergedItemSet());
diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx
index 787c16319fcd..008dbc8eeb51 100644
--- a/sd/source/ui/view/sdview3.cxx
+++ b/sd/source/ui/view/sdview3.cxx
@@ -794,8 +794,8 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
if( dynamic_cast< E3dObject *>( pPickObj ) != nullptr && dynamic_cast< E3dObject *>( pObj ) != nullptr )
{
// handle 3D attribute in addition
- SfxItemSet aNewSet( mrDoc.GetPool(), svl::Items<SID_ATTR_3D_START, SID_ATTR_3D_END> );
- SfxItemSet aOldSet( mrDoc.GetPool(), svl::Items<SID_ATTR_3D_START, SID_ATTR_3D_END> );
+ SfxItemSetFixed<SID_ATTR_3D_START, SID_ATTR_3D_END> aNewSet( mrDoc.GetPool() );
+ SfxItemSetFixed<SID_ATTR_3D_START, SID_ATTR_3D_END> aOldSet( mrDoc.GetPool() );
aOldSet.Put(pPickObj->GetMergedItemSet());
aNewSet.Put( pObj->GetMergedItemSet() );
diff --git a/sd/source/ui/view/sdview4.cxx b/sd/source/ui/view/sdview4.cxx
index 02febb2823be..0bde5f7b759b 100644
--- a/sd/source/ui/view/sdview4.cxx
+++ b/sd/source/ui/view/sdview4.cxx
@@ -161,7 +161,7 @@ SdrGrafObj* View::InsertGraphic( const Graphic& rGraphic, sal_Int8& rAction,
EndUndo();
}
- SfxItemSet aSet(mpDocSh->GetPool(), svl::Items<XATTR_FILLSTYLE, XATTR_FILLBITMAP>);
+ SfxItemSetFixed<XATTR_FILLSTYLE, XATTR_FILLBITMAP> aSet(mpDocSh->GetPool());
aSet.Put(XFillStyleItem(drawing::FillStyle_BITMAP));
aSet.Put(XFillBitmapItem(rGraphic));
More information about the Libreoffice-commits
mailing list