summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/ooxmlexport/data/footer-contain-hyperlink.docxbin0 -> 12150 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport.cxx12
-rw-r--r--sw/source/filter/ww8/wrtw8nds.cxx2
3 files changed, 13 insertions, 1 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/footer-contain-hyperlink.docx b/sw/qa/extras/ooxmlexport/data/footer-contain-hyperlink.docx
new file mode 100644
index 000000000000..27b00ed37ecb
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/footer-contain-hyperlink.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index 324838e25b43..194b7c6d582b 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -3629,6 +3629,18 @@ DECLARE_OOXMLEXPORT_TEST(testW14TextEffects_TextOutline, "TextEffects_TextOutlin
assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r[1]/w:rPr/w14:textOutline/w14:bevel", 1);
}
+DECLARE_OOXMLEXPORT_TEST(testFooterContainHyperlink,"footer-contain-hyperlink.docx")
+{
+ // Problem is that footer1.xml.rels contains the empty
+ // Target due to which the file get corrupted
+ // in MS Office 2007.
+ // Check for footer1.xml.rels file.
+ xmlDocPtr pXmlRels = parseExport("word/_rels/footer1.xml.rels");
+ if (!pXmlRels)
+ return;
+ // Check the value of Target which is http://www.google.com/.
+ assertXPath(pXmlRels,"/rels:Relationships/rels:Relationship","Target","http://www.google.com/");
+}
#endif
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index 645b82fef1ed..29da65dcb30f 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -810,7 +810,7 @@ bool AttributeOutputBase::AnalyzeURL( const OUString& rUrl, const OUString& /*rT
}
else
{
- INetURLObject aURL( rUrl );
+ INetURLObject aURL( rUrl, INET_PROT_NOT_VALID );
sURL = aURL.GetURLNoMark( INetURLObject::DECODE_UNAMBIGUOUS );
sMark = aURL.GetMark( INetURLObject::DECODE_UNAMBIGUOUS );
}