[Libreoffice-commits] core.git: sw/qa writerfilter/source

László Németh (via logerrit) logerrit at kemper.freedesktop.org
Mon Aug 26 13:24:55 UTC 2019


 sw/qa/extras/ooxmlexport/data/tdf105485.docx      |binary
 sw/qa/extras/ooxmlexport/ooxmlexport11.cxx        |    7 +++++++
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |    4 +++-
 3 files changed, 10 insertions(+), 1 deletion(-)

New commits:
commit 419b70b5d4db227509614bdea5b4b89bcf7a6032
Author:     László Németh <nemeth at numbertext.org>
AuthorDate: Fri Aug 23 16:10:20 2019 +0200
Commit:     László Németh <nemeth at numbertext.org>
CommitDate: Mon Aug 26 15:23:20 2019 +0200

    tdf#105485 DOCX: import deleted comments as deleted
    
    in tracked deletions, instead of importing them
    as normal comments of the actual text content,
    ie. showing them in the Hide Changes mode, too,
    without crossing out.
    
    Change-Id: I7f84d2e9f2dd280bbca2236b40bab83b94d40c68
    Reviewed-on: https://gerrit.libreoffice.org/78018
    Tested-by: Jenkins
    Reviewed-by: László Németh <nemeth at numbertext.org>

diff --git a/sw/qa/extras/ooxmlexport/data/tdf105485.docx b/sw/qa/extras/ooxmlexport/data/tdf105485.docx
new file mode 100644
index 000000000000..be8a10e41a04
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf105485.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
index b340666649ff..fc933a67df9c 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
@@ -883,6 +883,13 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf126245, "tdf126245.docx")
     assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:pPr/w:pPrChange/w:pPr/w:numPr/w:numId", "val", "1");
 }
 
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf105485, "tdf105485.docx")
+{
+    xmlDocPtr pXmlDoc = parseExport("word/document.xml");
+    // import change tracking of deleted comments
+    assertXPath(pXmlDoc, "//w:del/w:r/w:commentReference");
+}
+
 DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf125894, "tdf125894.docx")
 {
     xmlDocPtr pXmlDoc = parseExport("word/document.xml");
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index c78753545bfc..421e3af8bdc7 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -2284,7 +2284,9 @@ void DomainMapper_Impl::PopAnnotation()
         if (m_nAnnotationId == -1 || !m_aAnnotationPositions[m_nAnnotationId].m_xStart.is() || !m_aAnnotationPositions[m_nAnnotationId].m_xEnd.is())
         {
             uno::Sequence< beans::PropertyValue > aEmptyProperties;
-            appendTextContent( uno::Reference< text::XTextContent >( m_xAnnotationField, uno::UNO_QUERY_THROW ), aEmptyProperties );
+            uno::Reference< text::XTextContent > xContent( m_xAnnotationField, uno::UNO_QUERY_THROW );
+            appendTextContent( xContent, aEmptyProperties );
+            CheckRedline( xContent->getAnchor( ) );
         }
         else
         {


More information about the Libreoffice-commits mailing list