diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-09-01 15:18:17 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-09-01 15:18:17 +0200 |
commit | edf7c73d457f01831ba1ad2fb4aca1a35d7c2549 (patch) | |
tree | 4e4ac70dd161a786bd2d8ebe9eba2bcf64fa7f02 /svx | |
parent | Consistency around SfxBoolItem in svx/svx3ditems.hxx (diff) | |
download | core-edf7c73d457f01831ba1ad2fb4aca1a35d7c2549.tar.gz core-edf7c73d457f01831ba1ad2fb4aca1a35d7c2549.zip |
Consistency around SfxUInt16Item in svx/svx3ditems.hxx
...similar to what has been done for svx/sdtmfitm.hxx in
68969cc61adecac481ae9656978ef952f435b310 "Consistency around SdrMetricItem."
Change-Id: I2e467df03a34d694214e0560476cb7fd76ef0735
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/customshapes/EnhancedCustomShape3d.cxx | 4 | ||||
-rw-r--r-- | svx/source/engine3d/float3d.cxx | 16 | ||||
-rw-r--r-- | svx/source/engine3d/svx3ditems.cxx | 17 | ||||
-rw-r--r-- | svx/source/sdr/primitive2d/sdrattributecreator.cxx | 2 | ||||
-rw-r--r-- | svx/source/sdr/primitive3d/sdrattributecreator3d.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdattr.cxx | 8 |
6 files changed, 16 insertions, 33 deletions
diff --git a/svx/source/customshapes/EnhancedCustomShape3d.cxx b/svx/source/customshapes/EnhancedCustomShape3d.cxx index 1068f558c9e5..fbaf0b43a063 100644 --- a/svx/source/customshapes/EnhancedCustomShape3d.cxx +++ b/svx/source/customshapes/EnhancedCustomShape3d.cxx @@ -336,7 +336,7 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con drawing::FillStyle eFillStyle( ITEMVALUE( aSet, XATTR_FILLSTYLE, XFillStyleItem ) ); pScene->GetProperties().SetObjectItem( Svx3DShadeModeItem( 0 ) ); - aSet.Put( Svx3DPercentDiagonalItem( 0 ) ); + aSet.Put( makeSvx3DPercentDiagonalItem( 0 ) ); aSet.Put( Svx3DTextureModeItem( 1 ) ); aSet.Put( Svx3DNormalsKindItem( 1 ) ); @@ -720,7 +720,7 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con nIntensity = 0; nIntensity = 100 - nIntensity; pScene->GetProperties().SetObjectItem( Svx3DMaterialSpecularItem( aSpecularCol ) ); - pScene->GetProperties().SetObjectItem( Svx3DMaterialSpecularIntensityItem( (sal_uInt16)nIntensity ) ); + pScene->GetProperties().SetObjectItem( makeSvx3DMaterialSpecularIntensityItem( (sal_uInt16)nIntensity ) ); pScene->SetLogicRect( CalculateNewSnapRect( pCustomShape, aSnapRect, aBoundRect2d, pMap ) ); diff --git a/svx/source/engine3d/float3d.cxx b/svx/source/engine3d/float3d.cxx index f77ad603eb68..cc74d7c280a3 100644 --- a/svx/source/engine3d/float3d.cxx +++ b/svx/source/engine3d/float3d.cxx @@ -733,7 +733,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) eState = rAttrs.GetItemState(SDRATTR_3DOBJ_PERCENT_DIAGONAL); if( eState != SFX_ITEM_DONTCARE ) { - sal_uInt16 nValue = ((const Svx3DPercentDiagonalItem&)rAttrs.Get(SDRATTR_3DOBJ_PERCENT_DIAGONAL)).GetValue(); + sal_uInt16 nValue = ((const SfxUInt16Item&)rAttrs.Get(SDRATTR_3DOBJ_PERCENT_DIAGONAL)).GetValue(); if( nValue != aMtrPercentDiagonal.GetValue() ) { aMtrPercentDiagonal.SetValue( nValue ); @@ -758,7 +758,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) eState = rAttrs.GetItemState(SDRATTR_3DOBJ_BACKSCALE); if( eState != SFX_ITEM_DONTCARE ) { - sal_uInt16 nValue = ((const Svx3DBackscaleItem&)rAttrs.Get(SDRATTR_3DOBJ_BACKSCALE)).GetValue(); + sal_uInt16 nValue = ((const SfxUInt16Item&)rAttrs.Get(SDRATTR_3DOBJ_BACKSCALE)).GetValue(); if( nValue != aMtrBackscale.GetValue() ) { aMtrBackscale.SetValue( nValue ); @@ -922,7 +922,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) eState = rAttrs.GetItemState(SDRATTR_3DSCENE_SHADOW_SLANT); if( eState != SFX_ITEM_DONTCARE ) { - sal_uInt16 nValue = ((const Svx3DShadowSlantItem&)rAttrs.Get(SDRATTR_3DSCENE_SHADOW_SLANT)).GetValue(); + sal_uInt16 nValue = ((const SfxUInt16Item&)rAttrs.Get(SDRATTR_3DSCENE_SHADOW_SLANT)).GetValue(); if( nValue != aMtrSlant.GetValue() ) { aMtrSlant.SetValue( nValue ); @@ -1608,7 +1608,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) eState = rAttrs.GetItemState(SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY); if( eState != SFX_ITEM_DONTCARE ) { - sal_uInt16 nValue = ((const Svx3DMaterialSpecularIntensityItem&)rAttrs.Get(SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY)).GetValue(); + sal_uInt16 nValue = ((const SfxUInt16Item&)rAttrs.Get(SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY)).GetValue(); if( nValue != aMtrMatSpecularIntensity.GetValue() ) { aMtrMatSpecularIntensity.SetValue( nValue ); @@ -1793,7 +1793,7 @@ void Svx3DWin::GetAttr( SfxItemSet& rAttrs ) if( !aMtrPercentDiagonal.IsEmptyFieldValue() ) { sal_uInt16 nValue = (sal_uInt16) aMtrPercentDiagonal.GetValue(); - rAttrs.Put(Svx3DPercentDiagonalItem(nValue)); + rAttrs.Put(makeSvx3DPercentDiagonalItem(nValue)); } else rAttrs.InvalidateItem(SDRATTR_3DOBJ_PERCENT_DIAGONAL); @@ -1802,7 +1802,7 @@ void Svx3DWin::GetAttr( SfxItemSet& rAttrs ) if( !aMtrBackscale.IsEmptyFieldValue() ) { sal_uInt16 nValue = (sal_uInt16)aMtrBackscale.GetValue(); - rAttrs.Put(Svx3DBackscaleItem(nValue)); + rAttrs.Put(makeSvx3DBackscaleItem(nValue)); } else rAttrs.InvalidateItem(SDRATTR_3DOBJ_BACKSCALE); @@ -1878,7 +1878,7 @@ void Svx3DWin::GetAttr( SfxItemSet& rAttrs ) if( !aMtrSlant.IsEmptyFieldValue() ) { sal_uInt16 nValue2 = (sal_uInt16) aMtrSlant.GetValue(); - rAttrs.Put(Svx3DShadowSlantItem(nValue2)); + rAttrs.Put(makeSvx3DShadowSlantItem(nValue2)); } else rAttrs.InvalidateItem(SDRATTR_3DSCENE_SHADOW_SLANT); @@ -2209,7 +2209,7 @@ void Svx3DWin::GetAttr( SfxItemSet& rAttrs ) if( !aMtrMatSpecularIntensity.IsEmptyFieldValue() ) { sal_uInt16 nValue2 = (sal_uInt16) aMtrMatSpecularIntensity.GetValue(); - rAttrs.Put(Svx3DMaterialSpecularIntensityItem(nValue2)); + rAttrs.Put(makeSvx3DMaterialSpecularIntensityItem(nValue2)); } else rAttrs.InvalidateItem(SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY); diff --git a/svx/source/engine3d/svx3ditems.cxx b/svx/source/engine3d/svx3ditems.cxx index 65276737ea40..4242a0b25e10 100644 --- a/svx/source/engine3d/svx3ditems.cxx +++ b/svx/source/engine3d/svx3ditems.cxx @@ -31,15 +31,6 @@ using namespace ::rtl; using namespace ::com::sun::star; - -Svx3DPercentDiagonalItem::Svx3DPercentDiagonalItem(sal_uInt16 nVal) -: SfxUInt16Item(SDRATTR_3DOBJ_PERCENT_DIAGONAL, nVal) -{} - -Svx3DBackscaleItem::Svx3DBackscaleItem(sal_uInt16 nVal) -: SfxUInt16Item(SDRATTR_3DOBJ_BACKSCALE, nVal) -{} - // #i28528# // Added extra Item (Bool) for chart2 to be able to show reduced line geometry @@ -91,10 +82,6 @@ Svx3DMaterialSpecularItem::Svx3DMaterialSpecularItem(const Color& rCol) : SvxColorItem(rCol, SDRATTR_3DOBJ_MAT_SPECULAR) {} -Svx3DMaterialSpecularIntensityItem::Svx3DMaterialSpecularIntensityItem(sal_uInt16 nVal) -: SfxUInt16Item(SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY, nVal) -{} - Svx3DTextureKindItem::Svx3DTextureKindItem(sal_uInt16 nVal) : SfxUInt16Item(SDRATTR_3DOBJ_TEXTURE_KIND, nVal) {} @@ -175,10 +162,6 @@ Svx3DLightDirection8Item::Svx3DLightDirection8Item(const basegfx::B3DVector& rVe : SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_8, rVec) {} -Svx3DShadowSlantItem::Svx3DShadowSlantItem(sal_uInt16 nVal) -: SfxUInt16Item(SDRATTR_3DSCENE_SHADOW_SLANT, nVal) -{} - Svx3DShadeModeItem::Svx3DShadeModeItem(sal_uInt16 nVal) : SfxUInt16Item(SDRATTR_3DSCENE_SHADE_MODE, nVal) {} diff --git a/svx/source/sdr/primitive2d/sdrattributecreator.cxx b/svx/source/sdr/primitive2d/sdrattributecreator.cxx index 7122a9a92be8..48e685008503 100644 --- a/svx/source/sdr/primitive2d/sdrattributecreator.cxx +++ b/svx/source/sdr/primitive2d/sdrattributecreator.cxx @@ -891,7 +891,7 @@ namespace drawinglayer const double fDistance(((const SfxUInt32Item&)rSet.Get(SDRATTR_3DSCENE_DISTANCE)).GetValue()); // get shadow slant - const double fShadowSlant(F_PI180 * ((const Svx3DShadowSlantItem&)rSet.Get(SDRATTR_3DSCENE_SHADOW_SLANT)).GetValue()); + const double fShadowSlant(F_PI180 * ((const SfxUInt16Item&)rSet.Get(SDRATTR_3DSCENE_SHADOW_SLANT)).GetValue()); // get shade mode ::com::sun::star::drawing::ShadeMode aShadeMode(::com::sun::star::drawing::ShadeMode_FLAT); diff --git a/svx/source/sdr/primitive3d/sdrattributecreator3d.cxx b/svx/source/sdr/primitive3d/sdrattributecreator3d.cxx index 07d70fac7174..b9fca752fea0 100644 --- a/svx/source/sdr/primitive3d/sdrattributecreator3d.cxx +++ b/svx/source/sdr/primitive3d/sdrattributecreator3d.cxx @@ -125,7 +125,7 @@ namespace drawinglayer const ::basegfx::BColor aEmission(((const Svx3DMaterialEmissionItem&)rSet.Get(SDRATTR_3DOBJ_MAT_EMISSION)).GetValue().getBColor()); // get specular intensity - sal_uInt16 nSpecularIntensity(((const Svx3DMaterialSpecularIntensityItem&)rSet.Get(SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY)).GetValue()); + sal_uInt16 nSpecularIntensity(((const SfxUInt16Item&)rSet.Get(SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY)).GetValue()); if(nSpecularIntensity > 128) { diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx index c57392db8b1d..83aec84f67a1 100644 --- a/svx/source/svdraw/svdattr.cxx +++ b/svx/source/svdraw/svdattr.cxx @@ -247,8 +247,8 @@ SdrItemPool::SdrItemPool( mppLocalPoolDefaults[ SDRATTR_GRAFINVERT - SDRATTR_START] = new SdrGrafInvertItem; mppLocalPoolDefaults[ SDRATTR_GRAFMODE - SDRATTR_START] = new SdrGrafModeItem; mppLocalPoolDefaults[ SDRATTR_GRAFCROP - SDRATTR_START] = new SdrGrafCropItem; - mppLocalPoolDefaults[ SDRATTR_3DOBJ_PERCENT_DIAGONAL - SDRATTR_START ] = new Svx3DPercentDiagonalItem; - mppLocalPoolDefaults[ SDRATTR_3DOBJ_BACKSCALE - SDRATTR_START ] = new Svx3DBackscaleItem; + mppLocalPoolDefaults[ SDRATTR_3DOBJ_PERCENT_DIAGONAL - SDRATTR_START ] = new SfxUInt16Item(SDRATTR_3DOBJ_PERCENT_DIAGONAL, 10); + mppLocalPoolDefaults[ SDRATTR_3DOBJ_BACKSCALE - SDRATTR_START ] = new SfxUInt16Item(SDRATTR_3DOBJ_BACKSCALE, 100); mppLocalPoolDefaults[ SDRATTR_3DOBJ_DEPTH - SDRATTR_START ] = new SfxUInt32Item(SDRATTR_3DOBJ_DEPTH, 1000); mppLocalPoolDefaults[ SDRATTR_3DOBJ_HORZ_SEGS - SDRATTR_START ] = new SfxUInt32Item(SDRATTR_3DOBJ_HORZ_SEGS, 24); mppLocalPoolDefaults[ SDRATTR_3DOBJ_VERT_SEGS - SDRATTR_START ] = new SfxUInt32Item(SDRATTR_3DOBJ_VERT_SEGS, 24); @@ -262,7 +262,7 @@ SdrItemPool::SdrItemPool( mppLocalPoolDefaults[ SDRATTR_3DOBJ_MAT_COLOR - SDRATTR_START ] = new Svx3DMaterialColorItem; mppLocalPoolDefaults[ SDRATTR_3DOBJ_MAT_EMISSION - SDRATTR_START ] = new Svx3DMaterialEmissionItem; mppLocalPoolDefaults[ SDRATTR_3DOBJ_MAT_SPECULAR - SDRATTR_START ] = new Svx3DMaterialSpecularItem; - mppLocalPoolDefaults[ SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY - SDRATTR_START ] = new Svx3DMaterialSpecularIntensityItem; + mppLocalPoolDefaults[ SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY - SDRATTR_START ] = new SfxUInt16Item(SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY, 15); mppLocalPoolDefaults[ SDRATTR_3DOBJ_TEXTURE_KIND - SDRATTR_START ] = new Svx3DTextureKindItem; mppLocalPoolDefaults[ SDRATTR_3DOBJ_TEXTURE_MODE - SDRATTR_START ] = new Svx3DTextureModeItem; mppLocalPoolDefaults[ SDRATTR_3DOBJ_TEXTURE_FILTER - SDRATTR_START ] = new SfxBoolItem(SDRATTR_3DOBJ_TEXTURE_FILTER, false); @@ -301,7 +301,7 @@ SdrItemPool::SdrItemPool( mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTDIRECTION_6 - SDRATTR_START ] = new Svx3DLightDirection6Item; mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTDIRECTION_7 - SDRATTR_START ] = new Svx3DLightDirection7Item; mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTDIRECTION_8 - SDRATTR_START ] = new Svx3DLightDirection8Item; - mppLocalPoolDefaults[ SDRATTR_3DSCENE_SHADOW_SLANT - SDRATTR_START ] = new Svx3DShadowSlantItem; + mppLocalPoolDefaults[ SDRATTR_3DSCENE_SHADOW_SLANT - SDRATTR_START ] = new SfxUInt16Item(SDRATTR_3DSCENE_SHADOW_SLANT, 0); mppLocalPoolDefaults[ SDRATTR_3DSCENE_SHADE_MODE - SDRATTR_START ] = new Svx3DShadeModeItem; mppLocalPoolDefaults[ SDRATTR_CUSTOMSHAPE_ENGINE - SDRATTR_START ] = new SdrCustomShapeEngineItem; mppLocalPoolDefaults[ SDRATTR_CUSTOMSHAPE_DATA - SDRATTR_START ] = new SdrCustomShapeDataItem; |