Hi,<div><br></div><div>Exporting hyperlinks to .doc is done wrong in LibreOffice Writer. There is a flag (hlstmfIsAbsolute) that is set to 1. It should be 0, because all links are exported relative. </div><div><br></div><div>

<br></div><div>Before I make a patch, give me input on this.</div><div><br clear="all"><div>B - hlstmfIsAbsolute (1 bit): A bit that specifies whether this hyperlink is an absolute path or</div><div>relative path.</div><div>

Value Meaning</div><div>0 This hyperlink is a relative path.</div><div>1 This hyperlink is an absolute path.</div><div><br></div><div>The patch I have used for some time, that works for me and some hundred users is:</div>
<div><br></div><div>diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx<br>index 4db4999..d5f7327 100644<br>--- a/sw/source/filter/ww8/wrtw8nds.cxx<br>+++ b/sw/source/filter/ww8/wrtw8nds.cxx<br>
@@ -918,7 +918,7 @@ bool WW8AttributeOutput::StartURL( const String &amp;rUrl, const String &amp;rTarget )<br>     SwWW8Writer::WriteLong( *m_rWW8Export.pDataStrm, 0x00000002);<br>     sal_uInt32 nFlag = bBookMarkOnly ? 0 : 0x01;<br>
     if ( bAbsolute )<br>-        nFlag |= 0x02;<br>+        nFlag |= 0x00;<br>     if ( sMark.Len() )<br>         nFlag |= 0x08;<br>     SwWW8Writer::WriteLong( *m_rWW8Export.pDataStrm, nFlag );<br><br></div><div><br>But I guess a better patch would be (which I have not tested):<br>
<br>diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx<br>index 4db4999..d5f7327 100644<br>--- a/sw/source/filter/ww8/wrtw8nds.cxx<br>+++ b/sw/source/filter/ww8/wrtw8nds.cxx<br>@@ -918,7 +918,7 @@ bool WW8AttributeOutput::StartURL( const String &amp;rUrl, const String &amp;rTarget )<br>
     SwWW8Writer::WriteLong( *m_rWW8Export.pDataStrm, 0x00000002);<br>     sal_uInt32 nFlag = bBookMarkOnly ? 0 : 0x01;<br>     if ( bAbsolute )<br>-        nFlag |= 0x02;<br>+        nFlag |= 0x00;<br>     if ( sMark.Len() )<br>
         nFlag |= 0x08;<br>     SwWW8Writer::WriteLong( *m_rWW8Export.pDataStrm, nFlag );<br><br><br>Anyway, this is very easy to test for anyone.<br>1. Create a document with a hyperlink. <br>2. Save it as .doc<br>3. Open it in MS Word<br>
4. Ctrl Click on the link <br>5 and, look.. It does not work <br><br>6. Apply my patch<br>7. repeat point 1,2,3,4<br>8. and look.. It works :)<br><br><br></div>
<div><br></div>-- <br>Knut Olav Bøhmer<br>
</div>