diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-01-19 10:04:48 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-01-19 11:38:51 +0100 |
commit | 4ab36ed96f9dce18bad751c67bb447d3783f3aba (patch) | |
tree | 938a87660a12a5826b0eb95862b32d72143e00cd /chart2/source/controller/main/UndoGuard.cxx | |
parent | WASM gbuild: add --pre-js dependencies (diff) | |
download | core-4ab36ed96f9dce18bad751c67bb447d3783f3aba.tar.gz core-4ab36ed96f9dce18bad751c67bb447d3783f3aba.zip |
use more concrete types in chart2, ChartModel
Change-Id: I36b6ac63ce62e0eb0e9bec951d582f39aed3be25
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128592
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2/source/controller/main/UndoGuard.cxx')
-rw-r--r-- | chart2/source/controller/main/UndoGuard.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/chart2/source/controller/main/UndoGuard.cxx b/chart2/source/controller/main/UndoGuard.cxx index e10d9216137d..420347eb40d4 100644 --- a/chart2/source/controller/main/UndoGuard.cxx +++ b/chart2/source/controller/main/UndoGuard.cxx @@ -20,6 +20,7 @@ #include "UndoGuard.hxx" #include "ChartModelClone.hxx" #include "UndoActions.hxx" +#include <ChartModel.hxx> #include <com/sun/star/document/XUndoManager.hpp> #include <com/sun/star/frame/XModel.hpp> @@ -35,11 +36,12 @@ namespace chart UndoGuard::UndoGuard( const OUString& i_undoString, const uno::Reference< document::XUndoManager > & i_undoManager, const ModelFacet i_facet ) - :m_xChartModel( i_undoManager->getParent(), uno::UNO_QUERY_THROW ) - ,m_xUndoManager( i_undoManager ) + :m_xUndoManager( i_undoManager ) ,m_aUndoString( i_undoString ) ,m_bActionPosted( false ) { + m_xChartModel = dynamic_cast<::chart::ChartModel*>(i_undoManager->getParent().get()); + assert(m_xChartModel); m_pDocumentSnapshot = std::make_shared<ChartModelClone>( m_xChartModel, i_facet ); } |