summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/qa/extras/ooxmlexport/data/cp1000015.odtbin0 -> 8044 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport.cxx9
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx6
3 files changed, 12 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 fd1c30aea46b..798336000437 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 d7c008fac99a..15e2c558f519 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()