summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2013-11-06 17:05:03 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2013-11-06 18:01:46 +0100
commit7813bd3113beb2b2860f9eb213c5c67ef54f5bf0 (patch)
tree373e19d27475709d26c8f1222a2604b6a5225662
parenteb3942a24918e9537c85cc79a405fff8c167d456 (diff)
cp#1000015 DOCX export: fix not-well-formed XML on redline end + hyperlink
Change-Id: I3a87a0277952ba0a422df8988151f8b14e166e06
-rw-r--r--sw/qa/extras/ooxmlexport/data/cp1000015.odtbin0 -> 8044 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport.cxx7
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx6
3 files changed, 10 insertions, 3 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/cp1000015.odt b/sw/qa/extras/ooxmlexport/data/cp1000015.odt
new file mode 100644
index 000000000000..7d8dc9f10712
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/cp1000015.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index 1355f51fb710..d137de545f12 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 8f5859fee635..bd49937610ed 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()