summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-10-02 15:23:28 +0200
committerNoel Grandin <noel@peralex.com>2014-10-06 07:52:55 +0200
commit0745982dc53cce65e63bd05a757aec8e96bcd564 (patch)
tree54a76476f85c93b2421a0e9fa22135f207784580 /include
parent0096426086e52b962ba53aed2132c2f4d0942aed (diff)
loplugin: cstylecast
Change-Id: I88a106081b7413bff6313d1e07f53e39d8350002
Diffstat (limited to 'include')
-rw-r--r--include/svx/extrud3d.hxx16
-rw-r--r--include/svx/obj3d.hxx24
-rw-r--r--include/svx/scene3d.hxx62
-rw-r--r--include/svx/sdasitm.hxx1
4 files changed, 52 insertions, 51 deletions
diff --git a/include/svx/extrud3d.hxx b/include/svx/extrud3d.hxx
index ae3276c4ff82..dbb8260e0661 100644
--- a/include/svx/extrud3d.hxx
+++ b/include/svx/extrud3d.hxx
@@ -51,35 +51,35 @@ public:
// PercentDiagonal: 0..100, before 0.0..0.5
sal_uInt16 GetPercentDiagonal() const
- { return ((const SfxUInt16Item&)GetObjectItemSet().Get(SDRATTR_3DOBJ_PERCENT_DIAGONAL)).GetValue(); }
+ { return static_cast<const SfxUInt16Item&>(GetObjectItemSet().Get(SDRATTR_3DOBJ_PERCENT_DIAGONAL)).GetValue(); }
// BackScale: 0..100, before 0.0..1.0
sal_uInt16 GetPercentBackScale() const
- { return ((const SfxUInt16Item&)GetObjectItemSet().Get(SDRATTR_3DOBJ_BACKSCALE)).GetValue(); }
+ { return static_cast<const SfxUInt16Item&>(GetObjectItemSet().Get(SDRATTR_3DOBJ_BACKSCALE)).GetValue(); }
// BackScale: 0..100, before 0.0..1.0
sal_uInt32 GetExtrudeDepth() const
- { return ((const SfxUInt32Item&)GetObjectItemSet().Get(SDRATTR_3DOBJ_DEPTH)).GetValue(); }
+ { return static_cast<const SfxUInt32Item&>(GetObjectItemSet().Get(SDRATTR_3DOBJ_DEPTH)).GetValue(); }
// #107245# GetSmoothNormals() for bExtrudeSmoothed
bool GetSmoothNormals() const
- { return ((const Svx3DSmoothNormalsItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_SMOOTH_NORMALS)).GetValue(); }
+ { return static_cast<const Svx3DSmoothNormalsItem&>(GetObjectItemSet().Get(SDRATTR_3DOBJ_SMOOTH_NORMALS)).GetValue(); }
// #107245# GetSmoothLids() for bExtrudeSmoothFrontBack
bool GetSmoothLids() const
- { return ((const Svx3DSmoothLidsItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_SMOOTH_LIDS)).GetValue(); }
+ { return static_cast<const Svx3DSmoothLidsItem&>(GetObjectItemSet().Get(SDRATTR_3DOBJ_SMOOTH_LIDS)).GetValue(); }
// #107245# GetCharacterMode() for bExtrudeCharacterMode
bool GetCharacterMode() const
- { return ((const Svx3DCharacterModeItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_CHARACTER_MODE)).GetValue(); }
+ { return static_cast<const Svx3DCharacterModeItem&>(GetObjectItemSet().Get(SDRATTR_3DOBJ_CHARACTER_MODE)).GetValue(); }
// #107245# GetCloseFront() for bExtrudeCloseFront
bool GetCloseFront() const
- { return ((const Svx3DCloseFrontItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_CLOSE_FRONT)).GetValue(); }
+ { return static_cast<const Svx3DCloseFrontItem&>(GetObjectItemSet().Get(SDRATTR_3DOBJ_CLOSE_FRONT)).GetValue(); }
// #107245# GetCloseBack() for bExtrudeCloseBack
bool GetCloseBack() const
- { return ((const Svx3DCloseBackItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_CLOSE_BACK)).GetValue(); }
+ { return static_cast<const Svx3DCloseBackItem&>(GetObjectItemSet().Get(SDRATTR_3DOBJ_CLOSE_BACK)).GetValue(); }
virtual sal_uInt16 GetObjIdentifier() const SAL_OVERRIDE;
diff --git a/include/svx/obj3d.hxx b/include/svx/obj3d.hxx
index 36722903e3c6..ac7e52493ef7 100644
--- a/include/svx/obj3d.hxx
+++ b/include/svx/obj3d.hxx
@@ -251,52 +251,52 @@ public :
// DoubleSided: sal_True/FALSE
bool GetDoubleSided() const
- { return ((const SfxBoolItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_DOUBLE_SIDED)).GetValue(); }
+ { return static_cast<const SfxBoolItem&>(GetObjectItemSet().Get(SDRATTR_3DOBJ_DOUBLE_SIDED)).GetValue(); }
// NormalsKind: 0 == sal_False/sal_False, 1 == sal_True/sal_False, else == sal_True/TRUE
sal_uInt16 GetNormalsKind() const
- { return ((const Svx3DNormalsKindItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_NORMALS_KIND)).GetValue(); }
+ { return static_cast<const Svx3DNormalsKindItem&>(GetObjectItemSet().Get(SDRATTR_3DOBJ_NORMALS_KIND)).GetValue(); }
// NormalsInvert: sal_True/FALSE
bool GetNormalsInvert() const
- { return ((const SfxBoolItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_NORMALS_INVERT)).GetValue(); }
+ { return static_cast<const SfxBoolItem&>(GetObjectItemSet().Get(SDRATTR_3DOBJ_NORMALS_INVERT)).GetValue(); }
// TextureProjX: 0 == sal_False/sal_False, 1 == sal_True/sal_False, else == sal_True/TRUE
sal_uInt16 GetTextureProjectionX() const
- { return ((const Svx3DTextureProjectionXItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_TEXTURE_PROJ_X)).GetValue(); }
+ { return static_cast<const Svx3DTextureProjectionXItem&>(GetObjectItemSet().Get(SDRATTR_3DOBJ_TEXTURE_PROJ_X)).GetValue(); }
// TextureProjY: 0 == sal_False/sal_False, 1 == sal_True/sal_False, else == sal_True/TRUE
sal_uInt16 GetTextureProjectionY() const
- { return ((const Svx3DTextureProjectionYItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_TEXTURE_PROJ_Y)).GetValue(); }
+ { return static_cast<const Svx3DTextureProjectionYItem&>(GetObjectItemSet().Get(SDRATTR_3DOBJ_TEXTURE_PROJ_Y)).GetValue(); }
// Shadow3D: sal_True/FALSE
bool GetShadow3D() const
- { return ((const SfxBoolItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_SHADOW_3D)).GetValue(); }
+ { return static_cast<const SfxBoolItem&>(GetObjectItemSet().Get(SDRATTR_3DOBJ_SHADOW_3D)).GetValue(); }
// MaterialColor: Color
Color GetMaterialColor() const
- { return ((const SvxColorItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_MAT_COLOR)).GetValue(); }
+ { return static_cast<const SvxColorItem&>(GetObjectItemSet().Get(SDRATTR_3DOBJ_MAT_COLOR)).GetValue(); }
// MaterialEmission: Color
Color GetMaterialEmission() const
- { return ((const SvxColorItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_MAT_EMISSION)).GetValue(); }
+ { return static_cast<const SvxColorItem&>(GetObjectItemSet().Get(SDRATTR_3DOBJ_MAT_EMISSION)).GetValue(); }
// MaterialSpecular: Color
Color GetMaterialSpecular() const
- { return ((const SvxColorItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_MAT_SPECULAR)).GetValue(); }
+ { return static_cast<const SvxColorItem&>(GetObjectItemSet().Get(SDRATTR_3DOBJ_MAT_SPECULAR)).GetValue(); }
// MaterialSpecularIntensity:
sal_uInt16 GetMaterialSpecularIntensity() const
- { return ((const SfxUInt16Item&)GetObjectItemSet().Get(SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY)).GetValue(); }
+ { return static_cast<const SfxUInt16Item&>(GetObjectItemSet().Get(SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY)).GetValue(); }
// TextureFilter: sal_True/FALSE
bool GetTextureFilter() const
- { return ((const SfxBoolItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_TEXTURE_FILTER)).GetValue(); }
+ { return static_cast<const SfxBoolItem&>(GetObjectItemSet().Get(SDRATTR_3DOBJ_TEXTURE_FILTER)).GetValue(); }
// #i28528#
// Added extra Item (Bool) for chart2 to be able to show reduced line geometry
bool GetReducedLineGeometry() const
- { return ((const Svx3DReducedLineGeometryItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_REDUCED_LINE_GEOMETRY)).GetValue(); }
+ { return static_cast<const Svx3DReducedLineGeometryItem&>(GetObjectItemSet().Get(SDRATTR_3DOBJ_REDUCED_LINE_GEOMETRY)).GetValue(); }
virtual sal_uInt16 GetObjIdentifier() const SAL_OVERRIDE;
virtual void RecalcSnapRect() SAL_OVERRIDE;
diff --git a/include/svx/scene3d.hxx b/include/svx/scene3d.hxx
index dfcc90e34c71..86c7ecc423ac 100644
--- a/include/svx/scene3d.hxx
+++ b/include/svx/scene3d.hxx
@@ -104,85 +104,85 @@ public:
// Perspective: enum ProjectionType { PR_PARALLEL, PR_PERSPECTIVE }
ProjectionType GetPerspective() const
- { return (ProjectionType)((const Svx3DPerspectiveItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_PERSPECTIVE)).GetValue(); }
+ { return (ProjectionType) static_cast<const Svx3DPerspectiveItem&>(GetObjectItemSet().Get(SDRATTR_3DSCENE_PERSPECTIVE)).GetValue(); }
// Distance:
double GetDistance() const
- { return (double)((const SfxUInt32Item&)GetObjectItemSet().Get(SDRATTR_3DSCENE_DISTANCE)).GetValue(); }
+ { return (double)static_cast<const SfxUInt32Item&>(GetObjectItemSet().Get(SDRATTR_3DSCENE_DISTANCE)).GetValue(); }
// Focal length: before cm, now 1/10th mm (*100)
double GetFocalLength() const
- { return ((const SfxUInt32Item&)GetObjectItemSet().Get(SDRATTR_3DSCENE_FOCAL_LENGTH)).GetValue(); }
+ { return static_cast<const SfxUInt32Item&>(GetObjectItemSet().Get(SDRATTR_3DSCENE_FOCAL_LENGTH)).GetValue(); }
// Two sided lighting:
bool GetTwoSidedLighting() const
- { return ((const SfxBoolItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_TWO_SIDED_LIGHTING)).GetValue(); }
+ { return static_cast<const SfxBoolItem&>(GetObjectItemSet().Get(SDRATTR_3DSCENE_TWO_SIDED_LIGHTING)).GetValue(); }
// Lightcolor:
Color GetLightColor1() const
- { return ((const SvxColorItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTCOLOR_1)).GetValue(); }
+ { return static_cast<const SvxColorItem&>(GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTCOLOR_1)).GetValue(); }
Color GetLightColor2() const
- { return ((const SvxColorItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTCOLOR_2)).GetValue(); }
+ { return static_cast<const SvxColorItem&>(GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTCOLOR_2)).GetValue(); }
Color GetLightColor3() const
- { return ((const SvxColorItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTCOLOR_3)).GetValue(); }
+ { return static_cast<const SvxColorItem&>(GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTCOLOR_3)).GetValue(); }
Color GetLightColor4() const
- { return ((const SvxColorItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTCOLOR_4)).GetValue(); }
+ { return static_cast<const SvxColorItem&>(GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTCOLOR_4)).GetValue(); }
Color GetLightColor5() const
- { return ((const SvxColorItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTCOLOR_5)).GetValue(); }
+ { return static_cast<const SvxColorItem&>(GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTCOLOR_5)).GetValue(); }
Color GetLightColor6() const
- { return ((const SvxColorItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTCOLOR_6)).GetValue(); }
+ { return static_cast<const SvxColorItem&>(GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTCOLOR_6)).GetValue(); }
Color GetLightColor7() const
- { return ((const SvxColorItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTCOLOR_7)).GetValue(); }
+ { return static_cast<const SvxColorItem&>(GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTCOLOR_7)).GetValue(); }
Color GetLightColor8() const
- { return ((const SvxColorItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTCOLOR_8)).GetValue(); }
+ { return static_cast<const SvxColorItem&>(GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTCOLOR_8)).GetValue(); }
// Ambient color:
Color GetGlobalAmbientColor() const
- { return ((const SvxColorItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_AMBIENTCOLOR)).GetValue(); }
+ { return static_cast<const SvxColorItem&>(GetObjectItemSet().Get(SDRATTR_3DSCENE_AMBIENTCOLOR)).GetValue(); }
// Light on/off:
bool GetLightOnOff1() const
- { return ((const SfxBoolItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTON_1)).GetValue(); }
+ { return static_cast<const SfxBoolItem&>(GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTON_1)).GetValue(); }
bool GetLightOnOff2() const
- { return ((const SfxBoolItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTON_2)).GetValue(); }
+ { return static_cast<const SfxBoolItem&>(GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTON_2)).GetValue(); }
bool GetLightOnOff3() const
- { return ((const SfxBoolItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTON_3)).GetValue(); }
+ { return static_cast<const SfxBoolItem&>(GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTON_3)).GetValue(); }
bool GetLightOnOff4() const
- { return ((const SfxBoolItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTON_4)).GetValue(); }
+ { return static_cast<const SfxBoolItem&>(GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTON_4)).GetValue(); }
bool GetLightOnOff5() const
- { return ((const SfxBoolItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTON_5)).GetValue(); }
+ { return static_cast<const SfxBoolItem&>(GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTON_5)).GetValue(); }
bool GetLightOnOff6() const
- { return ((const SfxBoolItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTON_6)).GetValue(); }
+ { return static_cast<const SfxBoolItem&>(GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTON_6)).GetValue(); }
bool GetLightOnOff7() const
- { return ((const SfxBoolItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTON_7)).GetValue(); }
+ { return static_cast<const SfxBoolItem&>(GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTON_7)).GetValue(); }
bool GetLightOnOff8() const
- { return ((const SfxBoolItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTON_8)).GetValue(); }
+ { return static_cast<const SfxBoolItem&>(GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTON_8)).GetValue(); }
// Light direction:
basegfx::B3DVector GetLightDirection1() const
- { return ((const SvxB3DVectorItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTDIRECTION_1)).GetValue(); }
+ { return static_cast<const SvxB3DVectorItem&>(GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTDIRECTION_1)).GetValue(); }
basegfx::B3DVector GetLightDirection2() const
- { return ((const SvxB3DVectorItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTDIRECTION_2)).GetValue(); }
+ { return static_cast<const SvxB3DVectorItem&>(GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTDIRECTION_2)).GetValue(); }
basegfx::B3DVector GetLightDirection3() const
- { return ((const SvxB3DVectorItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTDIRECTION_3)).GetValue(); }
+ { return static_cast<const SvxB3DVectorItem&>(GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTDIRECTION_3)).GetValue(); }
basegfx::B3DVector GetLightDirection4() const
- { return ((const SvxB3DVectorItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTDIRECTION_4)).GetValue(); }
+ { return static_cast<const SvxB3DVectorItem&>(GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTDIRECTION_4)).GetValue(); }
basegfx::B3DVector GetLightDirection5() const
- { return ((const SvxB3DVectorItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTDIRECTION_5)).GetValue(); }
+ { return static_cast<const SvxB3DVectorItem&>(GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTDIRECTION_5)).GetValue(); }
basegfx::B3DVector GetLightDirection6() const
- { return ((const SvxB3DVectorItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTDIRECTION_6)).GetValue(); }
+ { return static_cast<const SvxB3DVectorItem&>(GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTDIRECTION_6)).GetValue(); }
basegfx::B3DVector GetLightDirection7() const
- { return ((const SvxB3DVectorItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTDIRECTION_7)).GetValue(); }
+ { return static_cast<const SvxB3DVectorItem&>(GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTDIRECTION_7)).GetValue(); }
basegfx::B3DVector GetLightDirection8() const
- { return ((const SvxB3DVectorItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTDIRECTION_8)).GetValue(); }
+ { return static_cast<const SvxB3DVectorItem&>(GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTDIRECTION_8)).GetValue(); }
// ShadowSlant:
sal_uInt16 GetShadowSlant() const
- { return ((const SfxUInt16Item&)GetObjectItemSet().Get(SDRATTR_3DSCENE_SHADOW_SLANT)).GetValue(); }
+ { return static_cast<const SfxUInt16Item&>(GetObjectItemSet().Get(SDRATTR_3DSCENE_SHADOW_SLANT)).GetValue(); }
// ShadeMode: 0 == FLAT, 1 == PHONG, 2 == SMOOTH, 3 == ForceDraft
sal_uInt16 GetShadeMode() const
- { return ((const Svx3DShadeModeItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_SHADE_MODE)).GetValue(); }
+ { return static_cast<const Svx3DShadeModeItem&>(GetObjectItemSet().Get(SDRATTR_3DSCENE_SHADE_MODE)).GetValue(); }
// set flag to draw only selected
void SetDrawOnlySelected(bool bNew) { bDrawOnlySelected = bNew; }
diff --git a/include/svx/sdasitm.hxx b/include/svx/sdasitm.hxx
index 33ebab8d627f..42c092074106 100644
--- a/include/svx/sdasitm.hxx
+++ b/include/svx/sdasitm.hxx
@@ -95,6 +95,7 @@ private:
const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& GetGeometry() const { return aPropSeq;}
com::sun::star::uno::Any* GetPropertyValueByName( const OUString& rPropName );
+ const com::sun::star::uno::Any* GetPropertyValueByName( const OUString& rPropName ) const;
com::sun::star::uno::Any* GetPropertyValueByName( const OUString& rPropName, const OUString& rPropName2 );
void SetPropertyValue( const com::sun::star::beans::PropertyValue& rPropVal );