LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (https://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   Libreoffice Calc - Hyperlink Problems (https://www.linuxquestions.org/questions/linux-desktop-74/libreoffice-calc-hyperlink-problems-911314/)

Myrlin 11-01-2011 02:29 PM

Libreoffice Calc - Hyperlink Problems
 
I have a large collection of photographs, which are documented in a spreadsheet which I originally produced in OpenOffice. Each entry is hyperlinked to the image. Most of the image filenames contain spaces.

I have just tried to use the spreadsheet, and discovered that Libreoffice will not link to a file (or folder) with a name containing spaces (e.g. /path/to/imagename with spaces.jpg).

It is a long time since I have used this document, so I am not sure whether it has ever worked in Libreoffice, but it worked perfectly in Openoffice.

I am using Archlinux, LXDE, and pcmanfm.

This is a real problem. I really do not want to have to rename hundreds of files just for the benefit of Libreoffice (and in any case some other applications use the names as they are, so they would fail).

I would be very grateful for any advice.

Thanks in advance.


P.S. I've just discovered that Libroffice Writer has the same problem, so it looks like it's package-wide.

frankbell 11-01-2011 07:13 PM

This is just a shot in the dark.

Try replacing the spaces in one item with %20 or one of the other HTML codes for a space and testing.

If it works, you can use LO search/replace to do all the links.

Myrlin 11-02-2011 05:51 AM

Many thanks for you fast reply, Frank.

The original spreadsheet does, in fact, replace spaces with %20.

I have tried just using a space, and I have tried a variety of types of file, but all fail. Writer and Calc always perform in exactly the same way.

frankbell 11-02-2011 08:13 PM

Another thought would be to replaces the spaces with underscores in the file names; that would be easy enough in the spreadsheet.

You could write a script or try using midnight commander to do a bulk rename of the picture files.

I don't have enough scripting experience to dash one off without about three hours research, but there are folks here who can.

I would make copies of everything, then try making the changes on the copies.

Myrlin 11-03-2011 02:38 PM

Thanks Frank.

Yes, I know I could do this as a workaround (and I may have to eventually), but that's not really the point. I just want the package to work as it should (and as it used to). If Gnucash/Viewnior etc can cope with spaces, Libreoffice really should!!

Many thanks again for your help.

frankbell 11-03-2011 07:00 PM

Please let us know how this turns out.

Myrlin 11-04-2011 06:16 AM

I've done a lot more analysis, and discovered that the fault appears to lie somewhere within LXDE itself.

I installed XFCE out of frustration, and everything worked perfectly using both Thunar and pcmanfm as filemanagers, so Libreoffice, Thunar and Pcmanfm seem to be innocent.

I don't really want to abandon LXDE in favour of XFCE, but I don't really know here to go from here.

In the short term, I suppose I could boot into XFCE to work in Libreoffice, and LXDE for other applications, but that's messy and not a long term option.

I would be very grateful for anyone's thoughts and ideas.

*** Edit *****

Openbox/pcmanfm works fine too.


All times are GMT -5. The time now is 04:30 PM.