sw/qa/extras/ooxmlexport/data/SdtContent.docx |binary sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 8 ++++++++ sw/source/filter/ww8/docxattributeoutput.cxx | 6 +++--- 3 files changed, 11 insertions(+), 3 deletions(-)
New commits: commit d9de57dd2acc4719f846e908284ed81f09856098 Author: Rajashri <rajashri.udh...@synerzip.com> Date: Thu Apr 24 14:44:33 2014 +0530 fdo#77713 : File Corruption - Header.xml Document containing track changes within a SDT content is getting corrupted. Reason for corruption: In export side,parent tag [SDT] is getting closed before child tag ['del' tag]. The corruption is resolved now. Change-Id: I42451495f80e30ddfebab8b81bcf1e309b0c2ca2 Reviewed-on: https://gerrit.libreoffice.org/9146 Reviewed-by: Miklos Vajna <vmik...@collabora.co.uk> Tested-by: Miklos Vajna <vmik...@collabora.co.uk> diff --git a/sw/qa/extras/ooxmlexport/data/SdtContent.docx b/sw/qa/extras/ooxmlexport/data/SdtContent.docx new file mode 100644 index 0000000..91e0ef0 Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/SdtContent.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index f33771f..5dc3bcf 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -2947,6 +2947,14 @@ DECLARE_OOXMLEXPORT_TEST(testlvlPicBulletId, "lvlPicBulletId.docx") assertXPath(pXmlDoc, "/w:numbering[1]/w:abstractNum[1]/w:lvl[1]/w:lvlPicBulletId[1]", 0); } +DECLARE_OOXMLEXPORT_TEST(testSdtContent, "SdtContent.docx") +{ + xmlDocPtr pXmlDoc = parseExport("word/header1.xml"); + if (!pXmlDoc) + return; + assertXPath(pXmlDoc, "/w:hdr[1]/w:p[1]/w:sdt[1]/w:sdtContent[1]/w:del[1]"); +} + DECLARE_OOXMLEXPORT_TEST(testCitation,"FDO74775.docx") { xmlDocPtr pXmlDoc = parseExport(); diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 27835b3..3321999 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -836,6 +836,9 @@ void DocxAttributeOutput::EndRun() // append the actual run end m_pSerializer->endElementNS( XML_w, XML_r ); + // if there is some redlining in the document, output it + EndRedline( m_pRedlineData ); + // enclose in a sdt block, if necessary WriteSdtBlock( m_nRunSdtPrToken, m_pRunSdtPrTokenChildren, m_pRunSdtPrDataBindingAttrs ); m_pSerializer->mergeTopMarks(); @@ -848,9 +851,6 @@ void DocxAttributeOutput::EndRun() WritePendingPlaceholder(); - // if there is some redlining in the document, output it - EndRedline( m_pRedlineData ); - m_pRedlineData = NULL; if ( m_closeHyperlinkInThisRun ) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits