Kaydet (Commit) 4002fae0 authored tarafından Ravindra Vidhate's avatar Ravindra Vidhate Kaydeden (comit) Miklos Vajna

fdo#79062 File having Footnote with Text Effect got corrupted after RT

When we do the export of the file, In the footnotes.xml,
 the w14 namespaces were not being added.

This issue exists for EndNotes as well.

Change-Id: I6494bbf1beaa0666743d9c1bb85a64f8bda20398
Reviewed-on: https://gerrit.libreoffice.org/9439Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
Tested-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
üst bce3a0a6
...@@ -3512,6 +3512,19 @@ DECLARE_OOXMLEXPORT_TEST(testFdo78910, "fdo78910.docx") ...@@ -3512,6 +3512,19 @@ DECLARE_OOXMLEXPORT_TEST(testFdo78910, "fdo78910.docx")
assertXPath ( pXmlDoc, "//w:hyperlink[2]/w:r[5]/w:fldChar", "fldCharType", "end" ); assertXPath ( pXmlDoc, "//w:hyperlink[2]/w:r[5]/w:fldChar", "fldCharType", "end" );
} }
DECLARE_OOXMLEXPORT_TEST(testFDO79062, "fdo79062.docx")
{
xmlDocPtr pXmlFootNotes = parseExport("word/footnotes.xml");
if (!pXmlFootNotes)
return;
assertXPath(pXmlFootNotes, "/w:footnotes", "Ignorable", "w14 wp14");
xmlDocPtr pXmlEndNotes = parseExport("word/endnotes.xml");
if (!pXmlEndNotes)
return;
assertXPath(pXmlEndNotes, "/w:endnotes", "Ignorable", "w14 wp14");
}
DECLARE_OOXMLEXPORT_TEST(testFdo78957, "fdo78957.docx") DECLARE_OOXMLEXPORT_TEST(testFdo78957, "fdo78957.docx")
{ {
xmlDocPtr pXmlHeader = parseExport("word/header2.xml"); xmlDocPtr pXmlHeader = parseExport("word/header2.xml");
......
...@@ -6040,10 +6040,7 @@ void DocxAttributeOutput::FootnotesEndnotes( bool bFootnotes ) ...@@ -6040,10 +6040,7 @@ void DocxAttributeOutput::FootnotesEndnotes( bool bFootnotes )
sal_Int32 nBody = bFootnotes? XML_footnotes: XML_endnotes; sal_Int32 nBody = bFootnotes? XML_footnotes: XML_endnotes;
sal_Int32 nItem = bFootnotes? XML_footnote: XML_endnote; sal_Int32 nItem = bFootnotes? XML_footnote: XML_endnote;
m_pSerializer->startElementNS( XML_w, nBody, m_pSerializer->startElementNS( XML_w, nBody, m_rExport.MainXmlNamespaces(m_pSerializer) );
FSNS( XML_xmlns, XML_w ), "http://schemas.openxmlformats.org/wordprocessingml/2006/main",
FSNS( XML_xmlns, XML_r ), "http://schemas.openxmlformats.org/officeDocument/2006/relationships",
FSEND );
sal_Int32 nIndex = 0; sal_Int32 nIndex = 0;
......
...@@ -246,9 +246,6 @@ private: ...@@ -246,9 +246,6 @@ private:
/// Write word/embeddings/Worksheet[n].xlsx /// Write word/embeddings/Worksheet[n].xlsx
void WriteEmbeddings(); void WriteEmbeddings();
/// All xml namespaces to be used at the top of any text .xml file (main doc, headers, footers,...)
sax_fastparser::XFastAttributeListRef MainXmlNamespaces( sax_fastparser::FSHelperPtr serializer );
/// Get background color of the document, if there is one. /// Get background color of the document, if there is one.
boost::optional<const SvxBrushItem*> getBackground(); boost::optional<const SvxBrushItem*> getBackground();
...@@ -256,6 +253,9 @@ private: ...@@ -256,6 +253,9 @@ private:
bool isMirroredMargin(); bool isMirroredMargin();
public: public:
/// All xml namespaces to be used at the top of any text .xml file (main doc, headers, footers,...)
sax_fastparser::XFastAttributeListRef MainXmlNamespaces( sax_fastparser::FSHelperPtr serializer );
/// FIXME this is temporary, remotely reminding the method of the same /// FIXME this is temporary, remotely reminding the method of the same
/// name in WW8Export. /// name in WW8Export.
void WriteMainText(); void WriteMainText();
......
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