Fix mindmap export.

This commit is contained in:
Paulo Gustavo Veiga 2013-02-23 13:48:43 -03:00
parent 8aa733158c
commit 76ccc5e6b2

View File

@ -289,8 +289,9 @@ public class FreemindExporter
// Font size // Font size
if (idx < countParts && part[idx].length() != 0) { if (idx < countParts && part[idx].length() != 0) {
String size = part[idx]; final String size = part[idx];
font.setSIZE(new BigInteger(size)); int freeSize = Integer.parseInt(size);
font.setSIZE(BigInteger.valueOf(wiseToFreeFontSize.get(freeSize)));
updated = true; updated = true;
} }
idx++; idx++;
@ -319,4 +320,20 @@ public class FreemindExporter
} }
} }
} }
// Freemind size goes from 10 to 28
// WiseMapping:
// 6 Small
// 8 Normal
// 10 Large
// 15 Huge
static private Map<Integer,Integer> wiseToFreeFontSize = new HashMap<Integer,Integer>();
static {
wiseToFreeFontSize.put(6,10);
wiseToFreeFontSize.put(8,12);
wiseToFreeFontSize.put(10,18);
wiseToFreeFontSize.put(15,24);
}
} }