diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-10-06 09:58:45 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-10-06 14:13:28 +0200 |
commit | 516f7dafd009988f3fc58041bc265b836f4b7322 (patch) | |
tree | 4ba762478a324f9a303c052f46b69ff0eaf55262 /chart2/source | |
parent | b693d19884a09b5f841b30f2e8b586778584ed16 (diff) |
SdrModel::getUnoModel can use XModel instead of XInterface
Change-Id: Ica10c62066881ba86099d2057ff6fe20e0084a85
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157632
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2/source')
-rw-r--r-- | chart2/source/inc/chartview/DrawModelWrapper.hxx | 2 | ||||
-rw-r--r-- | chart2/source/view/main/DrawModelWrapper.cxx | 8 |
2 files changed, 4 insertions, 6 deletions
diff --git a/chart2/source/inc/chartview/DrawModelWrapper.hxx b/chart2/source/inc/chartview/DrawModelWrapper.hxx index fb977528e8f1..080587e7ecfe 100644 --- a/chart2/source/inc/chartview/DrawModelWrapper.hxx +++ b/chart2/source/inc/chartview/DrawModelWrapper.hxx @@ -66,7 +66,7 @@ public: SfxItemPool& GetItemPool(); - SAL_DLLPRIVATE virtual css::uno::Reference< css::uno::XInterface > + SAL_DLLPRIVATE virtual css::uno::Reference< css::frame::XModel > createUnoModel() override; SAL_DLLPRIVATE css::uno::Reference< css::frame::XModel > getUnoModel(); diff --git a/chart2/source/view/main/DrawModelWrapper.cxx b/chart2/source/view/main/DrawModelWrapper.cxx index d5aff15c6660..9b4a8b28a1ef 100644 --- a/chart2/source/view/main/DrawModelWrapper.cxx +++ b/chart2/source/view/main/DrawModelWrapper.cxx @@ -123,16 +123,14 @@ DrawModelWrapper::~DrawModelWrapper() m_pRefDevice.disposeAndClear(); } -uno::Reference< uno::XInterface > DrawModelWrapper::createUnoModel() +uno::Reference< frame::XModel > DrawModelWrapper::createUnoModel() { - uno::Reference< lang::XComponent > xComponent = new SvxUnoDrawingModel( this ); //tell Andreas Schluens if SvxUnoDrawingModel is not needed anymore -> remove export from svx to avoid link problems in writer - return uno::Reference< uno::XInterface >::query( xComponent ); + return new SvxUnoDrawingModel( this ); //tell Andreas Schluens if SvxUnoDrawingModel is not needed anymore -> remove export from svx to avoid link problems in writer } uno::Reference< frame::XModel > DrawModelWrapper::getUnoModel() { - uno::Reference< uno::XInterface > xI = SdrModel::getUnoModel(); - return uno::Reference<frame::XModel>::query( xI ); + return SdrModel::getUnoModel(); } SdrModel& DrawModelWrapper::getSdrModel() |