summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-06-10 15:36:13 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-06-10 16:08:08 +0100
commit0ededb3430ccf41f4fe9fce746416b3111fb38ca (patch)
tree775aa35bdf84494d27817a594567c7025011904b
parent23f6f4fd1fb7395115d1b94b38d72a45a0825c79 (diff)
coverity#1158114 Unchecked dynamic_cast
Change-Id: I779e1cae1039886b2d43a025930cc50d7aaac95a
-rw-r--r--chart2/source/controller/main/ChartController_Tools.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/chart2/source/controller/main/ChartController_Tools.cxx b/chart2/source/controller/main/ChartController_Tools.cxx
index 8bc60c405a77..cb3bcef71489 100644
--- a/chart2/source/controller/main/ChartController_Tools.cxx
+++ b/chart2/source/controller/main/ChartController_Tools.cxx
@@ -837,8 +837,8 @@ void ChartController::executeDispatch_ToggleLegend()
Reference< frame::XModel > xModel( getModel() );
UndoGuard aUndoGuard = UndoGuard(
SCH_RESSTR( STR_ACTION_TOGGLE_LEGEND ), m_xUndoManager );
- ChartModel* pModel = dynamic_cast<ChartModel*>(xModel.get());
- Reference< beans::XPropertySet > xLegendProp( LegendHelper::getLegend( *pModel ), uno::UNO_QUERY );
+ ChartModel& rModel = dynamic_cast<ChartModel&>(*xModel.get());
+ Reference< beans::XPropertySet > xLegendProp( LegendHelper::getLegend(rModel), uno::UNO_QUERY );
bool bChanged = false;
if( xLegendProp.is())
{
@@ -858,7 +858,7 @@ void ChartController::executeDispatch_ToggleLegend()
}
else
{
- xLegendProp.set( LegendHelper::getLegend( *pModel, m_xCC, true ), uno::UNO_QUERY );
+ xLegendProp.set( LegendHelper::getLegend(rModel, m_xCC, true), uno::UNO_QUERY );
if( xLegendProp.is())
bChanged = true;
}