diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-09-01 16:16:49 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-09-01 16:16:49 +0200 |
commit | e5d6ae0c2efcf8edb224faa294be6b0baa636137 (patch) | |
tree | e17f5136b0d854fcb08ca92ebaef2e1350e5c301 /svx | |
parent | Missing Clone overrides (diff) | |
download | core-e5d6ae0c2efcf8edb224faa294be6b0baa636137.tar.gz core-e5d6ae0c2efcf8edb224faa294be6b0baa636137.zip |
Consistency around SvxColorItem in svx/svx3ditems.hxx
...similar to what has been done for svx/sdtmfitm.hxx in
68969cc61adecac481ae9656978ef952f435b310 "Consistency around SdrMetricItem."
Change-Id: If26ab3229871d2d6a7e4e7e8f79f4cb927b96930
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/customshapes/EnhancedCustomShape3d.cxx | 10 | ||||
-rw-r--r-- | svx/source/dialog/dlgctl3d.cxx | 16 | ||||
-rw-r--r-- | svx/source/engine3d/float3d.cxx | 60 | ||||
-rw-r--r-- | svx/source/engine3d/svx3ditems.cxx | 48 | ||||
-rw-r--r-- | svx/source/sdr/primitive2d/sdrattributecreator.cxx | 18 | ||||
-rw-r--r-- | svx/source/sdr/primitive3d/sdrattributecreator3d.cxx | 4 | ||||
-rw-r--r-- | svx/source/svdraw/svdattr.cxx | 24 |
7 files changed, 66 insertions, 114 deletions
diff --git a/svx/source/customshapes/EnhancedCustomShape3d.cxx b/svx/source/customshapes/EnhancedCustomShape3d.cxx index fbaf0b43a063..eac5e63211a2 100644 --- a/svx/source/customshapes/EnhancedCustomShape3d.cxx +++ b/svx/source/customshapes/EnhancedCustomShape3d.cxx @@ -679,14 +679,14 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con if ( nAmbientColor > 255 ) nAmbientColor = 255; Color aGlobalAmbientColor( (sal_uInt8)nAmbientColor, (sal_uInt8)nAmbientColor, (sal_uInt8)nAmbientColor ); - pScene->GetProperties().SetObjectItem( Svx3DAmbientcolorItem( aGlobalAmbientColor ) ); + pScene->GetProperties().SetObjectItem( makeSvx3DAmbientcolorItem( aGlobalAmbientColor ) ); sal_uInt8 nSpotLight1 = (sal_uInt8)( fLightIntensity * 255.0 ); basegfx::B3DVector aSpotLight1( aFirstLightDirection.DirectionX, - ( aFirstLightDirection.DirectionY ), -( aFirstLightDirection.DirectionZ ) ); aSpotLight1.normalize(); pScene->GetProperties().SetObjectItem( makeSvx3DLightOnOff1Item( true ) ); Color aAmbientSpot1Color( nSpotLight1, nSpotLight1, nSpotLight1 ); - pScene->GetProperties().SetObjectItem( Svx3DLightcolor1Item( aAmbientSpot1Color ) ); + pScene->GetProperties().SetObjectItem( makeSvx3DLightcolor1Item( aAmbientSpot1Color ) ); pScene->GetProperties().SetObjectItem( Svx3DLightDirection1Item( aSpotLight1 ) ); sal_uInt8 nSpotLight2 = (sal_uInt8)( fLight2Intensity * 255.0 ); @@ -694,14 +694,14 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con aSpotLight2.normalize(); pScene->GetProperties().SetObjectItem( makeSvx3DLightOnOff2Item( true ) ); Color aAmbientSpot2Color( nSpotLight2, nSpotLight2, nSpotLight2 ); - pScene->GetProperties().SetObjectItem( Svx3DLightcolor2Item( aAmbientSpot2Color ) ); + pScene->GetProperties().SetObjectItem( makeSvx3DLightcolor2Item( aAmbientSpot2Color ) ); pScene->GetProperties().SetObjectItem( Svx3DLightDirection2Item( aSpotLight2 ) ); sal_uInt8 nSpotLight3 = 70; basegfx::B3DVector aSpotLight3( 0.0, 0.0, 1.0 ); pScene->GetProperties().SetObjectItem( makeSvx3DLightOnOff3Item( true ) ); Color aAmbientSpot3Color( nSpotLight3, nSpotLight3, nSpotLight3 ); - pScene->GetProperties().SetObjectItem( Svx3DLightcolor3Item( aAmbientSpot3Color ) ); + pScene->GetProperties().SetObjectItem( makeSvx3DLightcolor3Item( aAmbientSpot3Color ) ); pScene->GetProperties().SetObjectItem( Svx3DLightDirection3Item( aSpotLight3 ) ); double fSpecular = GetDouble( rGeometryItem, "Specularity", 0, NULL ) / 100; @@ -719,7 +719,7 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con else if ( nIntensity < 0 ) nIntensity = 0; nIntensity = 100 - nIntensity; - pScene->GetProperties().SetObjectItem( Svx3DMaterialSpecularItem( aSpecularCol ) ); + pScene->GetProperties().SetObjectItem( makeSvx3DMaterialSpecularItem( aSpecularCol ) ); pScene->GetProperties().SetObjectItem( makeSvx3DMaterialSpecularIntensityItem( (sal_uInt16)nIntensity ) ); pScene->SetLogicRect( CalculateNewSnapRect( pCustomShape, aSnapRect, aBoundRect2d, pMap ) ); diff --git a/svx/source/dialog/dlgctl3d.cxx b/svx/source/dialog/dlgctl3d.cxx index af8d771e3f5b..053fbb0794f4 100644 --- a/svx/source/dialog/dlgctl3d.cxx +++ b/svx/source/dialog/dlgctl3d.cxx @@ -916,14 +916,14 @@ Color Svx3DLightControl::GetLightColor(sal_uInt32 nNum) const switch(nNum) { - case 0 : return ((const Svx3DLightcolor1Item&)aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_1)).GetValue(); - case 1 : return ((const Svx3DLightcolor2Item&)aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_2)).GetValue(); - case 2 : return ((const Svx3DLightcolor3Item&)aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_3)).GetValue(); - case 3 : return ((const Svx3DLightcolor4Item&)aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_4)).GetValue(); - case 4 : return ((const Svx3DLightcolor5Item&)aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_5)).GetValue(); - case 5 : return ((const Svx3DLightcolor6Item&)aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_6)).GetValue(); - case 6 : return ((const Svx3DLightcolor7Item&)aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_7)).GetValue(); - case 7 : return ((const Svx3DLightcolor8Item&)aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_8)).GetValue(); + case 0 : return ((const SvxColorItem&)aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_1)).GetValue(); + case 1 : return ((const SvxColorItem&)aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_2)).GetValue(); + case 2 : return ((const SvxColorItem&)aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_3)).GetValue(); + case 3 : return ((const SvxColorItem&)aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_4)).GetValue(); + case 4 : return ((const SvxColorItem&)aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_5)).GetValue(); + case 5 : return ((const SvxColorItem&)aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_6)).GetValue(); + case 6 : return ((const SvxColorItem&)aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_7)).GetValue(); + case 7 : return ((const SvxColorItem&)aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_8)).GetValue(); } } diff --git a/svx/source/engine3d/float3d.cxx b/svx/source/engine3d/float3d.cxx index cc74d7c280a3..febf4d025dc2 100644 --- a/svx/source/engine3d/float3d.cxx +++ b/svx/source/engine3d/float3d.cxx @@ -993,7 +993,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTCOLOR_1); if( eState != SFX_ITEM_DONTCARE ) { - aColor = ((const Svx3DLightcolor1Item&)rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_1)).GetValue(); + aColor = ((const SvxColorItem&)rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_1)).GetValue(); ColorLB* pLb = &aLbLight1; if( aColor != pLb->GetSelectEntryColor() ) { @@ -1042,7 +1042,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTCOLOR_2); if( eState != SFX_ITEM_DONTCARE ) { - aColor = ((const Svx3DLightcolor2Item&)rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_2)).GetValue(); + aColor = ((const SvxColorItem&)rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_2)).GetValue(); ColorLB* pLb = &aLbLight2; if( aColor != pLb->GetSelectEntryColor() ) { @@ -1091,7 +1091,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTCOLOR_3); if( eState != SFX_ITEM_DONTCARE ) { - aColor = ((const Svx3DLightcolor3Item&)rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_3)).GetValue(); + aColor = ((const SvxColorItem&)rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_3)).GetValue(); ColorLB* pLb = &aLbLight3; if( aColor != pLb->GetSelectEntryColor() ) { @@ -1140,7 +1140,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTCOLOR_4); if( eState != SFX_ITEM_DONTCARE ) { - aColor = ((const Svx3DLightcolor4Item&)rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_4)).GetValue(); + aColor = ((const SvxColorItem&)rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_4)).GetValue(); ColorLB* pLb = &aLbLight4; if( aColor != pLb->GetSelectEntryColor() ) { @@ -1189,7 +1189,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTCOLOR_5); if( eState != SFX_ITEM_DONTCARE ) { - aColor = ((const Svx3DLightcolor5Item&)rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_5)).GetValue(); + aColor = ((const SvxColorItem&)rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_5)).GetValue(); ColorLB* pLb = &aLbLight5; if( aColor != pLb->GetSelectEntryColor() ) { @@ -1238,7 +1238,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTCOLOR_6); if( eState != SFX_ITEM_DONTCARE ) { - aColor = ((const Svx3DLightcolor6Item&)rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_6)).GetValue(); + aColor = ((const SvxColorItem&)rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_6)).GetValue(); ColorLB* pLb = &aLbLight6; if( aColor != pLb->GetSelectEntryColor() ) { @@ -1287,7 +1287,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTCOLOR_7); if( eState != SFX_ITEM_DONTCARE ) { - aColor = ((const Svx3DLightcolor7Item&)rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_7)).GetValue(); + aColor = ((const SvxColorItem&)rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_7)).GetValue(); ColorLB* pLb = &aLbLight7; if( aColor != pLb->GetSelectEntryColor() ) { @@ -1336,7 +1336,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTCOLOR_8); if( eState != SFX_ITEM_DONTCARE ) { - aColor = ((const Svx3DLightcolor8Item&)rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_8)).GetValue(); + aColor = ((const SvxColorItem&)rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_8)).GetValue(); ColorLB* pLb = &aLbLight8; if( aColor != pLb->GetSelectEntryColor() ) { @@ -1385,7 +1385,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) eState = rAttrs.GetItemState(SDRATTR_3DSCENE_AMBIENTCOLOR); if( eState != SFX_ITEM_DONTCARE ) { - aColor = ((const Svx3DAmbientcolorItem&)rAttrs.Get(SDRATTR_3DSCENE_AMBIENTCOLOR)).GetValue(); + aColor = ((const SvxColorItem&)rAttrs.Get(SDRATTR_3DSCENE_AMBIENTCOLOR)).GetValue(); ColorLB* pLb = &aLbAmbientlight; if( aColor != pLb->GetSelectEntryColor() ) { @@ -1566,7 +1566,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) eState = rAttrs.GetItemState(SDRATTR_3DOBJ_MAT_EMISSION); if( eState != SFX_ITEM_DONTCARE ) { - aColor = ((const Svx3DMaterialEmissionItem&)rAttrs.Get(SDRATTR_3DOBJ_MAT_EMISSION)).GetValue(); + aColor = ((const SvxColorItem&)rAttrs.Get(SDRATTR_3DOBJ_MAT_EMISSION)).GetValue(); ColorLB* pLb = &aLbMatEmission; if( aColor != pLb->GetSelectEntryColor() ) { @@ -1587,7 +1587,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) eState = rAttrs.GetItemState(SDRATTR_3DOBJ_MAT_SPECULAR); if( eState != SFX_ITEM_DONTCARE ) { - aColor = ((const Svx3DMaterialSpecularItem&)rAttrs.Get(SDRATTR_3DOBJ_MAT_SPECULAR)).GetValue(); + aColor = ((const SvxColorItem&)rAttrs.Get(SDRATTR_3DOBJ_MAT_SPECULAR)).GetValue(); ColorLB* pLb = &aLbMatSpecular; if( aColor != pLb->GetSelectEntryColor() ) { @@ -1911,7 +1911,7 @@ void Svx3DWin::GetAttr( SfxItemSet& rAttrs ) if( aLbLight1.GetSelectEntryCount() ) { aColor = aLbLight1.GetSelectEntryColor(); - rAttrs.Put(Svx3DLightcolor1Item(aColor)); + rAttrs.Put(makeSvx3DLightcolor1Item(aColor)); } else rAttrs.InvalidateItem(SDRATTR_3DSCENE_LIGHTCOLOR_1); @@ -1936,7 +1936,7 @@ void Svx3DWin::GetAttr( SfxItemSet& rAttrs ) if( aLbLight2.GetSelectEntryCount() ) { aColor = aLbLight2.GetSelectEntryColor(); - rAttrs.Put(Svx3DLightcolor2Item(aColor)); + rAttrs.Put(makeSvx3DLightcolor2Item(aColor)); } else rAttrs.InvalidateItem(SDRATTR_3DSCENE_LIGHTCOLOR_2); @@ -1960,7 +1960,7 @@ void Svx3DWin::GetAttr( SfxItemSet& rAttrs ) if( aLbLight3.GetSelectEntryCount() ) { aColor = aLbLight3.GetSelectEntryColor(); - rAttrs.Put(Svx3DLightcolor3Item(aColor)); + rAttrs.Put(makeSvx3DLightcolor3Item(aColor)); } else rAttrs.InvalidateItem(SDRATTR_3DSCENE_LIGHTCOLOR_3); @@ -1984,7 +1984,7 @@ void Svx3DWin::GetAttr( SfxItemSet& rAttrs ) if( aLbLight4.GetSelectEntryCount() ) { aColor = aLbLight4.GetSelectEntryColor(); - rAttrs.Put(Svx3DLightcolor4Item(aColor)); + rAttrs.Put(makeSvx3DLightcolor4Item(aColor)); } else rAttrs.InvalidateItem(SDRATTR_3DSCENE_LIGHTCOLOR_4); @@ -2008,7 +2008,7 @@ void Svx3DWin::GetAttr( SfxItemSet& rAttrs ) if( aLbLight5.GetSelectEntryCount() ) { aColor = aLbLight5.GetSelectEntryColor(); - rAttrs.Put(Svx3DLightcolor5Item(aColor)); + rAttrs.Put(makeSvx3DLightcolor5Item(aColor)); } else rAttrs.InvalidateItem(SDRATTR_3DSCENE_LIGHTCOLOR_5); @@ -2032,7 +2032,7 @@ void Svx3DWin::GetAttr( SfxItemSet& rAttrs ) if( aLbLight6.GetSelectEntryCount() ) { aColor = aLbLight6.GetSelectEntryColor(); - rAttrs.Put(Svx3DLightcolor6Item(aColor)); + rAttrs.Put(makeSvx3DLightcolor6Item(aColor)); } else rAttrs.InvalidateItem(SDRATTR_3DSCENE_LIGHTCOLOR_6); @@ -2056,7 +2056,7 @@ void Svx3DWin::GetAttr( SfxItemSet& rAttrs ) if( aLbLight7.GetSelectEntryCount() ) { aColor = aLbLight7.GetSelectEntryColor(); - rAttrs.Put(Svx3DLightcolor7Item(aColor)); + rAttrs.Put(makeSvx3DLightcolor7Item(aColor)); } else rAttrs.InvalidateItem(SDRATTR_3DSCENE_LIGHTCOLOR_7); @@ -2080,7 +2080,7 @@ void Svx3DWin::GetAttr( SfxItemSet& rAttrs ) if( aLbLight8.GetSelectEntryCount() ) { aColor = aLbLight8.GetSelectEntryColor(); - rAttrs.Put(Svx3DLightcolor8Item(aColor)); + rAttrs.Put(makeSvx3DLightcolor8Item(aColor)); } else rAttrs.InvalidateItem(SDRATTR_3DSCENE_LIGHTCOLOR_8); @@ -2104,7 +2104,7 @@ void Svx3DWin::GetAttr( SfxItemSet& rAttrs ) if( aLbAmbientlight.GetSelectEntryCount() ) { aColor = aLbAmbientlight.GetSelectEntryColor(); - rAttrs.Put(Svx3DAmbientcolorItem(aColor)); + rAttrs.Put(makeSvx3DAmbientcolorItem(aColor)); } else rAttrs.InvalidateItem(SDRATTR_3DSCENE_AMBIENTCOLOR); @@ -2191,7 +2191,7 @@ void Svx3DWin::GetAttr( SfxItemSet& rAttrs ) if( aLbMatEmission.GetSelectEntryCount() ) { aColor = aLbMatEmission.GetSelectEntryColor(); - rAttrs.Put(Svx3DMaterialEmissionItem(aColor)); + rAttrs.Put(makeSvx3DMaterialEmissionItem(aColor)); } else rAttrs.InvalidateItem(SDRATTR_3DOBJ_MAT_EMISSION); @@ -2200,7 +2200,7 @@ void Svx3DWin::GetAttr( SfxItemSet& rAttrs ) if( aLbMatSpecular.GetSelectEntryCount() ) { aColor = aLbMatSpecular.GetSelectEntryColor(); - rAttrs.Put(Svx3DMaterialSpecularItem(aColor)); + rAttrs.Put(makeSvx3DMaterialSpecularItem(aColor)); } else rAttrs.InvalidateItem(SDRATTR_3DOBJ_MAT_SPECULAR); @@ -2943,15 +2943,15 @@ void Svx3DWin::ClickLight(PushButton& rBtn) switch(nLightSource) { - case 0: aLightItemSet.Put(Svx3DLightcolor1Item(aColor)); aLightItemSet.Put(makeSvx3DLightOnOff1Item(bOnOff)); break; - case 1: aLightItemSet.Put(Svx3DLightcolor2Item(aColor)); aLightItemSet.Put(makeSvx3DLightOnOff2Item(bOnOff)); break; - case 2: aLightItemSet.Put(Svx3DLightcolor3Item(aColor)); aLightItemSet.Put(makeSvx3DLightOnOff3Item(bOnOff)); break; - case 3: aLightItemSet.Put(Svx3DLightcolor4Item(aColor)); aLightItemSet.Put(makeSvx3DLightOnOff4Item(bOnOff)); break; - case 4: aLightItemSet.Put(Svx3DLightcolor5Item(aColor)); aLightItemSet.Put(makeSvx3DLightOnOff5Item(bOnOff)); break; - case 5: aLightItemSet.Put(Svx3DLightcolor6Item(aColor)); aLightItemSet.Put(makeSvx3DLightOnOff6Item(bOnOff)); break; - case 6: aLightItemSet.Put(Svx3DLightcolor7Item(aColor)); aLightItemSet.Put(makeSvx3DLightOnOff7Item(bOnOff)); break; + case 0: aLightItemSet.Put(makeSvx3DLightcolor1Item(aColor)); aLightItemSet.Put(makeSvx3DLightOnOff1Item(bOnOff)); break; + case 1: aLightItemSet.Put(makeSvx3DLightcolor2Item(aColor)); aLightItemSet.Put(makeSvx3DLightOnOff2Item(bOnOff)); break; + case 2: aLightItemSet.Put(makeSvx3DLightcolor3Item(aColor)); aLightItemSet.Put(makeSvx3DLightOnOff3Item(bOnOff)); break; + case 3: aLightItemSet.Put(makeSvx3DLightcolor4Item(aColor)); aLightItemSet.Put(makeSvx3DLightOnOff4Item(bOnOff)); break; + case 4: aLightItemSet.Put(makeSvx3DLightcolor5Item(aColor)); aLightItemSet.Put(makeSvx3DLightOnOff5Item(bOnOff)); break; + case 5: aLightItemSet.Put(makeSvx3DLightcolor6Item(aColor)); aLightItemSet.Put(makeSvx3DLightOnOff6Item(bOnOff)); break; + case 6: aLightItemSet.Put(makeSvx3DLightcolor7Item(aColor)); aLightItemSet.Put(makeSvx3DLightOnOff7Item(bOnOff)); break; default: - case 7: aLightItemSet.Put(Svx3DLightcolor8Item(aColor)); aLightItemSet.Put(makeSvx3DLightOnOff8Item(bOnOff)); break; + case 7: aLightItemSet.Put(makeSvx3DLightcolor8Item(aColor)); aLightItemSet.Put(makeSvx3DLightOnOff8Item(bOnOff)); break; } aCtlLightPreview.GetSvx3DLightControl().Set3DAttributes(aLightItemSet); diff --git a/svx/source/engine3d/svx3ditems.cxx b/svx/source/engine3d/svx3ditems.cxx index a50e64eba151..35fa12823c46 100644 --- a/svx/source/engine3d/svx3ditems.cxx +++ b/svx/source/engine3d/svx3ditems.cxx @@ -73,18 +73,6 @@ Svx3DTextureProjectionYItem::Svx3DTextureProjectionYItem(sal_uInt16 nVal) : SfxUInt16Item(SDRATTR_3DOBJ_TEXTURE_PROJ_Y, nVal) {} -Svx3DMaterialColorItem::Svx3DMaterialColorItem(const Color& rCol) -: SvxColorItem(rCol, SDRATTR_3DOBJ_MAT_COLOR) -{} - -Svx3DMaterialEmissionItem::Svx3DMaterialEmissionItem(const Color& rCol) -: SvxColorItem(rCol, SDRATTR_3DOBJ_MAT_EMISSION) -{} - -Svx3DMaterialSpecularItem::Svx3DMaterialSpecularItem(const Color& rCol) -: SvxColorItem(rCol, SDRATTR_3DOBJ_MAT_SPECULAR) -{} - Svx3DTextureKindItem::Svx3DTextureKindItem(sal_uInt16 nVal) : SfxUInt16Item(SDRATTR_3DOBJ_TEXTURE_KIND, nVal) {} @@ -97,42 +85,6 @@ Svx3DPerspectiveItem::Svx3DPerspectiveItem(sal_uInt16 nVal) : SfxUInt16Item(SDRATTR_3DSCENE_PERSPECTIVE, nVal) {} -Svx3DLightcolor1Item::Svx3DLightcolor1Item(const Color& rCol) -: SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_1) -{} - -Svx3DLightcolor2Item::Svx3DLightcolor2Item(const Color& rCol) -: SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_2) -{} - -Svx3DLightcolor3Item::Svx3DLightcolor3Item(const Color& rCol) -: SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_3) -{} - -Svx3DLightcolor4Item::Svx3DLightcolor4Item(const Color& rCol) -: SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_4) -{} - -Svx3DLightcolor5Item::Svx3DLightcolor5Item(const Color& rCol) -: SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_5) -{} - -Svx3DLightcolor6Item::Svx3DLightcolor6Item(const Color& rCol) -: SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_6) -{} - -Svx3DLightcolor7Item::Svx3DLightcolor7Item(const Color& rCol) -: SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_7) -{} - -Svx3DLightcolor8Item::Svx3DLightcolor8Item(const Color& rCol) -: SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_8) -{} - -Svx3DAmbientcolorItem::Svx3DAmbientcolorItem(const Color& rCol) -: SvxColorItem(rCol, SDRATTR_3DSCENE_AMBIENTCOLOR) -{} - Svx3DLightDirection1Item::Svx3DLightDirection1Item(const basegfx::B3DVector& rVec) : SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_1, rVec) {} diff --git a/svx/source/sdr/primitive2d/sdrattributecreator.cxx b/svx/source/sdr/primitive2d/sdrattributecreator.cxx index 48e685008503..650b6d0c49a8 100644 --- a/svx/source/sdr/primitive2d/sdrattributecreator.cxx +++ b/svx/source/sdr/primitive2d/sdrattributecreator.cxx @@ -923,62 +923,62 @@ namespace drawinglayer if(((const SfxBoolItem&)rSet.Get(SDRATTR_3DSCENE_LIGHTON_1)).GetValue()) { - const basegfx::BColor aColor(((const Svx3DLightcolor1Item&)rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_1)).GetValue().getBColor()); + const basegfx::BColor aColor(((const SvxColorItem&)rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_1)).GetValue().getBColor()); const basegfx::B3DVector aDirection(((const Svx3DLightDirection1Item&)rSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_1)).GetValue()); aLightVector.push_back(attribute::Sdr3DLightAttribute(aColor, aDirection, true)); } if(((const SfxBoolItem&)rSet.Get(SDRATTR_3DSCENE_LIGHTON_2)).GetValue()) { - const basegfx::BColor aColor(((const Svx3DLightcolor2Item&)rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_2)).GetValue().getBColor()); + const basegfx::BColor aColor(((const SvxColorItem&)rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_2)).GetValue().getBColor()); const basegfx::B3DVector aDirection(((const Svx3DLightDirection2Item&)rSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_2)).GetValue()); aLightVector.push_back(attribute::Sdr3DLightAttribute(aColor, aDirection, false)); } if(((const SfxBoolItem&)rSet.Get(SDRATTR_3DSCENE_LIGHTON_3)).GetValue()) { - const basegfx::BColor aColor(((const Svx3DLightcolor3Item&)rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_3)).GetValue().getBColor()); + const basegfx::BColor aColor(((const SvxColorItem&)rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_3)).GetValue().getBColor()); const basegfx::B3DVector aDirection(((const Svx3DLightDirection3Item&)rSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_3)).GetValue()); aLightVector.push_back(attribute::Sdr3DLightAttribute(aColor, aDirection, false)); } if(((const SfxBoolItem&)rSet.Get(SDRATTR_3DSCENE_LIGHTON_4)).GetValue()) { - const basegfx::BColor aColor(((const Svx3DLightcolor4Item&)rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_4)).GetValue().getBColor()); + const basegfx::BColor aColor(((const SvxColorItem&)rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_4)).GetValue().getBColor()); const basegfx::B3DVector aDirection(((const Svx3DLightDirection4Item&)rSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_4)).GetValue()); aLightVector.push_back(attribute::Sdr3DLightAttribute(aColor, aDirection, false)); } if(((const SfxBoolItem&)rSet.Get(SDRATTR_3DSCENE_LIGHTON_5)).GetValue()) { - const basegfx::BColor aColor(((const Svx3DLightcolor5Item&)rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_5)).GetValue().getBColor()); + const basegfx::BColor aColor(((const SvxColorItem&)rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_5)).GetValue().getBColor()); const basegfx::B3DVector aDirection(((const Svx3DLightDirection5Item&)rSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_5)).GetValue()); aLightVector.push_back(attribute::Sdr3DLightAttribute(aColor, aDirection, false)); } if(((const SfxBoolItem&)rSet.Get(SDRATTR_3DSCENE_LIGHTON_6)).GetValue()) { - const basegfx::BColor aColor(((const Svx3DLightcolor6Item&)rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_6)).GetValue().getBColor()); + const basegfx::BColor aColor(((const SvxColorItem&)rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_6)).GetValue().getBColor()); const basegfx::B3DVector aDirection(((const Svx3DLightDirection6Item&)rSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_6)).GetValue()); aLightVector.push_back(attribute::Sdr3DLightAttribute(aColor, aDirection, false)); } if(((const SfxBoolItem&)rSet.Get(SDRATTR_3DSCENE_LIGHTON_7)).GetValue()) { - const basegfx::BColor aColor(((const Svx3DLightcolor7Item&)rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_7)).GetValue().getBColor()); + const basegfx::BColor aColor(((const SvxColorItem&)rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_7)).GetValue().getBColor()); const basegfx::B3DVector aDirection(((const Svx3DLightDirection7Item&)rSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_7)).GetValue()); aLightVector.push_back(attribute::Sdr3DLightAttribute(aColor, aDirection, false)); } if(((const SfxBoolItem&)rSet.Get(SDRATTR_3DSCENE_LIGHTON_8)).GetValue()) { - const basegfx::BColor aColor(((const Svx3DLightcolor8Item&)rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_8)).GetValue().getBColor()); + const basegfx::BColor aColor(((const SvxColorItem&)rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_8)).GetValue().getBColor()); const basegfx::B3DVector aDirection(((const Svx3DLightDirection8Item&)rSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_8)).GetValue()); aLightVector.push_back(attribute::Sdr3DLightAttribute(aColor, aDirection, false)); } // get ambient color - const Color aAmbientValue(((const Svx3DAmbientcolorItem&)rSet.Get(SDRATTR_3DSCENE_AMBIENTCOLOR)).GetValue()); + const Color aAmbientValue(((const SvxColorItem&)rSet.Get(SDRATTR_3DSCENE_AMBIENTCOLOR)).GetValue()); const basegfx::BColor aAmbientLight(aAmbientValue.getBColor()); return attribute::SdrLightingAttribute(aAmbientLight, aLightVector); diff --git a/svx/source/sdr/primitive3d/sdrattributecreator3d.cxx b/svx/source/sdr/primitive3d/sdrattributecreator3d.cxx index b9fca752fea0..d73f5c044990 100644 --- a/svx/source/sdr/primitive3d/sdrattributecreator3d.cxx +++ b/svx/source/sdr/primitive3d/sdrattributecreator3d.cxx @@ -119,10 +119,10 @@ namespace drawinglayer const ::basegfx::BColor aObjectColor(((const XFillColorItem&)rSet.Get(XATTR_FILLCOLOR)).GetColorValue().getBColor()); // get specular color - const ::basegfx::BColor aSpecular(((const Svx3DMaterialSpecularItem&)rSet.Get(SDRATTR_3DOBJ_MAT_SPECULAR)).GetValue().getBColor()); + const ::basegfx::BColor aSpecular(((const SvxColorItem&)rSet.Get(SDRATTR_3DOBJ_MAT_SPECULAR)).GetValue().getBColor()); // get emissive color - const ::basegfx::BColor aEmission(((const Svx3DMaterialEmissionItem&)rSet.Get(SDRATTR_3DOBJ_MAT_EMISSION)).GetValue().getBColor()); + const ::basegfx::BColor aEmission(((const SvxColorItem&)rSet.Get(SDRATTR_3DOBJ_MAT_EMISSION)).GetValue().getBColor()); // get specular intensity sal_uInt16 nSpecularIntensity(((const SfxUInt16Item&)rSet.Get(SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY)).GetValue()); diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx index 83aec84f67a1..fd64fb05702d 100644 --- a/svx/source/svdraw/svdattr.cxx +++ b/svx/source/svdraw/svdattr.cxx @@ -259,9 +259,9 @@ SdrItemPool::SdrItemPool( mppLocalPoolDefaults[ SDRATTR_3DOBJ_TEXTURE_PROJ_X - SDRATTR_START ] = new Svx3DTextureProjectionXItem; mppLocalPoolDefaults[ SDRATTR_3DOBJ_TEXTURE_PROJ_Y - SDRATTR_START ] = new Svx3DTextureProjectionYItem; mppLocalPoolDefaults[ SDRATTR_3DOBJ_SHADOW_3D - SDRATTR_START ] = new SfxBoolItem(SDRATTR_3DOBJ_SHADOW_3D, false); - 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_COLOR - SDRATTR_START ] = new SvxColorItem(Color(0x0000b8ff), SDRATTR_3DOBJ_MAT_COLOR); + mppLocalPoolDefaults[ SDRATTR_3DOBJ_MAT_EMISSION - SDRATTR_START ] = new SvxColorItem(Color(0x00000000), SDRATTR_3DOBJ_MAT_EMISSION); + mppLocalPoolDefaults[ SDRATTR_3DOBJ_MAT_SPECULAR - SDRATTR_START ] = new SvxColorItem(Color(0x00ffffff), SDRATTR_3DOBJ_MAT_SPECULAR); 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; @@ -276,15 +276,15 @@ SdrItemPool::SdrItemPool( mppLocalPoolDefaults[ SDRATTR_3DSCENE_DISTANCE - SDRATTR_START ] = new SfxUInt32Item(SDRATTR_3DSCENE_DISTANCE, 100); mppLocalPoolDefaults[ SDRATTR_3DSCENE_FOCAL_LENGTH - SDRATTR_START ] = new SfxUInt32Item(SDRATTR_3DSCENE_FOCAL_LENGTH, 100); mppLocalPoolDefaults[ SDRATTR_3DSCENE_TWO_SIDED_LIGHTING - SDRATTR_START ] = new SfxBoolItem(SDRATTR_3DSCENE_TWO_SIDED_LIGHTING, false); - mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_1 - SDRATTR_START ] = new Svx3DLightcolor1Item; - mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_2 - SDRATTR_START ] = new Svx3DLightcolor2Item; - mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_3 - SDRATTR_START ] = new Svx3DLightcolor3Item; - mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_4 - SDRATTR_START ] = new Svx3DLightcolor4Item; - mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_5 - SDRATTR_START ] = new Svx3DLightcolor5Item; - mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_6 - SDRATTR_START ] = new Svx3DLightcolor6Item; - mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_7 - SDRATTR_START ] = new Svx3DLightcolor7Item; - mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_8 - SDRATTR_START ] = new Svx3DLightcolor8Item; - mppLocalPoolDefaults[ SDRATTR_3DSCENE_AMBIENTCOLOR - SDRATTR_START ] = new Svx3DAmbientcolorItem; + mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_1 - SDRATTR_START ] = new SvxColorItem(Color(0xffcccccc), SDRATTR_3DSCENE_LIGHTCOLOR_1); + mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_2 - SDRATTR_START ] = new SvxColorItem(Color(0x00000000), SDRATTR_3DSCENE_LIGHTCOLOR_2); + mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_3 - SDRATTR_START ] = new SvxColorItem(Color(0x00000000), SDRATTR_3DSCENE_LIGHTCOLOR_3); + mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_4 - SDRATTR_START ] = new SvxColorItem(Color(0x00000000), SDRATTR_3DSCENE_LIGHTCOLOR_4); + mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_5 - SDRATTR_START ] = new SvxColorItem(Color(0x00000000), SDRATTR_3DSCENE_LIGHTCOLOR_5); + mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_6 - SDRATTR_START ] = new SvxColorItem(Color(0x00000000), SDRATTR_3DSCENE_LIGHTCOLOR_6); + mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_7 - SDRATTR_START ] = new SvxColorItem(Color(0x00000000), SDRATTR_3DSCENE_LIGHTCOLOR_7); + mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_8 - SDRATTR_START ] = new SvxColorItem(Color(0x00000000), SDRATTR_3DSCENE_LIGHTCOLOR_8); + mppLocalPoolDefaults[ SDRATTR_3DSCENE_AMBIENTCOLOR - SDRATTR_START ] = new SvxColorItem(Color(0x00666666), SDRATTR_3DSCENE_AMBIENTCOLOR); mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTON_1 - SDRATTR_START ] = new SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_1, true); mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTON_2 - SDRATTR_START ] = new SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_2, false); mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTON_3 - SDRATTR_START ] = new SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_3, false); |