summaryrefslogtreecommitdiff
path: root/sw/source/core/draw
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2021-07-19 11:04:45 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2021-07-19 16:33:01 +0200
commitb1668edf7fa3ad8c32bcc4d73821770f2df011ca (patch)
treecb93a00ca59f770e616668af15fdc6a50e1627a1 /sw/source/core/draw
parent5b3c530016927d3e91e3124e124f7b428ab285ac (diff)
Move svl::Items to include/svl/whichranges.hxx, and unify its usage
... in WhichRangesContainer and SfxItemSet ctors. Now it's not needed to explicitly use 'value' in WhichRangesContainer's ctor, or create an instance for use in SfxItemSet ctor (svl::Items is already defined as a template value of corresponding type). Instead of WhichRangesContainer Foo(svl::Items<1, 2>::value); SfxItemSet Bar(rItemPool, svl::Items<1, 2>{}); now use: WhichRangesContainer Foo(svl::Items<1, 2>); SfxItemSet Bar(rItemPool, svl::Items<1, 2>); Change-Id: I4681d952b6442732025e5a26768098878907a238 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119157 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sw/source/core/draw')
-rw-r--r--sw/source/core/draw/dcontact.cxx6
-rw-r--r--sw/source/core/draw/dflyobj.cxx2
2 files changed, 4 insertions, 4 deletions
diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx
index 512ce30da3ff..189430f0363f 100644
--- a/sw/source/core/draw/dcontact.cxx
+++ b/sw/source/core/draw/dcontact.cxx
@@ -1089,7 +1089,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>{});
+ SfxItemSet aResizeSet(pFormat->GetDoc()->GetAttrPool(), svl::Items<RES_FRM_SIZE, RES_FRM_SIZE>);
SwFormatFrameSize aSize;
aResizeSet.Put(aSize);
SwTextBoxHelper::syncFlyFrameAttr(*pFormat, aResizeSet);
@@ -1279,7 +1279,7 @@ void SwDrawContact::Changed_( const SdrObject& rObj,
}
}
SfxItemSet aSet( GetFormat()->GetDoc()->GetAttrPool(),
- svl::Items<RES_VERT_ORIENT, RES_HORI_ORIENT>{} );
+ svl::Items<RES_VERT_ORIENT, RES_HORI_ORIENT> );
const SwFormatVertOrient& rVert = GetFormat()->GetVertOrient();
if ( nYPosDiff != 0 )
{
@@ -1351,7 +1351,7 @@ void SwDrawContact::Changed_( const SdrObject& rObj,
pDoc->getIDocumentState().SetEnableSetModified(false);
SfxItemSet aSyncSet(pDoc->GetAttrPool(),
- svl::Items<RES_VERT_ORIENT, RES_ANCHOR>{});
+ svl::Items<RES_VERT_ORIENT, RES_ANCHOR>);
aSyncSet.Put(SwFormatVertOrient(aObjRect.Top() - rPageFrame->getFrameArea().Top(),
text::VertOrientation::NONE,
text::RelOrientation::PAGE_FRAME));
diff --git a/sw/source/core/draw/dflyobj.cxx b/sw/source/core/draw/dflyobj.cxx
index a6a834efdb5f..fcb598966280 100644
--- a/sw/source/core/draw/dflyobj.cxx
+++ b/sw/source/core/draw/dflyobj.cxx
@@ -868,7 +868,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>{} );
+ SfxItemSet aSet( pSh->GetAttrPool(), svl::Items<RES_GRFATR_CROPGRF, RES_GRFATR_CROPGRF> );
pSh->GetCurAttr( aSet );
SwCropGrf aCrop( aSet.Get(RES_GRFATR_CROPGRF) );