<html>
<head>
<base href="https://bugs.documentfoundation.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_UNCONFIRMED "
title="UNCONFIRMED - Change the way to define relative vs absolute URLs"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=111957">111957</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Change the way to define relative vs absolute URLs
</td>
</tr>
<tr>
<th>Product</th>
<td>LibreOffice
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>UNCONFIRMED
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Component</th>
<td>LibreOffice
</td>
</tr>
<tr>
<th>Assignee</th>
<td>libreoffice-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>mikekaganski@hotmail.com
</td>
</tr></table>
<p>
<div>
<pre>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
<a class="bz_bug_link
bz_status_NEW "
title="NEW - Link from calc to writer with relative-path"
href="show_bug.cgi?id=47223">bug 47223</a>.
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.</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>