vijaymoorthy001 / xmind3

Automatically exported from code.google.com/p/xmind3
0 stars 0 forks source link

how to use relative path to add a hyperlink #152

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Select a topic, Click “Ctrl+H” or hyperlink icon on toolbar, Select 
file, and here choose the file/folder and link type, “Relative”.
2. select a file such as "C:\Documents and 
Settings\Administrator\Desktop\sample\txt\txt2\test.txt",and save xmind 
file on "C:\Documents and Settings\Administrator\Desktop\sample\test.xmind"
.then click ok button
3. open the file on the xmind file. "file not exists" are appeared.
file paht change to "C:\Documents and 
Settings\Administrator\Desktop\sample\txt2\txt\test.txt"

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?

xml version 3.1.1
OS: window xp

Please provide any additional information below.

Original issue reported on code.google.com by zhangf...@gmail.com on 31 Jan 2010 at 3:51

Attachments:

GoogleCodeExporter commented 9 years ago
I had the same problem and tried to fix it.

While the program goes down in folder hierarchy from the last folder that 
contains
both the XMind file and the chosen file/folder to the chosen file/folder, the 
order
of the different folders is reversed. In the code, this is actually just a 
for-loop.
So to fix this problem, only this for-loop has to be reversed.

The file that has to be modified is FilePathParser.java and is located in the 
source
code like this:
org.xmind.ui.mindmap\src\org\xmind\ui\internal\protocols\FilePathParser.java

The name of the method that has to be modified is
public static String toRelativePath(String base, String absolutePath)

The second for-loop of this method has to be modified from
for (int i = routine.size() - 1; i >= start; i--)
to
for (int i = start; i < routine.size(); i++)

Now the relative linking should work.

Original comment by kenneth....@gmail.com on 10 Feb 2010 at 1:13

GoogleCodeExporter commented 9 years ago
please try v3.2.1 :)

Original comment by stephen0...@gmail.com on 28 Dec 2010 at 7:29