To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=111763
                 Issue #|111763
                 Summary|Relative paths are saved incorrectly
               Component|Drawing
                 Version|OOo 3.2
                Platform|Opteron/x86_64
                     URL|
              OS/Version|Linux
                  Status|UNCONFIRMED
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|DEFECT
                Priority|P2
            Subcomponent|save-export
             Assigned to|graphicsneedsconfirm
             Reported by|kjetil_kilhavn





------- Additional comments from [email protected] Sat May 22 
01:03:38 +0000 2010 -------
When inserting an image as a link to a file, in my case with relative paths, the
path to the image is not correctly saved. 

In my case I have a drawing file in path /home/kjetil/Gjesdalbuane/Dokumenter,
and am inserting an image from path /home/kjetil/Gjesdalbuane/Bilder/3D-dyr.

The file path is saved relative, but not correctly. I investigated the
content.xml file, and the image path stored is
../../../home/kjetil/Gjesdalbuane/Bilder/3D-dyr/ - which is of course not 
correct.
The correct relative path would be ../Bilder/3D-dyr/

The path is displayed in Draw as
"file:///home/kjetil/home/kjetil/Gjesdalbuane/Bilder/3D-dyr"

Apparently the code that fails when saving backtracks from the document location
to root (at least that would match the three levels), and then inserts the
backtracking + the full path from there - which is the absolute path. 
To find the correct relative path you could compare the two absolute paths:
/home/kjetil/Gjesdalbuane/Dokumenter
/home/kjetil/Gjesdalbuane/Bilder/3D-dyr

Then remove the common part at the beginning to be left with
/Dokumenter
/Bilder/3D-dyr

The relative path becomes ../ times the number of levels to the document
location, followed by whatever is left of the path to the image.

I suppose it should also be checked whether there are any common parts at all,
because a relative path is only possible when there is a common part at the
beginning.

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to