diff options
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/hyperlink.docx | bin | 0 -> 12564 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 10 | ||||
-rw-r--r-- | sw/source/filter/ww8/docxattributeoutput.cxx | 1 |
3 files changed, 10 insertions, 1 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/hyperlink.docx b/sw/qa/extras/ooxmlexport/data/hyperlink.docx Binary files differnew file mode 100644 index 000000000000..5f5289790cb0 --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/hyperlink.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index 24d242b7c0e1..12abe5bf4a59 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -1718,6 +1718,16 @@ DECLARE_OOXML_TEST(testLineSpacingexport, "test_line_spacing.docx") assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:pPr/w:spacing", "line", "31680"); } +DECLARE_OOXML_TEST(testHyperlineIsEnd, "hyperlink.docx") +{ + // Check that the document.xml contents all the tag properly closed. + xmlDocPtr pXmlDoc = parseExport("word/document.xml"); + // If document.xml miss any ending tag then parseExport() returns NULL which fail the test case. + CPPUNIT_ASSERT(pXmlDoc) ; + // Check hyperlink is properly open. + assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:hyperlink",1); +} + #endif CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 2760f15826ca..881d9de7bde1 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -1232,7 +1232,6 @@ void DocxAttributeOutput::RunText( const OUString& rText, rtl_TextEncoding /*eCh if( m_closeHyperlinkInThisRun ) { m_closeHyperlinkInPreviousRun = true; - m_closeHyperlinkInThisRun = false; } // one text can be split into more <w:t>blah</w:t>'s by line breaks etc. |