sw/qa/extras/ooxmlexport/data/tdf149711.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport12.cxx   |   11 +++++++++++
 sw/source/filter/ww8/docxattributeoutput.cxx |    2 ++
 3 files changed, 13 insertions(+)

New commits:
commit 1e0ea56691bee9bd44e657bb4dca77d29c43ec76
Author:     László Németh <nem...@numbertext.org>
AuthorDate: Tue Jul 12 17:53:55 2022 +0200
Commit:     László Németh <nem...@numbertext.org>
CommitDate: Wed Jul 13 09:25:56 2022 +0200

    tdf#149707 sw_redlinenum DOCX export: fix tracked moving of list items
    
    Change tracking of the paragraph mark of moved list items
    wasn't exported. I.e. moveFrom and moveTo paragraphs
    are exported as old paragraphs with new content, e.g. accepting
    a removed list item and rejecting an inserted list item leave
    empty list items instead removing the list items completely in MSO.
    
    Note: in Writer the import of the old (incomplete) DOCX export
    worked before this commit, too.
    
    Change-Id: I9367d880af16aab376178ab6d226b3013688997c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137005
    Tested-by: László Németh <nem...@numbertext.org>
    Reviewed-by: László Németh <nem...@numbertext.org>
    (cherry picked from commit 51c7eef3fea7278679d975f75df2e7b564516258)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136983
    Tested-by: Jenkins

diff --git a/sw/qa/extras/ooxmlexport/data/tdf149711.docx 
b/sw/qa/extras/ooxmlexport/data/tdf149711.docx
new file mode 100644
index 000000000000..d90efa7c1f88
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf149711.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
index 3d4d3934f425..284651d3a760 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
@@ -1368,6 +1368,17 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf149708)
     assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:pPr/w:rPr/w:ins");
 }
 
+CPPUNIT_TEST_FIXTURE(Test, testTdf149707)
+{
+    loadAndSave("tdf149711.docx");
+    xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:moveFrom");
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[4]/w:moveTo");
+    // These were missing
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:pPr/w:rPr/w:moveFrom");
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p[4]/w:pPr/w:rPr/w:moveTo");
+}
+
 CPPUNIT_TEST_FIXTURE(Test, testTdf70234)
 {
     loadAndSave("tdf70234.docx");
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index 34760189fa09..a3a91a77827e 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -2973,6 +2973,8 @@ void DocxAttributeOutput::InitCollectedRunProperties()
         FSNS( XML_w, XML_rPrChange ),
         FSNS( XML_w, XML_del ),
         FSNS( XML_w, XML_ins ),
+        FSNS( XML_w, XML_moveFrom ),
+        FSNS( XML_w, XML_moveTo ),
         FSNS( XML_w14, XML_glow ),
         FSNS( XML_w14, XML_shadow ),
         FSNS( XML_w14, XML_reflection ),

Reply via email to