[Libreoffice-commits] core.git: sw/qa sw/source

Caolán McNamara caolanm at redhat.com
Wed Jun 17 05:43:38 PDT 2015


 sw/qa/extras/ooxmlexport/data/fdo60957-2.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport5.cxx     |    9 +++++++++
 sw/source/filter/ww8/docxattributeoutput.cxx  |    6 +++---
 3 files changed, 12 insertions(+), 3 deletions(-)

New commits:
commit 89c85a4b7674ddfd697d539d59d27176c683a46c
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Jun 17 13:21:23 2015 +0100

    fix crash on re-export of fdo60957-2.docx to docx
    
    Change-Id: I1a74a5f1877bfa72818ff0a38788eafe77eea581

diff --git a/sw/qa/extras/ooxmlexport/data/fdo60957-2.docx b/sw/qa/extras/ooxmlexport/data/fdo60957-2.docx
new file mode 100644
index 0000000..3819aaf
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/fdo60957-2.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
index dddbdee..0c215a9 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
@@ -849,6 +849,15 @@ DECLARE_OOXMLEXPORT_TEST(testOO72950, "ooo72950-1.odt")
         assertXPath(pXmlDoc, "//w:tbl", 1);
 }
 
+//There are two tables to export in this doc the second of which is inside a
+//frame anchored to first cell of the first table. They must not be
+//considered the same table
+DECLARE_OOXMLEXPORT_TEST(fdo60957, "fdo60957-2.docx")
+{
+    if (xmlDocPtr pXmlDoc = parseExport("word/document.xml"))
+        assertXPath(pXmlDoc, "//w:tbl", 2);
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 8db81f9..fd4af96 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -566,15 +566,15 @@ void DocxAttributeOutput::EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t pT
     // Write framePr
     if(!aFramePrTextbox.empty())
     {
-        ww8::WW8TableInfo::Pointer_t pOldTableInfo = m_rExport.m_pTableInfo;
         for (std::vector< boost::shared_ptr<sw::Frame> > ::iterator it = aFramePrTextbox.begin() ; it != aFramePrTextbox.end(); ++it)
         {
-            m_rExport.m_pTableInfo = ww8::WW8TableInfo::Pointer_t(new ww8::WW8TableInfo());
+            DocxTableExportContext aTableExportContext;
+            pushToTableExportContext(aTableExportContext);
             m_pCurrentFrame = it->get();
             m_rExport.SdrExporter().writeOnlyTextOfFrame(it->get());
             m_pCurrentFrame = NULL;
+            popFromTableExportContext(aTableExportContext);
         }
-        m_rExport.m_pTableInfo = pOldTableInfo;
         aFramePrTextbox.clear();
     }
     // Check for end of cell, rows, tables here


More information about the Libreoffice-commits mailing list