sw/qa/extras/ooxmlexport/data/tdf124384.docx      |binary
 sw/qa/extras/ooxmlexport/ooxmlexport11.cxx        |    7 +++++++
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |    2 +-
 3 files changed, 8 insertions(+), 1 deletion(-)

New commits:
commit ad6f0e2dc8bc9ed9f12e57c4dd94e11f439e9c5f
Author:     Serge Krot <serge.k...@cib.de>
AuthorDate: Thu Mar 28 14:10:12 2019 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Fri Mar 29 22:25:34 2019 +0100

    tdf#124384 sw DOCX: fix crash during bibliography loading
    
    Change-Id: Ic0c4b6f7480a4c6c3f53bd04e285cb0cab172531
    Reviewed-on: https://gerrit.libreoffice.org/69888
    Tested-by: Jenkins
    Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de>
    (cherry picked from commit 8a76b845e0376fd39014d6180c78b863f373633f)
    Reviewed-on: https://gerrit.libreoffice.org/69933
    Reviewed-by: Caolán McNamara <caol...@redhat.com>
    Tested-by: Caolán McNamara <caol...@redhat.com>

diff --git a/sw/qa/extras/ooxmlexport/data/tdf124384.docx 
b/sw/qa/extras/ooxmlexport/data/tdf124384.docx
new file mode 100644
index 000000000000..a41be4b11574
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf124384.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
index f4a300bc50b3..906634c4da99 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
@@ -128,6 +128,13 @@ DECLARE_OOXMLEXPORT_TEST(testTdf63561_clearTabs2, 
"tdf63561_clearTabs2.docx")
     CPPUNIT_ASSERT_EQUAL(sal_Int32(4), getProperty< 
uno::Sequence<style::TabStop> >(getParagraph(4), "ParaTabStops").getLength());
 }
 
+DECLARE_OOXMLEXPORT_TEST(testTdf124384, "tdf124384.docx")
+{
+    // There should be no crash during loading of the document
+    // so, let's check just how much pages we have
+    CPPUNIT_ASSERT_EQUAL(1, getPages());
+}
+
 DECLARE_OOXMLEXPORT_TEST(testTdf121456_tabsOffset, "tdf121456_tabsOffset.odt")
 {
     for (int i=2; i<8; i++)
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 59f23b01faf1..dcacd18b55f7 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -515,7 +515,7 @@ void DomainMapper_Impl::SetSdt(bool bSdt)
 {
     m_bSdt = bSdt;
 
-    if (m_bSdt)
+    if (m_bSdt && !m_aTextAppendStack.empty())
     {
         m_xStdEntryStart = GetTopTextAppend()->getEnd();
     }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to