[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - sw/qa sw/source

László Németh (via logerrit) logerrit at kemper.freedesktop.org
Fri Jun 14 13:49:10 UTC 2019


 sw/qa/extras/ooxmlexport/data/tdf115212.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport11.cxx   |    7 +++++++
 sw/source/filter/ww8/docxattributeoutput.cxx |    2 ++
 3 files changed, 9 insertions(+)

New commits:
commit caaeb47ad235a1e8eabe0a0cd97f096d38db2a95
Author:     László Németh <nemeth at numbertext.org>
AuthorDate: Wed Jun 5 14:30:53 2019 +0200
Commit:     Xisco Faulí <xiscofauli at libreoffice.org>
CommitDate: Fri Jun 14 15:48:10 2019 +0200

    tdf#115212 DOCX export: fix ToC with tracked deletion
    
    Removing part of Table of Contents with tracked deletion
    resulted broken DOCX export, ie. unrecoverable and
    uneditable document in MSO.
    
    Change-Id: If5972b2c9fb967819b7be889e0a3efb3714e670b
    Reviewed-on: https://gerrit.libreoffice.org/73550
    Tested-by: Jenkins
    Reviewed-by: László Németh <nemeth at numbertext.org>
    (cherry picked from commit f9fd82ffa2ccb0e506f44586289ac8b3e1001b38)
    Reviewed-on: https://gerrit.libreoffice.org/73877
    Reviewed-by: Xisco Faulí <xiscofauli at libreoffice.org>

diff --git a/sw/qa/extras/ooxmlexport/data/tdf115212.docx b/sw/qa/extras/ooxmlexport/data/tdf115212.docx
new file mode 100644
index 000000000000..1a44fbd7764a
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf115212.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
index 3864ecede42f..df83dab157fb 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
@@ -862,6 +862,13 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf70234, "tdf70234.docx")
     assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:del/w:r/w:delInstrText");
 }
 
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf115212, "tdf115212.docx")
+{
+    xmlDocPtr pXmlDoc = parseExport("word/document.xml");
+    // export field with tracked deletion
+    assertXPath(pXmlDoc, "//w:p[2]/w:del[1]/w:r[1]/w:fldChar");
+}
+
 DECLARE_OOXMLEXPORT_TEST(testTdf118691, "tdf118691.docx")
 {
     uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 0dbe8253cf36..f2c30c2eb654 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -1390,7 +1390,9 @@ void DocxAttributeOutput::EndRun(const SwTextNode* pNode, sal_Int32 nPos, bool /
         // Add the fields starts for hyperlinks, TOCs and index marks
         if ( pIt->bOpen && !pIt->pField )
         {
+            StartRedline( m_pRedlineData );
             StartField_Impl( pNode, nPos, *pIt, true );
+            EndRedline( m_pRedlineData );
 
             if (m_startedHyperlink)
                 ++m_nFieldsInHyperlink;


More information about the Libreoffice-commits mailing list