diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2024-10-02 21:37:35 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-10-03 14:08:07 +0200 |
commit | 36d4938894a0c4ac3fecd2fe00991328560d4b8a (patch) | |
tree | f3292829e34f2115a44d7ee137c18cd53d7e4c6f /sd/source/ui/unoidl/unopage.cxx | |
parent | 9b26255f03d6049bb9c7eeed4b63da070849d7be (diff) |
use more concrete UNO class in SdXImpressDocument
Change-Id: I61fb3e0c5f76fd6208255dc1f1bc403c25221ba6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174412
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd/source/ui/unoidl/unopage.cxx')
-rw-r--r-- | sd/source/ui/unoidl/unopage.cxx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx index d4878a84e4df..c3d60bd59daf 100644 --- a/sd/source/ui/unoidl/unopage.cxx +++ b/sd/source/ui/unoidl/unopage.cxx @@ -2344,21 +2344,22 @@ OUString SAL_CALL SdDrawPage::getName() // XMasterPageTarget Reference< drawing::XDrawPage > SAL_CALL SdDrawPage::getMasterPage( ) { + return static_cast<SdGenericDrawPage*>(getSdMasterPage()); +} + +SdMasterPage* SdDrawPage::getSdMasterPage() +{ ::SolarMutexGuard aGuard; throwIfDisposed(); if(GetPage()) { - Reference< drawing::XDrawPage > xPage; - if(SvxDrawPage::mpPage->TRG_HasMasterPage()) { SdrPage& rMasterPage = SvxDrawPage::mpPage->TRG_GetMasterPage(); - xPage.set( rMasterPage.getUnoPage(), uno::UNO_QUERY ); + return dynamic_cast<SdMasterPage*>(rMasterPage.getUnoPage().get()); } - - return xPage; } return nullptr; } |