diff options
Diffstat (limited to 'reportdesign')
-rw-r--r-- | reportdesign/inc/ReportDefinition.hxx | 2 | ||||
-rw-r--r-- | reportdesign/source/core/api/ReportDefinition.cxx | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/reportdesign/inc/ReportDefinition.hxx b/reportdesign/inc/ReportDefinition.hxx index 79c58c998600..bdcaeb8f2552 100644 --- a/reportdesign/inc/ReportDefinition.hxx +++ b/reportdesign/inc/ReportDefinition.hxx @@ -188,7 +188,7 @@ namespace reportdesign protected: /** abstract SdrModel provider */ - virtual SdrModel* getSdrModelFromUnoModel() const override; + virtual SdrModel& getSdrModelFromUnoModel() const override; public: //TTTT Needed? Or same as above? diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx index 11064f21d36e..82de0192902e 100644 --- a/reportdesign/source/core/api/ReportDefinition.cxx +++ b/reportdesign/source/core/api/ReportDefinition.cxx @@ -2020,9 +2020,10 @@ std::shared_ptr<rptui::OReportModel> OReportDefinition::getSdrModel(const uno::R return pReportModel; } -SdrModel* OReportDefinition::getSdrModelFromUnoModel() const +SdrModel& OReportDefinition::getSdrModelFromUnoModel() const { - return m_pImpl->m_pReportModel.get(); + OSL_ENSURE(m_pImpl->m_pReportModel.get(), "No SdrModel in ReportDesign, should not happen"); + return *m_pImpl->m_pReportModel.get(); } uno::Reference< uno::XInterface > SAL_CALL OReportDefinition::createInstanceWithArguments( const OUString& aServiceSpecifier, const uno::Sequence< uno::Any >& _aArgs) |