summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-06-10 15:32:52 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-06-10 16:08:07 +0100
commite2de37687c2e68706d2093e19d1b93cec02f0d83 (patch)
tree9d986c92b0559f3584d44bcb8dcb7d78c6324706
parent0452160624cb8501a5203fb90bad69b2a03e50dd (diff)
coverity#1158119 Unchecked dynamic_cast
Change-Id: Iebe5c7349c2eb33b307b52031e6c1337113785c1
-rw-r--r--chart2/source/controller/dialogs/res_LegendPosition.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/chart2/source/controller/dialogs/res_LegendPosition.cxx b/chart2/source/controller/dialogs/res_LegendPosition.cxx
index 2ca2bf65a91f..4b7d3ded55d1 100644
--- a/chart2/source/controller/dialogs/res_LegendPosition.cxx
+++ b/chart2/source/controller/dialogs/res_LegendPosition.cxx
@@ -126,8 +126,8 @@ void LegendPositionResources::writeToModel( const ::com::sun::star::uno::Referen
try
{
bool bShowLegend = m_pCbxShow && m_pCbxShow->IsChecked();
- ChartModel* pModel = dynamic_cast<ChartModel*>(xChartModel.get());
- uno::Reference< beans::XPropertySet > xProp( LegendHelper::getLegend( *pModel,m_xCC,bShowLegend ), uno::UNO_QUERY );
+ ChartModel& rModel = dynamic_cast<ChartModel&>(*xChartModel.get());
+ uno::Reference< beans::XPropertySet > xProp(LegendHelper::getLegend(rModel, m_xCC, bShowLegend), uno::UNO_QUERY);
if( xProp.is() )
{
//show