[Libreoffice-bugs] [Bug 111957] New: Change the way to define relative vs absolute URLs

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Tue Aug 22 06:25:54 UTC 2017


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

            Bug ID: 111957
           Summary: Change the way to define relative vs absolute URLs
           Product: LibreOffice
           Version: unspecified
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: medium
         Component: LibreOffice
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: mikekaganski at hotmail.com

Currently, LibreOffice has selectors under Options-Load/Save-General that
define if links are saved relative or absolute: "Save URLs relative to file
system" and "Save URLs relative to internet".

However, these are IMO absolutely backwards way to do it. We don't need to
define how the different URLs are saved, but how they are *created*. We need a
way to precisely control the type of a specific URL when it is created and at
any later time, not some option that modifies all (possibly unknown to user)
places in document at the saving time.

An existing link that was imported when a document was open should not change
its type based on user's general settings when the edited document is saved,
unless user has changed it explicitly. User should have means to define that
some subset of links is relative, while another subset is absolute. And so on.

So, my proposal is specifically as follows.
1. Change the internal model representation of links in program to keep the
type (relative/absolute) with the reference during the lifetime of the document
model.
2. When a document is loaded, determine the type of each link (based on the
link URL) and store in the field introduced in #1.
3. Change the currently-existing (above-mentioned) settings to "*Create* URLs
relative to file system" and "*Create* URLs relative to internet" and make
their function be effective for newly-created links only (at the creation
time), so that one could toggle the setting, create some links of one type,
then toggle the setting again and continue creating links of another type.
4. Add a UI for changing types of selected links. It might be a context menu
entry or a toolbar button. The UI element must disable itself if the selected
link cannot be made relative (e.g., the document we are editing is not saved
yet, or the document path and link path point to different hosts).
5. Also add a command to mass-change all existing links type.
6. Expand the above functions to currently unsupported links, like the one in
bug 47223.

This does not require to change the ODF standard, does not introduce any
incompatibility, it just needs to change the program logic and enables much
more flexible workflow.

-- 
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/20170822/fcba2eb4/attachment-0001.html>


More information about the Libreoffice-bugs mailing list