diff options
author | Armin Le Grand <Armin.Le.Grand@cib.de> | 2018-04-08 14:47:23 +0200 |
---|---|---|
committer | Armin Le Grand <Armin.Le.Grand@cib.de> | 2018-04-09 10:51:56 +0200 |
commit | 06d8e6264487e3084b583e5158d9b89f8480b3eb (patch) | |
tree | f26bdc003f656b8d5c944b3bc361da33816adb22 /sd | |
parent | aa02205fc46ed53a0af18517c3cd4064d514f85f (diff) |
Make getSdrModelFromUnoModel work with SdrModel&
Change-Id: Iea3af7db77ef778db7bbdf2c1b6b1b956fd57fec
Reviewed-on: https://gerrit.libreoffice.org/52592
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/inc/unomodel.hxx | 2 | ||||
-rw-r--r-- | sd/source/ui/unoidl/unomodel.cxx | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/sd/source/ui/inc/unomodel.hxx b/sd/source/ui/inc/unomodel.hxx index 381b22be955f..0baaa22eda96 100644 --- a/sd/source/ui/inc/unomodel.hxx +++ b/sd/source/ui/inc/unomodel.hxx @@ -130,7 +130,7 @@ private: protected: /** abstract SdrModel provider */ - virtual SdrModel* getSdrModelFromUnoModel() const override; + virtual SdrModel& getSdrModelFromUnoModel() const override; public: SdXImpressDocument(::sd::DrawDocShell* pShell, bool bClipBoard); diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index b6ee7d5d1122..dc53abb989b5 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -2714,9 +2714,10 @@ void SdXImpressDocument::initializeDocument() } } -SdrModel* SdXImpressDocument::getSdrModelFromUnoModel() const +SdrModel& SdXImpressDocument::getSdrModelFromUnoModel() const { - return GetDoc(); + OSL_ENSURE(GetDoc(), "No SdrModel in draw/Impress, should not happen"); + return *GetDoc(); // TTTT should be reference } void SAL_CALL SdXImpressDocument::dispose() |