summaryrefslogtreecommitdiff
path: root/svx/source/sdr
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/sdr')
-rw-r--r--svx/source/sdr/primitive2d/sdrattributecreator.cxx60
-rw-r--r--svx/source/sdr/primitive3d/sdrattributecreator3d.cxx26
2 files changed, 43 insertions, 43 deletions
diff --git a/svx/source/sdr/primitive2d/sdrattributecreator.cxx b/svx/source/sdr/primitive2d/sdrattributecreator.cxx
index dc62cf66c067..41988f65d70f 100644
--- a/svx/source/sdr/primitive2d/sdrattributecreator.cxx
+++ b/svx/source/sdr/primitive2d/sdrattributecreator.cxx
@@ -886,7 +886,7 @@ namespace drawinglayer
{
// get perspective
css::drawing::ProjectionMode aProjectionMode(css::drawing::ProjectionMode_PARALLEL);
- const sal_uInt16 nProjectionValue(static_cast<const Svx3DPerspectiveItem&>(rSet.Get(SDRATTR_3DSCENE_PERSPECTIVE)).GetValue());
+ const sal_uInt16 nProjectionValue(rSet.Get(SDRATTR_3DSCENE_PERSPECTIVE).GetValue());
if(1 == nProjectionValue)
{
@@ -894,14 +894,14 @@ namespace drawinglayer
}
// get distance
- const double fDistance(static_cast<const SfxUInt32Item&>(rSet.Get(SDRATTR_3DSCENE_DISTANCE)).GetValue());
+ const double fDistance(rSet.Get(SDRATTR_3DSCENE_DISTANCE).GetValue());
// get shadow slant
- const double fShadowSlant(F_PI180 * static_cast<const SfxUInt16Item&>(rSet.Get(SDRATTR_3DSCENE_SHADOW_SLANT)).GetValue());
+ const double fShadowSlant(F_PI180 * rSet.Get(SDRATTR_3DSCENE_SHADOW_SLANT).GetValue());
// get shade mode
css::drawing::ShadeMode aShadeMode(css::drawing::ShadeMode_FLAT);
- const sal_uInt16 nShadeValue(static_cast<const Svx3DShadeModeItem&>(rSet.Get(SDRATTR_3DSCENE_SHADE_MODE)).GetValue());
+ const sal_uInt16 nShadeValue(rSet.Get(SDRATTR_3DSCENE_SHADE_MODE).GetValue());
if(1 == nShadeValue)
{
@@ -917,7 +917,7 @@ namespace drawinglayer
}
// get two sided lighting
- const bool bTwoSidedLighting(static_cast<const SfxBoolItem&>(rSet.Get(SDRATTR_3DSCENE_TWO_SIDED_LIGHTING)).GetValue());
+ const bool bTwoSidedLighting(rSet.Get(SDRATTR_3DSCENE_TWO_SIDED_LIGHTING).GetValue());
return attribute::SdrSceneAttribute(fDistance, fShadowSlant, aProjectionMode, aShadeMode, bTwoSidedLighting);
}
@@ -927,64 +927,64 @@ namespace drawinglayer
// extract lights from given SfxItemSet (from scene)
::std::vector< attribute::Sdr3DLightAttribute > aLightVector;
- if(static_cast<const SfxBoolItem&>(rSet.Get(SDRATTR_3DSCENE_LIGHTON_1)).GetValue())
+ if(rSet.Get(SDRATTR_3DSCENE_LIGHTON_1).GetValue())
{
- const basegfx::BColor aColor(static_cast<const SvxColorItem&>(rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_1)).GetValue().getBColor());
- const basegfx::B3DVector aDirection(static_cast<const SvxB3DVectorItem&>(rSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_1)).GetValue());
+ const basegfx::BColor aColor(rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_1).GetValue().getBColor());
+ const basegfx::B3DVector aDirection(rSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_1).GetValue());
aLightVector.emplace_back(aColor, aDirection, true);
}
- if(static_cast<const SfxBoolItem&>(rSet.Get(SDRATTR_3DSCENE_LIGHTON_2)).GetValue())
+ if(rSet.Get(SDRATTR_3DSCENE_LIGHTON_2).GetValue())
{
- const basegfx::BColor aColor(static_cast<const SvxColorItem&>(rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_2)).GetValue().getBColor());
- const basegfx::B3DVector aDirection(static_cast<const SvxB3DVectorItem&>(rSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_2)).GetValue());
+ const basegfx::BColor aColor(rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_2).GetValue().getBColor());
+ const basegfx::B3DVector aDirection(rSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_2).GetValue());
aLightVector.emplace_back(aColor, aDirection, false);
}
- if(static_cast<const SfxBoolItem&>(rSet.Get(SDRATTR_3DSCENE_LIGHTON_3)).GetValue())
+ if(rSet.Get(SDRATTR_3DSCENE_LIGHTON_3).GetValue())
{
- const basegfx::BColor aColor(static_cast<const SvxColorItem&>(rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_3)).GetValue().getBColor());
- const basegfx::B3DVector aDirection(static_cast<const SvxB3DVectorItem&>(rSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_3)).GetValue());
+ const basegfx::BColor aColor(rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_3).GetValue().getBColor());
+ const basegfx::B3DVector aDirection(rSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_3).GetValue());
aLightVector.emplace_back(aColor, aDirection, false);
}
- if(static_cast<const SfxBoolItem&>(rSet.Get(SDRATTR_3DSCENE_LIGHTON_4)).GetValue())
+ if(rSet.Get(SDRATTR_3DSCENE_LIGHTON_4).GetValue())
{
- const basegfx::BColor aColor(static_cast<const SvxColorItem&>(rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_4)).GetValue().getBColor());
- const basegfx::B3DVector aDirection(static_cast<const SvxB3DVectorItem&>(rSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_4)).GetValue());
+ const basegfx::BColor aColor(rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_4).GetValue().getBColor());
+ const basegfx::B3DVector aDirection(rSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_4).GetValue());
aLightVector.emplace_back(aColor, aDirection, false);
}
- if(static_cast<const SfxBoolItem&>(rSet.Get(SDRATTR_3DSCENE_LIGHTON_5)).GetValue())
+ if(rSet.Get(SDRATTR_3DSCENE_LIGHTON_5).GetValue())
{
- const basegfx::BColor aColor(static_cast<const SvxColorItem&>(rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_5)).GetValue().getBColor());
- const basegfx::B3DVector aDirection(static_cast<const SvxB3DVectorItem&>(rSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_5)).GetValue());
+ const basegfx::BColor aColor(rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_5).GetValue().getBColor());
+ const basegfx::B3DVector aDirection(rSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_5).GetValue());
aLightVector.emplace_back(aColor, aDirection, false);
}
- if(static_cast<const SfxBoolItem&>(rSet.Get(SDRATTR_3DSCENE_LIGHTON_6)).GetValue())
+ if(rSet.Get(SDRATTR_3DSCENE_LIGHTON_6).GetValue())
{
- const basegfx::BColor aColor(static_cast<const SvxColorItem&>(rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_6)).GetValue().getBColor());
- const basegfx::B3DVector aDirection(static_cast<const SvxB3DVectorItem&>(rSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_6)).GetValue());
+ const basegfx::BColor aColor(rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_6).GetValue().getBColor());
+ const basegfx::B3DVector aDirection(rSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_6).GetValue());
aLightVector.emplace_back(aColor, aDirection, false);
}
- if(static_cast<const SfxBoolItem&>(rSet.Get(SDRATTR_3DSCENE_LIGHTON_7)).GetValue())
+ if(rSet.Get(SDRATTR_3DSCENE_LIGHTON_7).GetValue())
{
- const basegfx::BColor aColor(static_cast<const SvxColorItem&>(rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_7)).GetValue().getBColor());
- const basegfx::B3DVector aDirection(static_cast<const SvxB3DVectorItem&>(rSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_7)).GetValue());
+ const basegfx::BColor aColor(rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_7).GetValue().getBColor());
+ const basegfx::B3DVector aDirection(rSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_7).GetValue());
aLightVector.emplace_back(aColor, aDirection, false);
}
- if(static_cast<const SfxBoolItem&>(rSet.Get(SDRATTR_3DSCENE_LIGHTON_8)).GetValue())
+ if(rSet.Get(SDRATTR_3DSCENE_LIGHTON_8).GetValue())
{
- const basegfx::BColor aColor(static_cast<const SvxColorItem&>(rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_8)).GetValue().getBColor());
- const basegfx::B3DVector aDirection(static_cast<const SvxB3DVectorItem&>(rSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_8)).GetValue());
+ const basegfx::BColor aColor(rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_8).GetValue().getBColor());
+ const basegfx::B3DVector aDirection(rSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_8).GetValue());
aLightVector.emplace_back(aColor, aDirection, false);
}
// get ambient color
- const Color aAmbientValue(static_cast<const SvxColorItem&>(rSet.Get(SDRATTR_3DSCENE_AMBIENTCOLOR)).GetValue());
+ const Color aAmbientValue(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 5a60993b9649..5fe17f59dbad 100644
--- a/svx/source/sdr/primitive3d/sdrattributecreator3d.cxx
+++ b/svx/source/sdr/primitive3d/sdrattributecreator3d.cxx
@@ -37,7 +37,7 @@ namespace drawinglayer
{
// get NormalsKind
css::drawing::NormalsKind aNormalsKind(css::drawing::NormalsKind_SPECIFIC);
- const sal_uInt16 nNormalsValue(static_cast<const Svx3DNormalsKindItem&>(rSet.Get(SDRATTR_3DOBJ_NORMALS_KIND)).GetValue());
+ const sal_uInt16 nNormalsValue(rSet.Get(SDRATTR_3DOBJ_NORMALS_KIND).GetValue());
if(1 == nNormalsValue)
{
@@ -49,11 +49,11 @@ namespace drawinglayer
}
// get NormalsInvert flag
- const bool bInvertNormals(static_cast<const SfxBoolItem&>(rSet.Get(SDRATTR_3DOBJ_NORMALS_INVERT)).GetValue());
+ const bool bInvertNormals(rSet.Get(SDRATTR_3DOBJ_NORMALS_INVERT).GetValue());
// get TextureProjectionX
css::drawing::TextureProjectionMode aTextureProjectionX(css::drawing::TextureProjectionMode_OBJECTSPECIFIC);
- const sal_uInt16 nTextureValueX(static_cast<const Svx3DTextureProjectionXItem&>(rSet.Get(SDRATTR_3DOBJ_TEXTURE_PROJ_X)).GetValue());
+ const sal_uInt16 nTextureValueX(rSet.Get(SDRATTR_3DOBJ_TEXTURE_PROJ_X).GetValue());
if(1 == nTextureValueX)
{
@@ -66,7 +66,7 @@ namespace drawinglayer
// get TextureProjectionY
css::drawing::TextureProjectionMode aTextureProjectionY(css::drawing::TextureProjectionMode_OBJECTSPECIFIC);
- const sal_uInt16 nTextureValueY(static_cast<const Svx3DTextureProjectionYItem&>(rSet.Get(SDRATTR_3DOBJ_TEXTURE_PROJ_Y)).GetValue());
+ const sal_uInt16 nTextureValueY(rSet.Get(SDRATTR_3DOBJ_TEXTURE_PROJ_Y).GetValue());
if(1 == nTextureValueY)
{
@@ -78,18 +78,18 @@ namespace drawinglayer
}
// get DoubleSided flag
- const bool bDoubleSided(static_cast<const SfxBoolItem&>(rSet.Get(SDRATTR_3DOBJ_DOUBLE_SIDED)).GetValue());
+ const bool bDoubleSided(rSet.Get(SDRATTR_3DOBJ_DOUBLE_SIDED).GetValue());
// get Shadow3D flag
- const bool bShadow3D(static_cast<const SfxBoolItem&>(rSet.Get(SDRATTR_3DOBJ_SHADOW_3D)).GetValue());
+ const bool bShadow3D(rSet.Get(SDRATTR_3DOBJ_SHADOW_3D).GetValue());
// get TextureFilter flag
- const bool bTextureFilter(static_cast<const SfxBoolItem&>(rSet.Get(SDRATTR_3DOBJ_TEXTURE_FILTER)).GetValue());
+ const bool bTextureFilter(rSet.Get(SDRATTR_3DOBJ_TEXTURE_FILTER).GetValue());
// get texture kind
// TextureKind: 1 == Base3DTextureLuminance, 2 == Base3DTextureIntensity, 3 == Base3DTextureColor
css::drawing::TextureKind2 aTextureKind(css::drawing::TextureKind2_LUMINANCE);
- const sal_uInt16 nTextureKind(static_cast<const Svx3DTextureKindItem&>(rSet.Get(SDRATTR_3DOBJ_TEXTURE_KIND)).GetValue());
+ const sal_uInt16 nTextureKind(rSet.Get(SDRATTR_3DOBJ_TEXTURE_KIND).GetValue());
if(2 == nTextureKind)
{
@@ -103,7 +103,7 @@ namespace drawinglayer
// get texture mode
// TextureMode: 1 == Base3DTextureReplace, 2 == Base3DTextureModulate, 3 == Base3DTextureBlend
css::drawing::TextureMode aTextureMode(css::drawing::TextureMode_REPLACE);
- const sal_uInt16 nTextureMode(static_cast<const Svx3DTextureModeItem&>(rSet.Get(SDRATTR_3DOBJ_TEXTURE_MODE)).GetValue());
+ const sal_uInt16 nTextureMode(rSet.Get(SDRATTR_3DOBJ_TEXTURE_MODE).GetValue());
if(2 == nTextureMode)
{
@@ -118,13 +118,13 @@ namespace drawinglayer
const ::basegfx::BColor aObjectColor(rSet.Get(XATTR_FILLCOLOR).GetColorValue().getBColor());
// get specular color
- const ::basegfx::BColor aSpecular(static_cast<const SvxColorItem&>(rSet.Get(SDRATTR_3DOBJ_MAT_SPECULAR)).GetValue().getBColor());
+ const ::basegfx::BColor aSpecular(rSet.Get(SDRATTR_3DOBJ_MAT_SPECULAR).GetValue().getBColor());
// get emissive color
- const ::basegfx::BColor aEmission(static_cast<const SvxColorItem&>(rSet.Get(SDRATTR_3DOBJ_MAT_EMISSION)).GetValue().getBColor());
+ const ::basegfx::BColor aEmission(rSet.Get(SDRATTR_3DOBJ_MAT_EMISSION).GetValue().getBColor());
// get specular intensity
- sal_uInt16 nSpecularIntensity(static_cast<const SfxUInt16Item&>(rSet.Get(SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY)).GetValue());
+ sal_uInt16 nSpecularIntensity(rSet.Get(SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY).GetValue());
if(nSpecularIntensity > 128)
{
@@ -132,7 +132,7 @@ namespace drawinglayer
}
// get reduced line geometry
- const bool bReducedLineGeometry(static_cast<const Svx3DReducedLineGeometryItem&>(rSet.Get(SDRATTR_3DOBJ_REDUCED_LINE_GEOMETRY)).GetValue());
+ const bool bReducedLineGeometry(rSet.Get(SDRATTR_3DOBJ_REDUCED_LINE_GEOMETRY).GetValue());
// prepare material
attribute::MaterialAttribute3D aMaterial(aObjectColor, aSpecular, aEmission, nSpecularIntensity);