[Solved] Hyperlink - Relative references

Discuss the word processor
Post Reply
nunof32
Posts: 59
Joined: Sat Jul 28, 2012 9:52 am

[Solved] Hyperlink - Relative references

Post by nunof32 »

Hello,

I think I need a little help here.

First of all : I use a Mac and Open Office for Mac. OS is newest (10.10.1). OO is 4.1.1.

I have 2 documents sitting in the same folder. document1 has a hyperlink to document2. I need these two documents to travel from system to system (OS X to Windows to Unix to ...). The assumption is that when imported onto a new system these two files will always reside in the same directory. So, I need to define the hyperlink with only the filename of document2 – the expectation is that the rest of the path will always be assumed by the host filesystem to be 'current directory').

Accordingly, I define the target as : file:///document2

Doesn't work : OO says the file doesn't exist (I think because it is not looking in the right directory).

The help file, hyperlink topic, directs me to go to OO>Preferences>LoadSave>General and then specify that I want hyperlink references to be stored in relative, rather than absolute, form. It seems that on the Mac that option is not present ?!

Any help welcome, thanks in advance.
Last edited by Hagar Delest on Mon Dec 15, 2014 9:58 pm, edited 1 time in total.
Reason: tagged [Solved].
OpenOffice 4.1.10 with MacOS X 10.13.6
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: hyperlink - relative references

Post by acknak »

OO always constructs links relative to the location of the document, even though it displays file locations as full paths. Just link the documents normally, so it works on your system, then move the documents (together) somewhere else and try the link again: it should "just work".

OO seems to have a problem with this (in some situation) when working under Windows, but I've never had a problem with it under Linux; I expect MacOS is ok as well.
AOO4/LO5 • Linux • Fedora 23
User avatar
Lupp
Volunteer
Posts: 3542
Joined: Sat May 31, 2014 7:05 pm
Location: München, Germany

Re: hyperlink - relative references

Post by Lupp »

acknak wrote:OO always constructs links relative to the location of the document, even though it displays file locations as full paths.
Might this not depend on the setting under > 'Tools' > 'Options' > 'Load/Save' > section 'Save' > 'Save URLs relative to the file system: 'ticked'
when the file is saved?

Editing:
I tested it with a couple of Calc files one of which is containing references into three others. Saving it with the above mentioned option not ticked led to broken links as soon as the complete set of files was moved to another folder.
This is the behaviour of LibreOffice. It's surely the same with AOO, OOo as it was since StarOffice 5.2 (at least).
There is also the option 'Save URLs relative to the internet' with the respective effect.
On Windows 10: LibreOffice 24.2 (new numbering) and older versions, PortableOpenOffice 4.1.7 and older, StarOffice 5.2
---
Lupp from München
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: hyperlink - relative references

Post by acknak »

Good point!
AOO4/LO5 • Linux • Fedora 23
nunof32
Posts: 59
Joined: Sat Jul 28, 2012 9:52 am

Re: hyperlink - relative references

Post by nunof32 »

Thanks acknak and lupp for your help.

I made a few tests and verified that hyperlinks are stored relative (= filename only) or absolute (= full path) according to the setting referred to by lupp (in the OSX implementation that setting is under OO>Preferences>Load/Save>General>Save section). I have verified this by moving around the files within OSX and also by transferring them to a Windows system.

Thanks very much again.
OpenOffice 4.1.10 with MacOS X 10.13.6
NascarNana
Posts: 2
Joined: Sun Jan 04, 2015 11:08 pm

Re: Hyperlink - Relative references

Post by NascarNana »

NascarNana, OO 4.1.1, Win 7
The links between files saved in C:\Users\N\My Documents\*.odt appear to be broken. Other *.odt file not save in My Documents all appear to available. Error messages come up in OO and Win Explorer. The only problem I have dealt with since this happened were some unwanted programs that loaded during Adobe Flash update. Can't remember any other problems.
NascarNana Open Office 4.1.1 running on Win 7.
NascarNana
Posts: 2
Joined: Sun Jan 04, 2015 11:08 pm

Re: [Solved] Hyperlink - Relative references

Post by NascarNana »

Thank you. I will give it a try.
NascarNana Open Office 4.1.1 running on Win 7.
Post Reply