summaryrefslogtreecommitdiff
path: root/chart2/source/controller
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-04-24 12:29:39 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-04-24 14:51:27 +0100
commita21e0d3aa88694c4000cd3839a7158aa2e21400f (patch)
treeab6257a06530687e421eca704a31012c740a4026 /chart2/source/controller
parent655cfb327dea2abe63e9a3b30fbbcf51d9508455 (diff)
coverity#1405470 Unchecked dynamic_cast
Change-Id: I5125ec90b83630225ca9aab689e814e5a7c03a4e
Diffstat (limited to 'chart2/source/controller')
-rw-r--r--chart2/source/controller/main/ControllerCommandDispatch.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/chart2/source/controller/main/ControllerCommandDispatch.cxx b/chart2/source/controller/main/ControllerCommandDispatch.cxx
index 696c06d9e22d..89f6c1c9f36f 100644
--- a/chart2/source/controller/main/ControllerCommandDispatch.cxx
+++ b/chart2/source/controller/main/ControllerCommandDispatch.cxx
@@ -412,9 +412,9 @@ void ModelState::update( const Reference< frame::XModel > & xModel )
bIsThreeD = (nDimensionCount == 3);
if (xChartDoc.is())
{
- ChartModel* pModel = dynamic_cast<ChartModel*>(xChartDoc.get());
- bHasOwnData = pModel->hasInternalDataProvider();
- bHasDataFromPivotTable = pModel->isDataFromPivotTable();
+ ChartModel& rModel = dynamic_cast<ChartModel&>(*xChartDoc.get());
+ bHasOwnData = rModel.hasInternalDataProvider();
+ bHasDataFromPivotTable = rModel.isDataFromPivotTable();
}
bHasMainTitle = TitleHelper::getTitle( TitleHelper::MAIN_TITLE, xModel ).is();