summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-10-21 08:24:48 +0200
committerNoel Grandin <noel@peralex.com>2014-10-23 12:36:14 +0200
commitcb414252b8d5fcff516291ed4b9db75933e5331a (patch)
tree41011241dd6e3145fb21f8429be56d750a3290f5 /chart2
parentc7cacf639d873e33cd98c56a0006d877b132341e (diff)
loplugin: cstylecast
Change-Id: I4aafc170895d8bab47206c7b07b4f1f6105d42d3
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/controller/dialogs/dlg_ObjectProperties.cxx2
-rw-r--r--chart2/source/controller/dialogs/res_DataLabel.cxx10
-rw-r--r--chart2/source/controller/dialogs/res_ErrorBar.cxx8
-rw-r--r--chart2/source/controller/dialogs/res_LegendPosition.cxx2
-rw-r--r--chart2/source/controller/dialogs/res_Trendline.cxx6
-rw-r--r--chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx48
-rw-r--r--chart2/source/controller/dialogs/tp_AxisLabel.cxx2
-rw-r--r--chart2/source/controller/dialogs/tp_AxisPositions.cxx8
-rw-r--r--chart2/source/controller/dialogs/tp_LegendPosition.cxx2
-rw-r--r--chart2/source/controller/dialogs/tp_PointGeometry.cxx2
-rw-r--r--chart2/source/controller/dialogs/tp_PolarOptions.cxx2
-rw-r--r--chart2/source/controller/dialogs/tp_Scale.cxx40
-rw-r--r--chart2/source/controller/dialogs/tp_SeriesToAxis.cxx10
-rw-r--r--chart2/source/controller/dialogs/tp_TitleRotation.cxx6
-rw-r--r--chart2/source/controller/drawinglayer/DrawViewWrapper.cxx2
-rw-r--r--chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx2
-rw-r--r--chart2/source/controller/main/ChartController_Position.cxx10
-rw-r--r--chart2/source/controller/main/DrawCommandDispatch.cxx2
-rw-r--r--chart2/source/controller/main/SelectionHelper.cxx2
-rw-r--r--chart2/source/model/main/ChartModel.cxx3
-rw-r--r--chart2/source/view/diagram/VDiagram.cxx2
21 files changed, 85 insertions, 86 deletions
diff --git a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx
index ac3157760999..e07ffbe529a5 100644
--- a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx
+++ b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx
@@ -541,7 +541,7 @@ void SchAttribTabDlg::PageCreated(sal_uInt16 nId, SfxTabPage &rPage)
case TP_AXIS_LABEL:
{
bool bShowStaggeringControls = m_pParameter->CanAxisLabelsBeStaggered();
- ((SchAxisLabelTabPage&)rPage).ShowStaggeringControls( bShowStaggeringControls );
+ static_cast<SchAxisLabelTabPage&>(rPage).ShowStaggeringControls( bShowStaggeringControls );
( dynamic_cast< SchAxisLabelTabPage& >( rPage ) ).SetComplexCategories( m_pParameter->IsComplexCategoriesAxis() );
break;
}
diff --git a/chart2/source/controller/dialogs/res_DataLabel.cxx b/chart2/source/controller/dialogs/res_DataLabel.cxx
index 24315a3de371..c0f2da11fccd 100644
--- a/chart2/source/controller/dialogs/res_DataLabel.cxx
+++ b/chart2/source/controller/dialogs/res_DataLabel.cxx
@@ -74,7 +74,7 @@ void lcl_setBoolItemToCheckBox( const SfxItemSet& rInAttrs, sal_uInt16 nWhichId,
const SfxPoolItem *pPoolItem = NULL;
if( rInAttrs.GetItemState(nWhichId, true, &pPoolItem) == SfxItemState::SET )
- rCheckbox.Check( ((const SfxBoolItem*)pPoolItem)->GetValue() );
+ rCheckbox.Check( static_cast<const SfxBoolItem*>(pPoolItem)->GetValue() );
else
{
rCheckbox.EnableTriState( true );
@@ -135,7 +135,7 @@ DataLabelResources::DataLabelResources(VclBuilderContainer* pWindow, vcl::Window
::com::sun::star::uno::Sequence < sal_Int32 > aAvailabelPlacementList;
const SfxPoolItem *pPoolItem = NULL;
if( rInAttrs.GetItemState(SCHATTR_DATADESCR_AVAILABLE_PLACEMENTS, true, &pPoolItem) == SfxItemState::SET )
- aAvailabelPlacementList =((const SfxIntegerListItem*)pPoolItem)->GetConstSequence();
+ aAvailabelPlacementList = static_cast<const SfxIntegerListItem*>(pPoolItem)->GetConstSequence();
m_pLB_LabelPlacement->Clear();
for( sal_Int32 nN=0; nN<aAvailabelPlacementList.getLength(); ++nN )
@@ -331,7 +331,7 @@ void DataLabelResources::Reset(const SfxItemSet& rInAttrs)
if( rInAttrs.GetItemState(SCHATTR_DATADESCR_SEPARATOR, true, &pPoolItem) == SfxItemState::SET )
for(sal_Int32 i=0; i < NUMBER_SEPARATORS; ++i )
{
- if( m_aEntryMap[i] == ((const SfxStringItem*)pPoolItem)->GetValue())
+ if( m_aEntryMap[i] == static_cast<const SfxStringItem*>(pPoolItem)->GetValue())
m_pLB_Separator->SelectEntryPos( i );
}
else
@@ -339,7 +339,7 @@ void DataLabelResources::Reset(const SfxItemSet& rInAttrs)
if( rInAttrs.GetItemState(SCHATTR_DATADESCR_PLACEMENT, true, &pPoolItem) == SfxItemState::SET )
{
- sal_Int32 nPlacement = ((const SfxInt32Item*)pPoolItem)->GetValue();
+ sal_Int32 nPlacement = static_cast<const SfxInt32Item*>(pPoolItem)->GetValue();
::std::map< sal_Int32, sal_uInt16 >::const_iterator aIt( m_aPlacementToListBoxMap.find(nPlacement) );
if(aIt!=m_aPlacementToListBoxMap.end())
{
@@ -353,7 +353,7 @@ void DataLabelResources::Reset(const SfxItemSet& rInAttrs)
m_pLB_LabelPlacement->SetNoSelection();
if( rInAttrs.GetItemState(EE_PARA_WRITINGDIR, true, &pPoolItem ) == SfxItemState::SET )
- m_pLB_TextDirection->SelectEntryValue( SvxFrameDirection(((const SvxFrameDirectionItem*)pPoolItem)->GetValue()) );
+ m_pLB_TextDirection->SelectEntryValue( SvxFrameDirection(static_cast<const SvxFrameDirectionItem*>(pPoolItem)->GetValue()) );
if( rInAttrs.GetItemState( SCHATTR_TEXT_DEGREES, true, &pPoolItem ) == SfxItemState::SET )
{
diff --git a/chart2/source/controller/dialogs/res_ErrorBar.cxx b/chart2/source/controller/dialogs/res_ErrorBar.cxx
index d32d63ca98c4..a211f3de02bc 100644
--- a/chart2/source/controller/dialogs/res_ErrorBar.cxx
+++ b/chart2/source/controller/dialogs/res_ErrorBar.cxx
@@ -500,7 +500,7 @@ void ErrorBarResources::Reset(const SfxItemSet& rInAttrs)
m_bErrorKindUnique = ( aState != SfxItemState::DONTCARE );
if( aState == SfxItemState::SET )
- m_eErrorKind = ((const SvxChartKindErrorItem*) pPoolItem)->GetValue();
+ m_eErrorKind = static_cast<const SvxChartKindErrorItem*>(pPoolItem)->GetValue();
m_pLbFunction->SelectEntryPos( lcl_getLbEntryPosByErrorKind( m_eErrorKind ));
@@ -541,14 +541,14 @@ void ErrorBarResources::Reset(const SfxItemSet& rInAttrs)
m_bPlusUnique = ( aState != SfxItemState::DONTCARE );
if( aState == SfxItemState::SET )
{
- m_fPlusValue = ((const SvxDoubleItem*) pPoolItem)->GetValue();
+ m_fPlusValue = static_cast<const SvxDoubleItem*>(pPoolItem)->GetValue();
}
aState = rInAttrs.GetItemState( SCHATTR_STAT_CONSTMINUS, true, &pPoolItem );
m_bMinusUnique = ( aState != SfxItemState::DONTCARE );
if( aState == SfxItemState::SET )
{
- m_fMinusValue = ((const SvxDoubleItem*) pPoolItem)->GetValue();
+ m_fMinusValue = static_cast<const SvxDoubleItem*>(pPoolItem)->GetValue();
if( m_eErrorKind != CHERROR_RANGE &&
m_fPlusValue == m_fMinusValue )
@@ -559,7 +559,7 @@ void ErrorBarResources::Reset(const SfxItemSet& rInAttrs)
aState = rInAttrs.GetItemState( SCHATTR_STAT_INDICATE, true, &pPoolItem );
m_bIndicatorUnique = ( aState != SfxItemState::DONTCARE );
if( aState == SfxItemState::SET)
- m_eIndicate = ((const SvxChartIndicateItem * ) pPoolItem)->GetValue();
+ m_eIndicate = static_cast<const SvxChartIndicateItem *>(pPoolItem)->GetValue();
if( m_bIndicatorUnique )
{
diff --git a/chart2/source/controller/dialogs/res_LegendPosition.cxx b/chart2/source/controller/dialogs/res_LegendPosition.cxx
index da9e1dd72e68..179b9437b5e7 100644
--- a/chart2/source/controller/dialogs/res_LegendPosition.cxx
+++ b/chart2/source/controller/dialogs/res_LegendPosition.cxx
@@ -184,7 +184,7 @@ void LegendPositionResources::initFromItemSet( const SfxItemSet& rInAttrs )
const SfxPoolItem* pPoolItem = NULL;
if( rInAttrs.GetItemState( SCHATTR_LEGEND_POS, true, &pPoolItem ) == SfxItemState::SET )
{
- sal_Int32 nLegendPosition = ((const SfxInt32Item*)pPoolItem)->GetValue();
+ sal_Int32 nLegendPosition = static_cast<const SfxInt32Item*>(pPoolItem)->GetValue();
switch( nLegendPosition )
{
case chart2::LegendPosition_LINE_START:
diff --git a/chart2/source/controller/dialogs/res_Trendline.cxx b/chart2/source/controller/dialogs/res_Trendline.cxx
index 8c48e2af0240..8586e674d0ad 100644
--- a/chart2/source/controller/dialogs/res_Trendline.cxx
+++ b/chart2/source/controller/dialogs/res_Trendline.cxx
@@ -158,21 +158,21 @@ void TrendlineResources::Reset( const SfxItemSet& rInAttrs )
double nValue = 0.0;
if( rInAttrs.GetItemState( SCHATTR_REGRESSION_EXTRAPOLATE_FORWARD, true, &pPoolItem ) == SfxItemState::SET )
{
- nValue = ((const SvxDoubleItem*)pPoolItem)->GetValue() ;
+ nValue = static_cast<const SvxDoubleItem*>(pPoolItem)->GetValue() ;
}
lcl_setValue( *m_pFmtFld_ExtrapolateForward, nValue );
nValue = 0.0;
if( rInAttrs.GetItemState( SCHATTR_REGRESSION_EXTRAPOLATE_BACKWARD, true, &pPoolItem ) == SfxItemState::SET )
{
- nValue = ((const SvxDoubleItem*)pPoolItem)->GetValue() ;
+ nValue = static_cast<const SvxDoubleItem*>(pPoolItem)->GetValue() ;
}
lcl_setValue( *m_pFmtFld_ExtrapolateBackward, nValue );
nValue = 0.0;
if( rInAttrs.GetItemState( SCHATTR_REGRESSION_INTERCEPT_VALUE, true, &pPoolItem ) == SfxItemState::SET )
{
- nValue = ((const SvxDoubleItem*)pPoolItem)->GetValue() ;
+ nValue = static_cast<const SvxDoubleItem*>(pPoolItem)->GetValue() ;
}
lcl_setValue( *m_pFmtFld_InterceptValue, nValue );
diff --git a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx
index 81ccc2bbfa60..df2b8d29718f 100644
--- a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx
+++ b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx
@@ -349,44 +349,44 @@ IMPL_LINK_NOARG(ThreeD_SceneIllumination_TabPage, PreviewChangeHdl)
const SfxItemSet a3DLightAttributes(m_pCtl_Preview->GetSvx3DLightControl().Get3DAttributes());
LightSourceInfo* pInfo = &m_pLightSourceInfoList[0];
- pInfo->aLightSource.nDiffuseColor = ((const SvxColorItem&)a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTCOLOR_1)).GetValue().GetColor();
- pInfo->aLightSource.bIsEnabled = ((const SfxBoolItem&)a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTON_1)).GetValue();
- pInfo->aLightSource.aDirection = B3DVectorToDirection3D(((const SvxB3DVectorItem&)a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_1)).GetValue());
+ pInfo->aLightSource.nDiffuseColor = static_cast<const SvxColorItem&>(a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTCOLOR_1)).GetValue().GetColor();
+ pInfo->aLightSource.bIsEnabled = static_cast<const SfxBoolItem&>(a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTON_1)).GetValue();
+ pInfo->aLightSource.aDirection = B3DVectorToDirection3D(static_cast<const SvxB3DVectorItem&>(a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_1)).GetValue());
pInfo = &m_pLightSourceInfoList[1];
- pInfo->aLightSource.nDiffuseColor = ((const SvxColorItem&)a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTCOLOR_2)).GetValue().GetColor();
- pInfo->aLightSource.bIsEnabled = ((const SfxBoolItem&)a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTON_2)).GetValue();
- pInfo->aLightSource.aDirection = B3DVectorToDirection3D(((const SvxB3DVectorItem&)a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_2)).GetValue());
+ pInfo->aLightSource.nDiffuseColor = static_cast<const SvxColorItem&>(a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTCOLOR_2)).GetValue().GetColor();
+ pInfo->aLightSource.bIsEnabled = static_cast<const SfxBoolItem&>(a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTON_2)).GetValue();
+ pInfo->aLightSource.aDirection = B3DVectorToDirection3D(static_cast<const SvxB3DVectorItem&>(a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_2)).GetValue());
pInfo = &m_pLightSourceInfoList[2];
- pInfo->aLightSource.nDiffuseColor = ((const SvxColorItem&)a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTCOLOR_3)).GetValue().GetColor();
- pInfo->aLightSource.bIsEnabled = ((const SfxBoolItem&)a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTON_3)).GetValue();
- pInfo->aLightSource.aDirection = B3DVectorToDirection3D(((const SvxB3DVectorItem&)a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_3)).GetValue());
+ pInfo->aLightSource.nDiffuseColor = static_cast<const SvxColorItem&>(a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTCOLOR_3)).GetValue().GetColor();
+ pInfo->aLightSource.bIsEnabled = static_cast<const SfxBoolItem&>(a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTON_3)).GetValue();
+ pInfo->aLightSource.aDirection = B3DVectorToDirection3D(static_cast<const SvxB3DVectorItem&>(a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_3)).GetValue());
pInfo = &m_pLightSourceInfoList[3];
- pInfo->aLightSource.nDiffuseColor = ((const SvxColorItem&)a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTCOLOR_4)).GetValue().GetColor();
- pInfo->aLightSource.bIsEnabled = ((const SfxBoolItem&)a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTON_4)).GetValue();
- pInfo->aLightSource.aDirection = B3DVectorToDirection3D(((const SvxB3DVectorItem&)a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_4)).GetValue());
+ pInfo->aLightSource.nDiffuseColor = static_cast<const SvxColorItem&>(a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTCOLOR_4)).GetValue().GetColor();
+ pInfo->aLightSource.bIsEnabled = static_cast<const SfxBoolItem&>(a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTON_4)).GetValue();
+ pInfo->aLightSource.aDirection = B3DVectorToDirection3D(static_cast<const SvxB3DVectorItem&>(a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_4)).GetValue());
pInfo = &m_pLightSourceInfoList[4];
- pInfo->aLightSource.nDiffuseColor = ((const SvxColorItem&)a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTCOLOR_5)).GetValue().GetColor();
- pInfo->aLightSource.bIsEnabled = ((const SfxBoolItem&)a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTON_5)).GetValue();
- pInfo->aLightSource.aDirection = B3DVectorToDirection3D(((const SvxB3DVectorItem&)a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_5)).GetValue());
+ pInfo->aLightSource.nDiffuseColor = static_cast<const SvxColorItem&>(a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTCOLOR_5)).GetValue().GetColor();
+ pInfo->aLightSource.bIsEnabled = static_cast<const SfxBoolItem&>(a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTON_5)).GetValue();
+ pInfo->aLightSource.aDirection = B3DVectorToDirection3D(static_cast<const SvxB3DVectorItem&>(a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_5)).GetValue());
pInfo = &m_pLightSourceInfoList[5];
- pInfo->aLightSource.nDiffuseColor = ((const SvxColorItem&)a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTCOLOR_6)).GetValue().GetColor();
- pInfo->aLightSource.bIsEnabled = ((const SfxBoolItem&)a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTON_6)).GetValue();
- pInfo->aLightSource.aDirection = B3DVectorToDirection3D(((const SvxB3DVectorItem&)a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_6)).GetValue());
+ pInfo->aLightSource.nDiffuseColor = static_cast<const SvxColorItem&>(a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTCOLOR_6)).GetValue().GetColor();
+ pInfo->aLightSource.bIsEnabled = static_cast<const SfxBoolItem&>(a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTON_6)).GetValue();
+ pInfo->aLightSource.aDirection = B3DVectorToDirection3D(static_cast<const SvxB3DVectorItem&>(a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_6)).GetValue());
pInfo = &m_pLightSourceInfoList[6];
- pInfo->aLightSource.nDiffuseColor = ((const SvxColorItem&)a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTCOLOR_7)).GetValue().GetColor();
- pInfo->aLightSource.bIsEnabled = ((const SfxBoolItem&)a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTON_7)).GetValue();
- pInfo->aLightSource.aDirection = B3DVectorToDirection3D(((const SvxB3DVectorItem&)a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_7)).GetValue());
+ pInfo->aLightSource.nDiffuseColor = static_cast<const SvxColorItem&>(a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTCOLOR_7)).GetValue().GetColor();
+ pInfo->aLightSource.bIsEnabled = static_cast<const SfxBoolItem&>(a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTON_7)).GetValue();
+ pInfo->aLightSource.aDirection = B3DVectorToDirection3D(static_cast<const SvxB3DVectorItem&>(a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_7)).GetValue());
pInfo = &m_pLightSourceInfoList[7];
- pInfo->aLightSource.nDiffuseColor = ((const SvxColorItem&)a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTCOLOR_8)).GetValue().GetColor();
- pInfo->aLightSource.bIsEnabled = ((const SfxBoolItem&)a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTON_8)).GetValue();
- pInfo->aLightSource.aDirection = B3DVectorToDirection3D(((const SvxB3DVectorItem&)a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_8)).GetValue());
+ pInfo->aLightSource.nDiffuseColor = static_cast<const SvxColorItem&>(a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTCOLOR_8)).GetValue().GetColor();
+ pInfo->aLightSource.bIsEnabled = static_cast<const SfxBoolItem&>(a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTON_8)).GetValue();
+ pInfo->aLightSource.aDirection = B3DVectorToDirection3D(static_cast<const SvxB3DVectorItem&>(a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_8)).GetValue());
applyLightSourcesToModel();
diff --git a/chart2/source/controller/dialogs/tp_AxisLabel.cxx b/chart2/source/controller/dialogs/tp_AxisLabel.cxx
index f80402c093a2..82e37280d704 100644
--- a/chart2/source/controller/dialogs/tp_AxisLabel.cxx
+++ b/chart2/source/controller/dialogs/tp_AxisLabel.cxx
@@ -184,7 +184,7 @@ void SchAxisLabelTabPage::Reset( const SfxItemSet* rInAttrs )
m_pOrientHlp->SetStackedState( TRISTATE_INDET );
if( rInAttrs->GetItemState( EE_PARA_WRITINGDIR, true, &pPoolItem ) == SfxItemState::SET )
- m_pLbTextDirection->SelectEntryValue( SvxFrameDirection(((const SvxFrameDirectionItem*)pPoolItem)->GetValue()) );
+ m_pLbTextDirection->SelectEntryValue( SvxFrameDirection(static_cast<const SvxFrameDirectionItem*>(pPoolItem)->GetValue()) );
// Text overlap ----------
aState = rInAttrs->GetItemState( SCHATTR_AXIS_LABEL_OVERLAP, false, &pPoolItem );
diff --git a/chart2/source/controller/dialogs/tp_AxisPositions.cxx b/chart2/source/controller/dialogs/tp_AxisPositions.cxx
index 8fda04263f47..9bcb6e8e2938 100644
--- a/chart2/source/controller/dialogs/tp_AxisPositions.cxx
+++ b/chart2/source/controller/dialogs/tp_AxisPositions.cxx
@@ -180,7 +180,7 @@ void AxisPositionsTabPage::Reset(const SfxItemSet* rInAttrs)
{
double fCrossover = 0.0;
if( !bZero )
- fCrossover = (((const SvxDoubleItem*)pPoolItem)->GetValue());
+ fCrossover = static_cast<const SvxDoubleItem*>(pPoolItem)->GetValue();
if( m_bCrossingAxisIsCategoryAxis )
m_pED_CrossesAtCategory->SelectEntryPos( static_cast<sal_uInt16>(::rtl::math::round(fCrossover-1.0)) );
else
@@ -212,9 +212,9 @@ void AxisPositionsTabPage::Reset(const SfxItemSet* rInAttrs)
// Tick marks
long nTicks = 0, nMinorTicks = 0;
if(rInAttrs->GetItemState(SCHATTR_AXIS_TICKS,true, &pPoolItem)== SfxItemState::SET)
- nTicks = ((const SfxInt32Item*)pPoolItem)->GetValue();
+ nTicks = static_cast<const SfxInt32Item*>(pPoolItem)->GetValue();
if(rInAttrs->GetItemState(SCHATTR_AXIS_HELPTICKS,true, &pPoolItem)== SfxItemState::SET)
- nMinorTicks = ((const SfxInt32Item*)pPoolItem)->GetValue();
+ nMinorTicks = static_cast<const SfxInt32Item*>(pPoolItem)->GetValue();
m_pCB_TicksInner->Check(bool(nTicks&CHAXIS_MARK_INNER));
m_pCB_TicksOuter->Check(bool(nTicks&CHAXIS_MARK_OUTER));
@@ -269,7 +269,7 @@ void AxisPositionsTabPage::SetNumFormatter( SvNumberFormatter* pFormatter )
const SfxPoolItem *pPoolItem = NULL;
if( GetItemSet().GetItemState( SCHATTR_AXIS_CROSSING_MAIN_AXIS_NUMBERFORMAT, true, &pPoolItem ) == SfxItemState::SET )
{
- sal_uLong nFmt = (sal_uLong)((const SfxInt32Item*)pPoolItem)->GetValue();
+ sal_uLong nFmt = (sal_uLong)static_cast<const SfxInt32Item*>(pPoolItem)->GetValue();
m_pED_CrossesAt->SetFormatKey( nFmt );
}
}
diff --git a/chart2/source/controller/dialogs/tp_LegendPosition.cxx b/chart2/source/controller/dialogs/tp_LegendPosition.cxx
index c275c25660d8..707324fb8610 100644
--- a/chart2/source/controller/dialogs/tp_LegendPosition.cxx
+++ b/chart2/source/controller/dialogs/tp_LegendPosition.cxx
@@ -62,7 +62,7 @@ void SchLegendPosTabPage::Reset(const SfxItemSet* rInAttrs)
const SfxPoolItem* pPoolItem = 0;
if( rInAttrs->GetItemState( EE_PARA_WRITINGDIR, true, &pPoolItem ) == SfxItemState::SET )
- m_pLbTextDirection->SelectEntryValue( SvxFrameDirection(((const SvxFrameDirectionItem*)pPoolItem)->GetValue()) );
+ m_pLbTextDirection->SelectEntryValue( SvxFrameDirection(static_cast<const SvxFrameDirectionItem*>(pPoolItem)->GetValue()) );
}
} //namespace chart
diff --git a/chart2/source/controller/dialogs/tp_PointGeometry.cxx b/chart2/source/controller/dialogs/tp_PointGeometry.cxx
index 5e32432af83d..3abb60bbc5fb 100644
--- a/chart2/source/controller/dialogs/tp_PointGeometry.cxx
+++ b/chart2/source/controller/dialogs/tp_PointGeometry.cxx
@@ -71,7 +71,7 @@ void SchLayoutTabPage::Reset(const SfxItemSet* rInAttrs)
if (rInAttrs->GetItemState(SCHATTR_STYLE_SHAPE,true, &pPoolItem) == SfxItemState::SET)
{
- long nVal=((const SfxInt32Item*)pPoolItem)->GetValue();
+ long nVal = static_cast<const SfxInt32Item*>(pPoolItem)->GetValue();
if(m_pGeometryResources)
{
m_pGeometryResources->SelectEntryPos(static_cast<sal_uInt16>(nVal));
diff --git a/chart2/source/controller/dialogs/tp_PolarOptions.cxx b/chart2/source/controller/dialogs/tp_PolarOptions.cxx
index 32b09b5398ff..dbd0c460df28 100644
--- a/chart2/source/controller/dialogs/tp_PolarOptions.cxx
+++ b/chart2/source/controller/dialogs/tp_PolarOptions.cxx
@@ -76,7 +76,7 @@ void PolarOptionsTabPage::Reset(const SfxItemSet* rInAttrs)
if (rInAttrs->GetItemState(SCHATTR_STARTING_ANGLE, true, &pPoolItem) == SfxItemState::SET)
{
- long nTmp = (long)((const SfxInt32Item*)pPoolItem)->GetValue();
+ long nTmp = (long)static_cast<const SfxInt32Item*>(pPoolItem)->GetValue();
m_pAngleDial->SetRotation( nTmp*100 );
}
else
diff --git a/chart2/source/controller/dialogs/tp_Scale.cxx b/chart2/source/controller/dialogs/tp_Scale.cxx
index 363de5376a87..6b22257cfb08 100644
--- a/chart2/source/controller/dialogs/tp_Scale.cxx
+++ b/chart2/source/controller/dialogs/tp_Scale.cxx
@@ -284,17 +284,17 @@ void ScaleTabPage::Reset(const SfxItemSet* rInAttrs)
const SfxPoolItem *pPoolItem = NULL;
if (rInAttrs->GetItemState(SCHATTR_AXIS_ALLOW_DATEAXIS, true, &pPoolItem) == SfxItemState::SET)
- m_bAllowDateAxis = (bool) ((const SfxBoolItem*)pPoolItem)->GetValue();
+ m_bAllowDateAxis = (bool) static_cast<const SfxBoolItem*>(pPoolItem)->GetValue();
m_nAxisType=chart2::AxisType::REALNUMBER;
if (rInAttrs->GetItemState(SCHATTR_AXISTYPE, true, &pPoolItem) == SfxItemState::SET)
- m_nAxisType = (int) ((const SfxInt32Item*)pPoolItem)->GetValue();
+ m_nAxisType = (int) static_cast<const SfxInt32Item*>(pPoolItem)->GetValue();
if( m_nAxisType==chart2::AxisType::DATE && !m_bAllowDateAxis )
m_nAxisType=chart2::AxisType::CATEGORY;
if( m_bAllowDateAxis )
{
bool bAutoDateAxis = false;
if (rInAttrs->GetItemState(SCHATTR_AXIS_AUTO_DATEAXIS, true, &pPoolItem) == SfxItemState::SET)
- bAutoDateAxis = (bool) ((const SfxBoolItem*)pPoolItem)->GetValue();
+ bAutoDateAxis = (bool) static_cast<const SfxBoolItem*>(pPoolItem)->GetValue();
sal_uInt16 nPos = 0;
if( m_nAxisType==chart2::AxisType::DATE )
@@ -314,67 +314,67 @@ void ScaleTabPage::Reset(const SfxItemSet* rInAttrs)
m_pCbx_AutoTimeResolution->Check( true );
if (rInAttrs->GetItemState(SCHATTR_AXIS_AUTO_MIN,true,&pPoolItem) == SfxItemState::SET)
- m_pCbxAutoMin->Check(((const SfxBoolItem*)pPoolItem)->GetValue());
+ m_pCbxAutoMin->Check(static_cast<const SfxBoolItem*>(pPoolItem)->GetValue());
if (rInAttrs->GetItemState(SCHATTR_AXIS_MIN,true, &pPoolItem) == SfxItemState::SET)
{
- fMin = ((const SvxDoubleItem*)pPoolItem)->GetValue();
+ fMin = static_cast<const SvxDoubleItem*>(pPoolItem)->GetValue();
lcl_setValue( *m_pFmtFldMin, fMin );
}
if (rInAttrs->GetItemState(SCHATTR_AXIS_AUTO_MAX,true, &pPoolItem) == SfxItemState::SET)
- m_pCbxAutoMax->Check(((const SfxBoolItem*)pPoolItem)->GetValue());
+ m_pCbxAutoMax->Check(static_cast<const SfxBoolItem*>(pPoolItem)->GetValue());
if (rInAttrs->GetItemState(SCHATTR_AXIS_MAX,true, &pPoolItem) == SfxItemState::SET)
{
- fMax = ((const SvxDoubleItem*)pPoolItem)->GetValue();
+ fMax = static_cast<const SvxDoubleItem*>(pPoolItem)->GetValue();
lcl_setValue( *m_pFmtFldMax, fMax );
}
if (rInAttrs->GetItemState(SCHATTR_AXIS_AUTO_STEP_MAIN,true, &pPoolItem) == SfxItemState::SET)
- m_pCbxAutoStepMain->Check(((const SfxBoolItem*)pPoolItem)->GetValue());
+ m_pCbxAutoStepMain->Check(static_cast<const SfxBoolItem*>(pPoolItem)->GetValue());
if (rInAttrs->GetItemState(SCHATTR_AXIS_STEP_MAIN,true, &pPoolItem) == SfxItemState::SET)
{
- fStepMain = ((const SvxDoubleItem*)pPoolItem)->GetValue();
+ fStepMain = static_cast<const SvxDoubleItem*>(pPoolItem)->GetValue();
lcl_setValue( *m_pFmtFldStepMain, fStepMain );
m_pMt_MainDateStep->SetValue( static_cast<sal_Int32>(fStepMain) );
}
if (rInAttrs->GetItemState(SCHATTR_AXIS_AUTO_STEP_HELP,true, &pPoolItem) == SfxItemState::SET)
- m_pCbxAutoStepHelp->Check(((const SfxBoolItem*)pPoolItem)->GetValue());
+ m_pCbxAutoStepHelp->Check(static_cast<const SfxBoolItem*>(pPoolItem)->GetValue());
if (rInAttrs->GetItemState(SCHATTR_AXIS_LOGARITHM,true, &pPoolItem) == SfxItemState::SET)
- m_pCbxLogarithm->Check(((const SfxBoolItem*)pPoolItem)->GetValue());
+ m_pCbxLogarithm->Check(static_cast<const SfxBoolItem*>(pPoolItem)->GetValue());
if (rInAttrs->GetItemState(SCHATTR_AXIS_REVERSE,true, &pPoolItem) == SfxItemState::SET)
- m_pCbxReverse->Check(((const SfxBoolItem*)pPoolItem)->GetValue());
+ m_pCbxReverse->Check(static_cast<const SfxBoolItem*>(pPoolItem)->GetValue());
if (rInAttrs->GetItemState(SCHATTR_AXIS_STEP_HELP,true, &pPoolItem) == SfxItemState::SET)
{
- nStepHelp = ((const SfxInt32Item*)pPoolItem)->GetValue();
+ nStepHelp = static_cast<const SfxInt32Item*>(pPoolItem)->GetValue();
m_pMtStepHelp->SetValue( nStepHelp );
}
if (rInAttrs->GetItemState(SCHATTR_AXIS_AUTO_ORIGIN,true, &pPoolItem) == SfxItemState::SET)
- m_pCbxAutoOrigin->Check(((const SfxBoolItem*)pPoolItem)->GetValue());
+ m_pCbxAutoOrigin->Check(static_cast<const SfxBoolItem*>(pPoolItem)->GetValue());
if (rInAttrs->GetItemState(SCHATTR_AXIS_ORIGIN,true, &pPoolItem) == SfxItemState::SET)
{
- fOrigin = ((const SvxDoubleItem*)pPoolItem)->GetValue();
+ fOrigin = static_cast<const SvxDoubleItem*>(pPoolItem)->GetValue();
lcl_setValue( *m_pFmtFldOrigin, fOrigin );
}
if (rInAttrs->GetItemState(SCHATTR_AXIS_AUTO_TIME_RESOLUTION,true, &pPoolItem) == SfxItemState::SET)
- m_pCbx_AutoTimeResolution->Check(((const SfxBoolItem*)pPoolItem)->GetValue());
+ m_pCbx_AutoTimeResolution->Check(static_cast<const SfxBoolItem*>(pPoolItem)->GetValue());
if (rInAttrs->GetItemState(SCHATTR_AXIS_TIME_RESOLUTION,true, &pPoolItem) == SfxItemState::SET)
{
- m_nTimeResolution = ((const SfxInt32Item*)pPoolItem)->GetValue();
+ m_nTimeResolution = static_cast<const SfxInt32Item*>(pPoolItem)->GetValue();
m_pLB_TimeResolution->SelectEntryPos( m_nTimeResolution );
}
if (rInAttrs->GetItemState(SCHATTR_AXIS_MAIN_TIME_UNIT,true, &pPoolItem) == SfxItemState::SET)
{
- m_nMainTimeUnit = ((const SfxInt32Item*)pPoolItem)->GetValue();
+ m_nMainTimeUnit = static_cast<const SfxInt32Item*>(pPoolItem)->GetValue();
m_pLB_MainTimeUnit->SelectEntryPos( m_nMainTimeUnit );
}
if (rInAttrs->GetItemState(SCHATTR_AXIS_HELP_TIME_UNIT,true, &pPoolItem) == SfxItemState::SET)
{
- m_nHelpTimeUnit = ((const SfxInt32Item*)pPoolItem)->GetValue();
+ m_nHelpTimeUnit = static_cast<const SfxInt32Item*>(pPoolItem)->GetValue();
m_pLB_HelpTimeUnit->SelectEntryPos( m_nHelpTimeUnit );
}
@@ -527,7 +527,7 @@ void ScaleTabPage::SetNumFormat()
if( GetItemSet().GetItemState( SID_ATTR_NUMBERFORMAT_VALUE, true, &pPoolItem ) == SfxItemState::SET )
{
- sal_uLong nFmt = (sal_uLong)((const SfxInt32Item*)pPoolItem)->GetValue();
+ sal_uLong nFmt = (sal_uLong)static_cast<const SfxInt32Item*>(pPoolItem)->GetValue();
m_pFmtFldMax->SetFormatKey( nFmt );
m_pFmtFldMin->SetFormatKey( nFmt );
diff --git a/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx b/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx
index 26c158406f6d..aebb5275e4a2 100644
--- a/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx
+++ b/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx
@@ -123,7 +123,7 @@ void SchOptionTabPage::Reset(const SfxItemSet* rInAttrs)
m_pRbtAxis2->Check(false);
if (rInAttrs->GetItemState(SCHATTR_AXIS,true, &pPoolItem) == SfxItemState::SET)
{
- long nVal=((const SfxInt32Item*)pPoolItem)->GetValue();
+ long nVal=static_cast<const SfxInt32Item*>(pPoolItem)->GetValue();
if(nVal==CHART_AXIS_SECONDARY_Y)
{
m_pRbtAxis2->Check(true);
@@ -134,13 +134,13 @@ void SchOptionTabPage::Reset(const SfxItemSet* rInAttrs)
long nTmp;
if (rInAttrs->GetItemState(SCHATTR_BAR_GAPWIDTH, true, &pPoolItem) == SfxItemState::SET)
{
- nTmp = (long)((const SfxInt32Item*)pPoolItem)->GetValue();
+ nTmp = (long)static_cast<const SfxInt32Item*>(pPoolItem)->GetValue();
m_pMTGap->SetValue(nTmp);
}
if (rInAttrs->GetItemState(SCHATTR_BAR_OVERLAP, true, &pPoolItem) == SfxItemState::SET)
{
- nTmp = (long)((const SfxInt32Item*)pPoolItem)->GetValue();
+ nTmp = (long)static_cast<const SfxInt32Item*>(pPoolItem)->GetValue();
m_pMTOverlap->SetValue(nTmp);
}
@@ -171,7 +171,7 @@ void SchOptionTabPage::Reset(const SfxItemSet* rInAttrs)
{
::com::sun::star::uno::Sequence < sal_Int32 > aMissingValueTreatments;
if( rInAttrs->GetItemState(SCHATTR_AVAILABLE_MISSING_VALUE_TREATMENTS, true, &pPoolItem) == SfxItemState::SET )
- aMissingValueTreatments =((const SfxIntegerListItem*)pPoolItem)->GetConstSequence();
+ aMissingValueTreatments =static_cast<const SfxIntegerListItem*>(pPoolItem)->GetConstSequence();
if ( aMissingValueTreatments.getLength()>1 && rInAttrs->GetItemState(SCHATTR_MISSING_VALUE_TREATMENT,true, &pPoolItem) == SfxItemState::SET)
{
@@ -190,7 +190,7 @@ void SchOptionTabPage::Reset(const SfxItemSet* rInAttrs)
m_pRB_ContinueLine->Enable(true);
}
- long nVal=((const SfxInt32Item*)pPoolItem)->GetValue();
+ long nVal=static_cast<const SfxInt32Item*>(pPoolItem)->GetValue();
if(nVal==::com::sun::star::chart::MissingValueTreatment::LEAVE_GAP)
m_pRB_DontPaint->Check(true);
else if(nVal==::com::sun::star::chart::MissingValueTreatment::USE_ZERO)
diff --git a/chart2/source/controller/dialogs/tp_TitleRotation.cxx b/chart2/source/controller/dialogs/tp_TitleRotation.cxx
index 6fc90a273926..32004557fdf8 100644
--- a/chart2/source/controller/dialogs/tp_TitleRotation.cxx
+++ b/chart2/source/controller/dialogs/tp_TitleRotation.cxx
@@ -91,15 +91,15 @@ void SchAlignmentTabPage::Reset(const SfxItemSet* rInAttrs)
{
const SfxPoolItem* pItem = GetItem( *rInAttrs, SCHATTR_TEXT_DEGREES );
- sal_Int32 nDegrees = pItem ? ((const SfxInt32Item*)pItem)->GetValue() : 0;
+ sal_Int32 nDegrees = pItem ? static_cast<const SfxInt32Item*>(pItem)->GetValue() : 0;
m_pCtrlDial->SetRotation( nDegrees );
pItem = GetItem( *rInAttrs, SCHATTR_TEXT_STACKED );
- bool bStacked = pItem && ((const SfxBoolItem*)pItem)->GetValue();
+ bool bStacked = pItem && static_cast<const SfxBoolItem*>(pItem)->GetValue();
m_pOrientHlp->SetStackedState( bStacked ? TRISTATE_TRUE : TRISTATE_FALSE );
if( rInAttrs->GetItemState(EE_PARA_WRITINGDIR, true, &pItem) == SfxItemState::SET)
- m_pLbTextDirection->SelectEntryValue( SvxFrameDirection(((const SvxFrameDirectionItem*)pItem)->GetValue()) );
+ m_pLbTextDirection->SelectEntryValue( SvxFrameDirection(static_cast<const SvxFrameDirectionItem*>(pItem)->GetValue()) );
}
} //namespace chart
diff --git a/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx b/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx
index 578a5631e123..19460512e4e9 100644
--- a/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx
+++ b/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx
@@ -257,7 +257,7 @@ SdrObject* DrawViewWrapper::getTextEditObject() const
SdrObject* pObj = this->getSelectedObject();
SdrObject* pTextObj = NULL;
if( pObj && pObj->HasTextEdit())
- pTextObj = (SdrTextObj*)pObj;
+ pTextObj = static_cast<SdrTextObj*>(pObj);
return pTextObj;
}
diff --git a/chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx b/chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx
index 49cd67fef545..26d3038f9b76 100644
--- a/chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx
@@ -125,7 +125,7 @@ bool LegendItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSe
const SfxPoolItem* pPoolItem = NULL;
if( rInItemSet.GetItemState( SCHATTR_LEGEND_POS, true, &pPoolItem ) == SfxItemState::SET )
{
- chart2::LegendPosition eNewPos = static_cast<chart2::LegendPosition>(((const SfxInt32Item*)pPoolItem)->GetValue());
+ chart2::LegendPosition eNewPos = static_cast<chart2::LegendPosition>(static_cast<const SfxInt32Item*>(pPoolItem)->GetValue());
::com::sun::star::chart::ChartLegendExpansion eExpansion = ::com::sun::star::chart::ChartLegendExpansion_HIGH;
switch( eNewPos )
diff --git a/chart2/source/controller/main/ChartController_Position.cxx b/chart2/source/controller/main/ChartController_Position.cxx
index daf03c8acb57..4a5884a49e80 100644
--- a/chart2/source/controller/main/ChartController_Position.cxx
+++ b/chart2/source/controller/main/ChartController_Position.cxx
@@ -59,16 +59,16 @@ void lcl_getPositionAndSizeFromItemSet( const SfxItemSet& rItemSet, awt::Rectang
const SfxPoolItem* pPoolItem=NULL;
//read position
if (SfxItemState::SET==rItemSet.GetItemState(SID_ATTR_TRANSFORM_POS_X,true,&pPoolItem))
- nPosX=((const SfxInt32Item*)pPoolItem)->GetValue();
+ nPosX= static_cast<const SfxInt32Item*>(pPoolItem)->GetValue();
if (SfxItemState::SET==rItemSet.GetItemState(SID_ATTR_TRANSFORM_POS_Y,true,&pPoolItem))
- nPosY=((const SfxInt32Item*)pPoolItem)->GetValue();
+ nPosY=static_cast<const SfxInt32Item*>(pPoolItem)->GetValue();
//read size
if (SfxItemState::SET==rItemSet.GetItemState(SID_ATTR_TRANSFORM_WIDTH,true,&pPoolItem))
- nSizX=((const SfxUInt32Item*)pPoolItem)->GetValue();
+ nSizX=static_cast<const SfxUInt32Item*>(pPoolItem)->GetValue();
if (SfxItemState::SET==rItemSet.GetItemState(SID_ATTR_TRANSFORM_HEIGHT,true,&pPoolItem))
- nSizY=((const SfxUInt32Item*)pPoolItem)->GetValue();
+ nSizY=static_cast<const SfxUInt32Item*>(pPoolItem)->GetValue();
if (SfxItemState::SET==rItemSet.GetItemState(SID_ATTR_TRANSFORM_SIZE_POINT,true,&pPoolItem))
- eRP=(RECT_POINT)((const SfxAllEnumItem*)pPoolItem)->GetValue();
+ eRP=(RECT_POINT)static_cast<const SfxAllEnumItem*>(pPoolItem)->GetValue();
switch( eRP )
{
diff --git a/chart2/source/controller/main/DrawCommandDispatch.cxx b/chart2/source/controller/main/DrawCommandDispatch.cxx
index 70bf900166ce..4f3f01afeb3e 100644
--- a/chart2/source/controller/main/DrawCommandDispatch.cxx
+++ b/chart2/source/controller/main/DrawCommandDispatch.cxx
@@ -213,7 +213,7 @@ void DrawCommandDispatch::setLineEnds( SfxItemSet& rAttr )
long nWidth = 300; // (1/100th mm)
if ( aSet.GetItemState( XATTR_LINEWIDTH ) != SfxItemState::DONTCARE )
{
- long nValue = ( ( const XLineWidthItem& ) aSet.Get( XATTR_LINEWIDTH ) ).GetValue();
+ long nValue = static_cast<const XLineWidthItem&>( aSet.Get( XATTR_LINEWIDTH ) ).GetValue();
if ( nValue > 0 )
{
nWidth = nValue * 3;
diff --git a/chart2/source/controller/main/SelectionHelper.cxx b/chart2/source/controller/main/SelectionHelper.cxx
index 83910110dbd8..a7869d732156 100644
--- a/chart2/source/controller/main/SelectionHelper.cxx
+++ b/chart2/source/controller/main/SelectionHelper.cxx
@@ -602,7 +602,7 @@ bool SelectionHelper::getMarkHandles( SdrHdlList& rHdlList )
{
//if th object is a polygon
//from each point a handle is generated
- const ::basegfx::B2DPolyPolygon& rPolyPolygon = ((SdrPathObj*)m_pMarkObj)->GetPathPoly();
+ const ::basegfx::B2DPolyPolygon& rPolyPolygon = static_cast<SdrPathObj*>(m_pMarkObj)->GetPathPoly();
for( sal_uInt32 nN = 0L; nN < rPolyPolygon.count(); nN++)
{
const ::basegfx::B2DPolygon aPolygon(rPolyPolygon.getB2DPolygon(nN));
diff --git a/chart2/source/model/main/ChartModel.cxx b/chart2/source/model/main/ChartModel.cxx
index 9e65853e313e..77354a99ab2b 100644
--- a/chart2/source/model/main/ChartModel.cxx
+++ b/chart2/source/model/main/ChartModel.cxx
@@ -1417,8 +1417,7 @@ void ChartModel::setTimeBasedRange(sal_Int32 nStart, sal_Int32 nEnd)
void ChartModel::setWindow( const sal_uInt64 nWindowPtr )
throw (uno::RuntimeException, std::exception)
{
- void* pPtr = (void*)nWindowPtr;
- OpenGLWindow* pWindow = reinterpret_cast<OpenGLWindow*>(pPtr);
+ OpenGLWindow* pWindow = reinterpret_cast<OpenGLWindow*>(nWindowPtr);
mpOpenGLWindow = pWindow;
}
diff --git a/chart2/source/view/diagram/VDiagram.cxx b/chart2/source/view/diagram/VDiagram.cxx
index bdbc3dd44de5..7cd278903c3e 100644
--- a/chart2/source/view/diagram/VDiagram.cxx
+++ b/chart2/source/view/diagram/VDiagram.cxx
@@ -221,7 +221,7 @@ E3dScene* lcl_getE3dScene( const uno::Reference< drawing::XShape >& xShape )
{
SdrObject* pObj = pSvxShape->GetSdrObject();
if( pObj && pObj->ISA(E3dScene) )
- pRet = (E3dScene*)pObj;
+ pRet = static_cast<E3dScene*>(pObj);
}
}
return pRet;