summaryrefslogtreecommitdiff
path: root/svx/source/svdraw
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-09-24 14:20:49 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-09-25 19:04:52 +0200
commit03998c25358f88a9fd6ac306ad1aba81fceca0fe (patch)
treefe88512a4d8386af56ac0fb1f0e47b9c443827bb /svx/source/svdraw
parent398ae49ba337a2d2c32611f371132c978cf4db64 (diff)
use SfxItemSetFixed in svx
Change-Id: I8123b34c73a16579b59989ae31329dec378d8b98 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122584 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/svdraw')
-rw-r--r--svx/source/svdraw/svddrgmt.cxx2
-rw-r--r--svx/source/svdraw/svdedtv2.cxx5
-rw-r--r--svx/source/svdraw/svdfmtf.cxx4
-rw-r--r--svx/source/svdraw/svdoashp.cxx5
-rw-r--r--svx/source/svdraw/svdotext.cxx5
-rw-r--r--svx/source/svdraw/svdotxed.cxx2
-rw-r--r--svx/source/svdraw/svdpdf.cxx2
7 files changed, 11 insertions, 14 deletions
diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx
index ef744f881906..525cbb3360a2 100644
--- a/svx/source/svdraw/svddrgmt.cxx
+++ b/svx/source/svdraw/svddrgmt.cxx
@@ -3834,7 +3834,7 @@ bool SdrDragCrop::EndSdrDrag(bool /*bCopy*/)
sal_Int32 nBottomCrop = static_cast<sal_Int32>( rOldCrop.GetBottom() - nDiffBottom * fScaleY );
SfxItemPool& rPool = getSdrDragView().GetModel()->GetItemPool();
- SfxItemSet aSet( rPool, svl::Items<SDRATTR_GRAFCROP, SDRATTR_GRAFCROP> );
+ SfxItemSetFixed<SDRATTR_GRAFCROP, SDRATTR_GRAFCROP> aSet( rPool );
aSet.Put( SdrGrafCropItem( nLeftCrop, nTopCrop, nRightCrop, nBottomCrop ) );
getSdrDragView().SetAttributes( aSet, false );
}
diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx
index 4e5a5e3c4f43..1d04e2eb381a 100644
--- a/svx/source/svdraw/svdedtv2.cxx
+++ b/svx/source/svdraw/svdedtv2.cxx
@@ -558,10 +558,9 @@ void SdrEditView::ImpCopyAttributes(const SdrObject* pSource, SdrObject* pDest)
if(!(pSource && pDest))
return;
- SfxItemSet aSet(mpModel->GetItemPool(),
- svl::Items<SDRATTR_START, SDRATTR_NOTPERSIST_FIRST-1,
+ SfxItemSetFixed<SDRATTR_START, SDRATTR_NOTPERSIST_FIRST-1,
SDRATTR_NOTPERSIST_LAST+1, SDRATTR_END,
- EE_ITEMS_START, EE_ITEMS_END>);
+ EE_ITEMS_START, EE_ITEMS_END> aSet(mpModel->GetItemPool());
aSet.Put(pSource->GetMergedItemSet());
diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx
index be753c35eaa1..e62186225370 100644
--- a/svx/source/svdraw/svdfmtf.cxx
+++ b/svx/source/svdraw/svdfmtf.cxx
@@ -720,7 +720,7 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaRoundRectAction const & rAct)
SetAttributes(pRect);
tools::Long nRad=(rAct.GetHorzRound()+rAct.GetVertRound())/2;
if (nRad!=0) {
- SfxItemSet aSet(*mpLineAttr->GetPool(), svl::Items<SDRATTR_CORNER_RADIUS, SDRATTR_CORNER_RADIUS>);
+ SfxItemSetFixed<SDRATTR_CORNER_RADIUS, SDRATTR_CORNER_RADIUS> aSet(*mpLineAttr->GetPool());
aSet.Put(SdrMetricItem(SDRATTR_CORNER_RADIUS, nRad));
pRect->SetMergedItemSet(aSet);
}
@@ -1046,7 +1046,7 @@ void ImpSdrGDIMetaFileImport::ImportText( const Point& rPos, const OUString& rSt
if (!aFnt.IsTransparent())
{
- SfxItemSet aAttr(*mpFillAttr->GetPool(), svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST>);
+ SfxItemSetFixed<XATTR_FILL_FIRST, XATTR_FILL_LAST> aAttr(*mpFillAttr->GetPool());
aAttr.Put(XFillStyleItem(drawing::FillStyle_SOLID));
aAttr.Put(XFillColorItem(OUString(), aFnt.GetFillColor()));
pText->SetMergedItemSet(aAttr);
diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx
index 5cdd00a77e39..20a072b912ab 100644
--- a/svx/source/svdraw/svdoashp.cxx
+++ b/svx/source/svdraw/svdoashp.cxx
@@ -2215,11 +2215,10 @@ void SdrObjCustomShape::SetVerticalWriting( bool bVertical )
tools::Rectangle aObjectRect = GetLogicRect();
// prepare ItemSet to set exchanged width and height items
- SfxItemSet aNewSet(*rSet.GetPool(),
- svl::Items<SDRATTR_TEXT_AUTOGROWHEIGHT, SDRATTR_TEXT_AUTOGROWHEIGHT,
+ SfxItemSetFixed<SDRATTR_TEXT_AUTOGROWHEIGHT, SDRATTR_TEXT_AUTOGROWHEIGHT,
// Expanded item ranges to also support horizontal and vertical adjust.
SDRATTR_TEXT_VERTADJUST, SDRATTR_TEXT_VERTADJUST,
- SDRATTR_TEXT_AUTOGROWWIDTH, SDRATTR_TEXT_HORZADJUST>);
+ SDRATTR_TEXT_AUTOGROWWIDTH, SDRATTR_TEXT_HORZADJUST> aNewSet(*rSet.GetPool());
aNewSet.Put(rSet);
diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
index 3ad373cad189..c21a19db27b5 100644
--- a/svx/source/svdraw/svdotext.cxx
+++ b/svx/source/svdraw/svdotext.cxx
@@ -1503,11 +1503,10 @@ void SdrTextObj::SetVerticalWriting(bool bVertical)
tools::Rectangle aObjectRect = GetSnapRect();
// prepare ItemSet to set exchanged width and height items
- SfxItemSet aNewSet(*rSet.GetPool(),
- svl::Items<SDRATTR_TEXT_AUTOGROWHEIGHT, SDRATTR_TEXT_AUTOGROWHEIGHT,
+ SfxItemSetFixed<SDRATTR_TEXT_AUTOGROWHEIGHT, SDRATTR_TEXT_AUTOGROWHEIGHT,
// Expanded item ranges to also support hor and ver adjust.
SDRATTR_TEXT_VERTADJUST, SDRATTR_TEXT_VERTADJUST,
- SDRATTR_TEXT_AUTOGROWWIDTH, SDRATTR_TEXT_HORZADJUST>);
+ SDRATTR_TEXT_AUTOGROWWIDTH, SDRATTR_TEXT_HORZADJUST> aNewSet(*rSet.GetPool());
aNewSet.Put(rSet);
aNewSet.Put(makeSdrTextAutoGrowWidthItem(bAutoGrowHeight));
diff --git a/svx/source/svdraw/svdotxed.cxx b/svx/source/svdraw/svdotxed.cxx
index bbcdc2a7add9..96523d679471 100644
--- a/svx/source/svdraw/svdotxed.cxx
+++ b/svx/source/svdraw/svdotxed.cxx
@@ -95,7 +95,7 @@ bool SdrTextObj::BegTextEdit(SdrOutliner& rOutl)
// at SetParaAttribs(), all attributes contained in the parent become
// attributed hard to the paragraph.
const SfxItemSet& rSet = GetObjectItemSet();
- SfxItemSet aFilteredSet(*rSet.GetPool(), svl::Items<EE_ITEMS_START, EE_ITEMS_END>);
+ SfxItemSetFixed<EE_ITEMS_START, EE_ITEMS_END> aFilteredSet(*rSet.GetPool());
aFilteredSet.Put(rSet);
rOutl.SetParaAttribs(0, aFilteredSet);
}
diff --git a/svx/source/svdraw/svdpdf.cxx b/svx/source/svdraw/svdpdf.cxx
index 3e253ede4fde..ee6a59102c5d 100644
--- a/svx/source/svdraw/svdpdf.cxx
+++ b/svx/source/svdraw/svdpdf.cxx
@@ -828,7 +828,7 @@ void ImpSdrPdfImport::InsertTextObject(const Point& rPos, const Size& rSize, con
if (!aFont.IsTransparent())
{
- SfxItemSet aAttr(*mpFillAttr->GetPool(), svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST>);
+ SfxItemSetFixed<XATTR_FILL_FIRST, XATTR_FILL_LAST> aAttr(*mpFillAttr->GetPool());
aAttr.Put(XFillStyleItem(drawing::FillStyle_SOLID));
aAttr.Put(XFillColorItem(OUString(), aFont.GetFillColor()));
pText->SetMergedItemSet(aAttr);