Description: 1. Open Writer. Ensure your LibreOffice options are correct: Menu > Tools > Options > Load/Save > General > Save URLs relative to file system = True 2. Insert some linked image. The image should be in the same directory with the document. 3. Close Writer. Move the document with the image to some another directory. 4. Open Writer again. Ensure the image is visible. 5. Close Writer again. Move the image outside the directory. The image should not be visible in the document anymore. In case all these steps works correctly for you, you know that the image is really the linked one, and linked via _relative_ path. But then, if you look at this relative path, you will notice that it looks like the absolute one: Open image properties window > Open Image tab > See that the path in the File Name field looks as the absolute one. This issue leads to the following drawbacks: 1. First of all, this is just confusing. The user expect that relative paths should be displayed as relative. Therefore, when they see the relative path which looks like the absolute one, they think that this one is absolute. 2. In case the user need to change the relative paths into the absolute ones (or vice versa), and they already changed them, there will be no visual "signal" about this change. I.e. the paths "before" and "after" will look the same. 3. In case the relative paths will be displayed as relative (and absolute as absolute), it will be much more intuitive to change them. Something like: Click on the linked image > Find its path > change it from `./foo/bar.png` to `file:///C:/Users/John/Desktop/images/bar.png` Steps to Reproduce: - Actual Results: - Expected Results: - Reproducible: Always User Profile Reset: No Additional Info:
(In reply to John from comment #0) > 2. Insert some linked image. The image should be in the same directory with > the document. Please excuse me, but I don't know how to insert a linked image (I always insert an image with Insert => Image)
(In reply to Dieter Praas from comment #1) > (In reply to John from comment #0) > > > 2. Insert some linked image. The image should be in the same directory with > > the document. > > Please excuse me, but I don't know how to insert a linked image (I always > insert an image with Insert => Image) The File Open dialog should have a "[ ] Link" checkbox
Confirmed and seems like a useful request.
*** Bug 135506 has been marked as a duplicate of this bug. ***
*** Bug 139317 has been marked as a duplicate of this bug. ***
*** Bug 146064 has been marked as a duplicate of this bug. ***
There are alternate solutions which might be easier to implement. For example, on the properties dialog for the image, and/or on the file selection dialog, there should be a check box[es] for "relative"/"absolute" in addition to the current "link". Right now this behavior is controlled, apparently, by Menu/Tools/Options/LIbre Office/Load & Save/General - Save URLs relative to file system. What I suggested above would allow choice of relative/absolute by image. If that is too much trouble to implement, it would be sufficient to include a note on the properties dialog and the file selection dialog to the effect of "file link will be saved as [relative|absolute] according to global settings." (as the case may be). That only requires sending an extra 1 bit message to the dialogs, without the need to handle more user input. (It would be really nice if "global settings" were a hyperlink that opened the place to set it.) Many users on Windows or Mac might not even know what a relative path is, or the notation for it. If so, then a path such as "../../foo/myimage.jpg" might confuse them. Instead the properties dialog could say "file path resolves to:" There is also another problem with displaying the relative path. Until the document is saved, the target path for the document is not known. Presumably, the relative path that is written into the document is relative to the saved location.
By "target path for the document is not known" above, I mean the relative path that needs to be stored with the document, in case that was not clear.
(In reply to pb from comment #7) > There are alternate solutions which might be easier to implement. > > For example, on the properties dialog for the image, and/or on the file > selection dialog, there should be a check box[es] for "relative"/"absolute" > in addition to the current "link". > > Right now this behavior is controlled, apparently, by > Menu/Tools/Options/LIbre Office/Load & Save/General - Save URLs relative to > file system. > > What I suggested above would allow choice of relative/absolute by image. If > that is too much trouble to implement, it would be sufficient to include a > note on the properties dialog and the file selection dialog to the effect of > "file link will be saved as [relative|absolute] according to global > settings." (as the case may be). That only requires sending an extra 1 bit > message to the dialogs, without the need to handle more user input. It is helpfully to see and/or select the absolute path with the known file dialog window, and also see a check box [x] store as relative path, and then, if it is checked, see the resulting relative path. That is a user friendly solution. > > (It would be really nice if "global settings" were a hyperlink that opened > the place to set it.) > > Many users on Windows or Mac might not even know what a relative path is, or > the notation for it. If so, then a path such as "../../foo/myimage.jpg" > might confuse them. Instead the properties dialog could say "file path > resolves to:" Yes, that's why show the resulting relative path, only if [x] store relative is selected. A (stupid) user can now see what's happen, select and deselect, think about and look a little bit in internet what a relative path is. If the user cannot deal with it, one should deselect this option. But I guess that many users know about relative paths. > > There is also another problem with displaying the relative path. Until the > document is saved, the target path for the document is not known. > Presumably, the relative path that is written into the document is relative > to the saved location. This can be solved by an error message "Please save your document first" instead of displaying the resulting relative path
It is very important that a path can be written directly, not just with a file selection menu. In my experience, this is possible via the window's standard menu, and it is also possible to write immediately in the "Filename" dialog box without pressing [Browse]. That is fine. But I'm writing this note because some people may think it's not necessary and remove this feature in the future. Why is this important? Because a file path can be copied and pasted from another tool (e.g. TotalCommander), and that's nice. The second remark: If we may have a dialog field for a relative path, it should also be possible to edit also this relative path, and after leave the field (or pressing [apply] what is in the moment missing), and then see the resulting absolute path in its dialog field. Then the user can input a desired relative path, and look afterwards, where it is, and clarify afterwards, that it is ok. And a third remark: Also in MS-Windows it is possible to have symbolically linked folders (with MKLINK /J dst src\path"). This is a nice way to provide a link to a document and have another relative link in a generated document, especially from a PDF file. This works very well, I use it, but of course it requires a little knowledge of the file system, not for a normal standard user. But a document management administrator should have this knowledge.
Sorry, one more comment. There are two reasons for relative paths, please distinguish: a) Images that are inserted as links. In my opinion, this is an important function. Because external images can be edited (changed, updated) independently of the document, and used also in other contexts, e.g. linked from html files. But this links are resolved for example in an pdf document, in pdf there are internally embedded. b) Hyperlinks. These should either be file links, which are often necessary as relative links. Or just www links. Relative hyperlinks to a file location also work in a generated pdf on a website, that is opened with an internal browser window or tab. And they work especially well for a downloaded pdf if the linked files (e.g. javedoc files) are also downloaded to the correct local storage location. This is in my mind a necessary feature to work independent of an internet connection with downloaded documents. The internet should not be presumed as available in all situations.
*** Bug 160912 has been marked as a duplicate of this bug. ***
*** Bug 118594 has been marked as a duplicate of this bug. ***