<div>Hi,</div><div><br></div><div>Related to this bug.</div><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; "><a href="http://openoffice.org/bugzilla/show_bug.cgi?id=115297" target="_blank" style="color: rgb(0, 101, 204); ">http://openoffice.org/bugzilla/show_bug.cgi?id=115297</a></span><br>
<br><div class="gmail_quote">2011/5/20 Knut Olav Bøhmer <span dir="ltr">&lt;<a href="mailto:bohmer@gmail.com">bohmer@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
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>
</div></div></blockquote><div><br></div><div>The following was suppose to do</div><div>     if ( !bAbsolute )<br></div><div> insted of </div><div>     if ( bAbsolute )<br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div><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>
</blockquote></div><br><br clear="all"><br>-- <br>Knut Olav Bøhmer<br>