Kaydet (Commit) 6d73c5d7 authored tarafından Vinaya Mandke's avatar Vinaya Mandke Kaydeden (comit) Miklos Vajna

fdo#78651 DOCX Incorrect export of nested Tables

As the m_oldTableReference->m_pOldTablepInner was not cleared
the same tabled was incorrectly nested with itself.

Another issue was that the same table was mirrored in RT file
as LO was trying to export a Section break within a table cell.

Conflicts:
	sw/qa/extras/ooxmlexport/ooxmlexport.cxx

Reviewe on:
	https://gerrit.libreoffice.org/9361

Change-Id: I09b730a10f1a0bc4434050e0078aeab3185de817
üst c39bb97e
......@@ -3377,6 +3377,16 @@ DECLARE_OOXMLEXPORT_TEST(testfdo78300,"fdo78300.docx")
0);
}
DECLARE_OOXMLEXPORT_TEST(testFdo78651, "fdo78651.docx")
{
xmlDocPtr pXmlDoc = parseExport("word/document.xml");
if (!pXmlDoc)
return;
// ensure that there are only two tables
assertXPath(pXmlDoc, "//w:tbl", 2);
}
#endif
CPPUNIT_PLUGIN_IMPLEMENT();
......
......@@ -2553,6 +2553,7 @@ void DocxAttributeOutput::switchHeaderFooter(bool isHeaderFooter, sal_Int32 inde
//Reset the oldReference, after copying it back to the original.
m_oldTableReference->m_bTableCellOpen = false ;
m_oldTableReference->m_nTableDepth = 0;
m_oldTableReference->m_pOldTablepInner.reset();
}
}
......
......@@ -434,6 +434,13 @@ void MSWordExportBase::OutputSectionBreaks( const SfxItemSet *pSet, const SwNode
the RT files with different first page being set.
*/
bNewPageDesc = false;
/*
* If Table cell is open and page header types are different
* set pSet to NULL as we don't want to add any section breaks.
*/
if ( isCellOpen && ( pAktPageDesc->GetName() != pPageDesc->GetName() ) )
pSet = NULL;
}
else
{
......
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