summaryrefslogtreecommitdiff
path: root/sw/source/core/draw
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-10-06 16:17:38 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-10-10 11:33:38 +0200
commitdbd49cf90b175a3c3d7a4f25ad366f9bc4c716db (patch)
tree1c9ee40dc72d468f4b35dd83f62966844aabcf62 /sw/source/core/draw
parentb972aa8727da6eb2d5d9740b18450d8706df0874 (diff)
use SfxItemSetFixed in sw
Change-Id: I69e188d7599b7fc439f613cec0a0967ccb748b7e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123313 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/core/draw')
-rw-r--r--sw/source/core/draw/dcontact.cxx14
-rw-r--r--sw/source/core/draw/dflyobj.cxx2
2 files changed, 6 insertions, 10 deletions
diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx
index 762b27251cbe..cb9618c44e8b 100644
--- a/sw/source/core/draw/dcontact.cxx
+++ b/sw/source/core/draw/dcontact.cxx
@@ -1088,7 +1088,7 @@ static void lcl_textBoxSizeNotify(SwFrameFormat* pFormat)
if (SwTextBoxHelper::isTextBox(pFormat, RES_DRAWFRMFMT))
{
// Just notify the textbox that the size has changed, the actual object size is not interesting.
- SfxItemSet aResizeSet(pFormat->GetDoc()->GetAttrPool(), svl::Items<RES_FRM_SIZE, RES_FRM_SIZE>);
+ SfxItemSetFixed<RES_FRM_SIZE, RES_FRM_SIZE> aResizeSet(pFormat->GetDoc()->GetAttrPool());
SwFormatFrameSize aSize;
aResizeSet.Put(aSize);
SwTextBoxHelper::syncFlyFrameAttr(*pFormat, aResizeSet, pFormat->FindRealSdrObject());
@@ -1283,8 +1283,7 @@ void SwDrawContact::Changed_( const SdrObject& rObj,
assert(!"<SwDrawContact::Changed_(..)> - unsupported layout direction");
}
}
- SfxItemSet aSet( GetFormat()->GetDoc()->GetAttrPool(),
- svl::Items<RES_VERT_ORIENT, RES_HORI_ORIENT> );
+ SfxItemSetFixed<RES_VERT_ORIENT, RES_HORI_ORIENT> aSet( GetFormat()->GetDoc()->GetAttrPool() );
const SwFormatVertOrient& rVert = GetFormat()->GetVertOrient();
if ( nYPosDiff != 0 )
{
@@ -1354,9 +1353,8 @@ void SwDrawContact::Changed_( const SdrObject& rObj,
const bool bEnableSetModified = pDoc->getIDocumentState().IsEnableSetModified();
pDoc->getIDocumentState().SetEnableSetModified(false);
- SfxItemSet aSyncSet(
- pDoc->GetAttrPool(),
- svl::Items<RES_VERT_ORIENT, RES_HORI_ORIENT, RES_ANCHOR, RES_ANCHOR>);
+ SfxItemSetFixed<RES_VERT_ORIENT, RES_HORI_ORIENT, RES_ANCHOR, RES_ANCHOR>
+ aSyncSet( pDoc->GetAttrPool() );
aSyncSet.Put(GetFormat()->GetHoriOrient());
bool bRelToTableCell(false);
aSyncSet.Put(SwFormatVertOrient(pAnchoredDrawObj->GetRelPosToPageFrame(false, bRelToTableCell).getY(),
@@ -1367,9 +1365,7 @@ void SwDrawContact::Changed_( const SdrObject& rObj,
auto pSdrObj = const_cast<SdrObject*>(&rObj);
if (pSdrObj != GetFormat()->FindRealSdrObject())
{
- SfxItemSet aSet(
- pDoc->GetAttrPool(),
- svl::Items<RES_FRM_SIZE, RES_FRM_SIZE>);
+ SfxItemSetFixed<RES_FRM_SIZE, RES_FRM_SIZE> aSet( pDoc->GetAttrPool() );
aSet.Put(aSyncSet);
aSet.Put(pSdrObj->GetMergedItem(RES_FRM_SIZE));
diff --git a/sw/source/core/draw/dflyobj.cxx b/sw/source/core/draw/dflyobj.cxx
index 6d0a1ee0d917..d5497f9f2098 100644
--- a/sw/source/core/draw/dflyobj.cxx
+++ b/sw/source/core/draw/dflyobj.cxx
@@ -867,7 +867,7 @@ void SwVirtFlyDrawObj::NbcCrop(const basegfx::B2DPoint& rRef, double fxFact, dou
Fraction(fyFact));
// Get old values for crop in 10th of mm
- SfxItemSet aSet( pSh->GetAttrPool(), svl::Items<RES_GRFATR_CROPGRF, RES_GRFATR_CROPGRF> );
+ SfxItemSetFixed<RES_GRFATR_CROPGRF, RES_GRFATR_CROPGRF> aSet( pSh->GetAttrPool() );
pSh->GetCurAttr( aSet );
SwCropGrf aCrop( aSet.Get(RES_GRFATR_CROPGRF) );