diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-06-19 09:32:45 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-06-19 09:38:05 +0200 |
commit | 1e3a00f0c772a76a1dd76b8272e2c35a1802d574 (patch) | |
tree | a1eadac1680f1e46c789964200aa8a61bb659189 /sc/source/ui/drawfunc | |
parent | 9fe114e78f1285397dcd2a0d2e3d6afc3024fa66 (diff) |
Make SfxItemSet ranges correct by construction: Fix static cases
...with the aid of an extended compilerplugins/clang/store/sfxitemsetrewrite.cxx
(which in turn needed a small addition to compilerplugins/clang/check.hxx).
Enable svl::detail::validGap check for the static case, but keep it disabled for
now for the dynamic case.
Change-Id: I4846ba8e99aff94a86518e2cb5044e575093386e
Diffstat (limited to 'sc/source/ui/drawfunc')
-rw-r--r-- | sc/source/ui/drawfunc/drtxtob1.cxx | 12 | ||||
-rw-r--r-- | sc/source/ui/drawfunc/fuconcustomshape.cxx | 26 |
2 files changed, 19 insertions, 19 deletions
diff --git a/sc/source/ui/drawfunc/drtxtob1.cxx b/sc/source/ui/drawfunc/drtxtob1.cxx index f6c1e339eb6b..bfe52a9d8156 100644 --- a/sc/source/ui/drawfunc/drtxtob1.cxx +++ b/sc/source/ui/drawfunc/drtxtob1.cxx @@ -71,13 +71,11 @@ bool ScDrawTextObjectBar::ExecuteParaDlg( const SfxItemSet& rArgs, SfxItemSet& rOutSet ) { SfxItemPool* pArgPool = rArgs.GetPool(); - SfxItemSet aNewAttr( *pArgPool, - 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>{} ); + SfxItemSet aNewAttr( + *pArgPool, + svl::Items< + EE_ITEMS_START, EE_ITEMS_END, + SID_ATTR_PARA_PAGEBREAK, SID_ATTR_PARA_WIDOWS>{}); aNewAttr.Put( rArgs ); // Values have been taken over once to show the dialog. diff --git a/sc/source/ui/drawfunc/fuconcustomshape.cxx b/sc/source/ui/drawfunc/fuconcustomshape.cxx index 9cc4cd982c8f..b1ff194f5a13 100644 --- a/sc/source/ui/drawfunc/fuconcustomshape.cxx +++ b/sc/source/ui/drawfunc/fuconcustomshape.cxx @@ -167,18 +167,20 @@ void FuConstCustomShape::SetAttributes( SdrObject* pObj ) if( pSourceObj ) { const SfxItemSet& rSource = pSourceObj->GetMergedItemSet(); - SfxItemSet aDest( pObj->GetModel()->GetItemPool(), // ranges from SdrAttrObj - svl::Items<SDRATTR_START, SDRATTR_SHADOW_LAST, - SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST, - SDRATTR_TEXTDIRECTION, SDRATTR_TEXTDIRECTION, - // Graphic Attributes - SDRATTR_GRAF_FIRST, SDRATTR_GRAF_LAST, - // 3d Properties - SDRATTR_3D_FIRST, SDRATTR_3D_LAST, - // CustomShape properties - SDRATTR_CUSTOMSHAPE_FIRST, SDRATTR_CUSTOMSHAPE_LAST, - // range from SdrTextObj - EE_ITEMS_START, EE_ITEMS_END>{}); + SfxItemSet aDest( + pObj->GetModel()->GetItemPool(), + svl::Items< + // Ranges from SdrAttrObj: + SDRATTR_START, SDRATTR_SHADOW_LAST, + SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST, + SDRATTR_TEXTDIRECTION, + SDRATTR_TEXTDIRECTION, + // Graphic attributes, 3D properties, + // CustomShape properties: + SDRATTR_GRAF_FIRST, + SDRATTR_CUSTOMSHAPE_LAST, + // Range from SdrTextObj: + EE_ITEMS_START, EE_ITEMS_END>{}); aDest.Set( rSource ); pObj->SetMergedItemSet( aDest ); sal_Int32 nAngle = pSourceObj->GetRotateAngle(); |