]> source.dussan.org Git - poi.git/commitdiff
tidy up code
authorPJ Fanning <fanningpj@apache.org>
Wed, 31 Aug 2022 10:09:13 +0000 (10:09 +0000)
committerPJ Fanning <fanningpj@apache.org>
Wed, 31 Aug 2022 10:09:13 +0000 (10:09 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903788 13f79535-47bb-0310-9956-ffa450edef68

poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFTable.java
poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFTableCell.java

index f04c297a1c3952f2f5c740262a171aa31af8cea9..33548e791daea4267cd0e9b716cff1645cb4e59a 100644 (file)
@@ -76,33 +76,33 @@ public class XWPFTable implements IBodyElement, ISDTContents {
     static {
         // populate enum maps
         xwpfBorderTypeMap = new EnumMap<>(XWPFBorderType.class);
-        xwpfBorderTypeMap.put(XWPFBorderType.NIL, STBorder.Enum.forInt(STBorder.INT_NIL));
-        xwpfBorderTypeMap.put(XWPFBorderType.NONE, STBorder.Enum.forInt(STBorder.INT_NONE));
-        xwpfBorderTypeMap.put(XWPFBorderType.SINGLE, STBorder.Enum.forInt(STBorder.INT_SINGLE));
-        xwpfBorderTypeMap.put(XWPFBorderType.THICK, STBorder.Enum.forInt(STBorder.INT_THICK));
-        xwpfBorderTypeMap.put(XWPFBorderType.DOUBLE, STBorder.Enum.forInt(STBorder.INT_DOUBLE));
-        xwpfBorderTypeMap.put(XWPFBorderType.DOTTED, STBorder.Enum.forInt(STBorder.INT_DOTTED));
-        xwpfBorderTypeMap.put(XWPFBorderType.DASHED, STBorder.Enum.forInt(STBorder.INT_DASHED));
-        xwpfBorderTypeMap.put(XWPFBorderType.DOT_DASH, STBorder.Enum.forInt(STBorder.INT_DOT_DASH));
-        xwpfBorderTypeMap.put(XWPFBorderType.DOT_DOT_DASH, STBorder.Enum.forInt(STBorder.INT_DOT_DOT_DASH));
-        xwpfBorderTypeMap.put(XWPFBorderType.TRIPLE, STBorder.Enum.forInt(STBorder.INT_TRIPLE));
-        xwpfBorderTypeMap.put(XWPFBorderType.THIN_THICK_SMALL_GAP, STBorder.Enum.forInt(STBorder.INT_THIN_THICK_SMALL_GAP));
-        xwpfBorderTypeMap.put(XWPFBorderType.THICK_THIN_SMALL_GAP, STBorder.Enum.forInt(STBorder.INT_THICK_THIN_SMALL_GAP));
-        xwpfBorderTypeMap.put(XWPFBorderType.THIN_THICK_THIN_SMALL_GAP, STBorder.Enum.forInt(STBorder.INT_THIN_THICK_THIN_SMALL_GAP));
-        xwpfBorderTypeMap.put(XWPFBorderType.THIN_THICK_MEDIUM_GAP, STBorder.Enum.forInt(STBorder.INT_THIN_THICK_MEDIUM_GAP));
-        xwpfBorderTypeMap.put(XWPFBorderType.THICK_THIN_MEDIUM_GAP, STBorder.Enum.forInt(STBorder.INT_THICK_THIN_MEDIUM_GAP));
-        xwpfBorderTypeMap.put(XWPFBorderType.THIN_THICK_THIN_MEDIUM_GAP, STBorder.Enum.forInt(STBorder.INT_THIN_THICK_THIN_MEDIUM_GAP));
-        xwpfBorderTypeMap.put(XWPFBorderType.THIN_THICK_LARGE_GAP, STBorder.Enum.forInt(STBorder.INT_THIN_THICK_LARGE_GAP));
-        xwpfBorderTypeMap.put(XWPFBorderType.THICK_THIN_LARGE_GAP, STBorder.Enum.forInt(STBorder.INT_THICK_THIN_LARGE_GAP));
-        xwpfBorderTypeMap.put(XWPFBorderType.THIN_THICK_THIN_LARGE_GAP, STBorder.Enum.forInt(STBorder.INT_THIN_THICK_THIN_LARGE_GAP));
-        xwpfBorderTypeMap.put(XWPFBorderType.WAVE, STBorder.Enum.forInt(STBorder.INT_WAVE));
-        xwpfBorderTypeMap.put(XWPFBorderType.DOUBLE_WAVE, STBorder.Enum.forInt(STBorder.INT_DOUBLE_WAVE));
-        xwpfBorderTypeMap.put(XWPFBorderType.DASH_SMALL_GAP, STBorder.Enum.forInt(STBorder.INT_DASH_SMALL_GAP));
-        xwpfBorderTypeMap.put(XWPFBorderType.DASH_DOT_STROKED, STBorder.Enum.forInt(STBorder.INT_DASH_DOT_STROKED));
-        xwpfBorderTypeMap.put(XWPFBorderType.THREE_D_EMBOSS, STBorder.Enum.forInt(STBorder.INT_THREE_D_EMBOSS));
-        xwpfBorderTypeMap.put(XWPFBorderType.THREE_D_ENGRAVE, STBorder.Enum.forInt(STBorder.INT_THREE_D_ENGRAVE));
-        xwpfBorderTypeMap.put(XWPFBorderType.OUTSET, STBorder.Enum.forInt(STBorder.INT_OUTSET));
-        xwpfBorderTypeMap.put(XWPFBorderType.INSET, STBorder.Enum.forInt(STBorder.INT_INSET));
+        xwpfBorderTypeMap.put(XWPFBorderType.NIL, STBorder.NIL);
+        xwpfBorderTypeMap.put(XWPFBorderType.NONE, STBorder.NONE);
+        xwpfBorderTypeMap.put(XWPFBorderType.SINGLE, STBorder.SINGLE);
+        xwpfBorderTypeMap.put(XWPFBorderType.THICK, STBorder.THICK);
+        xwpfBorderTypeMap.put(XWPFBorderType.DOUBLE, STBorder.DOUBLE);
+        xwpfBorderTypeMap.put(XWPFBorderType.DOTTED, STBorder.DOTTED);
+        xwpfBorderTypeMap.put(XWPFBorderType.DASHED, STBorder.DASHED);
+        xwpfBorderTypeMap.put(XWPFBorderType.DOT_DASH, STBorder.DOT_DASH);
+        xwpfBorderTypeMap.put(XWPFBorderType.DOT_DOT_DASH, STBorder.DOT_DOT_DASH);
+        xwpfBorderTypeMap.put(XWPFBorderType.TRIPLE, STBorder.TRIPLE);
+        xwpfBorderTypeMap.put(XWPFBorderType.THIN_THICK_SMALL_GAP, STBorder.THIN_THICK_SMALL_GAP);
+        xwpfBorderTypeMap.put(XWPFBorderType.THICK_THIN_SMALL_GAP, STBorder.THICK_THIN_SMALL_GAP);
+        xwpfBorderTypeMap.put(XWPFBorderType.THIN_THICK_THIN_SMALL_GAP, STBorder.THIN_THICK_THIN_SMALL_GAP);
+        xwpfBorderTypeMap.put(XWPFBorderType.THIN_THICK_MEDIUM_GAP, STBorder.THIN_THICK_MEDIUM_GAP);
+        xwpfBorderTypeMap.put(XWPFBorderType.THICK_THIN_MEDIUM_GAP, STBorder.THICK_THIN_MEDIUM_GAP);
+        xwpfBorderTypeMap.put(XWPFBorderType.THIN_THICK_THIN_MEDIUM_GAP, STBorder.THIN_THICK_THIN_MEDIUM_GAP);
+        xwpfBorderTypeMap.put(XWPFBorderType.THIN_THICK_LARGE_GAP, STBorder.THIN_THICK_LARGE_GAP);
+        xwpfBorderTypeMap.put(XWPFBorderType.THICK_THIN_LARGE_GAP, STBorder.THICK_THIN_LARGE_GAP);
+        xwpfBorderTypeMap.put(XWPFBorderType.THIN_THICK_THIN_LARGE_GAP, STBorder.THIN_THICK_THIN_LARGE_GAP);
+        xwpfBorderTypeMap.put(XWPFBorderType.WAVE, STBorder.WAVE);
+        xwpfBorderTypeMap.put(XWPFBorderType.DOUBLE_WAVE, STBorder.DOUBLE_WAVE);
+        xwpfBorderTypeMap.put(XWPFBorderType.DASH_SMALL_GAP, STBorder.DASH_SMALL_GAP);
+        xwpfBorderTypeMap.put(XWPFBorderType.DASH_DOT_STROKED, STBorder.DASH_DOT_STROKED);
+        xwpfBorderTypeMap.put(XWPFBorderType.THREE_D_EMBOSS, STBorder.THREE_D_EMBOSS);
+        xwpfBorderTypeMap.put(XWPFBorderType.THREE_D_ENGRAVE, STBorder.THREE_D_ENGRAVE);
+        xwpfBorderTypeMap.put(XWPFBorderType.OUTSET, STBorder.OUTSET);
+        xwpfBorderTypeMap.put(XWPFBorderType.INSET, STBorder.INSET);
 
         stBorderTypeMap = new HashMap<>();
         stBorderTypeMap.put(STBorder.INT_NIL, XWPFBorderType.NIL);
index 47ccb465c7026d57a29af0732ad85baf940e19dc..f3044af3fdf025ef2ebdf34c61f87941babc3991 100644 (file)
@@ -54,10 +54,10 @@ public class XWPFTableCell implements IBody, ICell {
     static {
         // populate enum maps
         alignMap = new EnumMap<>(XWPFVertAlign.class);
-        alignMap.put(XWPFVertAlign.TOP, STVerticalJc.Enum.forInt(STVerticalJc.INT_TOP));
-        alignMap.put(XWPFVertAlign.CENTER, STVerticalJc.Enum.forInt(STVerticalJc.INT_CENTER));
-        alignMap.put(XWPFVertAlign.BOTH, STVerticalJc.Enum.forInt(STVerticalJc.INT_BOTH));
-        alignMap.put(XWPFVertAlign.BOTTOM, STVerticalJc.Enum.forInt(STVerticalJc.INT_BOTTOM));
+        alignMap.put(XWPFVertAlign.TOP, STVerticalJc.TOP);
+        alignMap.put(XWPFVertAlign.CENTER, STVerticalJc.CENTER);
+        alignMap.put(XWPFVertAlign.BOTH, STVerticalJc.BOTH);
+        alignMap.put(XWPFVertAlign.BOTTOM, STVerticalJc.BOTTOM);
 
         stVertAlignTypeMap = new HashMap<>();
         stVertAlignTypeMap.put(STVerticalJc.INT_TOP, XWPFVertAlign.TOP);