<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:mikekaganski@hotmail.com" title="Mike Kaganski <mikekaganski@hotmail.com>"> <span class="fn">Mike Kaganski</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - External links don't saved as relative in xls"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=90299">bug 90299</a>
          <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Keywords</td>
           <td>
                
           </td>
           <td>difficultyBeginner, easyHack, skillCpp
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - External links don't saved as relative in xls"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=90299#c18">Comment # 18</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - External links don't saved as relative in xls"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=90299">bug 90299</a>
              from <span class="vcard"><a class="email" href="mailto:mikekaganski@hotmail.com" title="Mike Kaganski <mikekaganski@hotmail.com>"> <span class="fn">Mike Kaganski</span></a>
</span></b>
        <pre>Code pointer:

The path is saved in XclExpSupbook::WriteBody, using maUrlEncoded.

The encoding of the URL for storing to BIFF happens in lclEncodeDosUrl
(sc/source/filter/excel/xehelper.cxx).

The latter *unconditionally* tries to store *drive* relative to base, but *does
not* try to save directory path relatively.

There is XclImpUrlHelper::DecodeUrl in sc/source/filter/excel/xihelper.cxx,
that does the opposite cf. to lclEncodeDosUrl.

Basically the task of the easy hack is: check with an Excel-generated XLS
containing a relative reference, what arrives to XclImpUrlHelper::DecodeUrl;
then implement passing the value of XclExpRoot::IsRelUrl() down to
lclEncodeDosUrl; and then in the latter, implement proper generation of
relative address depending on the passed IsRelUrl value.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>