diff --git a/wise-webapp/src/main/java/com/wisemapping/exporter/FreemindExporter.java b/wise-webapp/src/main/java/com/wisemapping/exporter/FreemindExporter.java index 47003c98..fdb8cfcc 100755 --- a/wise-webapp/src/main/java/com/wisemapping/exporter/FreemindExporter.java +++ b/wise-webapp/src/main/java/com/wisemapping/exporter/FreemindExporter.java @@ -177,17 +177,23 @@ public class FreemindExporter } } - freemindNode.setBACKGROUNDCOLOR(mindmapTopic.getBgColor()); + String wiseShape = mindmapTopic.getShape(); + if (wiseShape != null && !ShapeStyle.LINE.equals(ShapeStyle.fromValue(wiseShape))) { + freemindNode.setBACKGROUNDCOLOR(mindmapTopic.getBgColor()); + } final String shape = mindmapTopic.getShape(); if (shape != null && !shape.isEmpty()) { if (isRoot && !ShapeStyle.ROUNDED_RECTANGLE.getStyle().endsWith(shape) || !isRoot && !ShapeStyle.LINE.getStyle().endsWith(shape)) { String style = shape; - if (ShapeStyle.ROUNDED_RECTANGLE.getStyle().equals(shape)) { + if (ShapeStyle.ROUNDED_RECTANGLE.getStyle().equals(shape) || ShapeStyle.ELLIPSE.getStyle().equals(shape)) { style = "bubble"; } freemindNode.setSTYLE(style); } + } else if (!isRoot) { + String style = "fork"; + freemindNode.setSTYLE(style); } addIconNode(freemindNode, mindmapTopic); @@ -277,7 +283,7 @@ public class FreemindExporter final Font font = objectFactory.createFont(); final String[] part = fontStyle.split(";", 6); int countParts = part.length; - boolean updated = false; + boolean fontNodeNeeded = false; if (!fontStyle.endsWith(FreemindConstant.EMPTY_FONT_STYLE)) { int idx = 0; @@ -285,7 +291,7 @@ public class FreemindExporter // Font name if (idx < countParts && part[idx].length() != 0) { font.setNAME(part[idx]); - updated = true; + fontNodeNeeded = true; } idx++; @@ -293,11 +299,11 @@ public class FreemindExporter if (idx < countParts && part[idx].length() != 0) { final String size = part[idx]; if (size != null && !size.isEmpty()) { - int freeSize = Integer.parseInt(size); - Integer fsize = wiseToFreeFontSize.get(freeSize); - if(fsize!=null){ - font.setSIZE(BigInteger.valueOf(fsize)); - updated = true; + int wiseSize = Integer.parseInt(size); + Integer freeSize = wiseToFreeFontSize.get(wiseSize); + if(freeSize!=null){ + font.setSIZE(BigInteger.valueOf(freeSize)); + fontNodeNeeded = true; } } } @@ -306,23 +312,26 @@ public class FreemindExporter // Font Color if (idx < countParts && part[idx].length() != 0) { freemindNode.setCOLOR(part[idx]); - updated = true; } idx++; // Font Styles if (idx < countParts && part[idx].length() != 0) { font.setBOLD(Boolean.TRUE.toString()); - updated = true; + fontNodeNeeded = true; } idx++; if (idx < countParts && part[idx].length() != 0) { font.setITALIC(Boolean.TRUE.toString()); - updated = true; + fontNodeNeeded = true; } - if (updated) { + if (fontNodeNeeded) { + // font size should be set if freemind node has font properties note + if (font.getSIZE() == null) { + font.setSIZE(BigInteger.valueOf(wiseToFreeFontSize.get(8))); + } freemindNode.getArrowlinkOrCloudOrEdge().add(font); } } diff --git a/wise-webapp/src/main/java/com/wisemapping/model/ShapeStyle.java b/wise-webapp/src/main/java/com/wisemapping/model/ShapeStyle.java index 0681807d..21afdaf2 100755 --- a/wise-webapp/src/main/java/com/wisemapping/model/ShapeStyle.java +++ b/wise-webapp/src/main/java/com/wisemapping/model/ShapeStyle.java @@ -23,7 +23,8 @@ public enum ShapeStyle LINE("line"), ROUNDED_RECTANGLE("rounded rectagle"), RECTANGLE("rectagle"), - ELLIPSE("elipse"); + ELLIPSE("elipse"), + IMAGE("image"); private String style; @@ -35,5 +36,14 @@ public enum ShapeStyle public String getStyle() { return style; - } + } + + public static ShapeStyle fromValue(String value) { + for (ShapeStyle shapeStyle : ShapeStyle.values()) { + if (shapeStyle.getStyle().equals(value)) { + return shapeStyle; + } + } + throw new IllegalArgumentException("Shape value \"" + value + "\" doesn't match with a value shape style."); + } } diff --git a/wise-webapp/src/test/resources/data/export/bigmap.mm b/wise-webapp/src/test/resources/data/export/bigmap.mm index e71a3747..4ff96662 100644 --- a/wise-webapp/src/test/resources/data/export/bigmap.mm +++ b/wise-webapp/src/test/resources/data/export/bigmap.mm @@ -1,262 +1,262 @@ - - - - - + + + + + - - + + - - + + - - - + + + - - - - - - + + + + + + - - - - + + + + - - - - - + + + + + - + - - + + - - - + + + - - + + - - - - - - + + + + + + - - + + - - - - - - + + + + + + - - - - + + + + - - - - - + + + + + - - + + - - - - + + + + - + - - - - + + + + - - - + + + - - - - - + + + + + - + - - - - - + + + + + - - - + + + - - - + + + - - - - + + + + - - + + - - - + + + - - + + - - + + - - - + + + - - - + + + - + - - - - + + + + - - - + + + - + - - + + - - - - - - - + + + + + + + - - - - - - - - + + + + + + + + - - - + + + - - - - - + + + + + - - + + - - - - - - - + + + + + + + - - - - - - - - - + + + + + + + + + - - - - - + + + + + - - - - + + + + - - - - - - + + + + + + - - - - + + + + - + - - - - - - + + + + + + - - + + - - - + + + - + diff --git a/wise-webapp/src/test/resources/data/export/bug2.mm b/wise-webapp/src/test/resources/data/export/bug2.mm index 71f38497..84123d89 100644 --- a/wise-webapp/src/test/resources/data/export/bug2.mm +++ b/wise-webapp/src/test/resources/data/export/bug2.mm @@ -15,37 +15,37 @@ - - - - + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - + + + - - - - - - + + + + + + \ No newline at end of file diff --git a/wise-webapp/src/test/resources/data/export/bug2.mmap b/wise-webapp/src/test/resources/data/export/bug2.mmap index da9894a1..dbcc59f6 100644 --- a/wise-webapp/src/test/resources/data/export/bug2.mmap +++ b/wise-webapp/src/test/resources/data/export/bug2.mmap @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/wise-webapp/src/test/resources/data/export/bug3.mm b/wise-webapp/src/test/resources/data/export/bug3.mm index a8772d63..dea90ba9 100644 --- a/wise-webapp/src/test/resources/data/export/bug3.mm +++ b/wise-webapp/src/test/resources/data/export/bug3.mm @@ -12,7 +12,7 @@ - + @@ -22,12 +22,12 @@ - + - - - + + + @@ -42,9 +42,9 @@ - - - + + + @@ -56,7 +56,7 @@ - + @@ -67,7 +67,7 @@ - + @@ -79,7 +79,7 @@ - + @@ -91,13 +91,13 @@ - + - + - + @@ -109,7 +109,7 @@ - + @@ -121,7 +121,7 @@ - + @@ -133,17 +133,17 @@ - + - - + + - + - + @@ -168,37 +168,37 @@ - - - + + + - - + + - + - - + + - - + + - - + + - - - - + + + + - - + + @@ -207,11 +207,11 @@ - + - + @@ -221,8 +221,8 @@ - - + + @@ -231,12 +231,12 @@ - + - - + + @@ -247,10 +247,10 @@ - + - + @@ -261,7 +261,7 @@ - + @@ -272,16 +272,16 @@ - + - - + + - - + + @@ -291,34 +291,34 @@ - + - - + + - - - + + + - - - - - - - + + + + + + + - - - + + + - - + + @@ -328,17 +328,17 @@ - - - + + + - - - - - - + + + + + + @@ -348,12 +348,12 @@ - - - + + + - - + + @@ -364,7 +364,7 @@ - + @@ -376,7 +376,7 @@ - + @@ -389,10 +389,10 @@ - + - - + + @@ -402,7 +402,7 @@ - + @@ -412,7 +412,7 @@ - + @@ -423,9 +423,9 @@ - - - + + + @@ -435,7 +435,7 @@ - + @@ -445,7 +445,7 @@ - + @@ -456,7 +456,7 @@ - + @@ -467,10 +467,10 @@ - + - - + + @@ -480,7 +480,7 @@ - + @@ -491,10 +491,10 @@ - + - + @@ -505,9 +505,9 @@ - - - + + + @@ -519,14 +519,14 @@ - + - - - - + + + + @@ -536,22 +536,22 @@ - - - - - - + + + + + + - - + + - - + + @@ -561,7 +561,7 @@ - + @@ -571,11 +571,11 @@ - + - - - + + + @@ -586,9 +586,9 @@ - - - + + + @@ -600,15 +600,15 @@ - + - - - + + + - - + + @@ -619,8 +619,8 @@ - - + + @@ -633,10 +633,10 @@ - - - - + + + + @@ -649,16 +649,16 @@ - - - - + + + + - - - - - + + + + + @@ -670,10 +670,10 @@ - + - - + + @@ -684,9 +684,9 @@ - - - + + + @@ -698,8 +698,8 @@ - - + + @@ -711,9 +711,9 @@ - - - + + + @@ -725,8 +725,8 @@ - - + + @@ -737,12 +737,12 @@ - + - - + + @@ -752,7 +752,7 @@ - + @@ -762,18 +762,18 @@ - - + + - - - - - - - + + + + + + + - + @@ -790,10 +790,10 @@ - - - - + + + + @@ -804,8 +804,8 @@ - - + + @@ -817,7 +817,7 @@ - + @@ -829,15 +829,15 @@ - - - - - + + + + + - - - + + + @@ -849,8 +849,8 @@ - - + + @@ -863,7 +863,7 @@ - + @@ -876,15 +876,15 @@ - - - - - + + + + + - + @@ -894,44 +894,44 @@ - + - - - - + + + + - - - + + + - - - + + + - - - + + + - - - + + + - + - - + + - - + + @@ -943,7 +943,7 @@ - + @@ -960,8 +960,8 @@ - - + + @@ -978,15 +978,15 @@ - - - - + + + + - - - + + + @@ -997,31 +997,31 @@ - - - - - - + + + + + + - - - + + + - - - - - - + + + + + + - - - - - - + + + + + + @@ -1036,7 +1036,7 @@ - + diff --git a/wise-webapp/src/test/resources/data/export/bug3.mmap b/wise-webapp/src/test/resources/data/export/bug3.mmap index ad8f1e32..eb77f270 100644 --- a/wise-webapp/src/test/resources/data/export/bug3.mmap +++ b/wise-webapp/src/test/resources/data/export/bug3.mmap @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/wise-webapp/src/test/resources/data/export/complex.mm b/wise-webapp/src/test/resources/data/export/complex.mm index 4596ea5b..590d1a4d 100644 --- a/wise-webapp/src/test/resources/data/export/complex.mm +++ b/wise-webapp/src/test/resources/data/export/complex.mm @@ -1,31 +1,31 @@ - - - + + + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + @@ -35,16 +35,16 @@ - - + + - - + + - - - - + + + + \ No newline at end of file diff --git a/wise-webapp/src/test/resources/data/export/complex.mmap b/wise-webapp/src/test/resources/data/export/complex.mmap index f10f67d4..b4a150bb 100644 --- a/wise-webapp/src/test/resources/data/export/complex.mmap +++ b/wise-webapp/src/test/resources/data/export/complex.mmap @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/wise-webapp/src/test/resources/data/export/emptyNodes.mm b/wise-webapp/src/test/resources/data/export/emptyNodes.mm index 360319b8..e4555e96 100644 --- a/wise-webapp/src/test/resources/data/export/emptyNodes.mm +++ b/wise-webapp/src/test/resources/data/export/emptyNodes.mm @@ -1,6 +1,6 @@ - + @@ -12,26 +12,26 @@ - + - + - + - + - + - + @@ -77,7 +77,7 @@ - + diff --git a/wise-webapp/src/test/resources/data/export/emptyNodes.mmap b/wise-webapp/src/test/resources/data/export/emptyNodes.mmap index 7c036bc8..bc726d3f 100644 --- a/wise-webapp/src/test/resources/data/export/emptyNodes.mmap +++ b/wise-webapp/src/test/resources/data/export/emptyNodes.mmap @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/wise-webapp/src/test/resources/data/export/enc.mm b/wise-webapp/src/test/resources/data/export/enc.mm index f9905de3..093ba773 100644 --- a/wise-webapp/src/test/resources/data/export/enc.mm +++ b/wise-webapp/src/test/resources/data/export/enc.mm @@ -1,17 +1,15 @@ - - - + + - - - + + @@ -28,7 +26,7 @@ - + @@ -42,7 +40,7 @@ - + @@ -60,7 +58,7 @@ - + @@ -73,7 +71,7 @@ - + @@ -87,7 +85,7 @@ - + @@ -106,7 +104,7 @@ - + @@ -141,7 +139,7 @@ - + @@ -154,7 +152,7 @@ - + @@ -184,7 +182,7 @@ - + @@ -202,7 +200,7 @@ - + @@ -215,7 +213,7 @@ - + @@ -237,10 +235,10 @@ - - - - + + + + @@ -264,7 +262,7 @@ - + diff --git a/wise-webapp/src/test/resources/data/export/huge.mm b/wise-webapp/src/test/resources/data/export/huge.mm index 3cae7313..b926d2c9 100644 --- a/wise-webapp/src/test/resources/data/export/huge.mm +++ b/wise-webapp/src/test/resources/data/export/huge.mm @@ -10,56 +10,56 @@ - - - - - + + + + + - - - + + + - - - + + + - - - - - + + + + + - - - - - - + + + + + + - - + + - - - + + + - - - - + + + + - - + + - - + + - + @@ -69,17 +69,17 @@ - - - + + + - - + + - - + + @@ -88,25 +88,25 @@ - - - - + + + + - - + + - - + + - - - - + + + + - + @@ -115,32 +115,32 @@ - - - - - + + + + + - - - - + + + + - - - - + + + + - - - + + + - - - - + + + + @@ -153,15 +153,15 @@ - - - - - - - + + + + + + + - + @@ -171,37 +171,37 @@ - - - - - - - - - - + + + + + + + + + + - - - - - + + + + + - - - - - - + + + + + + - - - + + + @@ -211,8 +211,8 @@ - - + + @@ -222,24 +222,24 @@ - + - + - - - - - - - + + + + + + + - - + + - + @@ -248,33 +248,33 @@ - - - - - + + + + + - - - - - - + + + + + + - + - - - - - - + + + + + + - + @@ -283,86 +283,86 @@ - - - + + + - - - - - - + + + + + + - - + + - - - - + + + + - - + + - - - + + + - - - - + + + + - - - - - + + + + + - - - - + + + + - - + + - - - - - + + + + + - - - + + + - - + + - - - - - - + + + + + + - - - - - + + + + + - - + + diff --git a/wise-webapp/src/test/resources/data/export/huge.mmap b/wise-webapp/src/test/resources/data/export/huge.mmap index c7331eb8..8dee81ea 100644 --- a/wise-webapp/src/test/resources/data/export/huge.mmap +++ b/wise-webapp/src/test/resources/data/export/huge.mmap @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/wise-webapp/src/test/resources/data/export/issue.mm b/wise-webapp/src/test/resources/data/export/issue.mm index 82100f5f..93dfc107 100644 --- a/wise-webapp/src/test/resources/data/export/issue.mm +++ b/wise-webapp/src/test/resources/data/export/issue.mm @@ -152,12 +152,12 @@ - + - + - + @@ -168,13 +168,13 @@ - + - + - + diff --git a/wise-webapp/src/test/resources/data/export/issue.mmap b/wise-webapp/src/test/resources/data/export/issue.mmap index 04b5e7a0..2cc883cb 100644 --- a/wise-webapp/src/test/resources/data/export/issue.mmap +++ b/wise-webapp/src/test/resources/data/export/issue.mmap @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/wise-webapp/src/test/resources/data/export/sample2.mm b/wise-webapp/src/test/resources/data/export/sample2.mm index 25f7f19a..39cb44d5 100644 --- a/wise-webapp/src/test/resources/data/export/sample2.mm +++ b/wise-webapp/src/test/resources/data/export/sample2.mm @@ -1,5 +1,5 @@ - + @@ -9,26 +9,26 @@ - + - - + + - - - - - + + + + + - - - + + + - - + + \ No newline at end of file diff --git a/wise-webapp/src/test/resources/data/export/sample2.mmap b/wise-webapp/src/test/resources/data/export/sample2.mmap index 1581c31b..aff92ba2 100644 --- a/wise-webapp/src/test/resources/data/export/sample2.mmap +++ b/wise-webapp/src/test/resources/data/export/sample2.mmap @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/wise-webapp/src/test/resources/data/export/sample3.mm b/wise-webapp/src/test/resources/data/export/sample3.mm index 0c9b63e8..a91075fc 100644 --- a/wise-webapp/src/test/resources/data/export/sample3.mm +++ b/wise-webapp/src/test/resources/data/export/sample3.mm @@ -1,3 +1,3 @@ - + \ No newline at end of file diff --git a/wise-webapp/src/test/resources/data/export/sample3.mmap b/wise-webapp/src/test/resources/data/export/sample3.mmap index 20ca80b6..f54f1c3f 100644 --- a/wise-webapp/src/test/resources/data/export/sample3.mmap +++ b/wise-webapp/src/test/resources/data/export/sample3.mmap @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/wise-webapp/src/test/resources/data/export/sample4.mm b/wise-webapp/src/test/resources/data/export/sample4.mm index 0c9b63e8..a91075fc 100644 --- a/wise-webapp/src/test/resources/data/export/sample4.mm +++ b/wise-webapp/src/test/resources/data/export/sample4.mm @@ -1,3 +1,3 @@ - + \ No newline at end of file diff --git a/wise-webapp/src/test/resources/data/export/sample4.mmap b/wise-webapp/src/test/resources/data/export/sample4.mmap index 20ca80b6..f54f1c3f 100644 --- a/wise-webapp/src/test/resources/data/export/sample4.mmap +++ b/wise-webapp/src/test/resources/data/export/sample4.mmap @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/wise-webapp/src/test/resources/data/export/simple-maps.mm b/wise-webapp/src/test/resources/data/export/simple-maps.mm index afe8b82a..85d50baf 100644 --- a/wise-webapp/src/test/resources/data/export/simple-maps.mm +++ b/wise-webapp/src/test/resources/data/export/simple-maps.mm @@ -3,211 +3,164 @@ - + - + - - + - - + - - - - - - + - - - - + - - - - + - - - + - - - - - - + - - + - - + - - - - - - - - - - - - - + - - - - - - + - - - - - - - - @@ -215,128 +168,99 @@ - - + - - - - - - - - - - - + + - - - - + - - - - - - - - - - - - - + - - - - @@ -346,71 +270,55 @@ - - - - + - - + - - + - - - + - - - + - - - - - - - @@ -418,53 +326,41 @@ - - + - - + - - - - - - - - - - @@ -472,75 +368,57 @@ - - + - - - - - - - - - - - - + - - - - - + - - @@ -551,121 +429,91 @@ - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - @@ -675,88 +523,67 @@ - - - - + + + - - - - - - - + - - - - - - - - - - - - - - @@ -764,32 +591,26 @@ - - + + - - + - - - - - diff --git a/wise-webapp/src/test/resources/data/export/simple-maps.mmap b/wise-webapp/src/test/resources/data/export/simple-maps.mmap index 8df87322..f3c98ad2 100644 --- a/wise-webapp/src/test/resources/data/export/simple-maps.mmap +++ b/wise-webapp/src/test/resources/data/export/simple-maps.mmap @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/wise-webapp/src/test/resources/data/export/welcome-reloaded.mm b/wise-webapp/src/test/resources/data/export/welcome-reloaded.mm index a61d61ef..c7e9b4b7 100644 --- a/wise-webapp/src/test/resources/data/export/welcome-reloaded.mm +++ b/wise-webapp/src/test/resources/data/export/welcome-reloaded.mm @@ -1,56 +1,51 @@ - - - - + + - - + + - - + + - - + + - + - - + - - + + - - - - - - + + + + + - - - - + + + - - + + - - + + - - + + - + - + diff --git a/wise-webapp/src/test/resources/data/export/welcome-reloaded.mmap b/wise-webapp/src/test/resources/data/export/welcome-reloaded.mmap index 1c1f8dae..29e68c32 100644 --- a/wise-webapp/src/test/resources/data/export/welcome-reloaded.mmap +++ b/wise-webapp/src/test/resources/data/export/welcome-reloaded.mmap @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/wise-webapp/src/test/resources/data/export/welcome.mm b/wise-webapp/src/test/resources/data/export/welcome.mm index f6db0f12..b74a8fe1 100644 --- a/wise-webapp/src/test/resources/data/export/welcome.mm +++ b/wise-webapp/src/test/resources/data/export/welcome.mm @@ -1,26 +1,23 @@ - - - - + + - - + + - - + + - - + + - + - - + - + @@ -33,18 +30,16 @@ - + - - - - - - + + + + + - - - + + @@ -54,23 +49,23 @@ - + - - + + - - + + - - + + - + - + diff --git a/wise-webapp/src/test/resources/data/export/welcome.mmap b/wise-webapp/src/test/resources/data/export/welcome.mmap index be0a721e..b46bc9a7 100644 --- a/wise-webapp/src/test/resources/data/export/welcome.mmap +++ b/wise-webapp/src/test/resources/data/export/welcome.mmap @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/wise-webapp/src/test/resources/data/freemind/node-styles.mmr b/wise-webapp/src/test/resources/data/freemind/node-styles.mmr index 2b4b05b5..c0a306de 100644 --- a/wise-webapp/src/test/resources/data/freemind/node-styles.mmr +++ b/wise-webapp/src/test/resources/data/freemind/node-styles.mmr @@ -30,19 +30,15 @@ - - - -