use SfxUInt16Item for SID_ATTR_TRANSFORM_SIZE_POINT

Change-Id: Id7762047a17a1652c91761d3c910eadd3393040b
Reviewed-on: https://gerrit.libreoffice.org/80237
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin 2019-10-04 15:45:55 +02:00 committed by Noel Grandin
parent 594923028b
commit 191794ab56
5 changed files with 5 additions and 6 deletions

View file

@ -68,7 +68,7 @@ static void lcl_getPositionAndSizeFromItemSet( const SfxItemSet& rItemSet, awt::
if (rItemSet.GetItemState(SID_ATTR_TRANSFORM_HEIGHT,true,&pPoolItem)==SfxItemState::SET)
nSizY=static_cast<const SfxUInt32Item*>(pPoolItem)->GetValue();
if (rItemSet.GetItemState(SID_ATTR_TRANSFORM_SIZE_POINT,true,&pPoolItem)==SfxItemState::SET)
eRP=static_cast<RectPoint>(static_cast<const SfxAllEnumItem*>(pPoolItem)->GetValue());
eRP=static_cast<RectPoint>(static_cast<const SfxUInt16Item*>(pPoolItem)->GetValue());
switch( eRP )
{

View file

@ -877,7 +877,7 @@ bool SvxSwPosSizeTabPage::FillItemSet( SfxItemSet* rSet)
rSet->Put( SfxUInt32Item( GetWhich( SID_ATTR_TRANSFORM_WIDTH ), nWidth ) );
rSet->Put( SfxUInt32Item( GetWhich( SID_ATTR_TRANSFORM_HEIGHT ), nHeight ) );
//this item is required by SdrEditView::SetGeoAttrToMarked()
rSet->Put( SfxAllEnumItem( GetWhich( SID_ATTR_TRANSFORM_SIZE_POINT ), sal_uInt16(RectPoint::LT) ) );
rSet->Put( SfxUInt16Item( GetWhich( SID_ATTR_TRANSFORM_SIZE_POINT ), sal_uInt16(RectPoint::LT) ) );
bModified = true;
}

View file

@ -967,7 +967,7 @@ bool SvxPositionSizeTabPage::FillItemSet( SfxItemSet* rOutAttrs )
// put Width & Height to itemset
rOutAttrs->Put( SfxUInt32Item( GetWhich( SID_ATTR_TRANSFORM_WIDTH ), static_cast<sal_uInt32>(lWidth) ) );
rOutAttrs->Put( SfxUInt32Item( GetWhich( SID_ATTR_TRANSFORM_HEIGHT ), static_cast<sal_uInt32>(lHeight) ) );
rOutAttrs->Put( SfxAllEnumItem( GetWhich( SID_ATTR_TRANSFORM_SIZE_POINT ), sal::static_int_cast< sal_uInt16 >( meRP ) ) );
rOutAttrs->Put( SfxUInt16Item( GetWhich( SID_ATTR_TRANSFORM_SIZE_POINT ), sal::static_int_cast< sal_uInt16 >( meRP ) ) );
bModified = true;
}

View file

@ -25,7 +25,6 @@
#include <svl/typedwhich.hxx>
class SfxInt32Item;
class SfxAllEnumItem;
class SfxPointItem;
class SfxBoolItem;
class SfxUInt32Item;
@ -236,7 +235,7 @@ class SvxSetItem;
#define SID_ATTR_TRANSFORM_POS_Y TypedWhichId<SfxInt32Item>( SID_SVX_START + 89 )
#define SID_ATTR_TRANSFORM_WIDTH TypedWhichId<SfxUInt32Item>( SID_SVX_START + 90 )
#define SID_ATTR_TRANSFORM_HEIGHT TypedWhichId<SfxUInt32Item>( SID_SVX_START + 91 )
#define SID_ATTR_TRANSFORM_SIZE_POINT TypedWhichId<SfxAllEnumItem>( SID_SVX_START + 92 )
#define SID_ATTR_TRANSFORM_SIZE_POINT TypedWhichId<SfxUInt16Item>( SID_SVX_START + 92 )
#define SID_ATTR_TRANSFORM_ROT_X TypedWhichId<SfxInt32Item>( SID_SVX_START + 93 )
#define SID_ATTR_TRANSFORM_ROT_Y TypedWhichId<SfxInt32Item>( SID_SVX_START + 94 )
#define SID_ATTR_TRANSFORM_ANGLE TypedWhichId<SfxInt32Item>( SID_SVX_START + 95 )

View file

@ -843,7 +843,7 @@ void PosSizePropertyPanel::executeSize()
// put Width & Height to itemset
SfxUInt32Item aWidthItem( SID_ATTR_TRANSFORM_WIDTH, static_cast<sal_uInt32>(lWidth));
SfxUInt32Item aHeightItem( SID_ATTR_TRANSFORM_HEIGHT, static_cast<sal_uInt32>(lHeight));
SfxAllEnumItem aPointItem (SID_ATTR_TRANSFORM_SIZE_POINT, sal_uInt16(RectPoint::LT));
SfxUInt16Item aPointItem (SID_ATTR_TRANSFORM_SIZE_POINT, sal_uInt16(RectPoint::LT));
const sal_Int32 nCombinedContext(maContext.GetCombinedContext_DI());
if( nCombinedContext == CombinedEnumContext(Application::WriterVariants, Context::Graphic)