diff options
author | Pallavi Jadhav <pallavi.jadhav@synerzip.com> | 2013-11-08 18:48:58 +0530 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2013-11-15 17:37:44 +0100 |
commit | 5cdd6d28d10d815c046b65db48847558259a1d1a (patch) | |
tree | f58b3026ccd825a026c32c0fc62727f47784a1e3 /sw/qa/extras/ooxmlexport/ooxmlexport.cxx | |
parent | 85ff539bb1b6fa90c16f80e44df5df0962521f72 (diff) |
LibreOffice Corrupts DOCX files containing Footnotes after Roundtrip
Issue :
1] Extra data was getting written into document.xml after
</w:document>
This includes :
1) <sectPr> tag
2) Paragraph tag of <w:footnote w:id="2"> from
footnotes.xml
2] This is leading to document corruption
Implementation :
1] Enabled a flag inside DocxAttributeOutput::FootnotesEndnotes
2] Check value of flag to decide whehter to write section
properties or not
Conflicts:
sw/qa/extras/ooxmlexport/ooxmlexport.cxx
sw/source/filter/ww8/docxattributeoutput.cxx
Reviewed on:
https://gerrit.libreoffice.org/6644
Change-Id: Iae53fd6bf12bcbac84846bd36823bc08f21f9edf
Diffstat (limited to 'sw/qa/extras/ooxmlexport/ooxmlexport.cxx')
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index d182180579b5..7c5738f30ea8 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -1878,6 +1878,16 @@ DECLARE_OOXML_TEST(testPNGImageCrop, "test_PNG_ImageCrop.docx") CPPUNIT_ASSERT_EQUAL( sal_Int32( 737 ), aGraphicCropStruct.Bottom ); } +DECLARE_OOXML_TEST(testFootnoteParagraphTag, "testFootnote.docx") +{ + /* In footnotes.xml, the paragraph tag inside <w:footnote w:id="2"> was getting written into document.xml. + * Check for, paragraph tag is correctly written into footnotes.xml. + */ + xmlDocPtr pXmlFootnotes = parseExport("word/footnotes.xml"); + assertXPath(pXmlFootnotes, "/w:footnotes/w:footnote[3]","id","2"); + assertXPath(pXmlFootnotes, "/w:footnotes/w:footnote[3]/w:p/w:r/w:rPr/w:rStyle","val","Footnotereference"); +} + #endif CPPUNIT_PLUGIN_IMPLEMENT(); |