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.
I absolutely agree, a major enhancement, brinning down walls for the future, but looks to me like a great challenge.
(In reply to Mike Kaganski from comment #0)
> 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).
Additional, in the dialog Hyperlink a check absolute/relative should be offered (of course showing the same behavior on links that cannot be relative).
(In reply to Cor Nouws from comment #2)
> Additional, in the dialog Hyperlink a check absolute/relative should be
> offered (of course showing the same behavior on links that cannot be
Additional2: one can also create links by
- Paste special > DDE
In any case in a recent daily on Linux it work at least from
- Calc to Writer - resulting in a table, and
- Writer to Writer - resulting in a read only section
Both links may be approached/edited via Edit > Links.
- Dragging from the Navigator
If in the list below a file is opened, different than the one being
edited, one can drag various elements to the active document.
Drag Mode includes As Link and As Hyperlink.
- in Writer one can drag (at least) headers and sections
dragging as Link results in a protected section
the links may be approached/edited via Edit > Links.
dragging as Hyperlink results in a hyperlink
- in Calc one can drag (at least) sheets and named ranges
dragging as Hyperlink is the only one that I can select (in master)
NB 1. Edit > Links allows to edit linked images (local, web) and linked sections in other documents, and DDE links.
NB 2. On DDE links: https://bugs.documentfoundation.org/show_bug.cgi?id=109283#c7
NB 3. Not pretending to cover all details, but I think I have mentioned most)
I am so! grateful for these suggestions.. :)
I only propose enhancements -- of this behavior -- in a separate "bug report" because this one is already complete and self-containing.
by enhancement suggestion was filed (now) as: "Bug 117098", and I referred to this suggestion in it.
thank you, and thanks to the developers for LibreO and Writer !! :)
General acceptance, so go for it. The less weird options we have the better.