Issue 91833 - Link path with spaces
Summary: Link path with spaces
Status: UNCONFIRMED
Alias: None
Product: Calc
Classification: Application
Component: save-export (show other issues)
Version: OOo 2.4.1
Hardware: PC Windows XP
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords: needhelp
Depends on:
Blocks:
 
Reported: 2008-07-19 06:41 UTC by dlairmarc
Modified: 2014-01-12 09:39 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description dlairmarc 2008-07-19 06:41:05 UTC
I've run into a problem with OO2.4.1 at work. I've also tried the current 3.0
dev build m22, same results.

All of our spreadsheet files are stored as Excel 2000/03 spreadsheets (.xls) on
an NT 4.0 server.

Many of them have external links to other spreadsheets. Many of the paths and
filenames have spaces in them.

Use of Calc breaks the links by converting %20 to %2520 in .xls files opened in
Calc, saved as .xls, opened in Excel, saved, and then reopened in Calc.

It only seems to happen with network paths, as paths on the local machine do not
seem to undergo this conversion.

1. Create file on the server using Excel 2K with links to another spreadsheet
with spaces in the link name, save it.
2. Open file in OO, make some change to force an update and resave it back as .xls
3. Open file in Excel, make some change to force an update, resave it.
4. Open file again in Calc, any link with spaces (represented by %20) in the
path or filename are now translated to "%2520", rendering the links invalid.

This breaks the cell updating for both Calc and Excel from this point forward.

It appears that after the first save by Calc, Excel is accepting the %20
generated by Calc to represent the space and preserving the link with the %20 in
it, but Calc is reinterpreting the "%" character as a literal and needing to be
escaped, thus producing the "%25" and leaving the following "20" as part of the
path string. At least, this is what I think is happening.

I've tried turning on absolute path names, no difference.

Am I missing something? I've tried searching the bug reports and the forums but
didn't seem to find anything which seemed to fit. Lot's of issues concerning
spaces, but nothing which seems to duplicate this.

Has anyone else had this problem?  Is there a setting I've missed, or another
work-around?

At this point, I can't allow anyone using OO to access any of these files due to
the corruption of the path/file names.

While renaming every directory and or file on the network to remove an embedded
spaces and rebuilding all the links in every file would eliminate this issue, it
wouldn't be very practical due to the large number of files (1000 +) with
multiple links per file.
Comment 1 amy2008 2008-08-11 07:21:01 UTC
dlairmarc,
I can't reproduce it in DEV300_m28 on WinXP. Maybe I misunderstood your 
description. If possible, please confirm it again.
Comment 2 redflagzhulihua 2008-08-20 06:56:26 UTC
I can not reproduce this. But I'm not using a NT4.0 server, I'm using a Samba 
file server under Linux. Will this affect the result?
Comment 3 dlairmarc 2008-08-21 03:27:30 UTC
I'm trying to reproduce this outside of our network environment to narrow down
what causes this.

I'm wondering what the process is that outputs the path and inserts the %20 and
when it gets brought back in, is reinterpreted and takes the %20 as something
other than a space. This seems to be the real problem. Reparsing the saved link
with the embedded %20 seems to be where the problem is.

I'm hoping I can create some sample files to upload so they can be examined.

Marc

Comment 4 dlairmarc 2008-09-03 05:27:08 UTC
I've been trying to define this outside our work environment and think I have it
narrowed down to where it's easier to reproduce.

The "Save URLs relative to" options under Load/Save are unchecked to create
absolute paths. (Relative paths create a whole different problem on a network)

OS: XP sp3
OOo: tested under 2.4.1 and DEV300m29

My test setup:

parent directory:        "d:/temp/master.xls"
first subdirectory:     "d:/temp/sub 08/target 2.xls"
second subdirectory:    "d:/temp/sub temp/target file.xls"

Note the space(s)followed by a numeral in the first subdirectory path. 
Note the space(s) in the second subdirectory path are followed by letters.

Link created in master.xls to first subdirectory:
='file:///D:/temp/sub 08/target 2.xls'#$Sheet1.A1

Link created in master.xls to second subdirectory:
='file:///D:/temp/sub temp/target file.xls'#$Sheet1.B1

Close both files.
Reopen the master.xls file.
Allow the links to be updated.

The linked cells are now #NA

The link to the first subdirectory file is now:
='file:///D:/temp/sub%252008/target%25202.xls'#$Sheet1.A1

The link to the second subdirectory file is now:
='file:///D:/temp/sub%2520temp/target%2520file.xls'#$Sheet1.B1

I can do a search and replace on the %2520 string, replacing with either a
single space or %20 to recover the broken links, but saving and reopening causes
the problem all over again.

I can't reproduce using relative links, but that causes severe path problems in
a network where the links are scattered all over the file server.

I hope this helps someone to reproduce and confirm this issue.

Marc