diff options
author | Noel <noel.grandin@collabora.co.uk> | 2021-03-05 15:51:07 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-03-08 07:37:26 +0100 |
commit | 04e7a34a19b3658de57c4f2b3b0fa8445b01f199 (patch) | |
tree | 7c7c85944d8172033d58c626b44df6f735e0bc38 /chart2/source/controller/main | |
parent | 72841008bf422dfd8553240b3a78f0474d03523c (diff) |
loplugin:refcounting check for one more case
where we might be holding something newly created by pointer
instead of by *::Reference
Change-Id: Ife6f7acae4252bf56dcdeb95d72e43c523444f97
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112138
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2/source/controller/main')
-rw-r--r-- | chart2/source/controller/main/ChartController_Window.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx index a8d71e903fd3..afd4de8a5e75 100644 --- a/chart2/source/controller/main/ChartController_Window.cxx +++ b/chart2/source/controller/main/ChartController_Window.cxx @@ -863,7 +863,8 @@ void ChartController::execute_MouseButtonUp( const MouseEvent& rMEvt ) m_xUndoManager ); bool bChanged = false; - ChartModel* pModel = dynamic_cast<ChartModel*>(getModel().get()); + css::uno::Reference< css::frame::XModel > xModel = getModel(); + ChartModel* pModel = dynamic_cast<ChartModel*>(xModel.get()); assert(pModel); if ( eObjectType == OBJECTTYPE_LEGEND ) bChanged = DiagramHelper::switchDiagramPositioningToExcludingPositioning( *pModel, false , true ); @@ -2090,7 +2091,8 @@ void ChartController::sendPopupRequest(OUString const & rCID, tools::Rectangle a OUString sPivotTableName = xPivotTableDataProvider->getPivotTableName(); - PopupRequest* pPopupRequest = dynamic_cast<PopupRequest*>(pChartModel->getPopupRequest().get()); + css::uno::Reference<css::awt::XRequestCallback> xPopupRequest = pChartModel->getPopupRequest(); + PopupRequest* pPopupRequest = dynamic_cast<PopupRequest*>(xPopupRequest.get()); if (!pPopupRequest) return; |