summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVinaya Mandke <vinaya.mandke@synerzip.com>2014-05-13 18:19:52 +0530
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-05-18 11:22:49 +0200
commit6d73c5d748363173e73861ba46fcba36f04a1122 (patch)
tree82822d56c0bcb23a3b5a8264c7c57dbee337b2cb
parentc39bb97e475659b2007667d99914991b059b8841 (diff)
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
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo78651.docxbin0 -> 20283 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport.cxx10
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx1
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx7
4 files changed, 18 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/fdo78651.docx b/sw/qa/extras/ooxmlexport/data/fdo78651.docx
new file mode 100644
index 000000000000..a510782b4a3e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo78651.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index ebf2d336b833..795ec6735742 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -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();
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index aba33a41e64a..4c6c7d0b058c 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -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();
}
}
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index e3e4bccde762..93c06822d7f5 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -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
{