https://bugs.freedesktop.org/show_bug.cgi?id=86087
--- Comment #4 from [email protected] --- (In reply to Jean-Baptiste Faure from comment #2) > PLease explain step by step what you do to reproduce the problem, especially > how you insert a relative link. And attach your test document. 1. Start with a brand new configuration for LibreOffice in Linux: mkdir ~/bak mv ~/.libreoffice ~/libreoffice ~/bak mv ~/.config/libreoffice ~/bak/config 2. Create a "test" directory: mkdir ~/test cd ~/test 3. Create a pair of files to link in the document: echo relative > relative.txt echo absolute > absolute.txt 4. Verify that my distribution didn't create some strange shellscript wrapper (I already know this because I checked how the package was created): bash$ ls -l /usr/bin/soffice lrwxrwxrwx 1 root root 36 Nov 10 12:20 /usr/bin/soffice -> /usr/lib/libreoffice/program/soffice bash$ md5sum /usr/lib/libreoffice/program/soffice ec0d407981b993c828024639cefebda7 /usr/lib/libreoffice/program/soffice bash$ head /usr/lib/libreoffice/program/soffice #!/bin/sh # # This file is part of the LibreOffice project. # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # # This file incorporates work covered by the following license notice: # 5. Start LibreOffice Writer by running in bash: soffice 6. Verify settings in Tools / Options / Load/Save / General. Save URLs relative to file system is checked by default. 7. Click on "Writer Document" to create a Writer document. 8. Insert a link (CTRL-K) 9. Click on "Document" to insert a link to a local file, rather than an Internet link 10. Type in the "Document Path" field: relative.txt 11. Click [Apply] 12. A link is created: text: "relative.txt" tooltip: "Control-Click to follow link: relative.txt" 13. Hit <enter> to insert newlines a couple of times, and then a new link (CTRL-K) 14. Click on the Filesystem browser icon, next to the "Document Path" field. 15. Browse the filesystem to select ~/test/absolute.txt 16. Click [Apply] 17. A link is created: text: "/home/alan/test/absolute.txt" tooltip: "Control-Click to follow link: file:///home/alan/test/absolute.txt" 18. Current situation: a. the document has not been saved b. the current working directory of soffice is /home/alan/test: bash$ pgrep -a soffice 1222 /usr/lib/libreoffice/program/soffice.bin --splash-pipe=5 bash$ ls -l /proc/1222/cwd lrwxrwxrwx 1 alan users 0 Nov 10 16:00 /proc/1222/cwd -> /home/alan/test 19. Control-Click the first link (relative.txt). You will get an error message. 20. Control-Click the second link (/home/alan/test/absolute.txt). The file will open with an external program. 21. Save (CTRL-S) 22. In the file-save dialog, browse to ~/test and save as test-lo.docx 23. A new window pops, saying: This document may contain formatting or content that cannot be saved in the currently selected file format "Microsoft Word 2007/2010/2013 XML". Use the default ODF file format to be sure that the document is saved correctly. [x] Ask when not saving in ODF format [Use Microsoft Word 2007/2010/2013 XML Format] [Use ODF Format] 24. Click on "Use Microsoft Word 2007/2010/2013 XML Format" 25. Close LibreOffice Writer 26. Go to a Windows computer with MS Office 2010 27. Create a new directory: c:\temp\test 28. Copy the ~/test directory from the Linux computer to Windows, under c:\temp 29. Go to c:\temp\test, double click test-lo.docx, it opens in MS Word 2010, the title bar shows: test-lo.docx [Compatibility Mode]. The document in MS Word shows the text "/tmp/test.txt", the popup shows: file:///\\tmp\test.txt Ctrl+Click to follow link 30. Move the pointer over the text. There is no popup for the first text (relative.txt), but there is a popup for the second one (/home/alan/test/absolute.txt). The first text is not even a link. The link was lost when LibreOffice saved the file. 31. Press Ctrl while clicking the absolute link, an error message shows up saying: Cannot open the specified file. This is expected. 32. Click on File / Close to close the current document 33. Click on File / New / Blank document to create a new document 34. Click on Insert / Hyperlink 35. Type "relative.txt" in the Address field. 36. A link is created: text: "relative.txt" tooltip: "Control-Click to follow link: relative.txt" 37. Hit enter to insert a newline, and then click on Insert / Hyperlink 38. Click on the Filesystem browser icon, next to the "Document Path" field. 39. Browse the filesystem to select c:\temp\test\absolute.txt 40. Click [OK] 41. A link is created: text: "C:\temp\test\absolute.txt" tooltip: "Ctrl-Click to follow link: file:///c:\temp\test\absolute.txt" 42. Current situation: a. the document has not been saved b. the current working directory of MS Office is unknown 43. Control-click the first link (relative.txt). You will get an error message. 44. Control-click the second link (c:\temp\test\absolute.txt). After a warning dialog, the file will open with an external program. 45. Save (CTRL-S) 46. Type "c:\temp\test\test-ms.docx" and click [Save] 47. Control-click the first link again (relative.txt). This time it opens. 48. Close MS Word 49. Copy test-ms.docx saved by MS Word with the relative link to the Linux computer, to ~/test/ 50. Open test-ms.docx with LibreOffice 51. Control-Click the first link (relative.txt). You will get an error message (this is an error). 52. Control-Click the first link (c:\temp\test\absolute.txt). You will get an error message (this is expected). -- You are receiving this mail because: You are the assignee for the bug.
_______________________________________________ Libreoffice-bugs mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
