[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.1' - sw/qa sw/source

Miklos Vajna vmiklos at collabora.co.uk
Thu Nov 7 09:49:15 CET 2013


 sw/qa/extras/ooxmlexport/data/cp1000015.odt  |binary
 sw/qa/extras/ooxmlexport/ooxmlexport.cxx     |    9 +++++++++
 sw/source/filter/ww8/docxattributeoutput.cxx |    6 +++---
 3 files changed, 12 insertions(+), 3 deletions(-)

New commits:
commit b0e13125fc51d2eb549ec9d85cf1e0cd1dc05c3d
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Wed Nov 6 17:05:03 2013 +0100

    cp#1000015 DOCX export: fix not-well-formed XML on redline end + hyperlink
    
    (cherry picked from commit 7813bd3113beb2b2860f9eb213c5c67ef54f5bf0)
    
    Conflicts:
    	sw/qa/extras/ooxmlexport/ooxmlexport.cxx
    
    Change-Id: I3a87a0277952ba0a422df8988151f8b14e166e06

diff --git a/sw/qa/extras/ooxmlexport/data/cp1000015.odt b/sw/qa/extras/ooxmlexport/data/cp1000015.odt
new file mode 100644
index 0000000..7d8dc9f
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/cp1000015.odt differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index fd1c30a..7983360 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -75,6 +75,7 @@ public:
     void testFdo58577();
     void testFdo60990();
     void testBnc834035();
+    void testCp1000015();
 
     CPPUNIT_TEST_SUITE(Test);
 #if !defined(MACOSX) && !defined(WNT)
@@ -134,6 +135,7 @@ void Test::run()
         {"fdo58577.odt", &Test::testFdo58577},
         {"fdo60990.odt", &Test::testFdo60990},
         {"bnc834035.odt", &Test::testBnc834035},
+        {"cp1000015.odt", &Test::testCp1000015},
     };
     // Don't test the first import of these, for some reason those tests fail
     const char* aBlacklist[] = {
@@ -772,6 +774,13 @@ void Test::testBnc834035()
     assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:hyperlink", "anchor", "_Toc363553908");
 }
 
+void Test::testCp1000015()
+{
+    // Redline and hyperlink end got exported in an incorrect order.
+    getParagraph(1, "Hello.");
+    getParagraph(2, "http://www.google.com/");
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(Test);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 59440f5..2bc56ae 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -648,6 +648,9 @@ void DocxAttributeOutput::EndRun()
     WritePostponedMath();
     WritePendingPlaceholder();
 
+    // if there is some redlining in the document, output it
+    EndRedline();
+
     if ( m_closeHyperlinkInThisRun )
     {
         if ( m_startedHyperlink )
@@ -665,9 +668,6 @@ void DocxAttributeOutput::EndRun()
             delete m_Fields.front().pField;
         m_Fields.erase( m_Fields.begin( ) );
     }
-
-    // if there is some redlining in the document, output it
-    EndRedline();
 }
 
 void DocxAttributeOutput::WriteCommentRanges()


More information about the Libreoffice-commits mailing list