summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
Diffstat (limited to 'sc')
-rw-r--r--sc/qa/unit/ucalc_formula.cxx2
-rw-r--r--sc/source/core/data/docpool.cxx7
-rw-r--r--sc/source/core/data/documen8.cxx5
-rw-r--r--sc/source/core/data/patattr.cxx4
-rw-r--r--sc/source/core/data/stlsheet.cxx7
-rw-r--r--sc/source/core/data/table2.cxx2
-rw-r--r--sc/source/core/tool/detfunc.cxx12
-rw-r--r--sc/source/filter/excel/xehelper.cxx4
-rw-r--r--sc/source/filter/excel/xlroot.cxx2
-rw-r--r--sc/source/filter/starcalc/scflt.cxx5
-rw-r--r--sc/source/ui/app/scmod.cxx7
-rw-r--r--sc/source/ui/docshell/docsh3.cxx5
-rw-r--r--sc/source/ui/drawfunc/drawsh.cxx4
-rw-r--r--sc/source/ui/drawfunc/drawsh5.cxx2
-rw-r--r--sc/source/ui/drawfunc/drtxtob.cxx8
-rw-r--r--sc/source/ui/drawfunc/drtxtob1.cxx5
-rw-r--r--sc/source/ui/drawfunc/drtxtob2.cxx9
-rw-r--r--sc/source/ui/drawfunc/fuconcustomshape.cxx6
-rw-r--r--sc/source/ui/drawfunc/futext.cxx4
-rw-r--r--sc/source/ui/pagedlg/tphf.cxx4
-rw-r--r--sc/source/ui/unoobj/confuno.cxx5
-rw-r--r--sc/source/ui/view/cellsh1.cxx2
-rw-r--r--sc/source/ui/view/cellsh2.cxx2
-rw-r--r--sc/source/ui/view/cellsh3.cxx8
-rw-r--r--sc/source/ui/view/drawview.cxx2
-rw-r--r--sc/source/ui/view/formatsh.cxx12
-rw-r--r--sc/source/ui/view/gridwin2.cxx2
-rw-r--r--sc/source/ui/view/gridwin3.cxx2
-rw-r--r--sc/source/ui/view/pivotsh.cxx2
-rw-r--r--sc/source/ui/view/prevwsh.cxx2
-rw-r--r--sc/source/ui/view/tabvwsh3.cxx2
-rw-r--r--sc/source/ui/view/tabvwshc.cxx12
-rw-r--r--sc/source/ui/view/viewfun2.cxx8
-rw-r--r--sc/source/ui/view/viewfunc.cxx2
34 files changed, 78 insertions, 89 deletions
diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx
index a438eaeb77e8..6154ed4d9915 100644
--- a/sc/qa/unit/ucalc_formula.cxx
+++ b/sc/qa/unit/ucalc_formula.cxx
@@ -3425,7 +3425,7 @@ void Test::testFormulaRefUpdateValidity()
SfxUInt32Item aItem(ATTR_VALIDDATA, nIndex);
ScPatternAttr aNewAttrs(
- o3tl::make_unique<SfxItemSet>(*m_pDoc->GetPool(), ATTR_PATTERN_START, ATTR_PATTERN_END));
+ o3tl::make_unique<SfxItemSet>(*m_pDoc->GetPool(), svl::Items<ATTR_PATTERN_START, ATTR_PATTERN_END>{}));
aNewAttrs.GetItemSet().Put(aItem);
m_pDoc->ApplyPattern(0, 1, 0, aNewAttrs);
diff --git a/sc/source/core/data/docpool.cxx b/sc/source/core/data/docpool.cxx
index 1e5511642fff..f0845342489a 100644
--- a/sc/source/core/data/docpool.cxx
+++ b/sc/source/core/data/docpool.cxx
@@ -209,14 +209,13 @@ ScDocumentPool::ScDocumentPool()
GetDefaultFonts( aDummy, *pCjkFont, *pCtlFont );
SvxBoxInfoItem* pGlobalBorderInnerAttr = new SvxBoxInfoItem( ATTR_BORDER_INNER );
- auto pSet = o3tl::make_unique<SfxItemSet>( *this, ATTR_PATTERN_START, ATTR_PATTERN_END );
+ auto pSet = o3tl::make_unique<SfxItemSet>( *this, svl::Items<ATTR_PATTERN_START, ATTR_PATTERN_END>{} );
SfxItemSet aSetItemItemSet( *this,
- ATTR_BACKGROUND, ATTR_BACKGROUND,
+ svl::Items<ATTR_BACKGROUND, ATTR_BACKGROUND,
ATTR_BORDER, ATTR_SHADOW,
ATTR_LRSPACE, ATTR_ULSPACE,
ATTR_PAGE_SIZE, ATTR_PAGE_SIZE,
- ATTR_PAGE_ON, ATTR_PAGE_SHARED,
- 0 );
+ ATTR_PAGE_ON, ATTR_PAGE_SHARED>{} );
pGlobalBorderInnerAttr->SetLine(nullptr, SvxBoxInfoItemLine::HORI);
pGlobalBorderInnerAttr->SetLine(nullptr, SvxBoxInfoItemLine::VERT);
diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx
index d01155961a13..1dec3d68cd75 100644
--- a/sc/source/core/data/documen8.cxx
+++ b/sc/source/core/data/documen8.cxx
@@ -120,11 +120,10 @@ SfxPrinter* ScDocument::GetPrinter(bool bCreateIfNotExist)
{
auto pSet =
o3tl::make_unique<SfxItemSet>( *xPoolHelper->GetDocPool(),
- SID_PRINTER_NOTFOUND_WARN, SID_PRINTER_NOTFOUND_WARN,
+ svl::Items<SID_PRINTER_NOTFOUND_WARN, SID_PRINTER_NOTFOUND_WARN,
SID_PRINTER_CHANGESTODOC, SID_PRINTER_CHANGESTODOC,
SID_PRINT_SELECTEDSHEET, SID_PRINT_SELECTEDSHEET,
- SID_SCPRINTOPTIONS, SID_SCPRINTOPTIONS,
- nullptr );
+ SID_SCPRINTOPTIONS, SID_SCPRINTOPTIONS>{} );
::utl::MiscCfg aMisc;
SfxPrinterChangeFlags nFlags = SfxPrinterChangeFlags::NONE;
diff --git a/sc/source/core/data/patattr.cxx b/sc/source/core/data/patattr.cxx
index 0ab7a9c60c0c..cddd652158b3 100644
--- a/sc/source/core/data/patattr.cxx
+++ b/sc/source/core/data/patattr.cxx
@@ -85,7 +85,7 @@ ScPatternAttr::ScPatternAttr( std::unique_ptr<SfxItemSet>&& pItemSet )
}
ScPatternAttr::ScPatternAttr( SfxItemPool* pItemPool )
- : SfxSetItem ( ATTR_PATTERN, o3tl::make_unique<SfxItemSet>( *pItemPool, ATTR_PATTERN_START, ATTR_PATTERN_END ) ),
+ : SfxSetItem ( ATTR_PATTERN, o3tl::make_unique<SfxItemSet>( *pItemPool, svl::Items<ATTR_PATTERN_START, ATTR_PATTERN_END>{} ) ),
pName ( nullptr ),
pStyle ( nullptr ),
mnKey(0)
@@ -161,7 +161,7 @@ SfxPoolItem* ScPatternAttr::Create( SvStream& rStream, sal_uInt16 /* nVersion */
pStr = new OUString( ScGlobal::GetRscString(STR_STYLENAME_STANDARD) );
auto pNewSet = o3tl::make_unique<SfxItemSet>( *GetItemSet().GetPool(),
- ATTR_PATTERN_START, ATTR_PATTERN_END );
+ svl::Items<ATTR_PATTERN_START, ATTR_PATTERN_END>{} );
pNewSet->Load( rStream );
ScPatternAttr* pPattern = new ScPatternAttr( std::move(pNewSet) );
diff --git a/sc/source/core/data/stlsheet.cxx b/sc/source/core/data/stlsheet.cxx
index ae7aed25f171..a04cc9f00309 100644
--- a/sc/source/core/data/stlsheet.cxx
+++ b/sc/source/core/data/stlsheet.cxx
@@ -139,12 +139,11 @@ SfxItemSet& ScStyleSheet::GetItemSet()
SfxItemPool& rItemPool = GetPool().GetPool();
pSet = new SfxItemSet( rItemPool,
- ATTR_BACKGROUND, ATTR_BACKGROUND,
+ svl::Items<ATTR_BACKGROUND, ATTR_BACKGROUND,
ATTR_BORDER, ATTR_SHADOW,
ATTR_LRSPACE, ATTR_PAGE_SCALETO,
ATTR_WRITINGDIR, ATTR_WRITINGDIR,
- ATTR_USERDEF, ATTR_USERDEF,
- 0 );
+ ATTR_USERDEF, ATTR_USERDEF>{} );
// If being loaded also the set is then filled in from the file,
// so the defaults do not need to be set.
@@ -222,7 +221,7 @@ SfxItemSet& ScStyleSheet::GetItemSet()
case SfxStyleFamily::Para:
default:
- pSet = new SfxItemSet( GetPool().GetPool(), ATTR_PATTERN_START, ATTR_PATTERN_END );
+ pSet = new SfxItemSet( GetPool().GetPool(), svl::Items<ATTR_PATTERN_START, ATTR_PATTERN_END>{} );
break;
}
bMySet = true;
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index 4d8ce194b3c9..e63c23c3e2c2 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -479,7 +479,7 @@ void ScTable::DeleteSelection( InsertDeleteFlags nDelFlag, const ScMarkData& rMa
if ( IsProtected() && (nDelFlag & InsertDeleteFlags::ATTRIB) )
{
ScDocumentPool* pPool = pDocument->GetPool();
- SfxItemSet aSet( *pPool, ATTR_PATTERN_START, ATTR_PATTERN_END );
+ SfxItemSet aSet( *pPool, svl::Items<ATTR_PATTERN_START, ATTR_PATTERN_END>{} );
aSet.Put( ScProtectionAttr( false ) );
SfxItemPoolCache aCache( pPool, &aSet );
ApplySelectionCache( &aCache, rMark );
diff --git a/sc/source/core/tool/detfunc.cxx b/sc/source/core/tool/detfunc.cxx
index 9544fb20453c..56c3578088aa 100644
--- a/sc/source/core/tool/detfunc.cxx
+++ b/sc/source/core/tool/detfunc.cxx
@@ -134,11 +134,11 @@ static bool lcl_HasThickLine( SdrObject& rObj )
}
ScDetectiveData::ScDetectiveData( SdrModel* pModel ) :
- aBoxSet( pModel->GetItemPool(), SDRATTR_START, SDRATTR_END ),
- aArrowSet( pModel->GetItemPool(), SDRATTR_START, SDRATTR_END ),
- aToTabSet( pModel->GetItemPool(), SDRATTR_START, SDRATTR_END ),
- aFromTabSet( pModel->GetItemPool(), SDRATTR_START, SDRATTR_END ),
- aCircleSet( pModel->GetItemPool(), SDRATTR_START, SDRATTR_END )
+ aBoxSet( pModel->GetItemPool(), svl::Items<SDRATTR_START, SDRATTR_END>{} ),
+ aArrowSet( pModel->GetItemPool(), svl::Items<SDRATTR_START, SDRATTR_END>{} ),
+ aToTabSet( pModel->GetItemPool(), svl::Items<SDRATTR_START, SDRATTR_END>{} ),
+ aFromTabSet( pModel->GetItemPool(), svl::Items<SDRATTR_START, SDRATTR_END>{} ),
+ aCircleSet( pModel->GetItemPool(), svl::Items<SDRATTR_START, SDRATTR_END>{} )
{
nMaxLevel = 0;
@@ -194,7 +194,7 @@ ScDetectiveData::ScDetectiveData( SdrModel* pModel ) :
}
ScCommentData::ScCommentData( ScDocument& rDoc, SdrModel* pModel ) :
- aCaptionSet( pModel->GetItemPool(), SDRATTR_START, SDRATTR_END, EE_ITEMS_START, EE_ITEMS_END, 0, 0 )
+ aCaptionSet( pModel->GetItemPool(), svl::Items<SDRATTR_START, SDRATTR_END, EE_ITEMS_START, EE_ITEMS_END>{} )
{
basegfx::B2DPolygon aTriangle;
aTriangle.append(basegfx::B2DPoint(10.0, 0.0));
diff --git a/sc/source/filter/excel/xehelper.cxx b/sc/source/filter/excel/xehelper.cxx
index fe01b5c27477..37244ae8ae80 100644
--- a/sc/source/filter/excel/xehelper.cxx
+++ b/sc/source/filter/excel/xehelper.cxx
@@ -424,7 +424,7 @@ XclExpStringRef lclCreateFormattedString(
// font buffer and helper item set for edit engine -> Calc item conversion
XclExpFontBuffer& rFontBuffer = rRoot.GetFontBuffer();
- SfxItemSet aItemSet( *rRoot.GetDoc().GetPool(), ATTR_PATTERN_START, ATTR_PATTERN_END );
+ SfxItemSet aItemSet( *rRoot.GetDoc().GetPool(), svl::Items<ATTR_PATTERN_START, ATTR_PATTERN_END>{} );
// script type handling
Reference< XBreakIterator > xBreakIt = rRoot.GetDoc().GetBreakIterator();
@@ -678,7 +678,7 @@ void XclExpHFConverter::AppendPortion( const EditTextObject* pTextObj, sal_Unico
OUString aText;
sal_Int32 nHeight = 0;
- SfxItemSet aItemSet( *GetDoc().GetPool(), ATTR_PATTERN_START, ATTR_PATTERN_END );
+ SfxItemSet aItemSet( *GetDoc().GetPool(), svl::Items<ATTR_PATTERN_START, ATTR_PATTERN_END>{} );
// edit engine
bool bOldUpdateMode = mrEE.GetUpdateMode();
diff --git a/sc/source/filter/excel/xlroot.cxx b/sc/source/filter/excel/xlroot.cxx
index f2dccf1b4aa7..cd8ea057cab5 100644
--- a/sc/source/filter/excel/xlroot.cxx
+++ b/sc/source/filter/excel/xlroot.cxx
@@ -371,7 +371,7 @@ ScHeaderEditEngine& XclRoot::GetHFEditEngine() const
// set Calc header/footer defaults
SfxItemSet* pEditSet = new SfxItemSet( rEE.GetEmptyItemSet() );
- SfxItemSet aItemSet( *GetDoc().GetPool(), ATTR_PATTERN_START, ATTR_PATTERN_END );
+ SfxItemSet aItemSet( *GetDoc().GetPool(), svl::Items<ATTR_PATTERN_START, ATTR_PATTERN_END>{} );
ScPatternAttr::FillToEditItemSet( *pEditSet, aItemSet );
// FillToEditItemSet() adjusts font height to 1/100th mm, we need twips
std::unique_ptr<SfxPoolItem> pNewItem( aItemSet.Get( ATTR_FONT_HEIGHT ).CloneSetWhich(EE_CHAR_FONTHEIGHT));
diff --git a/sc/source/filter/starcalc/scflt.cxx b/sc/source/filter/starcalc/scflt.cxx
index e2ba310fc3e1..f07075e483a8 100644
--- a/sc/source/filter/starcalc/scflt.cxx
+++ b/sc/source/filter/starcalc/scflt.cxx
@@ -760,12 +760,11 @@ void Sc10PageCollection::PutToDoc( ScDocument* pDoc )
pSet->Put( aHeaderItem );
SfxItemSet aSetItemItemSet( *pDoc->GetPool(),
- ATTR_BACKGROUND, ATTR_BACKGROUND,
+ svl::Items<ATTR_BACKGROUND, ATTR_BACKGROUND,
ATTR_BORDER, ATTR_SHADOW,
ATTR_PAGE_SIZE, ATTR_PAGE_SIZE,
ATTR_LRSPACE, ATTR_ULSPACE,
- ATTR_PAGE_ON, ATTR_PAGE_SHARED,
- 0 );
+ ATTR_PAGE_ON, ATTR_PAGE_SHARED>{} );
nColor = pHeadFootLine->BackColor;
Color aBColor( nColor.Red, nColor.Green, nColor.Blue );
nColor = pHeadFootLine->RasterColor;
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index 8ca88ba3b886..db4637665612 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -405,7 +405,7 @@ void ScModule::Execute( SfxRequest& rReq )
bSet = !GetDocOptions().IsAutoSpell();
}
- SfxItemSet aSet( GetPool(), SID_AUTOSPELL_CHECK, SID_AUTOSPELL_CHECK );
+ SfxItemSet aSet( GetPool(), svl::Items<SID_AUTOSPELL_CHECK, SID_AUTOSPELL_CHECK>{} );
aSet.Put( SfxBoolItem( SID_AUTOSPELL_CHECK, bSet ) );
ModifyOptions( aSet );
rReq.Done();
@@ -1932,7 +1932,7 @@ std::unique_ptr<SfxItemSet> ScModule::CreateItemSet( sal_uInt16 nId )
{
pRet = o3tl::make_unique<SfxItemSet>( GetPool(),
// TP_CALC:
- SID_SCDOCOPTIONS, SID_SCDOCOPTIONS,
+ svl::Items<SID_SCDOCOPTIONS, SID_SCDOCOPTIONS,
// TP_VIEW:
SID_SCVIEWOPTIONS, SID_SCVIEWOPTIONS,
SID_SC_OPT_SYNCZOOM, SID_SC_OPT_SYNCZOOM,
@@ -1955,8 +1955,7 @@ std::unique_ptr<SfxItemSet> ScModule::CreateItemSet( sal_uInt16 nId )
// TP_DEFAULTS
SID_SCDEFAULTSOPTIONS, SID_SCDEFAULTSOPTIONS,
// TP_FORMULA
- SID_SCFORMULAOPTIONS, SID_SCFORMULAOPTIONS,
- 0 );
+ SID_SCFORMULAOPTIONS, SID_SCFORMULAOPTIONS>{} );
const ScAppOptions& rAppOpt = GetAppOptions();
diff --git a/sc/source/ui/docshell/docsh3.cxx b/sc/source/ui/docshell/docsh3.cxx
index 2a6e39bad2f9..25d137b30f53 100644
--- a/sc/source/ui/docshell/docsh3.cxx
+++ b/sc/source/ui/docshell/docsh3.cxx
@@ -645,10 +645,9 @@ void ScDocShell::ExecuteChangeCommentDialog( ScChangeAction* pAction, vcl::Windo
aDate += ScGlobal::pLocaleData->getTime( aDT, false );
SfxItemSet aSet( GetPool(),
- SID_ATTR_POSTIT_AUTHOR, SID_ATTR_POSTIT_AUTHOR,
+ svl::Items<SID_ATTR_POSTIT_AUTHOR, SID_ATTR_POSTIT_AUTHOR,
SID_ATTR_POSTIT_DATE, SID_ATTR_POSTIT_DATE,
- SID_ATTR_POSTIT_TEXT, SID_ATTR_POSTIT_TEXT,
- 0 );
+ SID_ATTR_POSTIT_TEXT, SID_ATTR_POSTIT_TEXT>{} );
aSet.Put( SvxPostItTextItem ( aComment, SID_ATTR_POSTIT_TEXT ) );
aSet.Put( SvxPostItAuthorItem( aAuthor, SID_ATTR_POSTIT_AUTHOR ) );
diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx
index 7d28bfe733f4..670d713774b7 100644
--- a/sc/source/ui/drawfunc/drawsh.cxx
+++ b/sc/source/ui/drawfunc/drawsh.cxx
@@ -122,7 +122,7 @@ void ScDrawShell::ExecDrawAttr( SfxRequest& rReq )
case SID_TEXT_STANDARD: // delete hard text attributes
{
- SfxItemSet aEmptyAttr(GetPool(), EE_ITEMS_START, EE_ITEMS_END);
+ SfxItemSet aEmptyAttr(GetPool(), svl::Items<EE_ITEMS_START, EE_ITEMS_END>{});
pView->SetAttributes(aEmptyAttr, true);
}
break;
@@ -334,7 +334,7 @@ void ScDrawShell::ExecuteMacroAssign( SdrObject* pObj, vcl::Window* pWin )
}
// create empty itemset for macro-dlg
- std::unique_ptr<SfxItemSet> pItemSet(new SfxItemSet(SfxGetpApp()->GetPool(), SID_ATTR_MACROITEM, SID_ATTR_MACROITEM, SID_EVENTCONFIG, SID_EVENTCONFIG, 0 ));
+ std::unique_ptr<SfxItemSet> pItemSet(new SfxItemSet(SfxGetpApp()->GetPool(), svl::Items<SID_ATTR_MACROITEM, SID_ATTR_MACROITEM, SID_EVENTCONFIG, SID_EVENTCONFIG>{} ));
pItemSet->Put ( aItem );
SfxEventNamesItem aNamesItem(SID_EVENTCONFIG);
diff --git a/sc/source/ui/drawfunc/drawsh5.cxx b/sc/source/ui/drawfunc/drawsh5.cxx
index 1b7cb1f9107c..2bd0815df733 100644
--- a/sc/source/ui/drawfunc/drawsh5.cxx
+++ b/sc/source/ui/drawfunc/drawsh5.cxx
@@ -451,7 +451,7 @@ void ScDrawShell::ExecDrawFunc( SfxRequest& rReq )
const SfxBoolItem* pItem = rReq.GetArg<SfxBoolItem>(SID_ENABLE_HYPHENATION);
if( pItem )
{
- SfxItemSet aSet( GetPool(), EE_PARA_HYPHENATE, EE_PARA_HYPHENATE );
+ SfxItemSet aSet( GetPool(), svl::Items<EE_PARA_HYPHENATE, EE_PARA_HYPHENATE>{} );
bool bValue = pItem->GetValue();
aSet.Put( SfxBoolItem( EE_PARA_HYPHENATE, bValue ) );
pView->SetAttributes( aSet );
diff --git a/sc/source/ui/drawfunc/drtxtob.cxx b/sc/source/ui/drawfunc/drtxtob.cxx
index a4b096213b49..92b092f758b0 100644
--- a/sc/source/ui/drawfunc/drtxtob.cxx
+++ b/sc/source/ui/drawfunc/drtxtob.cxx
@@ -801,7 +801,7 @@ void ScDrawTextObjectBar::ExecuteAttr( SfxRequest &rReq )
if ( pOutView )
pOutView->Paint( tools::Rectangle() );
- SfxItemSet aEmptyAttr( *aEditAttr.GetPool(), EE_ITEMS_START, EE_ITEMS_END );
+ SfxItemSet aEmptyAttr( *aEditAttr.GetPool(), svl::Items<EE_ITEMS_START, EE_ITEMS_END>{} );
pView->SetAttributes( aEmptyAttr, true );
if ( pOutView )
@@ -924,7 +924,7 @@ void ScDrawTextObjectBar::ExecuteAttr( SfxRequest &rReq )
sal_uInt16 nId = SID_ATTR_PARA_LRSPACE;
const SvxLRSpaceItem& rItem = static_cast<const SvxLRSpaceItem&>(
pArgs->Get( nId ));
- SfxItemSet aAttr( GetPool(), EE_PARA_LRSPACE, EE_PARA_LRSPACE );
+ SfxItemSet aAttr( GetPool(), svl::Items<EE_PARA_LRSPACE, EE_PARA_LRSPACE>{} );
nId = EE_PARA_LRSPACE;
SvxLRSpaceItem aLRSpaceItem( rItem.GetLeft(),
rItem.GetRight(), rItem.GetTextLeft(),
@@ -936,7 +936,7 @@ void ScDrawTextObjectBar::ExecuteAttr( SfxRequest &rReq )
{
SvxLineSpacingItem aLineSpaceItem = static_cast<const SvxLineSpacingItem&>(pArgs->Get(
GetPool().GetWhich(nSlot)));
- SfxItemSet aAttr( GetPool(), EE_PARA_SBL, EE_PARA_SBL );
+ SfxItemSet aAttr( GetPool(), svl::Items<EE_PARA_SBL, EE_PARA_SBL>{} );
aAttr.Put( aLineSpaceItem );
pView->SetAttributes( aAttr );
}
@@ -944,7 +944,7 @@ void ScDrawTextObjectBar::ExecuteAttr( SfxRequest &rReq )
{
SvxULSpaceItem aULSpaceItem = static_cast<const SvxULSpaceItem&>(pArgs->Get(
GetPool().GetWhich(nSlot)));
- SfxItemSet aAttr( GetPool(), EE_PARA_ULSPACE, EE_PARA_ULSPACE );
+ SfxItemSet aAttr( GetPool(), svl::Items<EE_PARA_ULSPACE, EE_PARA_ULSPACE>{} );
aULSpaceItem.SetWhich(EE_PARA_ULSPACE);
aAttr.Put( aULSpaceItem );
pView->SetAttributes( aAttr );
diff --git a/sc/source/ui/drawfunc/drtxtob1.cxx b/sc/source/ui/drawfunc/drtxtob1.cxx
index c655351c888b..f6c1e339eb6b 100644
--- a/sc/source/ui/drawfunc/drtxtob1.cxx
+++ b/sc/source/ui/drawfunc/drtxtob1.cxx
@@ -72,13 +72,12 @@ bool ScDrawTextObjectBar::ExecuteParaDlg( const SfxItemSet& rArgs,
{
SfxItemPool* pArgPool = rArgs.GetPool();
SfxItemSet aNewAttr( *pArgPool,
- EE_ITEMS_START, EE_ITEMS_END,
+ svl::Items<EE_ITEMS_START, EE_ITEMS_END,
SID_ATTR_PARA_HYPHENZONE, SID_ATTR_PARA_HYPHENZONE,
SID_ATTR_PARA_PAGEBREAK, SID_ATTR_PARA_PAGEBREAK,
SID_ATTR_PARA_SPLIT, SID_ATTR_PARA_SPLIT,
SID_ATTR_PARA_WIDOWS, SID_ATTR_PARA_WIDOWS,
- SID_ATTR_PARA_ORPHANS, SID_ATTR_PARA_ORPHANS,
- 0 );
+ SID_ATTR_PARA_ORPHANS, SID_ATTR_PARA_ORPHANS>{} );
aNewAttr.Put( rArgs );
// Values have been taken over once to show the dialog.
diff --git a/sc/source/ui/drawfunc/drtxtob2.cxx b/sc/source/ui/drawfunc/drtxtob2.cxx
index 8b0fddfbfed6..8783ef9c27ba 100644
--- a/sc/source/ui/drawfunc/drtxtob2.cxx
+++ b/sc/source/ui/drawfunc/drtxtob2.cxx
@@ -91,7 +91,7 @@ void ScDrawTextObjectBar::ExecuteGlobal( SfxRequest &rReq )
case SID_TEXTDIRECTION_LEFT_TO_RIGHT:
case SID_TEXTDIRECTION_TOP_TO_BOTTOM:
{
- SfxItemSet aAttr( pView->GetModel()->GetItemPool(), SDRATTR_TEXTDIRECTION, SDRATTR_TEXTDIRECTION, 0 );
+ SfxItemSet aAttr( pView->GetModel()->GetItemPool(), svl::Items<SDRATTR_TEXTDIRECTION, SDRATTR_TEXTDIRECTION>{} );
aAttr.Put( SvxWritingModeItem(
nSlot == SID_TEXTDIRECTION_LEFT_TO_RIGHT ?
css::text::WritingMode_LR_TB : css::text::WritingMode_TB_RL,
@@ -107,7 +107,7 @@ void ScDrawTextObjectBar::ExecuteGlobal( SfxRequest &rReq )
const SfxBoolItem* pItem = rReq.GetArg<SfxBoolItem>(SID_ENABLE_HYPHENATION);
if( pItem )
{
- SfxItemSet aSet( GetPool(), EE_PARA_HYPHENATE, EE_PARA_HYPHENATE );
+ SfxItemSet aSet( GetPool(), svl::Items<EE_PARA_HYPHENATE, EE_PARA_HYPHENATE>{} );
bool bValue = pItem->GetValue();
aSet.Put( SfxBoolItem( EE_PARA_HYPHENATE, bValue ) );
pView->SetAttributes( aSet );
@@ -163,9 +163,8 @@ void ScDrawTextObjectBar::ExecuteExtra( SfxRequest &rReq )
case SID_ATTR_PARA_RIGHT_TO_LEFT:
{
SfxItemSet aAttr( pView->GetModel()->GetItemPool(),
- EE_PARA_WRITINGDIR, EE_PARA_WRITINGDIR,
- EE_PARA_JUST, EE_PARA_JUST,
- 0 );
+ svl::Items<EE_PARA_WRITINGDIR, EE_PARA_WRITINGDIR,
+ EE_PARA_JUST, EE_PARA_JUST>{} );
bool bLeft = ( nSlot == SID_ATTR_PARA_LEFT_TO_RIGHT );
aAttr.Put( SvxFrameDirectionItem(
bLeft ? SvxFrameDirection::Horizontal_LR_TB : SvxFrameDirection::Horizontal_RL_TB,
diff --git a/sc/source/ui/drawfunc/fuconcustomshape.cxx b/sc/source/ui/drawfunc/fuconcustomshape.cxx
index 54d8470229f6..9cc4cd982c8f 100644
--- a/sc/source/ui/drawfunc/fuconcustomshape.cxx
+++ b/sc/source/ui/drawfunc/fuconcustomshape.cxx
@@ -168,7 +168,7 @@ void FuConstCustomShape::SetAttributes( SdrObject* pObj )
{
const SfxItemSet& rSource = pSourceObj->GetMergedItemSet();
SfxItemSet aDest( pObj->GetModel()->GetItemPool(), // ranges from SdrAttrObj
- SDRATTR_START, SDRATTR_SHADOW_LAST,
+ svl::Items<SDRATTR_START, SDRATTR_SHADOW_LAST,
SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST,
SDRATTR_TEXTDIRECTION, SDRATTR_TEXTDIRECTION,
// Graphic Attributes
@@ -178,9 +178,7 @@ void FuConstCustomShape::SetAttributes( SdrObject* pObj )
// CustomShape properties
SDRATTR_CUSTOMSHAPE_FIRST, SDRATTR_CUSTOMSHAPE_LAST,
// range from SdrTextObj
- EE_ITEMS_START, EE_ITEMS_END,
- // end
- 0, 0);
+ EE_ITEMS_START, EE_ITEMS_END>{});
aDest.Set( rSource );
pObj->SetMergedItemSet( aDest );
sal_Int32 nAngle = pSourceObj->GetRotateAngle();
diff --git a/sc/source/ui/drawfunc/futext.cxx b/sc/source/ui/drawfunc/futext.cxx
index c7d735a32ae0..3062294a8292 100644
--- a/sc/source/ui/drawfunc/futext.cxx
+++ b/sc/source/ui/drawfunc/futext.cxx
@@ -413,7 +413,7 @@ bool FuText::MouseButtonUp(const MouseEvent& rMEvt)
// set needed attributes for scrolling
SfxItemSet aItemSet( pDrDoc->GetItemPool(),
- SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST);
+ svl::Items<SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST>{});
aItemSet.Put( makeSdrTextAutoGrowWidthItem( false ) );
aItemSet.Put( makeSdrTextAutoGrowHeightItem( false ) );
@@ -684,7 +684,7 @@ SdrObject* FuText::CreateDefaultObject(const sal_uInt16 nID, const tools::Rectan
if(bMarquee)
{
- SfxItemSet aSet(pDrDoc->GetItemPool(), SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST);
+ SfxItemSet aSet(pDrDoc->GetItemPool(), svl::Items<SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST>{});
aSet.Put( makeSdrTextAutoGrowWidthItem( false ) );
aSet.Put( makeSdrTextAutoGrowHeightItem( false ) );
diff --git a/sc/source/ui/pagedlg/tphf.cxx b/sc/source/ui/pagedlg/tphf.cxx
index 2a4e385c851c..0c6c0b04a157 100644
--- a/sc/source/ui/pagedlg/tphf.cxx
+++ b/sc/source/ui/pagedlg/tphf.cxx
@@ -44,8 +44,8 @@ ScHFPage::ScHFPage( vcl::Window* pParent, const SfxItemSet& rSet, sal_uInt16 nSe
: SvxHFPage ( pParent, rSet, nSetId ),
aDataSet ( *rSet.GetPool(),
- ATTR_PAGE_HEADERLEFT, ATTR_PAGE_FOOTERRIGHT,
- ATTR_PAGE, ATTR_PAGE, 0 ),
+ svl::Items<ATTR_PAGE_HEADERLEFT, ATTR_PAGE_FOOTERRIGHT,
+ ATTR_PAGE, ATTR_PAGE>{} ),
nPageUsage ( SvxPageUsage::All ),
pStyleDlg ( nullptr )
{
diff --git a/sc/source/ui/unoobj/confuno.cxx b/sc/source/ui/unoobj/confuno.cxx
index 1cbab301bb6d..857b9d1bac4d 100644
--- a/sc/source/ui/unoobj/confuno.cxx
+++ b/sc/source/ui/unoobj/confuno.cxx
@@ -238,11 +238,10 @@ void SAL_CALL ScDocumentConfiguration::setPropertyValue(
SvMemoryStream aStream (aSequence.getArray(), nSize, StreamMode::READ );
aStream.Seek ( STREAM_SEEK_TO_BEGIN );
auto pSet = o3tl::make_unique<SfxItemSet>( *rDoc.GetPool(),
- SID_PRINTER_NOTFOUND_WARN, SID_PRINTER_NOTFOUND_WARN,
+ svl::Items<SID_PRINTER_NOTFOUND_WARN, SID_PRINTER_NOTFOUND_WARN,
SID_PRINTER_CHANGESTODOC, SID_PRINTER_CHANGESTODOC,
SID_PRINT_SELECTEDSHEET, SID_PRINT_SELECTEDSHEET,
- SID_SCPRINTOPTIONS, SID_SCPRINTOPTIONS,
- nullptr );
+ SID_SCPRINTOPTIONS, SID_SCPRINTOPTIONS>{} );
pDocShell->SetPrinter( SfxPrinter::Create( aStream, std::move(pSet) ) );
}
}
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 90700aa3ee5f..ff173fda39fe 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -3036,7 +3036,7 @@ void ScCellShell::ExecuteSubtotals(SfxRequest& rReq)
ScopedVclPtr<SfxAbstractTabDialog> pDlg;
ScSubTotalParam aSubTotalParam;
- SfxItemSet aArgSet( GetPool(), SCITEM_SUBTDATA, SCITEM_SUBTDATA );
+ SfxItemSet aArgSet( GetPool(), svl::Items<SCITEM_SUBTDATA, SCITEM_SUBTDATA>{} );
// Only get existing named database range.
ScDBData* pDBData = pTabViewShell->GetDBData(true, SC_DB_OLD);
diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx
index 3c6eec7a0b20..feeba69dc20a 100644
--- a/sc/source/ui/view/cellsh2.cxx
+++ b/sc/source/ui/view/cellsh2.cxx
@@ -478,7 +478,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
if( lcl_GetSortParam( pData, aSortParam ) )
{
ScDocument* pDoc = GetViewData()->GetDocument();
- SfxItemSet aArgSet( GetPool(), SCITEM_SORTDATA, SCITEM_SORTDATA );
+ SfxItemSet aArgSet( GetPool(), svl::Items<SCITEM_SORTDATA, SCITEM_SORTDATA>{} );
pDBData->GetSortParam( aSortParam );
bool bHasHeader = pDoc->HasColHeader( aSortParam.nCol1, aSortParam.nRow1, aSortParam.nCol2, aSortParam.nRow2, pData->GetTabNo() );
diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx
index 1b3105b87aab..b2be50b1ba05 100644
--- a/sc/source/ui/view/cellsh3.cxx
+++ b/sc/source/ui/view/cellsh3.cxx
@@ -331,13 +331,13 @@ void ScCellShell::Execute( SfxRequest& rReq )
std::unique_ptr<SfxItemSet> pEmptySet(
new SfxItemSet( *pReqArgs->GetPool(),
- ATTR_PATTERN_START,
- ATTR_PATTERN_END ));
+ svl::Items<ATTR_PATTERN_START,
+ ATTR_PATTERN_END>{} ));
std::unique_ptr<SfxItemSet> pNewSet(
new SfxItemSet( *pReqArgs->GetPool(),
- ATTR_PATTERN_START,
- ATTR_PATTERN_END ));
+ svl::Items<ATTR_PATTERN_START,
+ ATTR_PATTERN_END>{} ));
const SfxPoolItem* pAttr = nullptr;
sal_uInt16 nWhich = 0;
diff --git a/sc/source/ui/view/drawview.cxx b/sc/source/ui/view/drawview.cxx
index e8b2e064bd85..23cbe4ddf408 100644
--- a/sc/source/ui/view/drawview.cxx
+++ b/sc/source/ui/view/drawview.cxx
@@ -997,7 +997,7 @@ SdrObject* ScDrawView::ApplyGraphicToObject(
{
AddUndo(new SdrUndoAttrObj(rHitObject));
- SfxItemSet aSet(GetModel()->GetItemPool(), XATTR_FILLSTYLE, XATTR_FILLBITMAP);
+ SfxItemSet aSet(GetModel()->GetItemPool(), svl::Items<XATTR_FILLSTYLE, XATTR_FILLBITMAP>{});
aSet.Put(XFillStyleItem(drawing::FillStyle_BITMAP));
aSet.Put(XFillBitmapItem(OUString(), rGraphic));
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index 7dd4bfb5dd54..6895e17c064b 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -1033,7 +1033,7 @@ void ScFormatShell::ExecuteNumFormat( SfxRequest& rReq )
}
short nType = GetCurrentNumberFormatType();
- SfxItemSet aSet( GetPool(), nSlot, nSlot );
+ SfxItemSet aSet( GetPool(), {{nSlot, nSlot}} );
switch ( nSlot )
{
case SID_NUMBER_TWODEC:
@@ -1239,7 +1239,7 @@ void ScFormatShell::ExecuteNumFormat( SfxRequest& rReq )
const SfxItemSet& rOldSet =
pTabViewShell->GetSelectionPattern()->GetItemSet();
SfxItemPool* pDocPool = GetViewData()->GetDocument()->GetPool();
- SfxItemSet aNewSet( *pDocPool, ATTR_PATTERN_START, ATTR_PATTERN_END );
+ SfxItemSet aNewSet( *pDocPool, svl::Items<ATTR_PATTERN_START, ATTR_PATTERN_END>{} );
aNewSet.Put( *pItem );
pTabViewShell->ApplyAttributes( &aNewSet, &rOldSet );
}
@@ -1873,13 +1873,13 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq )
std::unique_ptr<SfxItemSet> pOldSet(
new SfxItemSet(
*(pDoc->GetPool()),
- ATTR_PATTERN_START,
- ATTR_PATTERN_END ));
+ svl::Items<ATTR_PATTERN_START,
+ ATTR_PATTERN_END>{} ));
std::unique_ptr<SfxItemSet> pNewSet(
new SfxItemSet(
*(pDoc->GetPool()),
- ATTR_PATTERN_START,
- ATTR_PATTERN_END ));
+ svl::Items<ATTR_PATTERN_START,
+ ATTR_PATTERN_END>{} ));
const SfxPoolItem& rBorderAttr =
pOldAttrs->GetItemSet().
Get( ATTR_BORDER );
diff --git a/sc/source/ui/view/gridwin2.cxx b/sc/source/ui/view/gridwin2.cxx
index 46f6ed82e251..7688dd25b9a2 100644
--- a/sc/source/ui/view/gridwin2.cxx
+++ b/sc/source/ui/view/gridwin2.cxx
@@ -199,7 +199,7 @@ void ScGridWindow::DoPushPivotButton( SCCOL nCol, SCROW nRow, const MouseEvent&
}
SfxItemSet aArgSet( pViewData->GetViewShell()->GetPool(),
- SCITEM_QUERYDATA, SCITEM_QUERYDATA );
+ svl::Items<SCITEM_QUERYDATA, SCITEM_QUERYDATA>{} );
aArgSet.Put( ScQueryItem( SCITEM_QUERYDATA, pViewData, &aQueryParam ) );
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
diff --git a/sc/source/ui/view/gridwin3.cxx b/sc/source/ui/view/gridwin3.cxx
index 3383f18d0720..fb6aba1ee455 100644
--- a/sc/source/ui/view/gridwin3.cxx
+++ b/sc/source/ui/view/gridwin3.cxx
@@ -332,7 +332,7 @@ void ScGridWindow::UpdateStatusPosSize()
if (!pPV)
return; // shouldn't be called in that case either
- SfxItemSet aSet(pViewData->GetViewShell()->GetPool(), SID_ATTR_POSITION, SID_ATTR_SIZE);
+ SfxItemSet aSet(pViewData->GetViewShell()->GetPool(), svl::Items<SID_ATTR_POSITION, SID_ATTR_SIZE>{});
// Fill items for position and size:
// show action rectangle during action,
diff --git a/sc/source/ui/view/pivotsh.cxx b/sc/source/ui/view/pivotsh.cxx
index 2c96d3e62a5a..185000c9c866 100644
--- a/sc/source/ui/view/pivotsh.cxx
+++ b/sc/source/ui/view/pivotsh.cxx
@@ -100,7 +100,7 @@ void ScPivotShell::Execute( SfxRequest& rReq )
ScViewData& rViewData = pViewShell->GetViewData();
SfxItemSet aArgSet( pViewShell->GetPool(),
- SCITEM_QUERYDATA, SCITEM_QUERYDATA );
+ svl::Items<SCITEM_QUERYDATA, SCITEM_QUERYDATA>{} );
aArgSet.Put( ScQueryItem( SCITEM_QUERYDATA, &rViewData, &aQueryParam ) );
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx
index 3bd8aed1684f..6d86d188e7fb 100644
--- a/sc/source/ui/view/prevwsh.cxx
+++ b/sc/source/ui/view/prevwsh.cxx
@@ -627,7 +627,7 @@ void ScPreviewShell::Execute( SfxRequest& rReq )
}
else
{
- SfxItemSet aSet ( GetPool(), SID_ATTR_ZOOM, SID_ATTR_ZOOM );
+ SfxItemSet aSet ( GetPool(), svl::Items<SID_ATTR_ZOOM, SID_ATTR_ZOOM>{} );
SvxZoomItem aZoomItem( SvxZoomType::PERCENT, pPreview->GetZoom(), SID_ATTR_ZOOM );
aSet.Put( aZoomItem );
diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx
index d6d11f18c79e..559aa45506bc 100644
--- a/sc/source/ui/view/tabvwsh3.cxx
+++ b/sc/source/ui/view/tabvwsh3.cxx
@@ -706,7 +706,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
}
else
{
- SfxItemSet aSet ( GetPool(), SID_ATTR_ZOOM, SID_ATTR_ZOOM );
+ SfxItemSet aSet ( GetPool(), svl::Items<SID_ATTR_ZOOM, SID_ATTR_ZOOM>{} );
SvxZoomItem aZoomItem( eOldZoomType, nOldZoom, SID_ATTR_ZOOM );
ScopedVclPtr<AbstractSvxZoomDialog> pDlg;
ScMarkData& rMark = GetViewData().GetMarkData();
diff --git a/sc/source/ui/view/tabvwshc.cxx b/sc/source/ui/view/tabvwshc.cxx
index 7cbcaed65b9b..53ad7ede5038 100644
--- a/sc/source/ui/view/tabvwshc.cxx
+++ b/sc/source/ui/view/tabvwshc.cxx
@@ -203,8 +203,8 @@ VclPtr<SfxModelessDialog> ScTabViewShell::CreateRefDialog(
case SID_OPENDLG_CONSOLIDATE:
{
SfxItemSet aArgSet( GetPool(),
- SCITEM_CONSOLIDATEDATA,
- SCITEM_CONSOLIDATEDATA );
+ svl::Items<SCITEM_CONSOLIDATEDATA,
+ SCITEM_CONSOLIDATEDATA>{} );
const ScConsolidateParam* pDlgData =
pDoc->GetConsolidateDlgData();
@@ -254,8 +254,8 @@ VclPtr<SfxModelessDialog> ScTabViewShell::CreateRefDialog(
{
ScQueryParam aQueryParam;
SfxItemSet aArgSet( GetPool(),
- SCITEM_QUERYDATA,
- SCITEM_QUERYDATA );
+ svl::Items<SCITEM_QUERYDATA,
+ SCITEM_QUERYDATA>{} );
ScDBData* pDBData = GetDBData(false, SC_DB_MAKE, ScGetDBSelection::RowDown);
pDBData->ExtendDataArea(pDoc);
@@ -284,8 +284,8 @@ VclPtr<SfxModelessDialog> ScTabViewShell::CreateRefDialog(
ScQueryParam aQueryParam;
SfxItemSet aArgSet( GetPool(),
- SCITEM_QUERYDATA,
- SCITEM_QUERYDATA );
+ svl::Items<SCITEM_QUERYDATA,
+ SCITEM_QUERYDATA>{} );
ScDBData* pDBData = GetDBData(false, SC_DB_MAKE, ScGetDBSelection::RowDown);
pDBData->ExtendDataArea(pDoc);
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index dec005d3561a..36e22d64ab24 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -3126,12 +3126,12 @@ void ScViewFunc::SetSelectionFrameLines( const SvxBorderLine* pLine,
{
std::unique_ptr<SfxItemSet> pOldSet(new SfxItemSet(
*(pDoc->GetPool()),
- ATTR_PATTERN_START,
- ATTR_PATTERN_END ));
+ svl::Items<ATTR_PATTERN_START,
+ ATTR_PATTERN_END>{} ));
std::unique_ptr<SfxItemSet> pNewSet(new SfxItemSet(
*(pDoc->GetPool()),
- ATTR_PATTERN_START,
- ATTR_PATTERN_END ));
+ svl::Items<ATTR_PATTERN_START,
+ ATTR_PATTERN_END>{} ));
SvxBorderLine aLine;
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index db6edf9d6112..6e09d4b6291b 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -981,7 +981,7 @@ void ScViewFunc::ApplyAttr( const SfxPoolItem& rAttrItem )
}
ScPatternAttr aNewAttrs( o3tl::make_unique<SfxItemSet>( *GetViewData().GetDocument()->GetPool(),
- ATTR_PATTERN_START, ATTR_PATTERN_END ) );
+ svl::Items<ATTR_PATTERN_START, ATTR_PATTERN_END>{} ) );
aNewAttrs.GetItemSet().Put( rAttrItem );
// if justify is set (with Buttons), always indentation 0