Kaydet (Commit) d9de57dd authored tarafından Rajashri's avatar Rajashri Kaydeden (comit) Miklos Vajna

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/9146Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
Tested-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
üst c865de60
......@@ -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();
......
......@@ -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 )
......
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