fdo#78886 File getting corrupted after Roundtrip due to fieldChar
In a hyperlink, extra field with fldCharType="end" is getting added even though there is no begin and separate fldCharType. When hyperlink is closing pageref was not set to false. Due to which LO was adding extra end fldCharType. Change-Id: I0f54ab03c38cec2888cf9a1638ec5435da90099c Reviewed-on: https://gerrit.libreoffice.org/9414 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
This commit is contained in:
committed by
Miklos Vajna
parent
80fd9fb720
commit
c5547beb47
BIN
sw/qa/extras/ooxmlexport/data/fdo78886.docx
Normal file
BIN
sw/qa/extras/ooxmlexport/data/fdo78886.docx
Normal file
Binary file not shown.
@@ -3437,6 +3437,15 @@ DECLARE_OOXMLEXPORT_TEST(testfdo78300,"fdo78300.docx")
|
||||
0);
|
||||
}
|
||||
|
||||
DECLARE_OOXMLEXPORT_TEST(testfdo78886, "fdo78886.docx")
|
||||
{
|
||||
xmlDocPtr pXmlDoc = parseExport("word/document.xml");
|
||||
if (!pXmlDoc)
|
||||
return;
|
||||
|
||||
assertXPath(pXmlDoc, "/w:document[1]/w:body[1]/w:tbl[2]/w:tr[1]/w:tc[1]/w:p[1]/w:hyperlink[1]/w:r[2]/w:fldChar[1]", 0);
|
||||
}
|
||||
|
||||
DECLARE_OOXMLEXPORT_TEST(testFdo78651, "fdo78651.docx")
|
||||
{
|
||||
xmlDocPtr pXmlDoc = parseExport("word/document.xml");
|
||||
|
@@ -802,6 +802,7 @@ void DocxAttributeOutput::EndRun()
|
||||
}
|
||||
m_pSerializer->endElementNS( XML_w, XML_hyperlink );
|
||||
m_startedHyperlink = false;
|
||||
m_endPageRef = false;
|
||||
m_nHyperLinkCount--;
|
||||
}
|
||||
m_closeHyperlinkInPreviousRun = false;
|
||||
|
Reference in New Issue
Block a user