tdf#70234 DOCX: import tracked deletion of fields

Deleted fields in tracked changes, for example page
number fields, imported as not deleted text fields.

Change-Id: Id35c3ad7d293039fc8a2d0b564572dc459a25d0f
Reviewed-on: https://gerrit.libreoffice.org/73397
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
This commit is contained in:
László Németh
2019-06-03 17:26:16 +02:00
parent 9dd38cacea
commit d160bca0dc
3 changed files with 8 additions and 0 deletions

Binary file not shown.

View File

@@ -849,6 +849,13 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTrackChangesEmptyParagraphsInADeletion,
assertXPath(pXmlDoc, "/w:document/w:body/w:p[" + OString::number(i) + "]/w:pPr/w:rPr/w:del");
}
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf70234, "tdf70234.docx")
{
xmlDocPtr pXmlDoc = parseExport("word/document.xml");
// import fields with tracked deletion
assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:del/w:r/w:fldChar");
}
DECLARE_OOXMLEXPORT_TEST(testTdf118691, "tdf118691.docx")
{
uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);

View File

@@ -5195,6 +5195,7 @@ void DomainMapper_Impl::PopFieldContext()
aMap.InsertProps(m_pLastCharacterContext);
aMap.InsertProps(m_aFieldStack.top()->getProperties());
appendTextContent(xToInsert, aMap.GetPropertyValues());
CheckRedline( xToInsert->getAnchor( ) );
}
else
{