summaryrefslogtreecommitdiff
path: root/reportdesign
diff options
context:
space:
mode:
authorArmin Le Grand <Armin.Le.Grand@cib.de>2018-07-27 13:38:46 +0200
committerCaolán McNamara <caolanm@redhat.com>2018-10-16 12:32:24 +0200
commit2cf13c31c6aa262e4bb4b075597f3543ecd3c4a6 (patch)
treea62439c3adf4e943788555209209bceffc54d863 /reportdesign
parentd5d09bb733842252b3e2d6e7480b211e67136a75 (diff)
tdf#118963 Hand over a SdrModel to createControlLabelPair
Change-Id: I34a35ff0700d14474fa9946851812c25c4eb4bc1 Reviewed-on: https://gerrit.libreoffice.org/58187 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de> (cherry picked from commit e5ee79b5c089e72e6b24c04c7c820d706bd39993) Reviewed-on: https://gerrit.libreoffice.org/61316 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'reportdesign')
-rw-r--r--reportdesign/source/ui/report/ReportController.cxx51
1 files changed, 41 insertions, 10 deletions
diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx
index ab76f3f14616..5a6fa67586df 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -3137,11 +3137,26 @@ void OReportController::createControl(const Sequence< PropertyValue >& _aArgs,co
{
SdrUnoObj* pLabel( nullptr );
SdrUnoObj* pControl( nullptr );
- FmFormView::createControlLabelPair( getDesignView()
- ,nLeftMargin,0
- ,nullptr,nullptr,_nObjectId,SdrInventor::ReportDesign,OBJ_DLG_FIXEDTEXT,
- nullptr,pSectionWindow->getReportSection().getPage(),m_aReportModel.get(),
- pLabel,pControl);
+
+ FmFormView::createControlLabelPair(
+ getDesignView(),
+ nLeftMargin,
+ 0,
+ nullptr,
+ nullptr,
+ _nObjectId,
+ SdrInventor::ReportDesign,
+ OBJ_DLG_FIXEDTEXT,
+ nullptr,
+ pSectionWindow->getReportSection().getPage(),
+
+ // tdf#118963 Need a SdrModel for SdrObject creation. Dereferencing
+ // m_aReportModel seems pretty safe, it's done in other places, initialized
+ // in impl_initialize and throws a RuntimeException if not existing.
+ *m_aReportModel,
+
+ pLabel,
+ pControl);
// always use SdrObject::Free(...) for SdrObjects (!)
SdrObject* pTemp(pLabel);
@@ -3434,12 +3449,28 @@ void OReportController::addPairControls(const Sequence< PropertyValue >& aArgs)
OSectionView* pSectionViews[2];
pSectionViews[0] = &pSectionWindow[1]->getReportSection().getSectionView();
pSectionViews[1] = &pSectionWindow[0]->getReportSection().getSectionView();
+
// find this in svx
- FmFormView::createControlLabelPair( getDesignView()
- ,nLeftMargin,0
- ,xField,xNumberFormats,nOBJID,SdrInventor::ReportDesign,OBJ_DLG_FIXEDTEXT,
- pSectionWindow[1]->getReportSection().getPage(),pSectionWindow[0]->getReportSection().getPage(),m_aReportModel.get(),
- pControl[0],pControl[1]);
+ FmFormView::createControlLabelPair(
+ getDesignView(),
+ nLeftMargin,
+ 0,
+ xField,
+ xNumberFormats,
+ nOBJID,
+ SdrInventor::ReportDesign,
+ OBJ_DLG_FIXEDTEXT,
+ pSectionWindow[1]->getReportSection().getPage(),
+ pSectionWindow[0]->getReportSection().getPage(),
+
+ // tdf#118963 Need a SdrModel for SdrObject creation. Dereferencing
+ // m_aReportModel seems pretty safe, it's done in other places, initialized
+ // in impl_initialize and throws a RuntimeException if not existing.
+ *m_aReportModel,
+
+ pControl[0],
+ pControl[1]);
+
if ( pControl[0] && pControl[1] )
{
SdrPageView* pPgViews[2];