[Libreoffice-commits] core.git: sw/qa sw/source
Vinaya Mandke
vinaya.mandke at synerzip.com
Sun May 18 02:23:23 PDT 2014
sw/qa/extras/ooxmlexport/data/fdo78651.docx |binary
sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 10 ++++++++++
sw/source/filter/ww8/docxattributeoutput.cxx | 1 +
sw/source/filter/ww8/ww8atr.cxx | 7 +++++++
4 files changed, 18 insertions(+)
New commits:
commit 6d73c5d748363173e73861ba46fcba36f04a1122
Author: Vinaya Mandke <vinaya.mandke at synerzip.com>
Date: Tue May 13 18:19:52 2014 +0530
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
diff --git a/sw/qa/extras/ooxmlexport/data/fdo78651.docx b/sw/qa/extras/ooxmlexport/data/fdo78651.docx
new file mode 100644
index 0000000..a510782
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/fdo78651.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index ebf2d33..795ec67 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 aba33a4..4c6c7d0 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 e3e4bcc..93c0682 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
{
More information about the Libreoffice-commits
mailing list