[Libreoffice-bugs] [Bug 90299] External links don't saved as relative in xls

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Fri Sep 10 10:50:19 UTC 2021


https://bugs.documentfoundation.org/show_bug.cgi?id=90299

Mike Kaganski <mikekaganski at hotmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |difficultyBeginner,
                   |                            |easyHack, skillCpp

--- Comment #18 from Mike Kaganski <mikekaganski at hotmail.com> ---
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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20210910/3e4e93e2/attachment.htm>


More information about the Libreoffice-bugs mailing list