summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
Diffstat (limited to 'svx')
-rw-r--r--svx/source/customshapes/EnhancedCustomShape2d.cxx6
-rw-r--r--svx/source/customshapes/EnhancedCustomShape3d.cxx6
-rw-r--r--svx/source/customshapes/EnhancedCustomShapeEngine.cxx4
-rw-r--r--svx/source/customshapes/EnhancedCustomShapeFontWork.cxx2
-rw-r--r--svx/source/dialog/dlgctl3d.cxx48
-rw-r--r--svx/source/engine3d/float3d.cxx82
-rw-r--r--svx/source/engine3d/view3d1.cxx4
-rw-r--r--svx/source/sdr/primitive2d/sdrattributecreator.cxx60
-rw-r--r--svx/source/sdr/primitive3d/sdrattributecreator3d.cxx26
-rw-r--r--svx/source/svdraw/svdoashp.cxx32
-rw-r--r--svx/source/table/tablecontroller.cxx12
-rw-r--r--svx/source/toolbars/extrusionbar.cxx20
-rw-r--r--svx/source/toolbars/fontworkbar.cxx10
-rw-r--r--svx/source/unodraw/unoprov.cxx1
-rw-r--r--svx/source/unodraw/unoshap3.cxx4
15 files changed, 159 insertions, 158 deletions
diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx
index 51c11848de67..9325e6e88f82 100644
--- a/svx/source/customshapes/EnhancedCustomShape2d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx
@@ -730,7 +730,7 @@ EnhancedCustomShape2d::EnhancedCustomShape2d( SdrObject* pAObj ) :
aLogicRect = tools::Rectangle( aP, aS );
OUString sShapeType;
- const SdrCustomShapeGeometryItem& rGeometryItem = static_cast<const SdrCustomShapeGeometryItem&>(pCustomShapeObj->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ));
+ const SdrCustomShapeGeometryItem& rGeometryItem = pCustomShapeObj->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY );
const Any* pAny = rGeometryItem.GetPropertyValueByName( "Type" );
if ( pAny ) {
*pAny >>= sShapeType;
@@ -1373,7 +1373,7 @@ bool EnhancedCustomShape2d::SetHandleControllerPosition( const sal_uInt32 nIndex
}
// and writing them back into the GeometryItem
SdrCustomShapeGeometryItem aGeometryItem(
- static_cast<const SdrCustomShapeGeometryItem&>(pCustomShapeObj->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY )));
+ pCustomShapeObj->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ));
css::beans::PropertyValue aPropVal;
aPropVal.Name = "AdjustmentValues";
aPropVal.Value <<= seqAdjustmentValues;
@@ -1607,7 +1607,7 @@ void EnhancedCustomShape2d::CreateSubPath( sal_Int32& rSrcPt, sal_Int32& rSegmen
bIsDefaultPath = true;
OUString sShpType;
- SdrCustomShapeGeometryItem& rGeometryItem = const_cast<SdrCustomShapeGeometryItem&>(static_cast<const SdrCustomShapeGeometryItem&>(pCustomShapeObj->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY )));
+ SdrCustomShapeGeometryItem& rGeometryItem = const_cast<SdrCustomShapeGeometryItem&>(pCustomShapeObj->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ));
Any* pAny = rGeometryItem.GetPropertyValueByName( "Type" );
if ( pAny )
*pAny >>= sShpType;
diff --git a/svx/source/customshapes/EnhancedCustomShape3d.cxx b/svx/source/customshapes/EnhancedCustomShape3d.cxx
index bbc9ad4f7320..d9968a768142 100644
--- a/svx/source/customshapes/EnhancedCustomShape3d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape3d.cxx
@@ -185,7 +185,7 @@ EnhancedCustomShape3d::Transformation2D::Transformation2D( const SdrObject* pCus
, fOriginY(0.0)
, pMap( pM )
{
- const SdrCustomShapeGeometryItem& rGeometryItem = static_cast<const SdrCustomShapeGeometryItem&>(pCustomShape->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ));
+ const SdrCustomShapeGeometryItem& rGeometryItem = pCustomShape->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY );
const Any* pAny = rGeometryItem.GetPropertyValueByName( "Extrusion", "ProjectionMode" );
if ( pAny )
*pAny >>= eProjectionMode;
@@ -253,7 +253,7 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con
{
SdrObject* pRet = nullptr;
SdrModel* pModel = pCustomShape->GetModel();
- const SdrCustomShapeGeometryItem& rGeometryItem = static_cast<const SdrCustomShapeGeometryItem&>(pCustomShape->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ));
+ const SdrCustomShapeGeometryItem& rGeometryItem = pCustomShape->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY );
double fMap, *pMap = nullptr;
if ( pModel )
@@ -734,7 +734,7 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con
tools::Rectangle EnhancedCustomShape3d::CalculateNewSnapRect( const SdrObject* pCustomShape, const tools::Rectangle& rSnapRect, const tools::Rectangle& rBoundRect, const double* pMap )
{
- const SdrCustomShapeGeometryItem& rGeometryItem = static_cast<const SdrCustomShapeGeometryItem&>(pCustomShape->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ));
+ const SdrCustomShapeGeometryItem& rGeometryItem = pCustomShape->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY );
const Point aCenter( rSnapRect.Center() );
double fExtrusionBackward, fExtrusionForward;
GetExtrusionDepth( rGeometryItem, pMap, fExtrusionBackward, fExtrusionForward );
diff --git a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx
index 00100d8afad9..4fd5857b315d 100644
--- a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx
@@ -258,8 +258,8 @@ Reference< drawing::XShape > SAL_CALL EnhancedCustomShapeEngine::render()
if ( pSdrObjCustomShape )
{
// retrieving the TextPath property to check if feature is enabled
- const SdrCustomShapeGeometryItem& rGeometryItem = static_cast<const SdrCustomShapeGeometryItem&>(
- pSdrObjCustomShape->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ));
+ const SdrCustomShapeGeometryItem& rGeometryItem =
+ pSdrObjCustomShape->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY );
bool bTextPathOn = false;
const uno::Any* pAny = rGeometryItem.GetPropertyValueByName( "TextPath", "TextPath" );
if ( pAny )
diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
index d336ec66e4af..be18edd1b2f8 100644
--- a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
@@ -428,7 +428,7 @@ bool GetFontWorkOutline(FWData& rFWData, const SdrObject* pCustomShape)
return false;
bool bSameLetterHeights = false;
- const SdrCustomShapeGeometryItem& rGeometryItem = static_cast<const SdrCustomShapeGeometryItem&>(pCustomShape->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ));
+ const SdrCustomShapeGeometryItem& rGeometryItem = pCustomShape->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY );
const css::uno::Any* pAny = rGeometryItem.GetPropertyValueByName( "TextPath", "SameLetterHeights" );
if ( pAny )
*pAny >>= bSameLetterHeights;
diff --git a/svx/source/dialog/dlgctl3d.cxx b/svx/source/dialog/dlgctl3d.cxx
index cab2f5443e98..8deb3bbc8e6c 100644
--- a/svx/source/dialog/dlgctl3d.cxx
+++ b/svx/source/dialog/dlgctl3d.cxx
@@ -876,14 +876,14 @@ bool Svx3DLightControl::GetLightOnOff(sal_uInt32 nNum) const
switch(nNum)
{
- case 0 : return static_cast<const SfxBoolItem&>(aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTON_1)).GetValue();
- case 1 : return static_cast<const SfxBoolItem&>(aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTON_2)).GetValue();
- case 2 : return static_cast<const SfxBoolItem&>(aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTON_3)).GetValue();
- case 3 : return static_cast<const SfxBoolItem&>(aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTON_4)).GetValue();
- case 4 : return static_cast<const SfxBoolItem&>(aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTON_5)).GetValue();
- case 5 : return static_cast<const SfxBoolItem&>(aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTON_6)).GetValue();
- case 6 : return static_cast<const SfxBoolItem&>(aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTON_7)).GetValue();
- case 7 : return static_cast<const SfxBoolItem&>(aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTON_8)).GetValue();
+ case 0 : return aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTON_1).GetValue();
+ case 1 : return aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTON_2).GetValue();
+ case 2 : return aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTON_3).GetValue();
+ case 3 : return aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTON_4).GetValue();
+ case 4 : return aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTON_5).GetValue();
+ case 5 : return aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTON_6).GetValue();
+ case 6 : return aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTON_7).GetValue();
+ case 7 : return aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTON_8).GetValue();
}
}
@@ -898,14 +898,14 @@ Color Svx3DLightControl::GetLightColor(sal_uInt32 nNum) const
switch(nNum)
{
- case 0 : return static_cast<const SvxColorItem&>(aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_1)).GetValue();
- case 1 : return static_cast<const SvxColorItem&>(aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_2)).GetValue();
- case 2 : return static_cast<const SvxColorItem&>(aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_3)).GetValue();
- case 3 : return static_cast<const SvxColorItem&>(aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_4)).GetValue();
- case 4 : return static_cast<const SvxColorItem&>(aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_5)).GetValue();
- case 5 : return static_cast<const SvxColorItem&>(aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_6)).GetValue();
- case 6 : return static_cast<const SvxColorItem&>(aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_7)).GetValue();
- case 7 : return static_cast<const SvxColorItem&>(aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_8)).GetValue();
+ case 0 : return aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_1).GetValue();
+ case 1 : return aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_2).GetValue();
+ case 2 : return aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_3).GetValue();
+ case 3 : return aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_4).GetValue();
+ case 4 : return aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_5).GetValue();
+ case 5 : return aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_6).GetValue();
+ case 6 : return aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_7).GetValue();
+ case 7 : return aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_8).GetValue();
}
}
@@ -920,14 +920,14 @@ basegfx::B3DVector Svx3DLightControl::GetLightDirection(sal_uInt32 nNum) const
switch(nNum)
{
- case 0 : return static_cast<const SvxB3DVectorItem&>(aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_1)).GetValue();
- case 1 : return static_cast<const SvxB3DVectorItem&>(aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_2)).GetValue();
- case 2 : return static_cast<const SvxB3DVectorItem&>(aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_3)).GetValue();
- case 3 : return static_cast<const SvxB3DVectorItem&>(aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_4)).GetValue();
- case 4 : return static_cast<const SvxB3DVectorItem&>(aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_5)).GetValue();
- case 5 : return static_cast<const SvxB3DVectorItem&>(aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_6)).GetValue();
- case 6 : return static_cast<const SvxB3DVectorItem&>(aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_7)).GetValue();
- case 7 : return static_cast<const SvxB3DVectorItem&>(aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_8)).GetValue();
+ case 0 : return aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_1).GetValue();
+ case 1 : return aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_2).GetValue();
+ case 2 : return aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_3).GetValue();
+ case 3 : return aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_4).GetValue();
+ case 4 : return aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_5).GetValue();
+ case 5 : return aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_6).GetValue();
+ case 6 : return aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_7).GetValue();
+ case 7 : return aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_8).GetValue();
}
}
diff --git a/svx/source/engine3d/float3d.cxx b/svx/source/engine3d/float3d.cxx
index 3a8289d23538..e8e025c7493c 100644
--- a/svx/source/engine3d/float3d.cxx
+++ b/svx/source/engine3d/float3d.cxx
@@ -580,7 +580,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DOBJ_HORZ_SEGS);
if(eState != SfxItemState::DONTCARE)
{
- sal_uInt32 nValue = static_cast<const SfxUInt32Item&>(rAttrs.Get(SDRATTR_3DOBJ_HORZ_SEGS)).GetValue();
+ sal_uInt32 nValue = rAttrs.Get(SDRATTR_3DOBJ_HORZ_SEGS).GetValue();
if(nValue != (sal_uInt32 )m_pNumHorizontal->GetValue())
{
m_pNumHorizontal->SetValue( nValue );
@@ -605,7 +605,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DOBJ_VERT_SEGS);
if( eState != SfxItemState::DONTCARE )
{
- sal_uInt32 nValue = static_cast<const SfxUInt32Item&>(rAttrs.Get(SDRATTR_3DOBJ_VERT_SEGS)).GetValue();
+ sal_uInt32 nValue = rAttrs.Get(SDRATTR_3DOBJ_VERT_SEGS).GetValue();
if( nValue != (sal_uInt32) m_pNumVertical->GetValue() )
{
m_pNumVertical->SetValue( nValue );
@@ -630,7 +630,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DOBJ_DEPTH);
if( eState != SfxItemState::DONTCARE )
{
- sal_uInt32 nValue = static_cast<const SfxUInt32Item&>(rAttrs.Get(SDRATTR_3DOBJ_DEPTH)).GetValue();
+ sal_uInt32 nValue = rAttrs.Get(SDRATTR_3DOBJ_DEPTH).GetValue();
sal_uInt32 nValue2 = GetCoreValue(*m_pMtrDepth, ePoolUnit);
if( nValue != nValue2 )
{
@@ -657,7 +657,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DOBJ_DOUBLE_SIDED);
if( eState != SfxItemState::DONTCARE )
{
- bool bValue = static_cast<const SfxBoolItem&>(rAttrs.Get(SDRATTR_3DOBJ_DOUBLE_SIDED)).GetValue();
+ bool bValue = rAttrs.Get(SDRATTR_3DOBJ_DOUBLE_SIDED).GetValue();
if( bValue != m_pBtnDoubleSided->IsChecked() )
{
m_pBtnDoubleSided->Check( bValue );
@@ -681,7 +681,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DOBJ_PERCENT_DIAGONAL);
if( eState != SfxItemState::DONTCARE )
{
- sal_uInt16 nValue = static_cast<const SfxUInt16Item&>(rAttrs.Get(SDRATTR_3DOBJ_PERCENT_DIAGONAL)).GetValue();
+ sal_uInt16 nValue = rAttrs.Get(SDRATTR_3DOBJ_PERCENT_DIAGONAL).GetValue();
if( nValue != m_pMtrPercentDiagonal->GetValue() )
{
m_pMtrPercentDiagonal->SetValue( nValue );
@@ -706,7 +706,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DOBJ_BACKSCALE);
if( eState != SfxItemState::DONTCARE )
{
- sal_uInt16 nValue = static_cast<const SfxUInt16Item&>(rAttrs.Get(SDRATTR_3DOBJ_BACKSCALE)).GetValue();
+ sal_uInt16 nValue = rAttrs.Get(SDRATTR_3DOBJ_BACKSCALE).GetValue();
if( nValue != m_pMtrBackscale->GetValue() )
{
m_pMtrBackscale->SetValue( nValue );
@@ -731,7 +731,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DOBJ_END_ANGLE);
if( eState != SfxItemState::DONTCARE )
{
- sal_Int32 nValue = static_cast<const SfxUInt32Item&>(rAttrs.Get(SDRATTR_3DOBJ_END_ANGLE)).GetValue();
+ sal_Int32 nValue = rAttrs.Get(SDRATTR_3DOBJ_END_ANGLE).GetValue();
if( nValue != m_pMtrEndAngle->GetValue() )
{
m_pMtrEndAngle->SetValue( nValue );
@@ -752,7 +752,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DOBJ_NORMALS_KIND);
if( eState != SfxItemState::DONTCARE )
{
- sal_uInt16 nValue = static_cast<const Svx3DNormalsKindItem&>(rAttrs.Get(SDRATTR_3DOBJ_NORMALS_KIND)).GetValue();
+ sal_uInt16 nValue = rAttrs.Get(SDRATTR_3DOBJ_NORMALS_KIND).GetValue();
if( ( !m_pBtnNormalsObj->IsChecked() && nValue == 0 ) ||
( !m_pBtnNormalsFlat->IsChecked() && nValue == 1 ) ||
@@ -781,7 +781,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DOBJ_NORMALS_INVERT);
if( eState != SfxItemState::DONTCARE )
{
- bool bValue = static_cast<const SfxBoolItem&>(rAttrs.Get(SDRATTR_3DOBJ_NORMALS_INVERT)).GetValue();
+ bool bValue = rAttrs.Get(SDRATTR_3DOBJ_NORMALS_INVERT).GetValue();
if( bValue != m_pBtnNormalsInvert->IsChecked() )
{
m_pBtnNormalsInvert->Check( bValue );
@@ -803,7 +803,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_TWO_SIDED_LIGHTING);
if( eState != SfxItemState::DONTCARE )
{
- bool bValue = static_cast<const SfxBoolItem&>(rAttrs.Get(SDRATTR_3DSCENE_TWO_SIDED_LIGHTING)).GetValue();
+ bool bValue = rAttrs.Get(SDRATTR_3DSCENE_TWO_SIDED_LIGHTING).GetValue();
if( bValue != m_pBtnTwoSidedLighting->IsChecked() )
{
m_pBtnTwoSidedLighting->Check( bValue );
@@ -826,7 +826,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_SHADE_MODE);
if( eState != SfxItemState::DONTCARE )
{
- sal_uInt16 nValue = static_cast<const Svx3DShadeModeItem&>(rAttrs.Get(SDRATTR_3DSCENE_SHADE_MODE)).GetValue();
+ sal_uInt16 nValue = rAttrs.Get(SDRATTR_3DSCENE_SHADE_MODE).GetValue();
if( nValue != m_pLbShademode->GetSelectedEntryPos() )
{
m_pLbShademode->SelectEntryPos( nValue );
@@ -846,7 +846,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DOBJ_SHADOW_3D);
if( eState != SfxItemState::DONTCARE )
{
- bool bValue = static_cast<const SfxBoolItem&>(rAttrs.Get(SDRATTR_3DOBJ_SHADOW_3D)).GetValue();
+ bool bValue = rAttrs.Get(SDRATTR_3DOBJ_SHADOW_3D).GetValue();
if( bValue != m_pBtnShadow3d->IsChecked() )
{
m_pBtnShadow3d->Check( bValue );
@@ -870,7 +870,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_SHADOW_SLANT);
if( eState != SfxItemState::DONTCARE )
{
- sal_uInt16 nValue = static_cast<const SfxUInt16Item&>(rAttrs.Get(SDRATTR_3DSCENE_SHADOW_SLANT)).GetValue();
+ sal_uInt16 nValue = rAttrs.Get(SDRATTR_3DSCENE_SHADOW_SLANT).GetValue();
if( nValue != m_pMtrSlant->GetValue() )
{
m_pMtrSlant->SetValue( nValue );
@@ -890,7 +890,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_DISTANCE);
if( eState != SfxItemState::DONTCARE )
{
- sal_uInt32 nValue = static_cast<const SfxUInt32Item&>(rAttrs.Get(SDRATTR_3DSCENE_DISTANCE)).GetValue();
+ sal_uInt32 nValue = rAttrs.Get(SDRATTR_3DSCENE_DISTANCE).GetValue();
sal_uInt32 nValue2 = GetCoreValue(*m_pMtrDistance, ePoolUnit);
if( nValue != nValue2 )
{
@@ -914,7 +914,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_FOCAL_LENGTH);
if( eState != SfxItemState::DONTCARE )
{
- sal_uInt32 nValue = static_cast<const SfxUInt32Item&>(rAttrs.Get(SDRATTR_3DSCENE_FOCAL_LENGTH)).GetValue();
+ sal_uInt32 nValue = rAttrs.Get(SDRATTR_3DSCENE_FOCAL_LENGTH).GetValue();
sal_uInt32 nValue2 = GetCoreValue(*m_pMtrFocalLength, ePoolUnit);
if( nValue != nValue2 )
{
@@ -940,7 +940,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTCOLOR_1);
if( eState != SfxItemState::DONTCARE )
{
- aColor = static_cast<const SvxColorItem&>(rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_1)).GetValue();
+ aColor = rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_1).GetValue();
SvxColorListBox* pLb = m_pLbLight1;
if( aColor != pLb->GetSelectEntryColor() )
{
@@ -960,7 +960,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTON_1);
if( eState != SfxItemState::DONTCARE )
{
- bool bOn = static_cast<const SfxBoolItem&>(rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_1)).GetValue();
+ bool bOn = rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_1).GetValue();
if( ( bOn && !GetUILightState(*m_pBtnLight1)) ||
( !bOn && GetUILightState(*m_pBtnLight1)) )
{
@@ -989,7 +989,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTCOLOR_2);
if( eState != SfxItemState::DONTCARE )
{
- aColor = static_cast<const SvxColorItem&>(rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_2)).GetValue();
+ aColor = rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_2).GetValue();
SvxColorListBox* pLb = m_pLbLight2;
if( aColor != pLb->GetSelectEntryColor() )
{
@@ -1009,7 +1009,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTON_2);
if( eState != SfxItemState::DONTCARE )
{
- bool bOn = static_cast<const SfxBoolItem&>(rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_2)).GetValue();
+ bool bOn = rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_2).GetValue();
if( ( bOn && !GetUILightState(*m_pBtnLight2)) ||
( !bOn && GetUILightState(*m_pBtnLight2)) )
{
@@ -1038,7 +1038,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTCOLOR_3);
if( eState != SfxItemState::DONTCARE )
{
- aColor = static_cast<const SvxColorItem&>(rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_3)).GetValue();
+ aColor = rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_3).GetValue();
SvxColorListBox* pLb = m_pLbLight3;
if( aColor != pLb->GetSelectEntryColor() )
{
@@ -1058,7 +1058,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTON_3);
if( eState != SfxItemState::DONTCARE )
{
- bool bOn = static_cast<const SfxBoolItem&>(rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_3)).GetValue();
+ bool bOn = rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_3).GetValue();
if( ( bOn && !GetUILightState(*m_pBtnLight3)) ||
( !bOn && GetUILightState(*m_pBtnLight3)) )
{
@@ -1087,7 +1087,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTCOLOR_4);
if( eState != SfxItemState::DONTCARE )
{
- aColor = static_cast<const SvxColorItem&>(rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_4)).GetValue();
+ aColor = rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_4).GetValue();
SvxColorListBox* pLb = m_pLbLight4;
if( aColor != pLb->GetSelectEntryColor() )
{
@@ -1107,7 +1107,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTON_4);
if( eState != SfxItemState::DONTCARE )
{
- bool bOn = static_cast<const SfxBoolItem&>(rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_4)).GetValue();
+ bool bOn = rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_4).GetValue();
if( ( bOn && !GetUILightState(*m_pBtnLight4)) ||
( !bOn && GetUILightState(*m_pBtnLight4)) )
{
@@ -1136,7 +1136,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTCOLOR_5);
if( eState != SfxItemState::DONTCARE )
{
- aColor = static_cast<const SvxColorItem&>(rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_5)).GetValue();
+ aColor = rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_5).GetValue();
SvxColorListBox* pLb = m_pLbLight5;
if( aColor != pLb->GetSelectEntryColor() )
{
@@ -1156,7 +1156,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTON_5);
if( eState != SfxItemState::DONTCARE )
{
- bool bOn = static_cast<const SfxBoolItem&>(rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_5)).GetValue();
+ bool bOn = rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_5).GetValue();
if( ( bOn && !GetUILightState(*m_pBtnLight5)) ||
( !bOn && GetUILightState(*m_pBtnLight5)) )
{
@@ -1185,7 +1185,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTCOLOR_6);
if( eState != SfxItemState::DONTCARE )
{
- aColor = static_cast<const SvxColorItem&>(rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_6)).GetValue();
+ aColor = rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_6).GetValue();
SvxColorListBox* pLb = m_pLbLight6;
if( aColor != pLb->GetSelectEntryColor() )
{
@@ -1205,7 +1205,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTON_6);
if( eState != SfxItemState::DONTCARE )
{
- bool bOn = static_cast<const SfxBoolItem&>(rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_6)).GetValue();
+ bool bOn = rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_6).GetValue();
if( ( bOn && !GetUILightState(*m_pBtnLight6)) ||
( !bOn && GetUILightState(*m_pBtnLight6)) )
{
@@ -1234,7 +1234,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTCOLOR_7);
if( eState != SfxItemState::DONTCARE )
{
- aColor = static_cast<const SvxColorItem&>(rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_7)).GetValue();
+ aColor = rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_7).GetValue();
SvxColorListBox* pLb = m_pLbLight7;
if( aColor != pLb->GetSelectEntryColor() )
{
@@ -1254,7 +1254,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTON_7);
if( eState != SfxItemState::DONTCARE )
{
- bool bOn = static_cast<const SfxBoolItem&>(rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_7)).GetValue();
+ bool bOn = rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_7).GetValue();
if( ( bOn && !GetUILightState(*m_pBtnLight7)) ||
( !bOn && GetUILightState(*m_pBtnLight7)) )
{
@@ -1283,7 +1283,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTCOLOR_8);
if( eState != SfxItemState::DONTCARE )
{
- aColor = static_cast<const SvxColorItem&>(rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_8)).GetValue();
+ aColor = rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_8).GetValue();
SvxColorListBox* pLb = m_pLbLight8;
if( aColor != pLb->GetSelectEntryColor() )
{
@@ -1303,7 +1303,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTON_8);
if( eState != SfxItemState::DONTCARE )
{
- bool bOn = static_cast<const SfxBoolItem&>(rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_8)).GetValue();
+ bool bOn = rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_8).GetValue();
if( ( bOn && !GetUILightState(*m_pBtnLight8)) ||
( !bOn && GetUILightState(*m_pBtnLight8)) )
{
@@ -1332,7 +1332,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_AMBIENTCOLOR);
if( eState != SfxItemState::DONTCARE )
{
- aColor = static_cast<const SvxColorItem&>(rAttrs.Get(SDRATTR_3DSCENE_AMBIENTCOLOR)).GetValue();
+ aColor = rAttrs.Get(SDRATTR_3DSCENE_AMBIENTCOLOR).GetValue();
SvxColorListBox* pLb = m_pLbAmbientlight;
if( aColor != pLb->GetSelectEntryColor() )
{
@@ -1357,7 +1357,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DOBJ_TEXTURE_KIND);
if( eState != SfxItemState::DONTCARE )
{
- sal_uInt16 nValue = static_cast<const Svx3DTextureKindItem&>(rAttrs.Get(SDRATTR_3DOBJ_TEXTURE_KIND)).GetValue();
+ sal_uInt16 nValue = rAttrs.Get(SDRATTR_3DOBJ_TEXTURE_KIND).GetValue();
if( ( !m_pBtnTexLuminance->IsChecked() && nValue == 1 ) ||
( !m_pBtnTexColor->IsChecked() && nValue == 3 ) )
@@ -1382,7 +1382,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DOBJ_TEXTURE_MODE);
if( eState != SfxItemState::DONTCARE )
{
- sal_uInt16 nValue = static_cast<const Svx3DTextureModeItem&>(rAttrs.Get(SDRATTR_3DOBJ_TEXTURE_MODE)).GetValue();
+ sal_uInt16 nValue = rAttrs.Get(SDRATTR_3DOBJ_TEXTURE_MODE).GetValue();
if( ( !m_pBtnTexReplace->IsChecked() && nValue == 1 ) ||
( !m_pBtnTexModulate->IsChecked() && nValue == 2 ) )
@@ -1407,7 +1407,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DOBJ_TEXTURE_PROJ_X);
if( eState != SfxItemState::DONTCARE )
{
- sal_uInt16 nValue = static_cast<const Svx3DTextureProjectionXItem&>(rAttrs.Get(SDRATTR_3DOBJ_TEXTURE_PROJ_X)).GetValue();
+ sal_uInt16 nValue = rAttrs.Get(SDRATTR_3DOBJ_TEXTURE_PROJ_X).GetValue();
if( ( !m_pBtnTexObjectX->IsChecked() && nValue == 0 ) ||
( !m_pBtnTexParallelX->IsChecked() && nValue == 1 ) ||
@@ -1436,7 +1436,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DOBJ_TEXTURE_PROJ_Y);
if( eState != SfxItemState::DONTCARE )
{
- sal_uInt16 nValue = static_cast<const Svx3DTextureProjectionYItem&>(rAttrs.Get(SDRATTR_3DOBJ_TEXTURE_PROJ_Y)).GetValue();
+ sal_uInt16 nValue = rAttrs.Get(SDRATTR_3DOBJ_TEXTURE_PROJ_Y).GetValue();
if( ( !m_pBtnTexObjectY->IsChecked() && nValue == 0 ) ||
( !m_pBtnTexParallelY->IsChecked() && nValue == 1 ) ||
@@ -1465,7 +1465,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DOBJ_TEXTURE_FILTER);
if( eState != SfxItemState::DONTCARE )
{
- bool bValue = static_cast<const SfxBoolItem&>(rAttrs.Get(SDRATTR_3DOBJ_TEXTURE_FILTER)).GetValue();
+ bool bValue = rAttrs.Get(SDRATTR_3DOBJ_TEXTURE_FILTER).GetValue();
if( bValue != m_pBtnTexFilter->IsChecked() )
{
m_pBtnTexFilter->Check( bValue );
@@ -1513,7 +1513,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DOBJ_MAT_EMISSION);
if( eState != SfxItemState::DONTCARE )
{
- aColor = static_cast<const SvxColorItem&>(rAttrs.Get(SDRATTR_3DOBJ_MAT_EMISSION)).GetValue();
+ aColor = rAttrs.Get(SDRATTR_3DOBJ_MAT_EMISSION).GetValue();
SvxColorListBox* pLb = m_pLbMatEmission;
if( aColor != pLb->GetSelectEntryColor() )
{
@@ -1534,7 +1534,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DOBJ_MAT_SPECULAR);
if( eState != SfxItemState::DONTCARE )
{
- aColor = static_cast<const SvxColorItem&>(rAttrs.Get(SDRATTR_3DOBJ_MAT_SPECULAR)).GetValue();
+ aColor = rAttrs.Get(SDRATTR_3DOBJ_MAT_SPECULAR).GetValue();
SvxColorListBox* pLb = m_pLbMatSpecular;
if( aColor != pLb->GetSelectEntryColor() )
{
@@ -1555,7 +1555,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY);
if( eState != SfxItemState::DONTCARE )
{
- sal_uInt16 nValue = static_cast<const SfxUInt16Item&>(rAttrs.Get(SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY)).GetValue();
+ sal_uInt16 nValue = rAttrs.Get(SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY).GetValue();
if( nValue != m_pMtrMatSpecularIntensity->GetValue() )
{
m_pMtrMatSpecularIntensity->SetValue( nValue );
@@ -1577,7 +1577,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_PERSPECTIVE);
if( eState != SfxItemState::DONTCARE )
{
- ProjectionType ePT = (ProjectionType)static_cast<const Svx3DPerspectiveItem&>(rAttrs.Get(SDRATTR_3DSCENE_PERSPECTIVE)).GetValue();
+ ProjectionType ePT = (ProjectionType)rAttrs.Get(SDRATTR_3DSCENE_PERSPECTIVE).GetValue();
if( ( !m_pBtnPerspective->IsChecked() && ePT == ProjectionType::Perspective ) ||
( m_pBtnPerspective->IsChecked() && ePT == ProjectionType::Parallel ) )
{
diff --git a/svx/source/engine3d/view3d1.cxx b/svx/source/engine3d/view3d1.cxx
index e4e38726ddb4..bfa2db5bc489 100644
--- a/svx/source/engine3d/view3d1.cxx
+++ b/svx/source/engine3d/view3d1.cxx
@@ -175,12 +175,12 @@ void E3dView::Set3DAttributes( const SfxItemSet& rAttr)
double E3dView::GetDefaultCamPosZ()
{
- return (double) static_cast<const SfxUInt32Item&>(mpModel->GetItemPool().GetDefaultItem(SDRATTR_3DSCENE_DISTANCE)).GetValue();
+ return (double) mpModel->GetItemPool().GetDefaultItem(SDRATTR_3DSCENE_DISTANCE).GetValue();
}
double E3dView::GetDefaultCamFocal()
{
- return (double) static_cast<const SfxUInt32Item&>(mpModel->GetItemPool().GetDefaultItem(SDRATTR_3DSCENE_FOCAL_LENGTH)).GetValue();
+ return (double) mpModel->GetItemPool().GetDefaultItem(SDRATTR_3DSCENE_FOCAL_LENGTH).GetValue();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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);
diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx
index d191331917ab..bfc41acfd63c 100644
--- a/svx/source/svdraw/svdoashp.cxx
+++ b/svx/source/svdraw/svdoashp.cxx
@@ -171,11 +171,11 @@ static MSO_SPT ImpGetCustomShapeType( const SdrObjCustomShape& rCustoShape )
{
MSO_SPT eRetValue = mso_sptNil;
- OUString aEngine( static_cast<const SfxStringItem&>( rCustoShape.GetMergedItem( SDRATTR_CUSTOMSHAPE_ENGINE ) ).GetValue() );
+ OUString aEngine( rCustoShape.GetMergedItem( SDRATTR_CUSTOMSHAPE_ENGINE ).GetValue() );
if ( aEngine.isEmpty() || aEngine == "com.sun.star.drawing.EnhancedCustomShapeEngine" )
{
OUString sShapeType;
- const SdrCustomShapeGeometryItem& rGeometryItem( static_cast<const SdrCustomShapeGeometryItem&>(rCustoShape.GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY )) );
+ const SdrCustomShapeGeometryItem& rGeometryItem( rCustoShape.GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) );
const Any* pAny = rGeometryItem.GetPropertyValueByName( "Type" );
if ( pAny && ( *pAny >>= sShapeType ) )
eRetValue = EnhancedCustomShapeTypeNames::Get( sShapeType );
@@ -410,7 +410,7 @@ Reference< XCustomShapeEngine > const & SdrObjCustomShape::GetCustomShapeEngine(
if (mxCustomShapeEngine.is())
return mxCustomShapeEngine;
- OUString aEngine(static_cast<const SfxStringItem&>(GetMergedItem( SDRATTR_CUSTOMSHAPE_ENGINE )).GetValue());
+ OUString aEngine(GetMergedItem( SDRATTR_CUSTOMSHAPE_ENGINE ).GetValue());
if ( aEngine.isEmpty() )
aEngine = "com.sun.star.drawing.EnhancedCustomShapeEngine";
@@ -474,7 +474,7 @@ bool SdrObjCustomShape::IsTextPath() const
{
const OUString sTextPath( "TextPath" );
bool bTextPathOn = false;
- const SdrCustomShapeGeometryItem& rGeometryItem = static_cast<const SdrCustomShapeGeometryItem&>(GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ));
+ const SdrCustomShapeGeometryItem& rGeometryItem = GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY );
const Any* pAny = rGeometryItem.GetPropertyValueByName( sTextPath, sTextPath );
if ( pAny )
*pAny >>= bTextPathOn;
@@ -486,7 +486,7 @@ bool SdrObjCustomShape::UseNoFillStyle() const
bool bRet = false;
OUString sShapeType;
const OUString sType( "Type" );
- const SdrCustomShapeGeometryItem& rGeometryItem( static_cast<const SdrCustomShapeGeometryItem&>(GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) ) );
+ const SdrCustomShapeGeometryItem& rGeometryItem( GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) );
const Any* pAny = rGeometryItem.GetPropertyValueByName( sType );
if ( pAny )
*pAny >>= sShapeType;
@@ -498,7 +498,7 @@ bool SdrObjCustomShape::UseNoFillStyle() const
bool SdrObjCustomShape::IsMirroredX() const
{
bool bMirroredX = false;
- SdrCustomShapeGeometryItem aGeometryItem( static_cast<const SdrCustomShapeGeometryItem&>(GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) ) );
+ SdrCustomShapeGeometryItem aGeometryItem( GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) );
const OUString sMirroredX( "MirroredX" );
css::uno::Any* pAny = aGeometryItem.GetPropertyValueByName( sMirroredX );
if ( pAny )
@@ -508,7 +508,7 @@ bool SdrObjCustomShape::IsMirroredX() const
bool SdrObjCustomShape::IsMirroredY() const
{
bool bMirroredY = false;
- SdrCustomShapeGeometryItem aGeometryItem( static_cast<const SdrCustomShapeGeometryItem&>(GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) ) );
+ SdrCustomShapeGeometryItem aGeometryItem( GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) );
const OUString sMirroredY( "MirroredY" );
css::uno::Any* pAny = aGeometryItem.GetPropertyValueByName( sMirroredY );
if ( pAny )
@@ -517,7 +517,7 @@ bool SdrObjCustomShape::IsMirroredY() const
}
void SdrObjCustomShape::SetMirroredX( const bool bMirrorX )
{
- SdrCustomShapeGeometryItem aGeometryItem( static_cast<const SdrCustomShapeGeometryItem&>(GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) ) );
+ SdrCustomShapeGeometryItem aGeometryItem( GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) );
const OUString sMirroredX( "MirroredX" );
PropertyValue aPropVal;
aPropVal.Name = sMirroredX;
@@ -527,7 +527,7 @@ void SdrObjCustomShape::SetMirroredX( const bool bMirrorX )
}
void SdrObjCustomShape::SetMirroredY( const bool bMirrorY )
{
- SdrCustomShapeGeometryItem aGeometryItem( static_cast<const SdrCustomShapeGeometryItem&>(GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) ) );
+ SdrCustomShapeGeometryItem aGeometryItem( GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) );
const OUString sMirroredY( "MirroredY" );
PropertyValue aPropVal;
aPropVal.Name = sMirroredY;
@@ -539,7 +539,7 @@ void SdrObjCustomShape::SetMirroredY( const bool bMirrorY )
double SdrObjCustomShape::GetExtraTextRotation( const bool bPreRotation ) const
{
const css::uno::Any* pAny;
- const SdrCustomShapeGeometryItem& rGeometryItem = static_cast<const SdrCustomShapeGeometryItem&>(GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ));
+ const SdrCustomShapeGeometryItem& rGeometryItem = GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY );
const OUString sTextRotateAngle( "TextRotateAngle" );
const OUString sTextPreRotateAngle( "TextPreRotateAngle" );
pAny = rGeometryItem.GetPropertyValueByName( bPreRotation ? sTextPreRotateAngle : sTextRotateAngle );
@@ -842,7 +842,7 @@ void SdrObjCustomShape::MergeDefaultAttributes( const OUString* pType )
PropertyValue aPropVal;
OUString sShapeType;
const OUString sType( "Type" );
- SdrCustomShapeGeometryItem aGeometryItem( static_cast<const SdrCustomShapeGeometryItem&>(GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY )) );
+ SdrCustomShapeGeometryItem aGeometryItem( GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) );
if ( pType && !pType->isEmpty() )
{
sal_Int32 nType = pType->toInt32();
@@ -1086,7 +1086,7 @@ bool SdrObjCustomShape::IsDefaultGeometry( const DefaultType eDefaultType ) cons
PropertyValue aPropVal;
OUString sShapeType;
const OUString sType( "Type" );
- const SdrCustomShapeGeometryItem aGeometryItem( static_cast<const SdrCustomShapeGeometryItem&>(GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY )) );
+ const SdrCustomShapeGeometryItem aGeometryItem( GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) );
const Any *pAny = aGeometryItem.GetPropertyValueByName( sType );
if ( pAny )
@@ -2885,7 +2885,7 @@ void SdrObjCustomShape::SaveGeoData(SdrObjGeoData& rGeo) const
rAGeo.bMirroredY = IsMirroredY();
const OUString sAdjustmentValues( "AdjustmentValues" );
- const Any* pAny = static_cast<const SdrCustomShapeGeometryItem&>( GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) ).GetPropertyValueByName( sAdjustmentValues );
+ const Any* pAny = GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ).GetPropertyValueByName( sAdjustmentValues );
if ( pAny )
*pAny >>= rAGeo.aAdjustmentSeq;
}
@@ -2898,7 +2898,7 @@ void SdrObjCustomShape::RestGeoData(const SdrObjGeoData& rGeo)
SetMirroredX( rAGeo.bMirroredX );
SetMirroredY( rAGeo.bMirroredY );
- SdrCustomShapeGeometryItem rGeometryItem = static_cast<const SdrCustomShapeGeometryItem&>(GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ));
+ SdrCustomShapeGeometryItem rGeometryItem = GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY );
const OUString sAdjustmentValues( "AdjustmentValues" );
PropertyValue aPropVal;
aPropVal.Name = sAdjustmentValues;
@@ -3174,13 +3174,13 @@ void SdrObjCustomShape::impl_setUnoShape(const uno::Reference<uno::XInterface>&
OUString SdrObjCustomShape::GetCustomShapeName()
{
OUString sShapeName;
- OUString aEngine( static_cast<const SfxStringItem&>(GetMergedItem( SDRATTR_CUSTOMSHAPE_ENGINE )).GetValue() );
+ OUString aEngine( GetMergedItem( SDRATTR_CUSTOMSHAPE_ENGINE ).GetValue() );
if ( aEngine.isEmpty()
|| aEngine == "com.sun.star.drawing.EnhancedCustomShapeEngine" )
{
OUString sShapeType;
const OUString sType("Type");
- const SdrCustomShapeGeometryItem& rGeometryItem( static_cast<const SdrCustomShapeGeometryItem&>( GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) ) );
+ const SdrCustomShapeGeometryItem& rGeometryItem( GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) );
const Any* pAny = rGeometryItem.GetPropertyValueByName( sType );
if ( pAny && ( *pAny >>= sShapeType ) )
sShapeName = EnhancedCustomShapeTypeNames::GetAccName( sShapeType );
diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx
index 7f1dbc070254..bcbfa618ffcc 100644
--- a/svx/source/table/tablecontroller.cxx
+++ b/svx/source/table/tablecontroller.cxx
@@ -882,7 +882,7 @@ namespace
SvxBoxItem mergeDrawinglayerTextDistancesAndSvxBoxItem(const SfxItemSet& rAttrSet)
{
// merge drawing layer text distance items into SvxBoxItem used by the dialog
- SvxBoxItem aBoxItem( static_cast< const SvxBoxItem& >( rAttrSet.Get( SDRATTR_TABLE_BORDER ) ) );
+ SvxBoxItem aBoxItem( rAttrSet.Get( SDRATTR_TABLE_BORDER ) );
aBoxItem.SetDistance( sal::static_int_cast< sal_uInt16 >( rAttrSet.Get(SDRATTR_TEXT_LEFTDIST).GetValue()), SvxBoxItemLine::LEFT );
aBoxItem.SetDistance( sal::static_int_cast< sal_uInt16 >( rAttrSet.Get(SDRATTR_TEXT_RIGHTDIST).GetValue()), SvxBoxItemLine::RIGHT );
aBoxItem.SetDistance( sal::static_int_cast< sal_uInt16 >( rAttrSet.Get(SDRATTR_TEXT_UPPERDIST).GetValue()), SvxBoxItemLine::TOP );
@@ -906,7 +906,7 @@ void SvxTableController::onFormatTable( SfxRequest const & rReq )
// merge drawing layer text distance items into SvxBoxItem used by the dialog
SvxBoxItem aBoxItem(mergeDrawinglayerTextDistancesAndSvxBoxItem(aNewAttr));
- SvxBoxInfoItem aBoxInfoItem( static_cast< const SvxBoxInfoItem& >( aNewAttr.Get( SDRATTR_TABLE_BORDER_INNER ) ) );
+ SvxBoxInfoItem aBoxInfoItem( aNewAttr.Get( SDRATTR_TABLE_BORDER_INNER ) );
MergeAttrFromSelectedCells(aNewAttr, false);
FillCommonBorderAttrFromSelectedCells( aBoxItem, aBoxInfoItem );
@@ -934,7 +934,7 @@ void SvxTableController::onFormatTable( SfxRequest const & rReq )
aNewSet.Put(aBoxInfoItem);
}
- SvxBoxItem aNewBoxItem( static_cast< const SvxBoxItem& >( aNewSet.Get( SDRATTR_TABLE_BORDER ) ) );
+ SvxBoxItem aNewBoxItem( aNewSet.Get( SDRATTR_TABLE_BORDER ) );
if( aNewBoxItem.GetDistance( SvxBoxItemLine::LEFT ) != aBoxItem.GetDistance( SvxBoxItemLine::LEFT ) )
aNewSet.Put(makeSdrTextLeftDistItem( aNewBoxItem.GetDistance( SvxBoxItemLine::LEFT ) ) );
@@ -2415,11 +2415,11 @@ void SvxTableController::ApplyBorderAttr( const SfxItemSet& rAttr )
{
const SvxBoxItem* pBoxItem = nullptr;
if(SfxItemState::SET == rAttr.GetItemState(SDRATTR_TABLE_BORDER, false) )
- pBoxItem = dynamic_cast< const SvxBoxItem* >( &rAttr.Get( SDRATTR_TABLE_BORDER ) );
+ pBoxItem = &rAttr.Get( SDRATTR_TABLE_BORDER );
const SvxBoxInfoItem* pBoxInfoItem = nullptr;
if(SfxItemState::SET == rAttr.GetItemState(SDRATTR_TABLE_BORDER_INNER, false) )
- pBoxInfoItem = dynamic_cast< const SvxBoxInfoItem* >( &rAttr.Get( SDRATTR_TABLE_BORDER_INNER ) );
+ pBoxInfoItem = &rAttr.Get( SDRATTR_TABLE_BORDER_INNER );
const SvxColorItem* pLineColorItem = nullptr;
if(SfxItemState::SET == rAttr.GetItemState(SID_FRAME_LINECOLOR, false) )
@@ -2461,7 +2461,7 @@ void SvxTableController::ApplyBorderAttr( const SfxItemSet& rAttr )
continue;
const SfxItemSet& rSet = xCell->GetItemSet();
- const SvxBoxItem* pOldOuter = static_cast<const SvxBoxItem*>(&rSet.Get( SDRATTR_TABLE_BORDER ));
+ const SvxBoxItem* pOldOuter = &rSet.Get( SDRATTR_TABLE_BORDER );
SvxBoxItem aNewFrame( *pOldOuter );
diff --git a/svx/source/toolbars/extrusionbar.cxx b/svx/source/toolbars/extrusionbar.cxx
index 791f4ee4a729..22321bbb1aab 100644
--- a/svx/source/toolbars/extrusionbar.cxx
+++ b/svx/source/toolbars/extrusionbar.cxx
@@ -545,7 +545,7 @@ void ExtrusionBar::execute( SdrView* pSdrView, SfxRequest const & rReq, SfxBindi
pSdrView->BegUndo( aStr );
pSdrView->AddUndo( pSdrView->GetModel()->GetSdrUndoFactory().CreateUndoAttrObject( *pObj ) );
}
- SdrCustomShapeGeometryItem aGeometryItem( static_cast<const SdrCustomShapeGeometryItem&>(pObj->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY )));
+ SdrCustomShapeGeometryItem aGeometryItem( pObj->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) );
impl_execute( rReq, aGeometryItem, pObj );
pObj->SetMergedItem( aGeometryItem );
pObj->BroadcastObjectChange();
@@ -625,7 +625,7 @@ void getExtrusionDirectionState( SdrView const * pSdrView, SfxItemSet& rSet )
SdrObject* pObj = rMarkList.GetMark(i)->GetMarkedSdrObj();
if( dynamic_cast<const SdrObjCustomShape*>( pObj) != nullptr )
{
- const SdrCustomShapeGeometryItem aGeometryItem( static_cast<const SdrCustomShapeGeometryItem&>(pObj->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY )) );
+ const SdrCustomShapeGeometryItem aGeometryItem( pObj->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) );
// see if this is an extruded customshape
if( !bHasCustomShape )
@@ -775,7 +775,7 @@ void getExtrusionProjectionState( SdrView const * pSdrView, SfxItemSet& rSet )
// see if this is an extruded customshape
if( !bHasCustomShape )
{
- const SdrCustomShapeGeometryItem aGeometryItem( static_cast<const SdrCustomShapeGeometryItem&>(pObj->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY )) );
+ const SdrCustomShapeGeometryItem aGeometryItem( pObj->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) );
const Any* pAny_ = aGeometryItem.GetPropertyValueByName( sExtrusion, sExtrusion );
if( pAny_ )
*pAny_ >>= bHasCustomShape;
@@ -784,7 +784,7 @@ void getExtrusionProjectionState( SdrView const * pSdrView, SfxItemSet& rSet )
continue;
}
- const SdrCustomShapeGeometryItem aGeometryItem( static_cast<const SdrCustomShapeGeometryItem&>(pObj->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY )) );
+ const SdrCustomShapeGeometryItem aGeometryItem( pObj->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) );
bool bParallel = true;
pAny = aGeometryItem.GetPropertyValueByName( sExtrusion, "ProjectionMode" );
@@ -827,7 +827,7 @@ void getExtrusionSurfaceState( SdrView const * pSdrView, SfxItemSet& rSet )
SdrObject* pObj = rMarkList.GetMark(i)->GetMarkedSdrObj();
if( dynamic_cast<const SdrObjCustomShape*>( pObj) != nullptr )
{
- const SdrCustomShapeGeometryItem aGeometryItem( static_cast<const SdrCustomShapeGeometryItem&>(pObj->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY )) );
+ const SdrCustomShapeGeometryItem aGeometryItem( pObj->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) );
// see if this is an extruded customshape
if( !bHasCustomShape )
@@ -912,7 +912,7 @@ void getExtrusionDepthState( SdrView const * pSdrView, SfxItemSet& rSet )
SdrObject* pObj = rMarkList.GetMark(i)->GetMarkedSdrObj();
if( dynamic_cast<const SdrObjCustomShape*>( pObj) != nullptr )
{
- const SdrCustomShapeGeometryItem aGeometryItem( static_cast<const SdrCustomShapeGeometryItem&>(pObj->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY )) );
+ const SdrCustomShapeGeometryItem aGeometryItem( pObj->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) );
// see if this is an extruded customshape
if( !bHasCustomShape )
@@ -996,7 +996,7 @@ void getExtrusionLightingDirectionState( SdrView const * pSdrView, SfxItemSet& r
SdrObject* pObj = rMarkList.GetMark(i)->GetMarkedSdrObj();
if( dynamic_cast<const SdrObjCustomShape*>( pObj) != nullptr )
{
- const SdrCustomShapeGeometryItem aGeometryItem( static_cast<const SdrCustomShapeGeometryItem&>(pObj->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY )) );
+ const SdrCustomShapeGeometryItem aGeometryItem( pObj->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) );
// see if this is an extruded customshape
if( !bHasCustomShape )
@@ -1070,7 +1070,7 @@ void getExtrusionLightingIntensityState( SdrView const * pSdrView, SfxItemSet& r
SdrObject* pObj = rMarkList.GetMark(i)->GetMarkedSdrObj();
if( dynamic_cast<const SdrObjCustomShape*>( pObj) != nullptr )
{
- const SdrCustomShapeGeometryItem aGeometryItem( static_cast<const SdrCustomShapeGeometryItem&>(pObj->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY )) );
+ const SdrCustomShapeGeometryItem aGeometryItem( pObj->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) );
// see if this is an extruded customshape
if( !bHasCustomShape )
@@ -1139,7 +1139,7 @@ void getExtrusionColorState( SdrView const * pSdrView, SfxItemSet& rSet )
SdrObject* pObj = rMarkList.GetMark(i)->GetMarkedSdrObj();
if( dynamic_cast<const SdrObjCustomShape*>( pObj) != nullptr )
{
- const SdrCustomShapeGeometryItem aGeometryItem( static_cast<const SdrCustomShapeGeometryItem&>(pObj->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY )) );
+ const SdrCustomShapeGeometryItem aGeometryItem( pObj->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) );
// see if this is an extruded customshape
if( !bHasCustomShape )
@@ -1207,7 +1207,7 @@ bool checkForSelectedCustomShapes( SdrView const * pSdrView, bool bOnlyExtruded
{
if( bOnlyExtruded )
{
- const SdrCustomShapeGeometryItem aGeometryItem( static_cast<const SdrCustomShapeGeometryItem&>(pObj->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) ));
+ const SdrCustomShapeGeometryItem aGeometryItem( pObj->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) );
const Any* pAny = aGeometryItem.GetPropertyValueByName( sExtrusion, sExtrusion );
if( pAny )
*pAny >>= bFound;
diff --git a/svx/source/toolbars/fontworkbar.cxx b/svx/source/toolbars/fontworkbar.cxx
index 161136f3482e..af8117c7f7d2 100644
--- a/svx/source/toolbars/fontworkbar.cxx
+++ b/svx/source/toolbars/fontworkbar.cxx
@@ -151,7 +151,7 @@ void SetFontWorkShapeTypeState( SdrView const * pSdrView, SfxItemSet& rSet )
SdrObject* pObj = rMarkList.GetMark( i )->GetMarkedSdrObj();
if( dynamic_cast<const SdrObjCustomShape*>( pObj) != nullptr )
{
- const SdrCustomShapeGeometryItem aGeometryItem( static_cast<const SdrCustomShapeGeometryItem&>(pObj->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY )));
+ const SdrCustomShapeGeometryItem aGeometryItem( pObj->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) );
const Any* pAny = aGeometryItem.GetPropertyValueByName( "Type" );
if( pAny )
{
@@ -239,7 +239,7 @@ bool checkForSelectedFontWork( SdrView const * pSdrView, sal_uInt32& nCheckStatu
SdrObject* pObj = rMarkList.GetMark(i)->GetMarkedSdrObj();
if( dynamic_cast<const SdrObjCustomShape*>( pObj) != nullptr )
{
- const SdrCustomShapeGeometryItem aGeometryItem( static_cast<const SdrCustomShapeGeometryItem&>(pObj->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY )));
+ const SdrCustomShapeGeometryItem aGeometryItem( pObj->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) );
const Any* pAny = aGeometryItem.GetPropertyValueByName( sTextPath, sTextPath );
if( pAny )
*pAny >>= bFound;
@@ -362,7 +362,7 @@ void GetGeometryForCustomShape( SdrCustomShapeGeometryItem& rGeometryItem, const
if( pSourceObj )
{
PropertyValue aPropVal_;
- const SdrCustomShapeGeometryItem& rSourceGeometry = static_cast<const SdrCustomShapeGeometryItem&>(pSourceObj->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ));
+ const SdrCustomShapeGeometryItem& rSourceGeometry = pSourceObj->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY );
const css::uno::Any* pAny = rSourceGeometry.GetPropertyValueByName( sType );
if ( pAny )
{
@@ -461,7 +461,7 @@ void FontworkBar::execute( SdrView* pSdrView, SfxRequest const & rReq, SfxBindin
pSdrView->BegUndo( aStr );
pSdrView->AddUndo( pSdrView->GetModel()->GetSdrUndoFactory().CreateUndoAttrObject( *pObj ) );
}
- SdrCustomShapeGeometryItem aGeometryItem( static_cast<const SdrCustomShapeGeometryItem&>(pObj->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY )));
+ SdrCustomShapeGeometryItem aGeometryItem( pObj->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) );
GetGeometryForCustomShape( aGeometryItem, aCustomShape );
pObj->SetMergedItem( aGeometryItem );
@@ -539,7 +539,7 @@ void FontworkBar::execute( SdrView* pSdrView, SfxRequest const & rReq, SfxBindin
pSdrView->BegUndo( aStr );
pSdrView->AddUndo( pSdrView->GetModel()->GetSdrUndoFactory().CreateUndoAttrObject( *pObj ) );
}
- SdrCustomShapeGeometryItem aGeometryItem( static_cast<const SdrCustomShapeGeometryItem&>(pObj->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY )));
+ SdrCustomShapeGeometryItem aGeometryItem( pObj->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) );
impl_execute( rReq, aGeometryItem, pObj );
pObj->SetMergedItem( aGeometryItem );
pObj->BroadcastObjectChange();
diff --git a/svx/source/unodraw/unoprov.cxx b/svx/source/unodraw/unoprov.cxx
index 24358b2f41b0..797870a01a5c 100644
--- a/svx/source/unodraw/unoprov.cxx
+++ b/svx/source/unodraw/unoprov.cxx
@@ -35,6 +35,7 @@
#include <svx/unoapi.hxx>
#include <editeng/unotext.hxx>
#include <svx/unoshprp.hxx>
+#include <svx/svx3ditems.hxx>
#include <editeng/editeng.hxx>
#include <svx/globl3d.hxx>
#include <svx/strings.hrc>
diff --git a/svx/source/unodraw/unoshap3.cxx b/svx/source/unodraw/unoshap3.cxx
index 8b9d1b3debc3..db8fbdd03dd4 100644
--- a/svx/source/unodraw/unoshap3.cxx
+++ b/svx/source/unodraw/unoshap3.cxx
@@ -341,9 +341,9 @@ bool Svx3DSceneObject::setPropertyValueImpl( const OUString& rName, const SfxIte
const SfxItemSet& rSceneSet = pScene->GetMergedItemSet();
double fCamPosZ =
- (double)static_cast<const SfxUInt32Item&>(rSceneSet.Get(SDRATTR_3DSCENE_DISTANCE)).GetValue();
+ (double)rSceneSet.Get(SDRATTR_3DSCENE_DISTANCE).GetValue();
double fCamFocal =
- (double)static_cast<const SfxUInt32Item&>(rSceneSet.Get(SDRATTR_3DSCENE_FOCAL_LENGTH)).GetValue();
+ (double)rSceneSet.Get(SDRATTR_3DSCENE_FOCAL_LENGTH).GetValue();
aCam.SetAutoAdjustProjection(false);
aCam.SetViewWindow(- fW / 2, - fH / 2, fW, fH);