[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-4+backports' - 46 commits - basic/source bin/check-elf-dynamic-objects chart2/qa chart2/source compilerplugins/LICENSE.TXT configure.ac cui/inc cui/source cui/uiconfig dictionaries download.lst external/openssl external/python3 filter/source helpcontent2 include/svx include/xmloff odk/docs odk/examples odk/index.html odk/index_online.html oox/documentation oox/source pyuno/inc pyuno/source readlicense_oo/license sc/CppunitTest_sc_anchor_test.mk sc/inc sc/qa sc/source sd/qa setup_native/source sfx2/uiconfig solenv/gbuild svx/source sw/qa sw/source translations vcl/source writerfilter/source xmloff/inc xmloff/source

Michael Weghorn (via logerrit) logerrit at kemper.freedesktop.org
Mon Jan 13 07:47:23 UTC 2020


 basic/source/runtime/runtime.cxx                                    |  123 -
 bin/check-elf-dynamic-objects                                       |    6 
 chart2/qa/extras/chart2import.cxx                                   |   43 
 chart2/qa/extras/data/odp/tdf123206.odp                             |binary
 chart2/qa/extras/data/pptx/tdf125444.pptx                           |binary
 chart2/source/controller/main/ControllerCommandDispatch.cxx         |   14 
 chart2/source/view/axes/Tickmarks.cxx                               |    5 
 chart2/source/view/axes/Tickmarks.hxx                               |    1 
 chart2/source/view/axes/VCartesianAxis.cxx                          |   15 
 compilerplugins/LICENSE.TXT                                         |    2 
 configure.ac                                                        |    6 
 cui/inc/strings.hrc                                                 |    2 
 cui/source/inc/treeopt.hxx                                          |    1 
 cui/source/options/treeopt.cxx                                      |   17 
 cui/source/tabpages/tabstpge.cxx                                    |    2 
 cui/source/tabpages/tpbitmap.cxx                                    |   12 
 cui/uiconfig/ui/linetabpage.ui                                      |    6 
 cui/uiconfig/ui/optviewpage.ui                                      |   10 
 dictionaries                                                        |    2 
 download.lst                                                        |    4 
 external/openssl/ExternalProject_openssl.mk                         |    2 
 external/python3/ExternalPackage_python3.mk                         |   76 
 external/python3/ExternalProject_python3.mk                         |   16 
 external/python3/UnpackedTarball_python3.mk                         |   13 
 external/python3/i100492-freebsd.patch.1                            |   45 
 external/python3/python-3.3.0-pythreadstate.patch.1                 |   15 
 external/python3/python-3.3.3-aix.patch.1                           |  146 -
 external/python3/python-3.3.3-disable-obmalloc.patch.0              |   19 
 external/python3/python-3.3.3-elf-rpath.patch.1                     |    9 
 external/python3/python-3.5.4-msvc-disable.patch.1                  |   15 
 external/python3/python-3.5.4-ssl.patch.1                           |   83 
 external/python3/python-3.7.6-msvc-ssl.patch.1                      |   25 
 external/python3/python3-osx-avoid-new-10.13.patch.1                |   61 
 external/python3/ubsan.patch.0                                      |   22 
 filter/source/graphicfilter/icgm/class7.cxx                         |    2 
 helpcontent2                                                        |    2 
 include/svx/ctredlin.hxx                                            |    5 
 include/xmloff/xmltoken.hxx                                         |    1 
 odk/docs/install.html                                               |    2 
 odk/docs/tools.html                                                 |    2 
 odk/examples/DevelopersGuide/examples.html                          |    2 
 odk/examples/examples.html                                          |    2 
 odk/index.html                                                      |    2 
 odk/index_online.html                                               |    2 
 oox/documentation/predefined-styles-map.ods                         |binary
 oox/source/drawingml/chart/plotareaconverter.cxx                    |    3 
 oox/source/drawingml/table/predefined-table-styles.cxx              |  918 ++++++++++
 oox/source/drawingml/table/tableproperties.cxx                      |  139 -
 pyuno/inc/pyuno.hxx                                                 |    1 
 pyuno/source/module/pyuno.cxx                                       |    9 
 pyuno/source/module/pyuno_runtime.cxx                               |   33 
 readlicense_oo/license/license.xml                                  |    2 
 sc/CppunitTest_sc_anchor_test.mk                                    |    4 
 sc/inc/docuno.hxx                                                   |    2 
 sc/qa/extras/anchor.cxx                                             |   17 
 sc/qa/unit/data/ods/tdf129552.fods                                  |  123 +
 sc/qa/unit/subsequent_export-test.cxx                               |   43 
 sc/source/filter/excel/xetable.cxx                                  |    7 
 sc/source/filter/oox/commentsbuffer.cxx                             |   60 
 sc/source/ui/condformat/condformatdlgentry.cxx                      |    5 
 sc/source/ui/docshell/docfunc.cxx                                   |   23 
 sc/source/ui/inc/docfunc.hxx                                        |    4 
 sc/source/ui/miscdlgs/acredlin.cxx                                  |    6 
 sc/source/ui/view/gridwin4.cxx                                      |    7 
 sd/qa/unit/data/pptx/predefined-table-style.pptx                    |binary
 sd/qa/unit/import-tests.cxx                                         |   30 
 setup_native/source/packinfo/packinfo_brand.txt                     |   16 
 setup_native/source/packinfo/packinfo_extensions.txt                |    8 
 setup_native/source/packinfo/packinfo_office.txt                    |  118 -
 setup_native/source/packinfo/packinfo_office_help.txt               |    2 
 setup_native/source/packinfo/packinfo_office_lang.txt               |   20 
 setup_native/source/packinfo/packinfo_sdkoo.txt                     |    2 
 setup_native/source/packinfo/packinfo_ure.txt                       |    4 
 sfx2/uiconfig/ui/licensedialog.ui                                   |    2 
 solenv/gbuild/platform/com_MSC_class.mk                             |    2 
 svx/source/accessibility/AccessibleShape.cxx                        |    2 
 svx/source/dialog/ctredlin.cxx                                      |   13 
 sw/qa/extras/layout/data/tdf128996.docx                             |binary
 sw/qa/extras/layout/layout.cxx                                      |   16 
 sw/qa/extras/ooxmlexport/data/tdf123262_textFootnoteSeparators.docx |binary
 sw/qa/extras/ooxmlexport/data/tdf129353.docx                        |binary
 sw/qa/extras/ooxmlexport/data/tdf129442_RightBorder.docx            |binary
 sw/qa/extras/ooxmlexport/data/tdf129450_BottomBorder.docx           |binary
 sw/qa/extras/ooxmlexport/ooxmlexport14.cxx                          |   29 
 sw/qa/extras/ooxmlexport/ooxmlexport3.cxx                           |   23 
 sw/qa/extras/ooxmlexport/ooxmlexport5.cxx                           |   47 
 sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx                       |   16 
 sw/qa/extras/rtfexport/data/tdf129513.rtf                           |    4 
 sw/qa/extras/rtfexport/rtfexport5.cxx                               |   11 
 sw/qa/extras/rtfimport/rtfimport.cxx                                |    2 
 sw/qa/extras/unowriter/unowriter.cxx                                |   35 
 sw/qa/uitest/table/tdf115026.py                                     |   38 
 sw/source/core/doc/tblafmt.cxx                                      |    8 
 sw/source/core/frmedt/feshview.cxx                                  |    1 
 sw/source/core/unocore/unomap1.cxx                                  |    6 
 sw/source/ui/fldui/flddb.cxx                                        |   58 
 sw/source/ui/fldui/flddb.hxx                                        |    1 
 sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx                |    7 
 translations                                                        |    2 
 vcl/source/window/layout.cxx                                        |    4 
 vcl/source/window/taskpanelist.cxx                                  |   24 
 writerfilter/source/dmapper/DomainMapper.cxx                        |   39 
 writerfilter/source/dmapper/DomainMapperTableHandler.cxx            |   10 
 writerfilter/source/dmapper/DomainMapper_Impl.cxx                   |  194 +-
 writerfilter/source/dmapper/DomainMapper_Impl.hxx                   |   23 
 writerfilter/source/rtftok/rtfdispatchflag.cxx                      |    1 
 xmloff/inc/SchXMLImport.hxx                                         |    1 
 xmloff/source/chart/SchXMLExport.cxx                                |   55 
 xmloff/source/chart/SchXMLImport.cxx                                |    1 
 xmloff/source/chart/SchXMLPlotAreaContext.cxx                       |  102 -
 xmloff/source/chart/SchXMLPlotAreaContext.hxx                       |   47 
 xmloff/source/chart/SchXMLSeries2Context.cxx                        |   18 
 xmloff/source/chart/transporttypes.hxx                              |    7 
 xmloff/source/core/xmltoken.cxx                                     |    1 
 xmloff/source/token/tokens.txt                                      |    1 
 115 files changed, 2239 insertions(+), 1058 deletions(-)

New commits:
commit 5e7bacba501e008b93f97bb2c9d80fe764cbd757
Merge: 8b6a27abe930 e17ed7b1e111
Author:     Michael Weghorn <m.weghorn at posteo.de>
AuthorDate: Mon Jan 13 08:46:18 2020 +0100
Commit:     Michael Weghorn <m.weghorn at posteo.de>
CommitDate: Mon Jan 13 08:46:18 2020 +0100

    Merge branch 'libreoffice-6-4'
    
    into distro/lhm/libreoffice-6-4+backports
    
    Change-Id: I248fcf4772b8189f41e67fd98b540571f565ee8c

commit e17ed7b1e11174a7b3ed1219ce1df8b26372417a
Author:     Andras Timar <andras.timar at collabora.com>
AuthorDate: Mon Jan 13 02:55:31 2020 +0100
Commit:     Gerrit Code Review <gerrit at gerrit.libreoffice.org>
CommitDate: Mon Jan 13 02:55:31 2020 +0100

    Update git submodules
    
    * Update dictionaries from branch 'libreoffice-6-4'
      to ab88309069f2df5dd010654d294c094ff2adc970
      - corrected Slovenian readme and package description
    
        Change-Id: Iaeece79f64ed03a63191afe9a5f55cbd298a5ed5
        Reviewed-on: https://gerrit.libreoffice.org/c/dictionaries/+/86644
        Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
        Tested-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>

diff --git a/dictionaries b/dictionaries
index 8d2b8fb67dce..ab88309069f2 160000
--- a/dictionaries
+++ b/dictionaries
@@ -1 +1 @@
-Subproject commit 8d2b8fb67dced7ee7fb4770402b8f7e1541f0b31
+Subproject commit ab88309069f2df5dd010654d294c094ff2adc970
commit 98570b51bd11917b68904c343dd5c40ec2912d3d
Author:     Adolfo Jayme Barrientos <fitojb at ubuntu.com>
AuthorDate: Sun Jan 12 18:19:13 2020 +0100
Commit:     Gerrit Code Review <gerrit at gerrit.libreoffice.org>
CommitDate: Sun Jan 12 18:19:13 2020 +0100

    Update git submodules
    
    * Update helpcontent2 from branch 'libreoffice-6-4'
      to 927b9f89df5519d053e3c0d12198776ed07f6f32
      - Revert "tdf#108869  repair icon on help file"
    
        This reverts commit ed4c9e733e8d0c62f17da3f5db1e1292d02cfa1e.
    
        Reason for revert: It breaks the string freeze.
    
        Change-Id: I27e1ea91921c9b5635e818719379ed283823378c
        Reviewed-on: https://gerrit.libreoffice.org/c/help/+/86641
        Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
        Tested-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>

diff --git a/helpcontent2 b/helpcontent2
index ed4c9e733e8d..927b9f89df55 160000
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit ed4c9e733e8d0c62f17da3f5db1e1292d02cfa1e
+Subproject commit 927b9f89df5519d053e3c0d12198776ed07f6f32
commit 12b5ab70f848b956beb2abe4c8e73374f34dfa7b
Author:     Seth Chaiklin <sdc.blanco at youmail.dk>
AuthorDate: Sun Jan 12 17:29:38 2020 +0100
Commit:     Gerrit Code Review <gerrit at gerrit.libreoffice.org>
CommitDate: Sun Jan 12 17:29:38 2020 +0100

    Update git submodules
    
    * Update helpcontent2 from branch 'libreoffice-6-4'
      to ed4c9e733e8d0c62f17da3f5db1e1292d02cfa1e
      - tdf#108869  repair icon on help file
    
         - updated path to image
    
        Change-Id: I70e8312d61e4163d7e654c4945eb520c7414f741
        Reviewed-on: https://gerrit.libreoffice.org/c/help/+/86617
        Tested-by: Jenkins
        Reviewed-by: Olivier Hallot <olivier.hallot at libreoffice.org>
        (cherry picked from commit 0d44ebef2f2c5829ff4998d9890aaf8f612a1ed3)
        Reviewed-on: https://gerrit.libreoffice.org/c/help/+/86639

diff --git a/helpcontent2 b/helpcontent2
index daea7016dd24..ed4c9e733e8d 160000
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit daea7016dd2410de8a610cc63a6ab3d84b256c52
+Subproject commit ed4c9e733e8d0c62f17da3f5db1e1292d02cfa1e
commit 2abea1b94e0f99b3887e816db006c11bfd72d010
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sat Jan 11 17:09:10 2020 +0000
Commit:     Adolfo Jayme Barrientos <fitojb at ubuntu.com>
CommitDate: Sun Jan 12 05:33:49 2020 +0100

    Resolves: tdf#129763 resize to request happening on every activate
    
    even though the state remains the same, so only do the resize
    if the EnableClearFormatButton[All] state changes.
    
    also change the default to off, which is what writer typically
    set it to, and make calc the one that enables it explicitly. Its
    easier to grow a dialog than shrink a dialog.
    
    Change-Id: I449df7b7dcf0204b5143b8ad88e528668b84d0a3
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86614
    Tested-by: Jenkins
    Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>

diff --git a/include/svx/ctredlin.hxx b/include/svx/ctredlin.hxx
index 91c95fa52454..55462c9dce28 100644
--- a/include/svx/ctredlin.hxx
+++ b/include/svx/ctredlin.hxx
@@ -262,6 +262,9 @@ private:
     bool bEnableRejectAll;
     bool bEnableUndo;
 
+    bool bEnableClearFormat;
+    bool bEnableClearFormatAll;
+
     weld::Window* m_pDialog;
     std::unique_ptr<weld::Button> m_xAccept;
     std::unique_ptr<weld::Button> m_xReject;
@@ -272,6 +275,7 @@ private:
 
     DECL_LINK( PbClickHdl, weld::Button&, void );
 
+    void            EnableClearFormatButton(weld::Button&, bool bFlag);
 public:
     SvxTPView(weld::Container* pParent, weld::Window* pDialog, weld::Builder* pTopLevel);
     virtual ~SvxTPView() override;
@@ -282,7 +286,6 @@ public:
     void            EnableAcceptAll(bool bFlag);
     void            EnableReject(bool bFlag);
     void            EnableRejectAll(bool bFlag);
-    void            EnableClearFormatButton(weld::Button&, bool bFlag);
     void            EnableClearFormat(bool bFlag);
     void            EnableClearFormatAll(bool bFlag);
     void            EnableUndo(bool bFlag=true);
diff --git a/sc/source/ui/miscdlgs/acredlin.cxx b/sc/source/ui/miscdlgs/acredlin.cxx
index a30c56ef0b00..4e08bc7506cf 100644
--- a/sc/source/ui/miscdlgs/acredlin.cxx
+++ b/sc/source/ui/miscdlgs/acredlin.cxx
@@ -108,6 +108,12 @@ ScAcceptChgDlg::ScAcceptChgDlg(SfxBindings* pB, SfxChildWindow* pCW, weld::Windo
 
     pTPFilter = m_xAcceptChgCtr->GetFilterPage();
     pTPView = m_xAcceptChgCtr->GetViewPage();
+
+    // set wider window for the optional extending button labels
+    // eg. "Reject/Clear formatting" instead of "Reject"
+    pTPView->EnableClearFormat(true);
+    pTPView->EnableClearFormatAll(true);
+
     pTheView = pTPView->GetTableControl();
     pTheView->SetCalcView();
     aSelectionIdle.SetInvokeHandler(LINK( this, ScAcceptChgDlg, UpdateSelectionHdl ));
diff --git a/svx/source/dialog/ctredlin.cxx b/svx/source/dialog/ctredlin.cxx
index f5defbb30ba8..15155c6c6edc 100644
--- a/svx/source/dialog/ctredlin.cxx
+++ b/svx/source/dialog/ctredlin.cxx
@@ -304,6 +304,8 @@ SvxTPView::SvxTPView(weld::Container* pParent, weld::Window* pDialog, weld::Buil
     , bEnableReject(true)
     , bEnableRejectAll(true)
     , bEnableUndo(true)
+    , bEnableClearFormat(false)
+    , bEnableClearFormatAll(false)
     , m_pDialog(pDialog)
     , m_xAccept(pTopLevel->weld_button("accept"))
     , m_xReject(pTopLevel->weld_button("reject"))
@@ -313,11 +315,6 @@ SvxTPView::SvxTPView(weld::Container* pParent, weld::Window* pDialog, weld::Buil
     , m_xViewData(new SvxRedlinTable(m_xBuilder->weld_tree_view("writerchanges"),
                                      m_xBuilder->weld_tree_view("calcchanges")))
 {
-    // set wider window for the optional extending button labels
-    // eg. "Reject/Clear formatting" instead of "Reject"
-    EnableClearFormat(true);
-    EnableClearFormatAll(true);
-
     Size aControlSize(80, 65);
     m_xViewData->set_size_request(aControlSize.Width(), aControlSize.Height());
 
@@ -440,12 +437,18 @@ void SvxTPView::EnableClearFormatButton(weld::Button& rButton, bool bFlag)
 
 void SvxTPView::EnableClearFormat(bool bFlag)
 {
+    if (bEnableClearFormat == bFlag)
+        return;
     EnableClearFormatButton(*m_xReject, bFlag);
+    bEnableClearFormat = bFlag;
 }
 
 void SvxTPView::EnableClearFormatAll(bool bFlag)
 {
+    if (bEnableClearFormatAll == bFlag)
+        return;
     EnableClearFormatButton(*m_xRejectAll, bFlag);
+    bEnableClearFormatAll = bFlag;
 }
 
 void SvxTPView::ShowUndo()
commit 52ac526a61c1a26bb9dbf995f4af02c9469b8cf6
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Jan 10 20:08:11 2020 +0000
Commit:     Adolfo Jayme Barrientos <fitojb at ubuntu.com>
CommitDate: Sun Jan 12 05:05:14 2020 +0100

    Resolves: tdf#129904 use the current page as the page for help
    
    in the options dialog which has a non-standard organization for its
    contents vs an ordinary dialog
    
    Change-Id: I6a50652f5ae3fe2e8b4d32933bec6dc0217cbec1
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86577
    Tested-by: Jenkins
    Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>

diff --git a/cui/source/inc/treeopt.hxx b/cui/source/inc/treeopt.hxx
index aa6f7f5b0a02..6344c23cd96b 100644
--- a/cui/source/inc/treeopt.hxx
+++ b/cui/source/inc/treeopt.hxx
@@ -163,6 +163,7 @@ private:
     DECL_LINK(BackHdl_Impl, weld::Button&, void);
     DECL_LINK(ApplyHdl_Impl, weld::Button&, void);
     DECL_LINK(OKHdl_Impl, weld::Button&, void);
+    DECL_LINK(HelpHdl_Impl, weld::Widget&, bool);
     void SelectHdl_Impl();
 
     virtual short run() override;
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index f36a8ab76029..c3005688e297 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -683,6 +683,22 @@ IMPL_LINK_NOARG(OfaTreeOptionsDialog, ApplyHdl_Impl, weld::Button&, void)
     }
 }
 
+IMPL_LINK_NOARG(OfaTreeOptionsDialog, HelpHdl_Impl, weld::Widget&, bool)
+{
+    Help* pHelp = Application::GetHelp();
+    if (pHelp && xCurrentPageEntry && xTreeLB->get_iter_depth(*xCurrentPageEntry))
+    {
+        OptionsPageInfo* pPageInfo = reinterpret_cast<OptionsPageInfo*>(xTreeLB->get_id(*xCurrentPageEntry).toInt64());
+        if (pPageInfo->m_xPage)
+        {
+            OString sHelpId(pPageInfo->m_xPage->GetHelpId());
+            pHelp->Start(OStringToOUString(sHelpId, RTL_TEXTENCODING_UTF8), m_xDialog.get());
+            return false;
+        }
+    }
+    return true;
+}
+
 IMPL_LINK_NOARG(OfaTreeOptionsDialog, OKHdl_Impl, weld::Button&, void)
 {
     if (xCurrentPageEntry && xTreeLB->get_iter_depth(*xCurrentPageEntry))
@@ -748,6 +764,7 @@ void OfaTreeOptionsDialog::InitTreeAndHandler()
     xBackPB->connect_clicked( LINK( this, OfaTreeOptionsDialog, BackHdl_Impl ) );
     xApplyPB->connect_clicked( LINK( this, OfaTreeOptionsDialog, ApplyHdl_Impl ) );
     xOkPB->connect_clicked( LINK( this, OfaTreeOptionsDialog, OKHdl_Impl ) );
+    m_xDialog->connect_help( LINK( this, OfaTreeOptionsDialog, HelpHdl_Impl ) );
 }
 
 void OfaTreeOptionsDialog::ActivatePage( sal_uInt16 nResId )
commit dfb60d3b80ca8459505ab7e4599eb9406f1bfb3e
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Jan 10 21:13:04 2020 +0000
Commit:     Adolfo Jayme Barrientos <fitojb at ubuntu.com>
CommitDate: Sat Jan 11 23:28:57 2020 +0100

    Resolves: tdf#127417 delete-all tabs doesn't work
    
    since...
    
    commit 1e2682235cded9a7cd90e55f0bfc60a1285e9a46
    Date:   Thu Apr 18 19:25:06 2019 +0200
    
        WIP: Further preparations for deeper Item changes
    
    because since then aNewTabs is cloned, but on delete-all
    aNewTabs is reset to a SvxTabStopItem with a 0 WhichId
    so its clones are useless
    
    Change-Id: I725bec90d8915b3546afeed590f21ebdbbdaa355
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86579
    Tested-by: Jenkins
    Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>

diff --git a/cui/source/tabpages/tabstpge.cxx b/cui/source/tabpages/tabstpge.cxx
index f9b7205247cb..9e7001c44404 100644
--- a/cui/source/tabpages/tabstpge.cxx
+++ b/cui/source/tabpages/tabstpge.cxx
@@ -520,7 +520,7 @@ IMPL_LINK_NOARG(SvxTabulatorTabPage, DelAllHdl_Impl, weld::Button&, void)
 {
     if ( aNewTabs->Count() )
     {
-        aNewTabs = std::make_unique<SvxTabStopItem>( 0 );
+        aNewTabs = std::make_unique<SvxTabStopItem>(GetWhich(SID_ATTR_TABSTOP));
         InitTabPos_Impl();
     }
 }
commit 87932b78d7e0d46c7e921a8b3149d67fbefeea0a
Author:     Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Thu Jan 9 11:01:15 2020 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Sat Jan 11 20:53:43 2020 +0100

    python3: fix 32-bit x86 build
    
    The reinvented wheel needs another subst.
    
    Change-Id: I5bc01b0213f00d383cf971d34f0dc2a9e6817ab9
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86480
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.stahl at cib.de>
    (cherry picked from commit db75ec187051090e2eb1b13745fe11a2a5bb1dd0)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86485
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/external/python3/ExternalPackage_python3.mk b/external/python3/ExternalPackage_python3.mk
index 87361941fa88..bdec26108144 100644
--- a/external/python3/ExternalPackage_python3.mk
+++ b/external/python3/ExternalPackage_python3.mk
@@ -137,7 +137,7 @@ endif
 # put -pc in its linux platform triplets, so filter that...
 ifneq ($(OS),WNT)
 $(eval $(call gb_ExternalPackage_add_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib,\
-	LO_lib/_sysconfigdata_m_$(python3_MACHDEP)_$(subst -pc,,$(HOST_PLATFORM)).py \
+	LO_lib/_sysconfigdata_m_$(python3_MACHDEP)_$(subst i686,i386,$(subst -pc,,$(HOST_PLATFORM))).py \
 ))
 endif
 
commit 085d76af93e1ac15ad2fc660f5eac91f80dfda67
Author:     Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Thu Jan 9 13:00:35 2020 +0100
Commit:     Xisco Faulí <xiscofauli at libreoffice.org>
CommitDate: Fri Jan 10 14:04:30 2020 +0100

    oox: add missing nullptr checks
    
    See
    http://crashreport.libreoffice.org/stats/signature/oox::drawingml::chart::PlotAreaConverter::convertFromModel(oox::drawingml::chart::View3DModel%20&)
    
    Regression from 11473832b5717cb3222ce72baee885bc9e8e2386
    
    Change-Id: I6cf08582fb384203ca1ce5736b88b85c11ff56da
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86483
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
    (cherry picked from commit aa499120c4cb3935cd942751859b6d5d3689ea43)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86523
    Reviewed-by: Xisco Faulí <xiscofauli at libreoffice.org>

diff --git a/oox/source/drawingml/chart/plotareaconverter.cxx b/oox/source/drawingml/chart/plotareaconverter.cxx
index 24ab5f0bfd3e..af3139618824 100644
--- a/oox/source/drawingml/chart/plotareaconverter.cxx
+++ b/oox/source/drawingml/chart/plotareaconverter.cxx
@@ -415,7 +415,8 @@ void PlotAreaConverter::convertFromModel( View3DModel& rView3DModel )
     bool bSupportsVaryColorsByPoint = mrModel.maTypeGroups.size() == 1;
 
     // convert all axes sets, and check which axis is attached to the first maTypeGroups
-    sal_Int32 nStartAxesSetIdx = (rValAxisIds.size() > 1 && aAxesSets[0]->maAxes[1]->mnAxisId != rValAxisIds[0] ) ? 1 : 0;
+    sal_Int32 nStartAxesSetIdx = (rValAxisIds.size() > 1 && aAxesSets.size() > 0 && aAxesSets[0]->maAxes.count( API_Y_AXIS )
+            && aAxesSets[0]->maAxes[ API_Y_AXIS ]->mnAxisId != rValAxisIds[0] ) ? 1 : 0;
     sal_Int32 nAxesSetIdx = nStartAxesSetIdx;
 
     for (auto const& axesSet : aAxesSets)
commit 822bbe6984a642ea3c09ca8a337499655cd54173
Author:     Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Thu Jan 9 17:24:41 2020 +0100
Commit:     Xisco Faulí <xiscofauli at libreoffice.org>
CommitDate: Fri Jan 10 11:23:41 2020 +0100

    tdf#115026: Add uitest
    
    Change-Id: Iaac2a1065c0c1c28e56db8a121cb28453e27d529
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86497
    Tested-by: Jenkins
    Reviewed-by: Xisco Faulí <xiscofauli at libreoffice.org>
    (cherry picked from commit 43d8dc34d74832e928c2cc215e9bf512f4edf3b3)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86504

diff --git a/sw/qa/uitest/table/tdf115026.py b/sw/qa/uitest/table/tdf115026.py
new file mode 100644
index 000000000000..610804948086
--- /dev/null
+++ b/sw/qa/uitest/table/tdf115026.py
@@ -0,0 +1,38 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+from uitest.framework import UITestCase
+from uitest.path import get_srcdir_url
+from libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.uihelper.common import get_state_as_dict
+
+class tdf115026(UITestCase):
+
+    def test_pageBreak_and_tableAutoFormat(self):
+        self.ui_test.create_doc_in_start_center("writer")
+        xWriterDoc = self.xUITest.getTopFocusWindow()
+        xWriterEdit = xWriterDoc.getChild("writer_edit")
+
+        self.xUITest.executeCommand(".uno:InsertPagebreak")
+        self.assertEqual(get_state_as_dict(xWriterEdit)["CurrentPage"], "2")
+
+        self.ui_test.execute_dialog_through_command(".uno:InsertTable")
+        xDialog = self.xUITest.getTopFocusWindow()
+
+        xOkBtn = xDialog.getChild("ok")
+        self.ui_test.close_dialog_through_button(xOkBtn)
+
+        self.ui_test.execute_dialog_through_command(".uno:AutoFormat")
+        xDialog = self.xUITest.getTopFocusWindow()
+
+        xOkBtn = xDialog.getChild("ok")
+        self.ui_test.close_dialog_through_button(xOkBtn)
+
+        self.assertEqual(get_state_as_dict(xWriterEdit)["CurrentPage"], "2")
+
+        self.ui_test.close_doc()
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
commit a1ed3efdac81c7f23616d0a3a32b34876923b448
Author:     Justin Luth <justin.luth at collabora.com>
AuthorDate: Wed Nov 27 12:52:38 2019 +0300
Commit:     Xisco Faulí <xiscofauli at libreoffice.org>
CommitDate: Thu Jan 9 14:16:19 2020 +0100

    tdf#115026 sw tableAutoFormat: don't clear break/keep
    
    If a table style HAS defined a page-break
    or keep-with-next-paragraph, then apply it when
    applying the style. But if the format just has a default
    non-break/non-keep attribute, then don't apply that.
    Kinda seems artificial/arbitrary, but it looks difficult
    to change the break/keep property to be an optional component.
    If it was optional, then it would be fine to take a
    defined non-break and apply it, but since it is a
    mandatory value, just ignore the default state.
    
    Yes, this means that applying one style can introduce a
    break/keep, but applying a different style cannot
    remove it. None of the build-in styles has either of
    these properties set. Since there is no way to identify
    direct formatting, assuming the user intentionally
    set these is the better policy by far...
    
    I didn't do the same thing with shadow/collapsing borders
    etc. Those seem more like table style properties than these
    two flow items.
    
    I still couldn't get the unit test to work.
    I got access to the created document by removing
    EnableKillingFile from swmodelbase, and from that I can see
    that the autoformat is not affecting the table with
    RestoreTableProperties.
    I assume the Break is overwritten during the table creation
    process because I can see the background being applied
    in that case, but still no Break.
    
    Change-Id: Ia2a4ff8a19158b1ea5d74ec3a21c688c53d66724
    Reviewed-on: https://gerrit.libreoffice.org/83879
    Tested-by: Jenkins
    Reviewed-by: Justin Luth <justin_luth at sil.org>
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
    (cherry picked from commit 43f983d08d66520536980339f33ef44d5eec35f6)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85838
    Reviewed-by: Xisco Faulí <xiscofauli at libreoffice.org>

diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx
index 765154b3e862..35e626a0f5a1 100644
--- a/sw/source/core/doc/tblafmt.cxx
+++ b/sw/source/core/doc/tblafmt.cxx
@@ -685,11 +685,13 @@ void SwTableAutoFormat::RestoreTableProperties(SwTable &table) const
 
     SfxItemSet rSet(pDoc->GetAttrPool(), aTableSetRange);
 
-    rSet.Put(*m_aBreak);
+    if ( m_aBreak->GetBreak() != SvxBreak::NONE )
+        rSet.Put(*m_aBreak);
     rSet.Put(m_aPageDesc);
     rSet.Put(SwFormatLayoutSplit(m_bLayoutSplit));
     rSet.Put(SfxBoolItem(RES_COLLAPSING_BORDERS, m_bCollapsingBorders));
-    rSet.Put(*m_aKeepWithNextPara);
+    if ( m_aKeepWithNextPara->GetValue() )
+        rSet.Put(*m_aKeepWithNextPara);
     rSet.Put(*m_aShadow);
 
     pFormat->SetFormatAttr(rSet);
@@ -882,7 +884,7 @@ OUString SwTableAutoFormat::GetTableTemplateCellSubName(const SwBoxAutoFormat& r
  *      +-----------------------------------------------------------------------+
  *   4  |           |           |           |           |           |           |
  *      +-----------------------------------------------------------------------+
- *   5  |   LRSC    |  LR       |  LRENC    |           |           |  LRENC    |
+ *   5  |   LRSC    |  LR       |  LREC     |           |           |  LRENC    |
  *      +-----------+-----------+-----------+-----------+-----------+-----------+
  * ODD  = 1, 3, 5, ...
  * EVEN = 2, 4, 6, ...
commit 6d5d176379400798689857a2678e8eb63cbac533
Author:     Juergen Funk <juergen.funk_ml at cib.de>
AuthorDate: Thu Jan 9 08:34:28 2020 +0100
Commit:     Juergen Funk (CIB) <juergen.funk_ml at cib.de>
CommitDate: Thu Jan 9 11:45:55 2020 +0100

    Get PDB files to work for soffice.bin and unopkg.bin
    
    ..by renaming them to *.bin.pdb, so WinDbg picks them up. Follow-up fix
    to commit 6ca3adf22b62b88b313c8fc9311183efdabe445a
    
    Change-Id: I5cb7b305c997b423cf0cd70835163811f75b3e25
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86465
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    (cherry picked from commit d3f138efc185e1ee781943d44eb33b82d46ca577)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86470
    Tested-by: Jenkins
    Reviewed-by: Juergen Funk (CIB) <juergen.funk_ml at cib.de>

diff --git a/solenv/gbuild/platform/com_MSC_class.mk b/solenv/gbuild/platform/com_MSC_class.mk
index c56079ff45df..3c41c945a559 100644
--- a/solenv/gbuild/platform/com_MSC_class.mk
+++ b/solenv/gbuild/platform/com_MSC_class.mk
@@ -155,7 +155,7 @@ gb_LinkTarget_INCLUDE :=\
 # We must name the .pdb like libname.pdb, not libname.\(dll\|exe\|pyd\).pdb,
 # otherwise WinDbg does not find it.
 define gb_LinkTarget__get_pdb_filename
-$(patsubst %.dll,%.pdb,$(patsubst %.exe,%.pdb,$(patsubst %.pyd,%.pdb,$(1))))
+$(patsubst %.dll,%.pdb,$(patsubst %.exe,%.pdb,$(patsubst %.bin,%.bin.pdb,$(patsubst %.pyd,%.pdb,$(1)))))
 endef
 
 gb_LinkTarget_get_pdbfile_in = \
commit 46ac8dd2305cea9c618a5a37940a616df265a53f
Author:     Vasily Melenchuk <vasily.melenchuk at cib.de>
AuthorDate: Fri Dec 27 14:55:11 2019 +0100
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Thu Jan 9 10:20:09 2020 +0100

    tdf#121458: chart: change "Data Ranges" button enabled condition.
    
    "Data Ranges" button right now enabled if chart has no own table
    (as it was before 0074951704022d173a5fdb9df933f47be1dcbb91)
    or own table exists and it is possible to create data provider
    (LibreOffice will warn later about destroying data table).
    
    Change-Id: If92b0aad8a6099250effdb68022addb277ef4371
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86391
    Tested-by: Jenkins
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    (cherry picked from commit 985b76d237b26b428771bfc03d1ef74cdb5d77f0)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86402

diff --git a/chart2/source/controller/main/ControllerCommandDispatch.cxx b/chart2/source/controller/main/ControllerCommandDispatch.cxx
index ffbb53ac7176..f8474959a619 100644
--- a/chart2/source/controller/main/ControllerCommandDispatch.cxx
+++ b/chart2/source/controller/main/ControllerCommandDispatch.cxx
@@ -553,13 +553,8 @@ void ControllerCommandDispatch::updateCommandAvailability()
         if ( xChartDoc.is() )
         {
             ChartModel& rModel = dynamic_cast<ChartModel&>(*xChartDoc);
-            Reference< lang::XServiceInfo > xParentServiceInfo(rModel.getParent(), uno::UNO_QUERY);
-            OSL_ENSURE(xParentServiceInfo.is(), "Invalid XServiceInfo");
-            if ( xParentServiceInfo.is() )
-            {
-                css::uno::Reference< com::sun::star::chart2::XDataProviderAccess > xCreatorDoc(rModel.getParent(), uno::UNO_QUERY);
-                bCanCreateDataProvider = xCreatorDoc.is();
-            }
+            css::uno::Reference< com::sun::star::chart2::XDataProviderAccess > xCreatorDoc(rModel.getParent(), uno::UNO_QUERY);
+            bCanCreateDataProvider = xCreatorDoc.is();
         }
     }
 
@@ -632,8 +627,9 @@ void ControllerCommandDispatch::updateCommandAvailability()
     m_aCommandAvailability[ ".uno:FormatChartArea" ] = m_aCommandAvailability[ ".uno:DiagramArea" ];
     m_aCommandAvailability[ ".uno:FormatLegend" ] = m_aCommandAvailability[ ".uno:Legend" ];
 
-    // depending on own data
-    m_aCommandAvailability[".uno:DataRanges"] = bIsWritable && bModelStateIsValid && !m_apModelState->bHasDataFromPivotTable && bCanCreateDataProvider;
+    // depending on own data and ability to create new data provider
+    m_aCommandAvailability[".uno:DataRanges"] = bIsWritable && bModelStateIsValid && !m_apModelState->bHasDataFromPivotTable
+        && ((m_apModelState->bHasOwnData && bCanCreateDataProvider) || !m_apModelState->bHasOwnData);
     m_aCommandAvailability[ ".uno:DiagramData" ] = bIsWritable && bModelStateIsValid &&  m_apModelState->bHasOwnData && bEnableDataTableDialog;
 
     // titles
commit fa0b6fd521b917f0f002ae22b78b25530e91d0c4
Author:     Vasily Melenchuk <vasily.melenchuk at cib.de>
AuthorDate: Fri Jan 3 10:55:05 2020 +0100
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Thu Jan 9 10:19:20 2020 +0100

    tdf#128782: sw: set name for draw frame style for text box
    
    Since new undo/redo code operates style names instead of pointers,
    it is important to have all formats with name.
    
    Change-Id: Ib91cd13b8a324ae674e9ace9bb5f17e679bd2dab
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86162
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    (cherry picked from commit c79dcf98d662e76b1290f8d43c927d1031e94729)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86399
    Reviewed-by: Michael Stahl <michael.stahl at cib.de>
    Tested-by: Jenkins

diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx
index 41b46703f017..fe873b96bb26 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -2089,6 +2089,7 @@ bool SwFEShell::ImpEndCreate()
             text::PositionLayoutDir::PositionInLayoutDirOfAnchor );
         // #i44344#, #i44681# - positioning attributes already set
         pFormat->PosAttrSet();
+        pFormat->SetName(GetUniqueShapeName());
 
         SwDrawContact *pContact = new SwDrawContact( pFormat, &rSdrObj );
         // #i35635#
commit 5a8b378129feb725d4d3e48cd20b493688226eaa
Author:     Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Wed Jan 8 15:05:34 2020 +0100
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Thu Jan 9 10:18:35 2020 +0100

    python3: remove _uuid module
    
    Of course the autotetection in setup.py strikes again, the build will
    fail if the user doesn't have libuuid-devel installed; we'd need to add
    a check to LO's configure.ac for libuuid.
    
    Let's just not ship it, not sure if anybody needs it.
    
    Change-Id: I9079309da7d9c16e666fbab30542365124f97860
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86433
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.stahl at cib.de>
    (cherry picked from commit ebb6c2576af8d883ddf8eb09e3969c50d9ac07c9)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86448
    Reviewed-by: Jean-Baptiste Faure <jbfaure at libreoffice.org>
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

diff --git a/external/python3/ExternalPackage_python3.mk b/external/python3/ExternalPackage_python3.mk
index 60eeb022160c..87361941fa88 100644
--- a/external/python3/ExternalPackage_python3.mk
+++ b/external/python3/ExternalPackage_python3.mk
@@ -114,7 +114,6 @@ $(eval $(call gb_ExternalPackage_add_files,python3,$(LIBO_BIN_FOLDER)/python-cor
 	LO_lib/_testimportmultiple.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
 	LO_lib/_testmultiphase.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
 	LO_lib/unicodedata.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
-	LO_lib/_uuid.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
 	LO_lib/xxlimited.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
 	LO_lib/_xxtestfuzz.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
 	LO_lib/zlib.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
commit f396be106a0886ba635b449c44627fb800a3bc25
Author:     Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Sun Dec 8 10:33:56 2019 +0300
Commit:     Xisco Faulí <xiscofauli at libreoffice.org>
CommitDate: Thu Jan 9 10:09:26 2020 +0100

    tdf#129256: don't create objects only to destroy when moving preserved array
    
    Restructure the StepDCREATE_IMPL code to do the preservation step before
    creating the objects for the rest of array.
    
    Change-Id: I4e4ba718af2da035b08397522e726eb131f813a4
    Reviewed-on: https://gerrit.libreoffice.org/84706
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
    (cherry picked from commit bc1a8c682f889e488a7961faa0708568c480438a)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/84739
    Reviewed-by: Xisco Faulí <xiscofauli at libreoffice.org>

diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx
index faf2b1daf88a..9ab8d580780e 100644
--- a/basic/source/runtime/runtime.cxx
+++ b/basic/source/runtime/runtime.cxx
@@ -4310,93 +4310,82 @@ void SbiRuntime::StepDCREATE_IMPL( sal_uInt32 nOp1, sal_uInt32 nOp2 )
     SbxDimArray* pArray = dynamic_cast<SbxDimArray*>(xObj.get());
     if (pArray)
     {
-        short nDims = pArray->GetDims();
-        sal_Int32 nTotalSize = 0;
+        const short nDims = pArray->GetDims();
+        sal_Int32 nTotalSize = nDims > 0 ? 1 : 0;
 
         // must be a one-dimensional array
         sal_Int32 nLower, nUpper;
         for( sal_Int32 i = 0 ; i < nDims ; ++i )
         {
             pArray->GetDim32( i+1, nLower, nUpper );
-            sal_Int32 nSize = nUpper - nLower + 1;
-            if( i == 0 )
-            {
-                nTotalSize = nSize;
-            }
-            else
-            {
-                nTotalSize *= nSize;
-            }
+            const sal_Int32 nSize = nUpper - nLower + 1;
+            nTotalSize *= nSize;
         }
 
-        // create objects and insert them into the array
-        OUString aClass( pImg->GetString( static_cast<short>( nOp2 ) ) );
-        for( sal_Int32 i = 0 ; i < nTotalSize ; ++i )
+        // First, fill those parts of the array that are preserved
+        SbxDimArray* const pOldArray = static_cast<SbxDimArray*>(refRedimpArray.get());
+        if (nTotalSize && pOldArray)
         {
-            SbxObject *pClassObj = SbxBase::CreateObject( aClass );
-            if( !pClassObj )
+            const short nDimsOld = pOldArray->GetDims();
+
+            if (nDimsOld != nDims)
             {
-                Error( ERRCODE_BASIC_INVALID_OBJECT );
-                break;
+                StarBASIC::Error(ERRCODE_BASIC_OUT_OF_RANGE);
+                nTotalSize = 0; // don't create objects on error
             }
             else
             {
-                OUString aName( pImg->GetString( static_cast<short>( nOp1 ) ) );
-                pClassObj->SetName( aName );
-                // the object must be able to call the basic
-                pClassObj->SetParent( &rBasic );
-                pArray->SbxArray::Put32( pClassObj, i );
-            }
-        }
-    }
+                std::unique_ptr<sal_Int32[]> pLowerBounds(new sal_Int32[nDims]);
+                std::unique_ptr<sal_Int32[]> pUpperBounds(new sal_Int32[nDims]);
+                std::unique_ptr<sal_Int32[]> pActualIndices(new sal_Int32[nDims]);
 
-    SbxDimArray* pOldArray = static_cast<SbxDimArray*>(refRedimpArray.get());
-    if( pArray && pOldArray )
-    {
-        short nDimsNew = pArray->GetDims();
-        short nDimsOld = pOldArray->GetDims();
-        short nDims = nDimsNew;
-        bool bRangeError = false;
+                // Compare bounds
+                for (short i = 1; i <= nDims; i++)
+                {
+                    sal_Int32 lBoundNew, uBoundNew;
+                    sal_Int32 lBoundOld, uBoundOld;
+                    pArray->GetDim32(i, lBoundNew, uBoundNew);
+                    pOldArray->GetDim32(i, lBoundOld, uBoundOld);
 
-        // Store dims to use them for copying later
-        std::unique_ptr<sal_Int32[]> pLowerBounds(new sal_Int32[nDims]);
-        std::unique_ptr<sal_Int32[]> pUpperBounds(new sal_Int32[nDims]);
-        std::unique_ptr<sal_Int32[]> pActualIndices(new sal_Int32[nDims]);
-        if( nDimsOld != nDimsNew )
-        {
-            bRangeError = true;
-        }
-        else
-        {
-            // Compare bounds
-            for( short i = 1 ; i <= nDims ; i++ )
-            {
-                sal_Int32 lBoundNew, uBoundNew;
-                sal_Int32 lBoundOld, uBoundOld;
-                pArray->GetDim32( i, lBoundNew, uBoundNew );
-                pOldArray->GetDim32( i, lBoundOld, uBoundOld );
-
-                lBoundNew = std::max( lBoundNew, lBoundOld );
-                uBoundNew = std::min( uBoundNew, uBoundOld );
-                short j = i - 1;
-                pActualIndices[j] = pLowerBounds[j] = lBoundNew;
-                pUpperBounds[j] = uBoundNew;
+                    lBoundNew = std::max(lBoundNew, lBoundOld);
+                    uBoundNew = std::min(uBoundNew, uBoundOld);
+                    short j = i - 1;
+                    pActualIndices[j] = pLowerBounds[j] = lBoundNew;
+                    pUpperBounds[j] = uBoundNew;
+                }
+
+                // Copy data from old array by going recursively through all dimensions
+                // (It would be faster to work on the flat internal data array of an
+                // SbyArray but this solution is clearer and easier)
+                implCopyDimArray_DCREATE(pArray, pOldArray, nDims - 1,
+                    0, pActualIndices.get(), pLowerBounds.get(), pUpperBounds.get());
             }
+            refRedimpArray.clear();
         }
+        // pOldArray points to destroyed object now, and only used as "ReDim Preserve" flag below
 
-        if( bRangeError )
-        {
-            StarBASIC::Error( ERRCODE_BASIC_OUT_OF_RANGE );
-        }
-        else
+        // create objects and insert them into the array
+        OUString aClass( pImg->GetString( static_cast<short>( nOp2 ) ) );
+        for( sal_Int32 i = 0 ; i < nTotalSize ; ++i )
         {
-            // Copy data from old array by going recursively through all dimensions
-            // (It would be faster to work on the flat internal data array of an
-            // SbyArray but this solution is clearer and easier)
-            implCopyDimArray_DCREATE( pArray, pOldArray, nDims - 1,
-                                      0, pActualIndices.get(), pLowerBounds.get(), pUpperBounds.get() );
+            if (!pOldArray || !pArray->SbxArray::GetRef32(i)) // For those left unset after preserve
+            {
+                SbxObject* pClassObj = SbxBase::CreateObject(aClass);
+                if (!pClassObj)
+                {
+                    Error(ERRCODE_BASIC_INVALID_OBJECT);
+                    break;
+                }
+                else
+                {
+                    OUString aName(pImg->GetString(static_cast<short>(nOp1)));
+                    pClassObj->SetName(aName);
+                    // the object must be able to call the basic
+                    pClassObj->SetParent(&rBasic);
+                    pArray->SbxArray::Put32(pClassObj, i);
+                }
+            }
         }
-        refRedimpArray = nullptr;
     }
 }
 
commit e76fcb8f169acac3d81bdaf9b126cc4c98e2eb8e
Author:     Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Fri Dec 13 09:36:39 2019 +0300
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Thu Jan 9 08:19:01 2020 +0100

    tdf#129353, tdf#129402: fix node creation on index import
    
    ToC, bibliography, and index sections import code changed to closely
    follow what Word does, make sure that pre-rendered entries don't get
    imported as standalone paragraphs outside of the index sections, and
    paragraph count is accurate (no missing or added paragraphs as much
    as possible).
    
    In Word, an index may start and end in the middle of a paragraph:
    
        <w:p>
            <w:r>
                <w:t>Some text before index</w:t>
            </w:r>
            <w:r>
                <w:fldChar w:fldCharType="begin"/>
            </w:r>
            <w:r>
                <w:instrText> TOC ...</w:instrText>
            </w:r>
            <w:r>
                <w:fldChar w:fldCharType="separate"/>
            </w:r>
            <w:r>
                <w:t>First pre-rendered index entry</w:t>
            </w:r>
        </w:p>
        ...
        <w:p>
            <w:r>
                <w:t>Last pre-rendered index entry</w:t>
            </w:r>
            <w:r>
                <w:fldChar w:fldCharType="end"/>
            </w:r>
            <w:r>
                <w:t>Some text after index</w:t>
            </w:r>
        </w:p>
    
    However, normally it looks like either no runs precedig index, or no
    runs of pre-rendered contents will be present. When no Std elements
    are used, the typical situation is that there's a normal paragraph
    (possibly with some user text), which ends with index start marker,
    without any pre-rendered contents in the same paragraph; and all pre-
    rendered contents goes in following paragraphs. Such index normally
    ends with index end marker in the *first* run of a paragraph, which
    then might have normal text runs.
    
    When Stds are used, then no leading/trailing out-of-index runs in
    paragraphs with marks are usually present; and in this case, when
    paragraphs with index marks don't contain pre-rendered entries, they
    still are treated as part of the index.
    
    In Writer, indexes are node sections (and so cannot be inline with
    other paragraph contents). When there was some paragraph content
    already before the start-of-index mark, the paragraph is assumed
    to end before the index; in this case, when current <w:p> element
    ends, importer decides if a separate starting paragraph is needed
    or not, depending on if there was some runs after the mark. When
    there was no text runs before the starting mark, then the paragraph
    is treated as leading paragraph of the index. This allows to not
    miss empty paragraphs before index; and not have two paragraphs
    where there was one in Word. Only in cases when user had manually
    typed text both in and outside of the index in the same paragraph
    in Word, we would have the paragraph split into two in Writer.
    
    For end marks, the behaviour depends on whether it's inside Std.
    When inside, the ending paragraph starting with index end mark is
    considered part of the index. For out-of-Std case, it's considered
    normal paragraph (and measures are taken to make sure it's not
    dropped even if empty, because sometimes such paragraphs don't
    have other content, and have section settings, which is usually
    treated by Writer as "drop this paragraph" sign).
    
    A special problem is multi-column index. It's wrapped into a
    continuous section by Word; and in Writer, we also wrap it into
    a section. It would be possibly useful to detect somehow if this
    section is part of index definition, and in this case, drop the
    section and put its properties into the Writer's index section.
    That would avoid an explicit section in the imported document.
    This is TODO, for someone who figures how to detect reliably if
    the section belongs to index definition. See comment in
    DomainMapper_Impl::appendTextSectionAfter. By the way, current
    export code is wrong, producing an index that is single-column
    in Word; this change doesn't touch that.
    
    Several existing tests needed to be fixed, which used to test
    wrong results.
    
    Reviewed-on: https://gerrit.libreoffice.org/85089
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
    (cherry picked from commit 5cdb14345842c07eb1a466897753da910e9488f8)
    
    Change-Id: I9597c8ab13f31ded9abcc24054d3478d3e3a3b40
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85289
    Tested-by: Jenkins
    Reviewed-by: Andras Timar <andras.timar at collabora.com>

diff --git a/sw/qa/extras/ooxmlexport/data/tdf129353.docx b/sw/qa/extras/ooxmlexport/data/tdf129353.docx
new file mode 100644
index 000000000000..c5cf8865eda6
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf129353.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
index 2271aa413dd6..062831503404 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
@@ -14,8 +14,10 @@
 
 #include <editsh.hxx>
 #include <frmatr.hxx>
+#include <tools/lineend.hxx>
 #include <com/sun/star/text/TableColumnSeparator.hpp>
 #include <com/sun/star/text/RelOrientation.hpp>
+#include <com/sun/star/text/XDocumentIndex.hpp>
 
 class Test : public SwModelTestBase
 {
@@ -207,6 +209,33 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf128889, "tdf128889.fodt")
     assertXPath(pXml, "/w:document/w:body/w:p[1]/w:r[2]/w:br", "type", "page");
 }
 
+DECLARE_OOXMLEXPORT_TEST(testTdf129353, "tdf129353.docx")
+{
+    CPPUNIT_ASSERT_EQUAL(8, getParagraphs());
+    getParagraph(1, "(Verne, 1870)");
+    getParagraph(2, "Bibliography");
+    getParagraph(4, "Christie, A. (1922). The Secret Adversary. ");
+    CPPUNIT_ASSERT_EQUAL(OUString(), getParagraph(8)->getString());
+
+    uno::Reference<text::XDocumentIndexesSupplier> xIndexSupplier(mxComponent, uno::UNO_QUERY);
+    uno::Reference<container::XIndexAccess> xIndexes = xIndexSupplier->getDocumentIndexes();
+    uno::Reference<text::XDocumentIndex> xIndex(xIndexes->getByIndex(0), uno::UNO_QUERY);
+    uno::Reference<text::XTextRange> xTextRange = xIndex->getAnchor();
+    uno::Reference<text::XText> xText = xTextRange->getText();
+    uno::Reference<text::XTextCursor> xTextCursor = xText->createTextCursor();
+    xTextCursor->gotoRange(xTextRange->getStart(), false);
+    xTextCursor->gotoRange(xTextRange->getEnd(), true);
+    OUString aIndexString(convertLineEnd(xTextCursor->getString(), LineEnd::LINEEND_LF));
+
+    // Check that all the pre-rendered entries are correct, including trailing spaces
+    CPPUNIT_ASSERT_EQUAL(OUString("\n" // starting with an empty paragraph
+                                  "Christie, A. (1922). The Secret Adversary. \n"
+                                  "\n"
+                                  "Verne, J. G. (1870). Twenty Thousand Leagues Under the Sea. \n"
+                                  ""), // ending with an empty paragraph
+                         aIndexString);
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
index 2560cf89a506..1c2560320cdc 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
@@ -9,6 +9,8 @@
 
 #include <swmodeltestbase.hxx>
 
+#include <com/sun/star/text/XDocumentIndex.hpp>
+#include <com/sun/star/text/XDocumentIndexesSupplier.hpp>
 #include <com/sun/star/text/XFootnote.hpp>
 #include <com/sun/star/text/XTextTable.hpp>
 #include <com/sun/star/style/LineSpacing.hpp>
@@ -694,6 +696,33 @@ DECLARE_OOXMLEXPORT_TEST(testFdo77129, "fdo77129.docx")
     assertXPathContent(pXmlDoc, "/w:document/w:body/w:p[4]/w:r[1]/w:t", "Abstract");
 }
 
+// Test the same testdoc used for testFdo77129.
+DECLARE_OOXMLEXPORT_TEST(testTdf129402, "fdo77129.docx")
+{
+    // tdf#129402: ToC title must be "Contents", not "Content"; the index field must include
+    // pre-rendered element.
+
+    // Currently export drops empty paragraph after ToC, so skip getParagraphs test for now
+//    CPPUNIT_ASSERT_EQUAL(5, getParagraphs());
+    CPPUNIT_ASSERT_EQUAL(OUString("owners."), getParagraph(1)->getString());
+    CPPUNIT_ASSERT_EQUAL(OUString("Contents"), getParagraph(2)->getString());
+    CPPUNIT_ASSERT_EQUAL(OUString("How\t2"), getParagraph(3)->getString());
+//    CPPUNIT_ASSERT_EQUAL(OUString(), getParagraph(4)->getString());
+
+    uno::Reference<text::XDocumentIndexesSupplier> xIndexSupplier(mxComponent, uno::UNO_QUERY);
+    uno::Reference<container::XIndexAccess> xIndexes = xIndexSupplier->getDocumentIndexes();
+    uno::Reference<text::XDocumentIndex> xIndex(xIndexes->getByIndex(0), uno::UNO_QUERY);
+    uno::Reference<text::XTextRange> xTextRange = xIndex->getAnchor();
+    uno::Reference<text::XText> xText = xTextRange->getText();
+    uno::Reference<text::XTextCursor> xTextCursor = xText->createTextCursor();
+    xTextCursor->gotoRange(xTextRange->getStart(), false);
+    xTextCursor->gotoRange(xTextRange->getEnd(), true);
+    OUString aTocString(xTextCursor->getString());
+
+    // Check that the pre-rendered entry is inside the index
+    CPPUNIT_ASSERT_EQUAL(OUString("How\t2"), aTocString);
+}
+
 DECLARE_OOXMLEXPORT_TEST(testfdo79969_xlsm, "fdo79969_xlsm.docx")
 {
     // This UT for DOCX embedded with excel work sheet.
diff --git a/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
index 15390ccd574c..d20d8a90938f 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
@@ -282,9 +282,9 @@ DECLARE_OOXMLEXPORT_TEST(testAlphabeticalIndex_MultipleColumns,"alphabeticalInde
 
     // check for section breaks after and before the Index Section
     assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:pPr/w:sectPr/w:type","val","continuous");
-    assertXPath(pXmlDoc, "/w:document/w:body/w:p[9]/w:pPr/w:sectPr/w:type","val","continuous");
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[8]/w:pPr/w:sectPr/w:type","val","continuous");
     // check for "w:space" attribute for the columns in Section Properties
-    assertXPath(pXmlDoc, "/w:document/w:body/w:p[9]/w:pPr/w:sectPr/w:cols/w:col[1]","space","720");
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[8]/w:pPr/w:sectPr/w:cols/w:col[1]","space","720");
 }
 
 DECLARE_OOXMLEXPORT_TEST(testPageref, "testPageref.docx")
@@ -353,15 +353,13 @@ DECLARE_OOXMLEXPORT_TEST(testGenericTextField, "Unsupportedtextfields.docx")
     xmlXPathFreeObject(pXmlObj);
 }
 
-DECLARE_OOXMLEXPORT_TEST(test_FieldType, "99_Fields.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(test_FieldType, "99_Fields.docx")
 {
     xmlDocPtr pXmlDoc = parseExport("word/document.xml");
-    if (!pXmlDoc)
-        return;
     // Checking for three field types (BIBLIOGRAPHY, BIDIOUTLINE, CITATION) in sequence
-    assertXPath(pXmlDoc, "/w:document[1]/w:body[1]/w:p[2]/w:r[2]/w:instrText[1]",1);
-    assertXPath(pXmlDoc, "/w:document[1]/w:body[1]/w:p[5]/w:r[2]/w:instrText[1]",1);
-    assertXPath(pXmlDoc, "/w:document[1]/w:body[1]/w:p/w:sdt/w:sdtContent/w:r[2]/w:instrText[1]",1);
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[2]/w:instrText");
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r[2]/w:instrText");
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[4]/w:sdt/w:sdtContent/w:r[2]/w:instrText");
 }
 
 DECLARE_OOXMLEXPORT_TEST(testCitation,"FDO74775.docx")
@@ -411,7 +409,7 @@ DECLARE_OOXMLEXPORT_TEST(testFDO78654 , "fdo78654.docx")
         return;
     // In case of two "Hyperlink" tags in one paragraph and one of them
     // contains "PAGEREF" field then field end tag was missing from hyperlink.
-    assertXPath ( pXmlDoc, "/w:document/w:body/w:p[2]/w:hyperlink[3]/w:r[5]/w:fldChar", "fldCharType", "end" );
+    assertXPath ( pXmlDoc, "/w:document/w:body/w:sdt/w:sdtContent/w:p[2]/w:hyperlink[3]/w:r[5]/w:fldChar", "fldCharType", "end" );
 }
 
 
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx
index a88dddf2f086..14b822553d85 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -971,7 +971,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFdo82071)
 {
     load(mpTestDocumentPath, "fdo82071.rtf");
     // The problem was that in TOC, chapter names were underlined, but they should not be.
-    uno::Reference<text::XTextRange> xRun = getRun(getParagraph(2), 1);
+    uno::Reference<text::XTextRange> xRun = getRun(getParagraph(1), 1);
     // Make sure we test the right text portion.
     CPPUNIT_ASSERT_EQUAL(OUString("Chapter 1"), xRun->getString());
     // This was awt::FontUnderline::SINGLE.
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 87b7fdbcbecc..3fd2e98fe018 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -3460,11 +3460,12 @@ void DomainMapper::lcl_utext(const sal_uInt8 * data_, size_t len)
             // If the paragraph contains only the section properties and it has
             // no runs, we should not create a paragraph for it in Writer, unless that would remove the whole section.
             SectionPropertyMap* pSectionContext = m_pImpl->GetSectionContext();
-            bool bRemove = !m_pImpl->GetParaChanged() && m_pImpl->GetParaSectpr()
-                           && !bSingleParagraphAfterRedline
-                           && !m_pImpl->GetIsDummyParaAddedForTableInSection()
-                           && !( pSectionContext && pSectionContext->GetBreakType() != -1 && pContext && pContext->isSet(PROP_BREAK_TYPE) )
-                           && !m_pImpl->GetIsPreviousParagraphFramed();
+            bool bRemove = (!m_pImpl->GetParaChanged() && m_pImpl->GetRemoveThisPara()) ||
+                           (!m_pImpl->GetParaChanged() && m_pImpl->GetParaSectpr()
+                            && !bSingleParagraphAfterRedline
+                            && !m_pImpl->GetIsDummyParaAddedForTableInSection()
+                            && !( pSectionContext && pSectionContext->GetBreakType() != -1 && pContext && pContext->isSet(PROP_BREAK_TYPE) )
+                            && !m_pImpl->GetIsPreviousParagraphFramed());
 
             const bool bNoNumbering = bRemove || (!m_pImpl->GetParaChanged() && m_pImpl->GetParaSectpr() && bSingleParagraph);
             PropertyMapPtr xContext = bNoNumbering ? m_pImpl->GetTopContextOfType(CONTEXT_PARAGRAPH) : PropertyMapPtr();
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index ec337152525f..f60d188c4c01 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -41,6 +41,8 @@
 #include <com/sun/star/text/ChapterFormat.hpp>
 #include <com/sun/star/text/FilenameDisplayFormat.hpp>
 #include <com/sun/star/text/SetVariableType.hpp>
+#include <com/sun/star/text/XDocumentIndex.hpp>
+#include <com/sun/star/text/XDocumentIndexesSupplier.hpp>
 #include <com/sun/star/text/XFootnote.hpp>
 #include <com/sun/star/text/XLineNumberingProperties.hpp>
 #include <com/sun/star/style/XStyle.hpp>
@@ -97,6 +99,7 @@
 #include <unotools/configmgr.hxx>
 #include <unotools/mediadescriptor.hxx>
 #include <tools/diagnose_ex.h>
+#include <tools/lineend.hxx>
 #include <sal/log.hxx>
 
 
@@ -1795,6 +1798,7 @@ void DomainMapper_Impl::finishParagraph( const PropertyMapPtr& pPropertyMap, con
         SetIsPreviousParagraphFramed(false);
 
     m_bParaChanged = false;
+    m_bRemoveThisParagraph = false;
     if( !IsInHeaderFooter() && !IsInShape() && (!pParaContext || !pParaContext->IsFrameMode()) )
     { // If the paragraph is in a frame, shape or header/footer, it's not a paragraph of the section itself.
         SetIsFirstParagraphInSection(false);
@@ -1878,7 +1882,7 @@ void DomainMapper_Impl::appendTextPortion( const OUString& rString, const Proper
                         uno::Reference< text::XTextCursor > xTOCTextCursor = xTextAppend->getEnd()->getText( )->createTextCursor( );
                         assert(xTOCTextCursor.is());
                         xTOCTextCursor->gotoEnd(false);
-                        if (m_bStartIndex || m_bStartBibliography || m_bStartGenericField)
+                        if (m_bStartGenericField)
                             xTOCTextCursor->goLeft(1, false);
                         xTextRange = xTextAppend->insertTextPortion(rString, aValues, xTOCTextCursor);
                         SAL_WARN_IF(!xTextRange.is(), "writerfilter.dmapper", "insertTextPortion failed");
@@ -2123,8 +2127,38 @@ uno::Reference< beans::XPropertySet > DomainMapper_Impl::appendTextSectionAfter(
                 xCursor->gotoEnd( true );
             //the paragraph after this new section is already inserted
             xCursor->goLeft(1, true);
+            css::uno::Reference<css::text::XTextRange> xTextRange(xCursor, css::uno::UNO_QUERY_THROW);
+
+            if (css::uno::Reference<css::text::XDocumentIndexesSupplier> xIndexSupplier{
+                    GetTextDocument(), css::uno::UNO_QUERY })
+            {
+                css::uno::Reference<css::text::XTextRangeCompare> xCompare(
+                    xTextAppend, css::uno::UNO_QUERY);
+                const auto xIndexAccess = xIndexSupplier->getDocumentIndexes();
+                for (sal_Int32 i = xIndexAccess->getCount(); i > 0; --i)
+                {
+                    if (css::uno::Reference<css::text::XDocumentIndex> xIndex{
+                            xIndexAccess->getByIndex(i - 1), css::uno::UNO_QUERY })
+                    {
+                        const auto xIndexTextRange = xIndex->getAnchor();
+                        if (xCompare->compareRegionStarts(xTextRange, xIndexTextRange) == 0
+                            && xCompare->compareRegionEnds(xTextRange, xIndexTextRange) == 0)
+                        {
+                            // The boundaries coincide with an index: trying to attach a section
+                            // to the range will insert the section inside the index. goRight will
+                            // extend the range outside of the index, so that created section will
+                            // be around it. Alternatively we could return index section itself
+                            // instead : xRet.set(xIndex, uno::UNO_QUERY) - to set its properties,
+                            // like columns/fill.
+                            xCursor->goRight(1, true);
+                            break;
+                        }
+                    }
+                }
+            }
+
             uno::Reference< text::XTextContent > xSection( m_xTextFactory->createInstance("com.sun.star.text.TextSection"), uno::UNO_QUERY_THROW );
-            xSection->attach( uno::Reference< text::XTextRange >( xCursor, uno::UNO_QUERY_THROW) );
+            xSection->attach( xTextRange );
             xRet.set(xSection, uno::UNO_QUERY );
         }
         catch(const uno::Exception&)
@@ -4046,10 +4080,12 @@ OUString DomainMapper_Impl::extractTocTitle()
         else
             xCursor->gotoEnd( true );
 
-        //the paragraph after this new section is already inserted
-        xCursor->goLeft(1, true);
+        // the paragraph after this new section might have been already inserted
+        OUString sResult = xCursor->getString();
+        if (sResult.endsWith(SAL_NEWLINE_STRING))
+            sResult = sResult.copy(0, sResult.getLength() - SAL_N_ELEMENTS(SAL_NEWLINE_STRING) + 1);
 
-        return xCursor->getString();
+        return sResult;
     }
     catch(const uno::Exception&)
     {
@@ -4058,12 +4094,48 @@ OUString DomainMapper_Impl::extractTocTitle()
     return OUString();
 }
 
+css::uno::Reference<css::beans::XPropertySet>
+DomainMapper_Impl::StartIndexSectionChecked(const OUString& sServiceName)
+{
+    if (m_bParaChanged)
+    {
+        finishParagraph(GetTopContextOfType(CONTEXT_PARAGRAPH), false); // resets m_bParaChanged
+        PopProperties(CONTEXT_PARAGRAPH);
+        PushProperties(CONTEXT_PARAGRAPH);
+        SetIsFirstRun(true);
+        // The first paragraph of the index that is continuation of just finished one needs to be
+        // removed when finished (unless more content will arrive, which will set m_bParaChanged)
+        m_bRemoveThisParagraph = true;
+    }
+    const auto& xTextAppend = GetTopTextAppend();
+    const auto xTextRange = xTextAppend->getEnd();
+    const auto xRet = createSectionForRange(xTextRange, xTextRange, sServiceName, false);
+    if (!m_aTextAppendStack.top().xInsertPosition)
+    {
+        try
+        {
+            m_bStartedTOC = true;
+            uno::Reference<text::XTextCursor> xTOCTextCursor
+                = xTextRange->getText()->createTextCursor();
+            assert(xTOCTextCursor.is());
+            xTOCTextCursor->gotoEnd(false);
+            mxTOCTextCursor = xTOCTextCursor;
+            m_aTextAppendStack.push(TextAppendContext(xTextAppend, xTOCTextCursor));
+        }
+        catch (const uno::Exception&)
+        {
+            TOOLS_WARN_EXCEPTION("writerfilter.dmapper",
+                                 "DomainMapper_Impl::StartIndexSectionChecked:");
+        }
+    }
+    return xRet;
+}
+
 void DomainMapper_Impl::handleToc
     (const FieldContextPtr& pContext,
     const OUString & sTOCServiceName)
 {
     OUString sValue;
-    m_bStartTOC = true;
     if (IsInHeaderFooter())
         m_bStartTOCHeaderFooter = true;
     bool bTableOfFigures = false;
@@ -4180,34 +4252,21 @@ void DomainMapper_Impl::handleToc
 
     if (m_xTextFactory.is() && ! m_aTextAppendStack.empty())
     {
+        const auto& xTextAppend = GetTopTextAppend();
         if (aTocTitle.isEmpty() || bTableOfFigures)
         {
             // reset marker of the TOC title
-            m_xStdEntryStart = uno::Reference< text::XTextRange >();
-
-            xTOC.set(
-                    m_xTextFactory->createInstance
-                    ( bTableOfFigures ?
-                      "com.sun.star.text.IllustrationsIndex"
-                      : sTOCServiceName),
-                    uno::UNO_QUERY_THROW);
-
-            OUString const sMarker("Y");
-            //insert index
-            uno::Reference< text::XTextContent > xToInsert( xTOC, uno::UNO_QUERY );
-            uno::Reference< text::XTextAppend >  xTextAppend = m_aTextAppendStack.top().xTextAppend;
-            if (xTextAppend.is())
-            {
-                uno::Reference< text::XTextCursor > xCrsr = xTextAppend->getText()->createTextCursor();
-                uno::Reference< text::XText > xText = xTextAppend->getText();
-                if(xCrsr.is() && xText.is())
-                {
-                    xCrsr->gotoEnd(false);
-                    xText->insertString(xCrsr, sMarker, false);
-                    xText->insertTextContent(uno::Reference< text::XTextRange >( xCrsr, uno::UNO_QUERY_THROW ), xToInsert, false);
-                    xTOCMarkerCursor = xCrsr;
-                }
-            }
+            m_xStdEntryStart.clear();
+
+            // Create section before setting m_bStartTOC: finishing paragraph
+            // inside StartIndexSectionChecked could do the wrong thing otherwise
+            xTOC = StartIndexSectionChecked(bTableOfFigures ? "com.sun.star.text.IllustrationsIndex"
+                                                            : sTOCServiceName);
+
+            const auto xTextCursor = xTextAppend->getText()->createTextCursor();
+            if (xTextCursor)
+                xTextCursor->gotoEnd(false);
+            xTOCMarkerCursor = xTextCursor;
         }
         else
         {
@@ -4216,7 +4275,6 @@ void DomainMapper_Impl::handleToc
             xTOC = createSectionForRange(m_xStdEntryStart, xTextRangeEndOfTocHeader, sTOCServiceName, false);
 
             // init [xTOCMarkerCursor]
-            uno::Reference< text::XTextAppend >  xTextAppend = m_aTextAppendStack.top().xTextAppend;
             uno::Reference< text::XText > xText = xTextAppend->getText();
             uno::Reference< text::XTextCursor > xCrsr = xText->createTextCursor();
             xTOCMarkerCursor = xCrsr;
@@ -4227,6 +4285,8 @@ void DomainMapper_Impl::handleToc
         }
     }
 
+    m_bStartTOC = true;
+
     if (xTOC.is())
         xTOC->setPropertyValue(getPropertyName( PROP_TITLE ), uno::makeAny(aTocTitle));
 
@@ -4364,14 +4424,12 @@ void DomainMapper_Impl::handleBibliography
     (const FieldContextPtr& pContext,
     const OUString & sTOCServiceName)
 {
-    uno::Reference< beans::XPropertySet > xTOC;
+    // Create section before setting m_bStartTOC and m_bStartBibliography: finishing paragraph
+    // inside StartIndexSectionChecked could do the wrong thing otherwise
+    const auto xTOC = StartIndexSectionChecked(sTOCServiceName);
     m_bStartTOC = true;
     m_bStartBibliography = true;
-    if (m_xTextFactory.is())
-        xTOC.set(
-                m_xTextFactory->createInstance(
-                sTOCServiceName),
-                uno::UNO_QUERY_THROW);
+
     if (xTOC.is())
         xTOC->setPropertyValue(getPropertyName( PROP_TITLE ), uno::makeAny(OUString()));
 
@@ -4386,18 +4444,15 @@ void DomainMapper_Impl::handleIndex
     (const FieldContextPtr& pContext,
     const OUString & sTOCServiceName)
 {
-    uno::Reference< beans::XPropertySet > xTOC;
+    // Create section before setting m_bStartTOC and m_bStartIndex: finishing paragraph
+    // inside StartIndexSectionChecked could do the wrong thing otherwise
+    const auto xTOC = StartIndexSectionChecked(sTOCServiceName);
+
     m_bStartTOC = true;
     m_bStartIndex = true;
     OUString sValue;
     OUString sIndexEntryType = "I"; // Default value for field flag '\f' is 'I'.
 
-
-    if (m_xTextFactory.is())
-        xTOC.set(
-                m_xTextFactory->createInstance(
-                sTOCServiceName),
-                uno::UNO_QUERY_THROW);
     if (xTOC.is())
     {
         xTOC->setPropertyValue(getPropertyName( PROP_TITLE ), uno::makeAny(OUString()));
@@ -5561,33 +5616,26 @@ void DomainMapper_Impl::PopFieldContext()
                 uno::Reference< text::XTextContent > xToInsert( pContext->GetTOC(), uno::UNO_QUERY );
                 if( xToInsert.is() )
                 {
-                    if(xTOCMarkerCursor.is() || m_bStartIndex || m_bStartBibliography)
+                    if (m_bStartedTOC || m_bStartIndex || m_bStartBibliography)
                     {
-                        if (m_bStartIndex || m_bStartBibliography)
-                        {
-                            if (mxTOCTextCursor.is())
-                            {
-                                mxTOCTextCursor->goLeft(1,true);
-                                mxTOCTextCursor->setString(OUString());
-                            }
-                            xTextAppend->finishParagraph(  uno::Sequence< beans::PropertyValue >() );
-                        }
-                        else
+                        // inside Std, last empty paragraph is also part of index
+                        if (!m_bParaChanged && !m_xStdEntryStart)
                         {
-                            if (!m_xStdEntryStart.is())
-                            {
-                                xTOCMarkerCursor->goLeft(1,true);
-                                xTOCMarkerCursor->setString(OUString());
-                                xTOCMarkerCursor->goLeft(1,true);
-                                xTOCMarkerCursor->setString(OUString());
-                            }
+                            // End of index is the first item on a new paragraph - this paragraph
+                            // should not be part of index
+                            auto xCursor
+                                = xTextAppend->createTextCursorByRange(xTextAppend->getEnd());
+                            xCursor->gotoEnd(false);
+                            xCursor->goLeft(1, true);
+                            // delete
+                            xCursor->setString(OUString());
+                            // But a new paragraph should be started after the index instead
+                            xTextAppend->finishParagraph(css::beans::PropertyValues());
                         }
-                    }
-                    if (m_bStartedTOC || m_bStartIndex || m_bStartBibliography)
-                    {
                         m_bStartedTOC = false;
                         m_aTextAppendStack.pop();
                         m_bTextInserted = false;
+                        m_bParaChanged = true; // the paragraph must stay anyway
                     }
                     m_bStartTOC = false;
                     m_bStartIndex = false;
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
index c8de67b69674..207fae7750ea 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
@@ -559,6 +559,8 @@ private:
     bool                            m_bSdt;
     bool                            m_bIsFirstRun;
     bool                            m_bIsOutsideAParagraph;
+    /// This is a continuation of already finished paragraph - e.g., first in an index section
+    bool                            m_bRemoveThisParagraph = false;
 
     css::uno::Reference< css::text::XTextCursor > xTOCMarkerCursor;
     css::uno::Reference< css::text::XTextCursor > mxTOCTextCursor;
@@ -663,6 +665,7 @@ public:
     /// Getter method for m_bSdt.
     bool GetSdt() const { return m_bSdt;}
     bool GetParaChanged() const { return m_bParaChanged;}
+    bool GetRemoveThisPara() const { return m_bRemoveThisParagraph; }
 
     void deferBreak( BreakType deferredBreakType );
     bool isBreakDeferred( BreakType deferredBreakType );
@@ -1065,6 +1068,8 @@ public:
 
 private:
     void PushPageHeaderFooter(bool bHeader, SectionPropertyMap::PageType eType);
+    // Start a new index section; if needed, finish current paragraph
+    css::uno::Reference<css::beans::XPropertySet> StartIndexSectionChecked(const OUString& sServiceName);
     std::vector<css::uno::Reference< css::drawing::XShape > > m_vTextFramesForChaining ;
     /// Current paragraph had at least one field in it.
     bool m_bParaHadField;
commit 75265fad67c38827aec074e99e010109f9219079
Author:     Serge Krot <Serge.Krot at cib.de>
AuthorDate: Wed Jan 8 21:18:20 2020 +0100
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Thu Jan 9 00:59:00 2020 +0100

    tdf#129887: fix crash during scrolling down document
    
    regression from tdf#129708
    
    Change-Id: I6c5d7eb90030234e899ab8ce5b3adec33e03962a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86454
    Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
    Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    (cherry picked from commit a3c3f21a742f7c7f587bd63ee2617a150bb39b96)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86460
    Tested-by: Jenkins
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

diff --git a/svx/source/accessibility/AccessibleShape.cxx b/svx/source/accessibility/AccessibleShape.cxx
index debd4fa7243e..f248df629ff0 100644
--- a/svx/source/accessibility/AccessibleShape.cxx
+++ b/svx/source/accessibility/AccessibleShape.cxx
@@ -159,7 +159,7 @@ void AccessibleShape::Init()
             if( pSdrObject )
             {
                 SdrTextObj* pTextObj = dynamic_cast<SdrTextObj*>( pSdrObject  );
-                const bool hasOutlinerParaObject = pTextObj->CanCreateEditOutlinerParaObject() || pSdrObject->GetOutlinerParaObject() != nullptr;
+                const bool hasOutlinerParaObject = (pTextObj && pTextObj->CanCreateEditOutlinerParaObject()) || (pSdrObject->GetOutlinerParaObject() != nullptr);
 
                 // create AccessibleTextHelper to handle this shape's text
                 if( !hasOutlinerParaObject )
commit 0596b93afc6f5987da9c80a12c730a5828df7e09
Author:     Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
AuthorDate: Wed Jan 8 18:11:05 2020 +0100
Commit:     Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
CommitDate: Wed Jan 8 18:11:05 2020 +0100

    bump product version to 6.4.1.0.0+
    
    Change-Id: I4dd8377f4c16f73362d397a054a5b57441efb365

diff --git a/configure.ac b/configure.ac
index 4a4e3821b844..c239b1f66794 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,7 +9,7 @@ dnl in order to create a configure script.
 # several non-alphanumeric characters, those are split off and used only for the
 # ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no idea.
 
-AC_INIT([LibreOffice],[6.4.0.1.0+],[],[],[http://documentfoundation.org/])
+AC_INIT([LibreOffice],[6.4.1.0.0+],[],[],[http://documentfoundation.org/])
 
 dnl libnumbertext needs autoconf 2.68, but that can pick up autoconf268 just fine if it is installed
 dnl whereas aclocal (as run by autogen.sh) insists on using autoconf and fails hard
commit cbac26c52ccbe59c51c6631cb8c4b0a314a9848a
Author:     Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
AuthorDate: Wed Jan 8 17:47:29 2020 +0100
Commit:     Gerrit Code Review <gerrit at gerrit.libreoffice.org>
CommitDate: Wed Jan 8 17:47:29 2020 +0100

    Update git submodules
    
    * Update translations from branch 'libreoffice-6-4'
      to a7bd83b1b05ea2a4604ca73b011afca6ae9b8f40
      - update translations for 6.4.0 rc2
    
        and force-fix errors using pocheck
    
        Change-Id: I271c6f6ca96a7cfd41bfc51b5e9894033b17fabc

diff --git a/translations b/translations
index 51e009dadcd8..a7bd83b1b05e 160000
--- a/translations
+++ b/translations
@@ -1 +1 @@
-Subproject commit 51e009dadcd8769a9902b98ec00d03e26b1ebd54
+Subproject commit a7bd83b1b05ea2a4604ca73b011afca6ae9b8f40
commit 1bbff471cdcfcd4a9ceb6ff6fed7006fbc3f6e1c
Author:     Justin Luth <justin.luth at collabora.com>
AuthorDate: Fri Nov 29 22:10:27 2019 +0300
Commit:     Michael Stahl <michael.stahl at cib.de>
CommitDate: Wed Jan 8 17:41:52 2020 +0100

    tdf#123262 writerfilter: completely ignore footnote separators
    
    ... except for processing enough to observe the separator exists.
    
    For each footnote reference, the entire footnote.xml file is
    parsed every time. The text in the "separator" footnote was
    being added to every footnote.  The normal case where this is just
    a single paragraph was already handled, but this patch generalizes
    everything to handle cases of actual text or multiple paragraphs.
    
    Not every footnote has a type, so we can't depend on that to turn
    ignoringText ON/OFF. Every footnote has an ID, but theoretically
    the ID could be processed before or after the type, and it has
    no idea which type it is. Finally, the skipped text has no idea
    how many times/paragaphs it needs to skip. So a three-way
    control was needed to handle on/used/off. As a safeguard, finishing
    the footnote.xml parse (PopFootOrEndnote) ensures that
    ignoring won't be left on in the unlikely case that
    the separator is the last footnote.
    
    Change-Id: Ia30ca8d3a36417a4691e3b2e1c978720be017030
    Reviewed-on: https://gerrit.libreoffice.org/82172
    Tested-by: Jenkins
    Reviewed-by: Justin Luth <justin_luth at sil.org>
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
    (cherry picked from commit acb9d901009d026cb48e6a8b94e6200f05110504)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85734
    Reviewed-by: Michael Stahl <michael.stahl at cib.de>

diff --git a/sw/qa/extras/ooxmlexport/data/tdf123262_textFootnoteSeparators.docx b/sw/qa/extras/ooxmlexport/data/tdf123262_textFootnoteSeparators.docx
new file mode 100644
index 000000000000..ceccb767e27e
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf123262_textFootnoteSeparators.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
index 14ba1cde9683..2560cf89a506 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
@@ -523,6 +523,24 @@ DECLARE_OOXMLEXPORT_TEST(testFDO79062, "fdo79062.docx")
     CPPUNIT_ASSERT_EQUAL_MESSAGE( "Paragraph starts with W(87), not tab(9)", u'W', sFootnotePara[0] );
 }
 
+DECLARE_OOXMLEXPORT_TEST(testTdf123262_textFootnoteSeparators, "tdf123262_textFootnoteSeparators.docx")
+{
+    //Everything easily fits on one page
+    CPPUNIT_ASSERT_EQUAL_MESSAGE( "Number of Pages", 1, getPages() );
+
+    uno::Reference<text::XFootnotesSupplier> xFootnotesSupplier(mxComponent, uno::UNO_QUERY);
+    uno::Reference<container::XIndexAccess> xFootnotes = xFootnotesSupplier->getFootnotes();
+    uno::Reference<text::XText> xFootnoteText(xFootnotes->getByIndex(0), uno::UNO_QUERY);
+
+    // The text in the separator footnote should not be added to the footnotes
+    OUString sText = " Microsoft Office.";
+    CPPUNIT_ASSERT_EQUAL(sText, xFootnoteText->getString());
+
+    // Ensure that paragraph markers are not lost.
+    xFootnoteText.set(xFootnotes->getByIndex(1), uno::UNO_QUERY);
+    CPPUNIT_ASSERT_EQUAL_MESSAGE( "Number of paragraphs in second footnote", 2, getParagraphs(xFootnoteText) );
+}
+
 DECLARE_OOXMLEXPORT_TEST(testfdo79668,"fdo79668.docx")
 {
     // fdo#79668: Document was Crashing on DebugUtil build while Saving
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 5417b6a05e0b..87b7fdbcbecc 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -1078,9 +1078,20 @@ void DomainMapper::lcl_attribute(Id nName, Value & val)
             }
         break;
         case NS_ooxml::LN_CT_FtnEdn_type:
-            // This is the "separator" footnote, ignore its linebreak.
+            // This is the "separator" footnote, ignore its linebreaks/text.
             if (static_cast<sal_uInt32>(nIntValue) == NS_ooxml::LN_Value_doc_ST_FtnEdn_separator)
-                m_pImpl->SeenFootOrEndnoteSeparator();
+                m_pImpl->SetSkipFootnoteState( SkipFootnoteSeparator::ON );
+            else
+                m_pImpl->SetSkipFootnoteState( SkipFootnoteSeparator::OFF );
+        break;
+        case NS_ooxml::LN_CT_FtnEdn_id:
+        {
+            SkipFootnoteSeparator eSkip = m_pImpl->GetSkipFootnoteState();
+            if ( eSkip == SkipFootnoteSeparator::ON )
+                m_pImpl->SetSkipFootnoteState( SkipFootnoteSeparator::SKIPPING );
+            else if ( eSkip == SkipFootnoteSeparator::SKIPPING )
+                m_pImpl->SetSkipFootnoteState( SkipFootnoteSeparator::OFF );
+        }
         break;
         case NS_ooxml::LN_CT_DataBinding_prefixMappings:
             m_pImpl->appendGrabBag(m_pImpl->m_aInteropGrabBag, "ooxml:CT_DataBinding_prefixMappings", sStringValue);
@@ -3398,18 +3409,19 @@ void DomainMapper::lcl_utext(const sal_uInt8 * data_, size_t len)
     if (!m_pImpl->hasTableManager())
         return;
 
+    SkipFootnoteSeparator eSkip = m_pImpl->GetSkipFootnoteState();
+    if ( eSkip == SkipFootnoteSeparator::ON || eSkip == SkipFootnoteSeparator::SKIPPING )
+    {
+        m_pImpl->SetSkipFootnoteState( SkipFootnoteSeparator::SKIPPING );
+        return;
+    }
+
     try
     {
         m_pImpl->getTableManager().utext(data_, len);
 
         if (bNewLine)
         {
-            if (m_pImpl->m_bIgnoreNextPara)
-            {
-                m_pImpl->m_bIgnoreNextPara = false;
-                return;
-            }
-
             const bool bSingleParagraph = m_pImpl->GetIsFirstParagraphInSection() && m_pImpl->GetIsLastParagraphInSection();
             const bool bSingleParagraphAfterRedline = m_pImpl->GetIsFirstParagraphInSection(true) && m_pImpl->GetIsLastParagraphInSection();
             PropertyMapPtr pContext = m_pImpl->GetTopContextOfType(CONTEXT_PARAGRAPH);
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 82c5b08c9e0f..ec337152525f 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -268,7 +268,7 @@ DomainMapper_Impl::DomainMapper_Impl(
         m_bInFootOrEndnote(false),
         m_bHasFootnoteStyle(false),
         m_bCheckFootnoteStyle(false),
-        m_bSeenFootOrEndnoteSeparator(false),
+        m_eSkipFootnoteState(SkipFootnoteSeparator::OFF),
         m_bLineNumberingSet( false ),
         m_bIsInFootnoteProperties( false ),
         m_bIsParaMarkerChange( false ),
@@ -299,7 +299,6 @@ DomainMapper_Impl::DomainMapper_Impl(
         m_nLastTableCellParagraphDepth(0),
         m_bHasFtn(false),
         m_bHasFtnSep(false),
-        m_bIgnoreNextPara(false),
         m_bCheckFirstFootnoteTab(false),
         m_bIgnoreNextTab(false),
         m_bIsSplitPara(false),
@@ -2470,21 +2469,12 @@ void DomainMapper_Impl::PopFootOrEndnote()
         return;
     }
     m_aRedlines.pop();
-    m_bSeenFootOrEndnoteSeparator = false;
+    m_eSkipFootnoteState = SkipFootnoteSeparator::OFF;
     m_bInFootOrEndnote = false;
     m_pFootnoteContext = nullptr;
     m_bFirstParagraphInCell = m_bSaveFirstParagraphInCell;
 }
 
-void DomainMapper_Impl::SeenFootOrEndnoteSeparator()
-{
-    if (!m_bSeenFootOrEndnoteSeparator)
-    {
-        m_bSeenFootOrEndnoteSeparator = true;
-        m_bIgnoreNextPara = true;
-    }
-}
-
 void DomainMapper_Impl::PopAnnotation()
 {
     RemoveLastParagraph();
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
index 18b019e7c402..c8de67b69674 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
@@ -114,6 +114,13 @@ enum BreakType
     COLUMN_BREAK
 };
 
+enum SkipFootnoteSeparator
+{
+    OFF,
+    ON,
+    SKIPPING
+};
+
 /**
  * Storage for state that is relevant outside a header/footer, but not inside it.
  *
@@ -512,8 +519,8 @@ private:
     PropertyMapPtr m_pFootnoteContext;
     bool m_bHasFootnoteStyle;
     bool m_bCheckFootnoteStyle;
-    /// Did we get a <w:separator/> for this footnote already?
-    bool                            m_bSeenFootOrEndnoteSeparator;
+    /// Skip paragraphs from the <w:separator/> footnote
+    SkipFootnoteSeparator           m_eSkipFootnoteState;
 
     bool                            m_bLineNumberingSet;
     bool                            m_bIsInFootnoteProperties;
@@ -781,8 +788,9 @@ public:
     void SetCheckFootnoteStyle(bool bVal) { m_bCheckFootnoteStyle = bVal; }
 
     const PropertyMapPtr& GetFootnoteContext() const { return m_pFootnoteContext; }
-    /// Got a <w:separator/>.
-    void SeenFootOrEndnoteSeparator();
+
+    SkipFootnoteSeparator GetSkipFootnoteState() const { return m_eSkipFootnoteState; }
+    void SetSkipFootnoteState(SkipFootnoteSeparator eId) { m_eSkipFootnoteState =  eId; }
 
     void PushAnnotation();
     void PopAnnotation();
@@ -992,8 +1000,6 @@ public:
     /// If the current section has a footnote separator.
     bool m_bHasFtnSep;
 
-    /// If the next newline should be ignored, used by the special footnote separator paragraph.
-    bool m_bIgnoreNextPara;
     /// If the next tab should be ignored, used for footnotes.
     bool m_bCheckFirstFootnoteTab;
     bool m_bIgnoreNextTab;
commit f2d54bb55d23d000d2c69860cb145ae379e1ea10
Author:     Heiko Tietze <tietze.heiko at gmail.com>
AuthorDate: Mon Jan 6 13:48:14 2020 +0100
Commit:     Heiko Tietze <heiko.tietze at documentfoundation.org>
CommitDate: Wed Jan 8 17:30:51 2020 +0100

    Resolves tdf#129622 - Layout problem in Options-LibreOffice-View
    
    horizontal fill set for the questionable controls
    
    Change-Id: Iab194709ec3ad4881ace36a605ebb4a0d37fe8a4
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86275
    Tested-by: Jenkins
    Reviewed-by: Heiko Tietze <heiko.tietze at documentfoundation.org>
    (cherry picked from commit beed7183ac6323eb052e7c586d6a807fcb32eb1f)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86427

diff --git a/cui/uiconfig/ui/optviewpage.ui b/cui/uiconfig/ui/optviewpage.ui
index 188a3f9e2d09..db59ad52b4ba 100644
--- a/cui/uiconfig/ui/optviewpage.ui
+++ b/cui/uiconfig/ui/optviewpage.ui
@@ -269,6 +269,7 @@
                       <object class="GtkComboBoxText" id="notebookbariconsize">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
+                        <property name="hexpand">True</property>
                         <items>
                           <item translatable="yes" context="optviewpage|notebookbariconsize">Automatic</item>
                           <item translatable="yes" context="optviewpage|notebookbariconsize">Small</item>
@@ -298,6 +299,7 @@
                       <object class="GtkComboBoxText" id="sidebariconsize">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
+                        <property name="hexpand">True</property>
                         <items>
                           <item translatable="yes" context="optviewpage|sidebariconsize">Automatic</item>
                           <item translatable="yes" context="optviewpage|sidebariconsize">Small</item>
@@ -327,6 +329,7 @@
                       <object class="GtkComboBoxText" id="iconsize">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
+                        <property name="hexpand">True</property>
                         <items>
                           <item translatable="yes" context="optviewpage|iconsize">Automatic</item>
                           <item translatable="yes" context="optviewpage|iconsize">Small</item>
@@ -719,11 +722,4 @@
       <widget name="mousemiddle"/>
     </widgets>
   </object>
-  <object class="GtkAdjustment" id="adjustment3">
-    <property name="lower">10</property>
-    <property name="upper">90</property>
-    <property name="value">75</property>
-    <property name="step_increment">1</property>
-    <property name="page_increment">10</property>
-  </object>
 </interface>
commit e67c416d7471301ee85cebb353c9839e9238ea0a
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Tue Jan 7 18:06:09 2020 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Wed Jan 8 16:29:12 2020 +0100

    Fix SfxPoolItem use-after-free
    
    ...as observed with -fsanitize=address in Draw, after drawing some rectangle (so
    that there is at least one marked object) doing "Format - Area... - Area -
    Bitmap":
    
    > ERROR: AddressSanitizer: heap-use-after-free on address 0x6030004aca50 at pc 0x7f14d0ef5fe1 bp 0x7ffd966c6cb0 sp 0x7ffd966c6ca8
    > READ of size 4 at 0x6030004aca50 thread T0
    >  #0 in CntUInt32Item::GetValue() const at include/svl/cintitem.hxx:163:42
    >  #1 in SvxBitmapTabPage::Reset(SfxItemSet const*) at cui/source/tabpages/tpbitmap.cxx:278:124
    >  #2 in SvxAreaTabPage::CreatePage(int, SfxTabPage*) at cui/source/tabpages/tparea.cxx:448:21
    >  #3 in SvxAreaTabPage::SelectFillType(weld::ToggleButton&, SfxItemSet const*) at cui/source/tabpages/tparea.cxx:381:9
    >  #4 in SvxAreaTabPage::SelectFillTypeHdl_Impl(weld::ToggleButton&) at cui/source/tabpages/tparea.cxx:364:5
    >  #5 in SvxAreaTabPage::LinkStubSelectFillTypeHdl_Impl(void*, weld::ToggleButton&) at cui/source/tabpages/tparea.cxx:358:1
    >  #6 in Link<weld::ToggleButton&, void>::Call(weld::ToggleButton&) const at include/tools/link.hxx:111:45
    >  #7 in weld::ToggleButton::signal_toggled() at include/vcl/weld.hxx:1130:42
    [...]
    > 0x6030004aca50 is located 16 bytes inside of 24-byte region [0x6030004aca40,0x6030004aca58)
    > freed by thread T0 here:
    >  #0 in operator delete(void*, unsigned long) at ~/github.com/llvm/llvm-project/compiler-rt/lib/asan/asan_new_delete.cpp:172:3
    >  #1 in SfxUInt32Item::~SfxUInt32Item() at include/svl/intitem.hxx:113:21
    >  #2 in SfxItemPool::Remove(SfxPoolItem const&) at svl/source/items/itempool.cxx:710:13
    >  #3 in SfxItemSet::~SfxItemSet() at svl/source/items/itemset.cxx:252:42
    >  #4 in SvxBitmapTabPage::Reset(SfxItemSet const*) at cui/source/tabpages/tpbitmap.cxx:276:9
    >  #5 in SvxAreaTabPage::CreatePage(int, SfxTabPage*) at cui/source/tabpages/tparea.cxx:448:21
    >  #6 in SvxAreaTabPage::SelectFillType(weld::ToggleButton&, SfxItemSet const*) at cui/source/tabpages/tparea.cxx:381:9
    >  #7 in SvxAreaTabPage::SelectFillTypeHdl_Impl(weld::ToggleButton&) at cui/source/tabpages/tparea.cxx:364:5
    >  #8 in SvxAreaTabPage::LinkStubSelectFillTypeHdl_Impl(void*, weld::ToggleButton&) at cui/source/tabpages/tparea.cxx:358:1
    >  #9 in Link<weld::ToggleButton&, void>::Call(weld::ToggleButton&) const at include/tools/link.hxx:111:45
    
    This appears to be broken ever since d543d66a4ee34d3b0088f45951b56c150f7206ec
    "tdf#104615: there's no mpView when opening odc directly".
    
    Change-Id: Id0b3991f3e953ca5b10f466daab890383b0428ca
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86368
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
    (cherry picked from commit 4d59436258702251a881a007ccc52ffd5a3eeb38)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86423
    Reviewed-by: Michael Stahl <michael.stahl at cib.de>

diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx
index 7d1f17be236b..e7c32cb41984 100644
--- a/cui/source/tabpages/tpbitmap.cxx
+++ b/cui/source/tabpages/tpbitmap.cxx
@@ -255,8 +255,8 @@ bool SvxBitmapTabPage::FillItemSet( SfxItemSet* rAttrs )
 
 void SvxBitmapTabPage::Reset( const SfxItemSet* rAttrs )
 {
-    const SfxPoolItem* pItemTransfWidth = nullptr;
-    const SfxPoolItem* pItemTransfHeight = nullptr;
+    double transfWidth = 0.0;
+    double transfHeight = 0.0;
     double fUIScale  = 1.0;
     if (mpView)
     {
@@ -266,12 +266,12 @@ void SvxBitmapTabPage::Reset( const SfxItemSet* rAttrs )
         if (mpView->AreObjectsMarked())
         {
             SfxItemSet rGeoAttr(mpView->GetGeoAttrFromMarked());
-            pItemTransfWidth = GetItem( rGeoAttr, SID_ATTR_TRANSFORM_WIDTH );
-            pItemTransfHeight= GetItem( rGeoAttr, SID_ATTR_TRANSFORM_HEIGHT );
+            transfWidth = static_cast<double>(GetItem( rGeoAttr, SID_ATTR_TRANSFORM_WIDTH )->GetValue());
+            transfHeight= static_cast<double>(GetItem( rGeoAttr, SID_ATTR_TRANSFORM_HEIGHT )->GetValue());
         }
     }
-    m_fObjectWidth = std::max( pItemTransfWidth ? static_cast<double>(static_cast<const SfxUInt32Item*>(pItemTransfWidth)->GetValue()) : 0.0, 1.0 );
-    m_fObjectHeight = std::max( pItemTransfHeight ? static_cast<double>(static_cast<const SfxUInt32Item*>(pItemTransfHeight)->GetValue()) : 0.0, 1.0 );
+    m_fObjectWidth = std::max( transfWidth, 1.0 );
+    m_fObjectHeight = std::max( transfHeight, 1.0 );
     double fTmpWidth((OutputDevice::LogicToLogic(static_cast<sal_Int32>(m_fObjectWidth), mePoolUnit, MapUnit::Map100thMM )) / fUIScale);
     m_fObjectWidth = fTmpWidth;
 
commit 925be88167868798c97ff1f66dcdb9bd3bbec1e2
Author:     Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Tue Dec 31 15:31:41 2019 +0300
Commit:     Xisco Faulí <xiscofauli at libreoffice.org>
CommitDate: Wed Jan 8 16:05:50 2020 +0100

    tdf#120502: Excel doesn't increment max column for OOXML
    
    This is obviously a result of copy-paste from XclExpColinfo::WriteBody
    (where that increment existed at least since commit
    92d8c6d6c4dc2a2824a0e24e22485361c3b65b54 from 2004). Implementing OOXML
    export, authors of commit 64274b38f6cc50a8bb49f114f1ac9e7c1c3b3c4f likely
    forgot to remove this after copying the code to XclExpColinfo::SaveXml.
    
    This change removes the copy-pasted code incrementing column number for
    the last possible column.
    
    Change-Id: Ie2f043c4910568731cac90d89ec791ecbc8565b5
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86046
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
    (cherry picked from commit f1aec2392dba32e90f2cb0e4ad3c84bcbbd9f305)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86428
    Reviewed-by: Xisco Faulí <xiscofauli at libreoffice.org>

diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx
index 90f2c85720be..e220803967cb 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -69,6 +69,7 @@
 #include <test/xmltesttools.hxx>
 #include <com/sun/star/drawing/XDrawPageSupplier.hpp>
 #include <com/sun/star/awt/XBitmap.hpp>
+#include <com/sun/star/frame/Desktop.hpp>
 #include <com/sun/star/graphic/GraphicType.hpp>
 #include <com/sun/star/sheet/GlobalSheetSettings.hpp>
 #include <comphelper/storagehelper.hxx>
@@ -230,6 +231,7 @@ public:
     void testXltxExport();
     void testRotatedImageODS();
     void testTdf128976();
+    void testTdf120502();
 
     CPPUNIT_TEST_SUITE(ScExportTest);
     CPPUNIT_TEST(test);
@@ -361,6 +363,7 @@ public:
     CPPUNIT_TEST(testXltxExport);
     CPPUNIT_TEST(testRotatedImageODS);
     CPPUNIT_TEST(testTdf128976);
+    CPPUNIT_TEST(testTdf120502);
 
     CPPUNIT_TEST_SUITE_END();
 
@@ -4585,6 +4588,46 @@ void ScExportTest::testTdf128976()
     xDocSh->DoClose();
 }
 
+void ScExportTest::testTdf120502()
+{
+    // Create an empty worksheet; resize last column on its first sheet; export to XLSX, and check
+    // that the last exportd column number is correct
+    css::uno::Reference<css::frame::XDesktop2> xDesktop
+        = css::frame::Desktop::create(comphelper::getProcessComponentContext());
+    CPPUNIT_ASSERT(xDesktop);
+
+    css::uno::Sequence<css::beans::PropertyValue> args(1);
+    args[0].Name = "Hidden";
+    args[0].Value <<= true;
+
+    css::uno::Reference<css::lang::XComponent> xComponent
+        = xDesktop->loadComponentFromURL("private:factory/scalc", "_blank", 0, args);
+    CPPUNIT_ASSERT(xComponent);
+
+    // Get the document model
+    SfxObjectShell* pFoundShell = SfxObjectShell::GetShellFromComponent(xComponent);
+    CPPUNIT_ASSERT_MESSAGE("Failed to access document shell", pFoundShell);
+
+    ScDocShellRef xShell = dynamic_cast<ScDocShell*>(pFoundShell);
+    CPPUNIT_ASSERT(xShell);
+
+    ScDocument& rDoc = xShell->GetDocument();
+    const SCCOL nMaxCol = rDoc.MaxCol(); // 0-based
+
+    const auto nOldWidth = rDoc.GetColWidth(nMaxCol, 0);
+    rDoc.SetColWidth(nMaxCol, 0, nOldWidth + 100);
+
+    std::shared_ptr<utl::TempFile> pXPathFile
+        = ScBootstrapFixture::exportTo(&(*xShell), FORMAT_XLSX);
+    xShell->DoClose();
+    const xmlDocPtr pSheet1
+        = XPathHelper::parseExport(pXPathFile, m_xSFactory, "xl/worksheets/sheet1.xml");
+    CPPUNIT_ASSERT(pSheet1);
+
+    // This was 1025 when nMaxCol+1 was 1024
+    assertXPath(pSheet1, "/x:worksheet/x:cols/x:col", "max", OUString::number(nMaxCol + 1));
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(ScExportTest);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sc/source/filter/excel/xetable.cxx b/sc/source/filter/excel/xetable.cxx
index 3e8ffb13bdef..0a7e5cbfbbed 100644
--- a/sc/source/filter/excel/xetable.cxx
+++ b/sc/source/filter/excel/xetable.cxx
@@ -1681,11 +1681,6 @@ void XclExpColinfo::WriteBody( XclExpStream& rStrm )
 
 void XclExpColinfo::SaveXml( XclExpXmlStream& rStrm )
 {
-    // if last column is equal to last possible column, Excel adds one more
-    sal_uInt16 nLastXclCol = mnLastXclCol;
-    if( nLastXclCol == static_cast< sal_uInt16 >( rStrm.GetRoot().GetMaxPos().Col() ) )
-        ++nLastXclCol;
-
     const double nExcelColumnWidth = mnScWidth  / static_cast< double >( sc::TwipsToHMM( GetCharWidth() ) );
 
     // tdf#101363 In MS specification the output value is set with double precision after delimiter:
@@ -1703,7 +1698,7 @@ void XclExpColinfo::SaveXml( XclExpXmlStream& rStrm )
             XML_customWidth,    ToPsz( mbCustomWidth ),
             XML_hidden,         ToPsz( ::get_flag( mnFlags, EXC_COLINFO_HIDDEN ) ),
             XML_outlineLevel,   OString::number(mnOutlineLevel),
-            XML_max,            OString::number(nLastXclCol + 1),
+            XML_max,            OString::number(mnLastXclCol + 1),
             XML_min,            OString::number(mnFirstXclCol + 1),
             // OOXTODO: XML_phonetic,
             XML_style,          lcl_GetStyleId(rStrm, maXFId.mnXFIndex),
commit 11ab8389d4a2a05c18d23160e0ec51d559a75918
Author:     Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
AuthorDate: Wed Jan 8 15:42:43 2020 +0100
Commit:     Gerrit Code Review <gerrit at gerrit.libreoffice.org>
CommitDate: Wed Jan 8 15:42:43 2020 +0100

    Update git submodules
    
    * Update helpcontent2 from branch 'libreoffice-6-4'
      to daea7016dd2410de8a610cc63a6ab3d84b256c52
      - avoid unnecessary change in po files due to use of spaces to indent
    
        po file extraction would strip tabs, but keeps spaces when extracting
        strings.
    
        Change-Id: I2947b12787f52f65ef9981ba6a9c9ffdee503a6b
        (cherry picked from commit 9fc4da0db94a4d06ab31ada262551a0a28f2859e)

diff --git a/helpcontent2 b/helpcontent2
index b69d4fce04ce..daea7016dd24 160000
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit b69d4fce04ce452840f9c4fbe0de83e7316b5900
+Subproject commit daea7016dd2410de8a610cc63a6ab3d84b256c52
commit 95d7d13205c05c2114a6d3bc2c4538246b22f3e0
Author:     Tomáš Chvátal <tchvatal at suse.com>
AuthorDate: Wed Jan 8 13:25:05 2020 +0100
Commit:     Adolfo Jayme Barrientos <fitojb at ubuntu.com>
CommitDate: Wed Jan 8 15:40:41 2020 +0100

    tdf#129879 Fix wrong order of buttons
    
    Change-Id: I0cb135c5b8298fd7c5579673d0eaff7068a03842
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86426
    Tested-by: Jenkins
    Reviewed-by: Tomáš Chvátal <tchvatal at suse.com>
    Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>

diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index 981ac621aa60..9c5a36304a21 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -718,8 +718,8 @@ static int getButtonPriority(const OString &rType)
     const OUString &rEnv = Application::GetDesktopEnvironment();
 
     if (rEnv.equalsIgnoreAsciiCase("windows") ||
-        rEnv.equalsIgnoreAsciiCase("tde") ||
-        rEnv.startsWithIgnoreAsciiCase("kde"))
+        rEnv.equalsIgnoreAsciiCase("lxqt") ||
+        rEnv.startsWithIgnoreAsciiCase("plasma"))
     {
         pOrder = &aSaveDiscardCancel[0];
     }
commit 46b469d58a0e6b8fbe5888045c272159154a0705
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Wed Jan 8 11:12:08 2020 +0100
Commit:     Michael Stahl <michael.stahl at cib.de>
CommitDate: Wed Jan 8 14:48:57 2020 +0100

    pyuno: fix build against system-python-3.6
    
    pyuno/source/module/pyuno_runtime.cxx:984:57: error: use of undeclared identifier 'PyThread_get_thread_ident'
    
    It's only an assert, so simply do it only for >=3.7.
    
    Change-Id: Ia3fffc7a9af30780adff9bc7dbabe1727c1f8f54
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86410
    Reviewed-by: Michael Stahl <michael.stahl at cib.de>
    Tested-by: Jenkins
    (cherry picked from commit fb4e15a89d8d8f081c0c152e5047bc0e76870b39)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86421
    Tested-by: Michael Stahl <michael.stahl at cib.de>

diff --git a/pyuno/source/module/pyuno_runtime.cxx b/pyuno/source/module/pyuno_runtime.cxx
index 5fa923c236dc..e0987cd63cd7 100644
--- a/pyuno/source/module/pyuno_runtime.cxx
+++ b/pyuno/source/module/pyuno_runtime.cxx
@@ -979,9 +979,11 @@ PyThreadAttach::PyThreadAttach( PyInterpreterState *interp)
     // note: *may* be called recursively, with PyThreadDetach between  - in
     // that case, don't create *new* PyThreadState but reuse!
 #ifndef NDEBUG
+#if PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION >= 7
     PyThreadState const*const current = _PyThreadState_UncheckedGet();
     // dereference isn't safe but let's hope it's tolerable for debugging purpose
     assert((current == nullptr || current->thread_id != PyThread_get_thread_ident()) && "recursive PyThreadAttach");
+#endif
 #endif
     tstate = PyGILState_GetThisThreadState(); // from TLS, possibly detached
     if (!tstate)
commit e4b8fc7563087e82a659f6b697a986b53e51876c
Author:     Szabolcs Toth <szabolcs450 at gmail.com>
AuthorDate: Tue Dec 17 16:06:30 2019 +0100
Commit:     Xisco Faulí <xiscofauli at libreoffice.org>
CommitDate: Wed Jan 8 14:43:54 2020 +0100

    tdf#129450 DOCX import: fix bottom border of 1-row tables
    
    Bottom border was missing in a 1-row table with disabled
    inside borders. This happened because LO applied the empty
    horizontal borders to the bottom border of the table.
    
    Change-Id: I40140bf63297189edad13088f98fc5f869969c2d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85303
    Reviewed-by: László Németh <nemeth at numbertext.org>
    Tested-by: László Németh <nemeth at numbertext.org>
    (cherry picked from commit 6b1bd2699b0bdad6dc42db741dea0717cf7c1d36)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86397
    Tested-by: Jenkins
    Reviewed-by: Xisco Faulí <xiscofauli at libreoffice.org>

diff --git a/sw/qa/extras/ooxmlexport/data/tdf129450_BottomBorder.docx b/sw/qa/extras/ooxmlexport/data/tdf129450_BottomBorder.docx
new file mode 100644
index 000000000000..df00bfe04421
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf129450_BottomBorder.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
index 8e7a7149292e..4511509e69cd 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
@@ -1036,6 +1036,18 @@ DECLARE_OOXMLEXPORT_TEST(testRightBorder, "tdf129442_RightBorder.docx")
     assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[1]/w:tc/w:tcPr/w:tcBorders/w:end [@w:val = 'nil']", 0);
 }
 
+DECLARE_OOXMLEXPORT_TEST(testBottomBorder, "tdf129450_BottomBorder.docx")
+{
+    // tdf#129450: Missing bottom border in one row table.
+
+    xmlDocPtr pXmlDocument = parseExport("word/document.xml");
+    if (!pXmlDocument)
+        return;
+
+    // If there is no bottom border, it is shown in tcBorders.
+    assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr/w:tc[1]/w:tcPr/w:tcBorders/w:bottom [@w:val = 'nil']", 0);
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
index 21472dc0eddf..b3bd18de4931 100644
--- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
@@ -835,6 +835,11 @@ CellPropertyValuesSeq_t DomainMapperTableHandler::endTableGetCellProperties(Tabl
                 {
                     rInfo.pTableBorders->Erase(META_PROP_VERTICAL_BORDER);
                 }
+                // Do not apply horizontal borders to a one row table.

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list