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

Miklos Vajna vmiklos at collabora.co.uk
Wed Nov 6 18:02:25 CET 2013


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

New commits:
commit 7813bd3113beb2b2860f9eb213c5c67ef54f5bf0
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
    
    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 1355f51..d137de54 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -1548,6 +1548,13 @@ DECLARE_OOXML_TEST(testFdo69644, "fdo69644.docx")
     assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tblGrid/w:gridCol", 5);
 }
 
+DECLARE_OOXML_TEST(testCp1000015, "cp1000015.odt")
+{
+    // Redline and hyperlink end got exported in an incorrect order.
+    getParagraph(1, "Hello.");
+    getParagraph(2, "http://www.google.com/");
+}
+
 #endif
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 8f5859f..bd49937 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -712,6 +712,9 @@ void DocxAttributeOutput::EndRun()
     WritePostponedMath();
     WritePendingPlaceholder();
 
+    // if there is some redlining in the document, output it
+    EndRedline();
+
     if ( m_closeHyperlinkInThisRun )
     {
         if ( m_startedHyperlink )
@@ -729,9 +732,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