Kaydet (Commit) 85344383 authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#1158136 Unchecked dynamic_cast

Change-Id: I8d4e7c497430faacd0d8f1138b9af8b2f11127a0
üst 4f4a21c8
...@@ -189,6 +189,7 @@ void ObjectPropertiesDialogParameter::init( const uno::Reference< frame::XModel ...@@ -189,6 +189,7 @@ void ObjectPropertiesDialogParameter::init( const uno::Reference< frame::XModel
if( m_bIsCrossingAxisIsCategoryAxis ) if( m_bIsCrossingAxisIsCategoryAxis )
{ {
ChartModel* pModel = dynamic_cast<ChartModel*>(xChartModel.get()); ChartModel* pModel = dynamic_cast<ChartModel*>(xChartModel.get());
if (pModel)
m_aCategories = DiagramHelper::getExplicitSimpleCategories( *pModel ); m_aCategories = DiagramHelper::getExplicitSimpleCategories( *pModel );
} }
} }
...@@ -197,11 +198,14 @@ void ObjectPropertiesDialogParameter::init( const uno::Reference< frame::XModel ...@@ -197,11 +198,14 @@ void ObjectPropertiesDialogParameter::init( const uno::Reference< frame::XModel
if ( nDimensionIndex == 0 && aData.AxisType == chart2::AxisType::CATEGORY ) if ( nDimensionIndex == 0 && aData.AxisType == chart2::AxisType::CATEGORY )
{ {
ChartModel* pModel = dynamic_cast<ChartModel*>(xChartModel.get()); ChartModel* pModel = dynamic_cast<ChartModel*>(xChartModel.get());
if (pModel)
{
ExplicitCategoriesProvider aExplicitCategoriesProvider( xCooSys, *pModel ); ExplicitCategoriesProvider aExplicitCategoriesProvider( xCooSys, *pModel );
m_bComplexCategoriesAxis = aExplicitCategoriesProvider.hasComplexCategories(); m_bComplexCategoriesAxis = aExplicitCategoriesProvider.hasComplexCategories();
} }
} }
} }
}
//no staggering of labels for 3D axis //no staggering of labels for 3D axis
m_bCanAxisLabelsBeStaggered = nDimensionCount==2; m_bCanAxisLabelsBeStaggered = nDimensionCount==2;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment