[Libreoffice-commits] core.git: include/svx reportdesign/source svx/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sun Oct 7 19:20:13 UTC 2018


 include/svx/fmview.hxx                             |    2 ++
 reportdesign/source/ui/report/ReportController.cxx |    4 ++++
 svx/source/form/fmview.cxx                         |    4 ++--
 svx/source/form/fmvwimp.cxx                        |    6 +++++-
 svx/source/inc/fmvwimp.hxx                         |    2 ++
 5 files changed, 15 insertions(+), 3 deletions(-)

New commits:
commit f2bd68c33c13b94cf844227d04a7eba9fe3723f8
Author:     Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Sun Sep 30 01:25:48 2018 +0200
Commit:     Julien Nabet <serval2412 at yahoo.fr>
CommitDate: Sun Oct 7 21:19:52 2018 +0200

    tdf#120152: fix adding labels in reportdesign
    
    Regression from:
    https://cgit.freedesktop.org/libreoffice/core/commit/?id=4b4942224b550235da228655677b5c068a053254
    
    Change-Id: I7935f11e82410574e64cf3d50ea4e2e3791f0487
    Reviewed-on: https://gerrit.libreoffice.org/61146
    Tested-by: Jenkins
    Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>

diff --git a/include/svx/fmview.hxx b/include/svx/fmview.hxx
index cec43527f499..106e83131733 100644
--- a/include/svx/fmview.hxx
+++ b/include/svx/fmview.hxx
@@ -95,6 +95,8 @@ public:
         sal_uInt16 _nControlObjectID,
         SdrInventor _nInventor,
         sal_uInt16 _nLabelObjectID,
+        SdrPage* _pLabelPage,
+        SdrPage* _pControlPage,
 
         // tdf#118963 Need a SdrModel for SdrObject creation. To make the
         // demand clear, hand over a SdrMldel&
diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx
index 1319f3be33fc..c0288eb92de6 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -3146,6 +3146,8 @@ void OReportController::createControl(const Sequence< PropertyValue >& _aArgs,co
             _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
@@ -3453,6 +3455,8 @@ void OReportController::addPairControls(const Sequence< PropertyValue >& aArgs)
                 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
diff --git a/svx/source/form/fmview.cxx b/svx/source/form/fmview.cxx
index e4670a1fb714..5f93b1750b85 100644
--- a/svx/source/form/fmview.cxx
+++ b/svx/source/form/fmview.cxx
@@ -566,7 +566,7 @@ FmFormObj* FmFormView::getMarkedGrid() const
 void FmFormView::createControlLabelPair( OutputDevice const * _pOutDev, sal_Int32 _nXOffsetMM, sal_Int32 _nYOffsetMM,
     const Reference< XPropertySet >& _rxField, const Reference< XNumberFormats >& _rxNumberFormats,
     sal_uInt16 _nControlObjectID, SdrInventor _nInventor, sal_uInt16 _nLabelObjectID,
-    SdrModel& _rModel,
+    SdrPage* _pLabelPage, SdrPage* _pControlPage, SdrModel& _rModel,
     std::unique_ptr<SdrUnoObj, SdrObjectFreeOp>& _rpLabel,
     std::unique_ptr<SdrUnoObj, SdrObjectFreeOp>& _rpControl )
 {
@@ -574,7 +574,7 @@ void FmFormView::createControlLabelPair( OutputDevice const * _pOutDev, sal_Int3
         *_pOutDev, _nXOffsetMM, _nYOffsetMM,
         _rxField, _rxNumberFormats,
         _nControlObjectID, "", _nInventor, _nLabelObjectID,
-        _rModel,
+        _pLabelPage, _pControlPage, _rModel,
         _rpLabel, _rpControl
     );
 }
diff --git a/svx/source/form/fmvwimp.cxx b/svx/source/form/fmvwimp.cxx
index ec0df8ee71a7..aa953fa13616 100644
--- a/svx/source/form/fmvwimp.cxx
+++ b/svx/source/form/fmvwimp.cxx
@@ -1526,6 +1526,8 @@ bool FmXFormView::createControlLabelPair( OutputDevice const & _rOutDev, sal_Int
         _rFieldPostfix,
         SdrInventor::FmForm,
         OBJ_FM_FIXEDTEXT,
+        nullptr,
+        nullptr,
 
         // tdf#118963 Hand over a SdrModel to SdrObject-creation. It uses the local m_pView
         // and already returning false when nullptr == getView() could be done, but m_pView
@@ -1557,7 +1559,7 @@ bool FmXFormView::createControlLabelPair( OutputDevice const & _rOutDev, sal_Int
     const Reference< XPropertySet >& _rxField,
     const Reference< XNumberFormats >& _rxNumberFormats, sal_uInt16 _nControlObjectID,
     const OUString& _rFieldPostfix, SdrInventor _nInventor, sal_uInt16 _nLabelObjectID,
-    SdrModel& _rModel,
+    SdrPage* _pLabelPage, SdrPage* _pControlPage, SdrModel& _rModel,
     std::unique_ptr<SdrUnoObj, SdrObjectFreeOp>& _rpLabel, std::unique_ptr<SdrUnoObj, SdrObjectFreeOp>& _rpControl)
 {
     sal_Int32 nDataType = 0;
@@ -1604,6 +1606,7 @@ bool FmXFormView::createControlLabelPair( OutputDevice const & _rOutDev, sal_Int
                 _rModel,
                 _nInventor,
                 _nLabelObjectID)));
+        _pLabelPage->NbcInsertObject(pLabel.get());
 
         OSL_ENSURE( pLabel.get(), "FmXFormView::createControlLabelPair: could not create the label!" );
 
@@ -1636,6 +1639,7 @@ bool FmXFormView::createControlLabelPair( OutputDevice const & _rOutDev, sal_Int
             _rModel,
              _nInventor,
              _nControlObjectID)));
+    _pControlPage->NbcInsertObject(pControl.get());
 
     OSL_ENSURE( pControl.get(), "FmXFormView::createControlLabelPair: could not create the control!" );
 
diff --git a/svx/source/inc/fmvwimp.hxx b/svx/source/inc/fmvwimp.hxx
index f56a70e5db25..13749dedf391 100644
--- a/svx/source/inc/fmvwimp.hxx
+++ b/svx/source/inc/fmvwimp.hxx
@@ -263,6 +263,8 @@ private:
 
         // tdf#118963 Need a SdrModel for SdrObject creation. To make the
         // demand clear, hand over a SdrMldel&
+        SdrPage* _pLabelPage,
+        SdrPage* _pControlPage,
         SdrModel& _rModel,
 
         std::unique_ptr<SdrUnoObj, SdrObjectFreeOp>& _rpLabel,


More information about the Libreoffice-commits mailing list