diff options
Diffstat (limited to 'chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx')
-rw-r--r-- | chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx b/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx index c943bd4e085f..78eccbeed65a 100644 --- a/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx +++ b/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx @@ -107,7 +107,12 @@ rtl::Reference< ::chart::ChartView > const & Chart2ModelContact::getChartView() // get the chart view rtl::Reference<ChartModel> xChartModel( m_xChartModel ); if( xChartModel ) - m_xChartView = xChartModel->getChartView(); // will create if necessary + { + auto xInstance = xChartModel->createInstance( CHART_VIEW_SERVICE_NAME ); + auto pChartView = dynamic_cast<ChartView*>(xInstance.get()); + assert(!xInstance || pChartView); + m_xChartView = pChartView; + } } return m_xChartView; } |