coverity#1158096 Unchecked dynamic_cast

Change-Id: I9d02b4e9e4c8dfea73cef3970d11e21eaefb80bd
This commit is contained in:
Caolán McNamara
2014-06-10 15:37:46 +01:00
parent ef68800d96
commit 08b0691bde

View File

@@ -343,9 +343,8 @@ InternalDataProvider::InternalDataProvider(
{
vector< vector< uno::Any > > aNewCategories;//inner count is level
{
ChartModel* pModel = dynamic_cast<ChartModel*>(xChartModel.get());
assert(pModel);
ExplicitCategoriesProvider aExplicitCategoriesProvider( ChartModelHelper::getFirstCoordinateSystem(xChartModel), *pModel );
ChartModel& rModel = dynamic_cast<ChartModel&>(*xChartModel.get());
ExplicitCategoriesProvider aExplicitCategoriesProvider(ChartModelHelper::getFirstCoordinateSystem(xChartModel), rModel);
const Sequence< Reference< chart2::data::XLabeledDataSequence> >& rSplitCategoriesList( aExplicitCategoriesProvider.getSplitCategoriesList() );
sal_Int32 nLevelCount = rSplitCategoriesList.getLength();