summaryrefslogtreecommitdiff
path: root/reportdesign
diff options
context:
space:
mode:
authorArmin Le Grand <Armin.Le.Grand@cib.de>2018-07-27 13:38:46 +0200
committerArmin Le Grand <Armin.Le.Grand@cib.de>2018-07-28 18:35:57 +0200
commite5ee79b5c089e72e6b24c04c7c820d706bd39993 (patch)
tree230845441bc6c9e2da4d1c3b05232443c3e1b5de /reportdesign
parent7dc30a147353085b8410f0c676ca48e602b383f0 (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>
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 013733fb128e..64373669f9b4 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -3136,11 +3136,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);
@@ -3433,12 +3448,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];