Kaydet (Commit) 89c85a4b authored tarafından Caolán McNamara's avatar Caolán McNamara

fix crash on re-export of fdo60957-2.docx to docx

Change-Id: I1a74a5f1877bfa72818ff0a38788eafe77eea581
üst a58affd7
...@@ -849,6 +849,15 @@ DECLARE_OOXMLEXPORT_TEST(testOO72950, "ooo72950-1.odt") ...@@ -849,6 +849,15 @@ DECLARE_OOXMLEXPORT_TEST(testOO72950, "ooo72950-1.odt")
assertXPath(pXmlDoc, "//w:tbl", 1); 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(); CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -566,15 +566,15 @@ void DocxAttributeOutput::EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t pT ...@@ -566,15 +566,15 @@ void DocxAttributeOutput::EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t pT
// Write framePr // Write framePr
if(!aFramePrTextbox.empty()) 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) 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_pCurrentFrame = it->get();
m_rExport.SdrExporter().writeOnlyTextOfFrame(it->get()); m_rExport.SdrExporter().writeOnlyTextOfFrame(it->get());
m_pCurrentFrame = NULL; m_pCurrentFrame = NULL;
popFromTableExportContext(aTableExportContext);
} }
m_rExport.m_pTableInfo = pOldTableInfo;
aFramePrTextbox.clear(); aFramePrTextbox.clear();
} }
// Check for end of cell, rows, tables here // Check for end of cell, rows, tables here
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment