More export issues fixed.

This commit is contained in:
Paulo Gustavo Veiga 2013-02-23 13:53:56 -03:00
parent 76ccc5e6b2
commit 9049ca25aa
2 changed files with 13 additions and 9 deletions

View File

@ -290,9 +290,11 @@ public class FreemindExporter
// Font size // Font size
if (idx < countParts && part[idx].length() != 0) { if (idx < countParts && part[idx].length() != 0) {
final String size = part[idx]; final String size = part[idx];
int freeSize = Integer.parseInt(size); if (size != null && !size.isEmpty()) {
font.setSIZE(BigInteger.valueOf(wiseToFreeFontSize.get(freeSize))); int freeSize = Integer.parseInt(size);
updated = true; font.setSIZE(BigInteger.valueOf(wiseToFreeFontSize.get(freeSize)));
updated = true;
}
} }
idx++; idx++;
@ -327,12 +329,13 @@ public class FreemindExporter
// 8 Normal // 8 Normal
// 10 Large // 10 Large
// 15 Huge // 15 Huge
static private Map<Integer,Integer> wiseToFreeFontSize = new HashMap<Integer,Integer>(); static private Map<Integer, Integer> wiseToFreeFontSize = new HashMap<Integer, Integer>();
static { static {
wiseToFreeFontSize.put(6,10); wiseToFreeFontSize.put(6, 10);
wiseToFreeFontSize.put(8,12); wiseToFreeFontSize.put(8, 12);
wiseToFreeFontSize.put(10,18); wiseToFreeFontSize.put(10, 18);
wiseToFreeFontSize.put(15,24); wiseToFreeFontSize.put(15, 24);
} }

View File

@ -131,7 +131,8 @@ public class TransformerController extends BaseController {
throw new IllegalArgumentException("Unsupported export format"); throw new IllegalArgumentException("Unsupported export format");
} }
result.getModelMap().put("filename", filename); // IE does not support spaces in the name... As usual ...
result.getModelMap().put("filename", filename.replaceAll(" ","_"));
return result; return result;
} }
} }