]> source.dussan.org Git - poi.git/commitdiff
Remove use of deprecated methods
authorPJ Fanning <fanningpj@apache.org>
Sun, 22 Oct 2017 13:03:33 +0000 (13:03 +0000)
committerPJ Fanning <fanningpj@apache.org>
Sun, 22 Oct 2017 13:03:33 +0000 (13:03 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1812911 13f79535-47bb-0310-9956-ffa450edef68

20 files changed:
src/examples/src/org/apache/poi/hssf/view/SVTableCellRenderer.java
src/examples/src/org/apache/poi/ss/examples/ExcelComparator.java
src/examples/src/org/apache/poi/ss/examples/html/ToHtml.java
src/java/org/apache/poi/hssf/usermodel/HSSFCellStyle.java
src/java/org/apache/poi/ss/usermodel/CellStyle.java
src/java/org/apache/poi/ss/util/CellUtil.java
src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCellStyle.java
src/ooxml/testcases/org/apache/poi/ss/util/TestXSSFPropertyTemplate.java
src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFCellStyle.java
src/scratchpad/src/org/apache/poi/hssf/converter/ExcelToFoConverter.java
src/scratchpad/src/org/apache/poi/hssf/converter/ExcelToHtmlConverter.java
src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java
src/testcases/org/apache/poi/hssf/usermodel/TestCellStyle.java
src/testcases/org/apache/poi/hssf/usermodel/TestHSSFOptimiser.java
src/testcases/org/apache/poi/hssf/usermodel/TestRowStyle.java
src/testcases/org/apache/poi/ss/usermodel/BaseTestBorderStyle.java
src/testcases/org/apache/poi/ss/usermodel/BaseTestCell.java
src/testcases/org/apache/poi/ss/util/BaseTestCellUtil.java
src/testcases/org/apache/poi/ss/util/TestPropertyTemplate.java
src/testcases/org/apache/poi/ss/util/TestRegionUtil.java

index 62778964d912f345a4dc2fbf2e1342ac52bab9f3..d1f7d18b97a834afc3b4be228049a4a8653c943d 100644 (file)
@@ -161,8 +161,8 @@ public class SVTableCellRenderer extends JLabel
                                SVTableUtils.getAWTColor(s.getRightBorderColor(), SVTableUtils.black),
                                SVTableUtils.getAWTColor(s.getBottomBorderColor(), SVTableUtils.black),
                                SVTableUtils.getAWTColor(s.getLeftBorderColor(), SVTableUtils.black),
-                               s.getBorderTopEnum(), s.getBorderRightEnum(),
-                               s.getBorderBottomEnum(), s.getBorderLeftEnum(),
+                               s.getBorderTop(), s.getBorderRight(),
+                               s.getBorderBottom(), s.getBorderLeft(),
                                hasFocus);
             setBorder(cellBorder);
             isBorderSet=true;
index 25e843329930cbc7d5af75455b924fe6ada96744..73675b7f9506f29a2f693ed15d30168a7c125dd6 100644 (file)
@@ -352,23 +352,23 @@ public class ExcelComparator {
         String borderName;
         switch (borderSide) {
             case 't': default:
-                b1 = style1.getBorderTopEnum() == BorderStyle.THIN;
-                b2 = style2.getBorderTopEnum() == BorderStyle.THIN;
+                b1 = style1.getBorderTop() == BorderStyle.THIN;
+                b2 = style2.getBorderTop() == BorderStyle.THIN;
                 borderName = "TOP";
                 break;
             case 'b':
-                b1 = style1.getBorderBottomEnum() == BorderStyle.THIN;
-                b2 = style2.getBorderBottomEnum() == BorderStyle.THIN;
+                b1 = style1.getBorderBottom() == BorderStyle.THIN;
+                b2 = style2.getBorderBottom() == BorderStyle.THIN;
                 borderName = "BOTTOM";
                 break;
             case 'l':
-                b1 = style1.getBorderLeftEnum() == BorderStyle.THIN;
-                b2 = style2.getBorderLeftEnum() == BorderStyle.THIN;
+                b1 = style1.getBorderLeft() == BorderStyle.THIN;
+                b2 = style2.getBorderLeft() == BorderStyle.THIN;
                 borderName = "LEFT";
                 break;
             case 'r':
-                b1 = style1.getBorderRightEnum() == BorderStyle.THIN;
-                b2 = style2.getBorderRightEnum() == BorderStyle.THIN;
+                b1 = style1.getBorderRight() == BorderStyle.THIN;
+                b2 = style2.getBorderRight() == BorderStyle.THIN;
                 borderName = "RIGHT";
                 break;
         }
index 45d8157ea143c6f5ab6c494754ef9ae6f2ffe824..dfe3fa40132db7956187b8d8c74dc984e6c351b7 100644 (file)
@@ -297,10 +297,10 @@ public class ToHtml {
     }
 
     private void borderStyles(CellStyle style) {
-        styleOut("border-left", style.getBorderLeftEnum(), BORDER);
-        styleOut("border-right", style.getBorderRightEnum(), BORDER);
-        styleOut("border-top", style.getBorderTopEnum(), BORDER);
-        styleOut("border-bottom", style.getBorderBottomEnum(), BORDER);
+        styleOut("border-left", style.getBorderLeft(), BORDER);
+        styleOut("border-right", style.getBorderRight(), BORDER);
+        styleOut("border-top", style.getBorderTop(), BORDER);
+        styleOut("border-bottom", style.getBorderBottom(), BORDER);
     }
 
     private void fontStyle(CellStyle style) {
index 2e6c5b5c5428b2ababd007b5a133baa66ca664dd..64a0d12e98cf663cf37047fb4eb0a4c9a2f103ca 100644 (file)
@@ -408,28 +408,15 @@ public final class HSSFCellStyle implements CellStyle {
         _format.setBorderLeft(border.getCode());
     }
 
-    /**
-     * get the type of border to use for the left border of the cell
-     * @return border type
-     * @deprecated POI 3.15. Will return a BorderStyle enum in the future. Use {@link #getBorderLeftEnum()}.
-     */
-    @Deprecated
     @Override
-    public short getBorderLeft()
-    {
-        return _format.getBorderLeft();
-    }
-    /**
-     * get the type of border to use for the left border of the cell
-     * @return border type
-     * @since POI 3.15
-     */
-    @Override
-    public BorderStyle getBorderLeftEnum()
+    public BorderStyle getBorderLeft()
     {
         return BorderStyle.valueOf(_format.getBorderLeft());
     }
-    
+
+    @Override
+    public BorderStyle getBorderLeftEnum() { return getBorderLeft(); }
+
     /**
      * set the type of border to use for the right border of the cell
      * @param border type
@@ -442,28 +429,15 @@ public final class HSSFCellStyle implements CellStyle {
         _format.setBorderRight(border.getCode());
     }
 
-    /**
-     * get the type of border to use for the right border of the cell
-     * @return border type
-     * @deprecated POI 3.15. Will return a BorderStyle enum in the future. Use {@link #getBorderRightEnum()}.
-     */
-    @Deprecated
     @Override
-    public short getBorderRight()
-    {
-        return _format.getBorderRight();
-    }
-    /**
-     * get the type of border to use for the right border of the cell
-     * @return border type
-     * @since POI 3.15
-     */
-    @Override
-    public BorderStyle getBorderRightEnum()
+    public BorderStyle getBorderRight()
     {
         return BorderStyle.valueOf(_format.getBorderRight());
     }
-    
+
+    @Override
+    public BorderStyle getBorderRightEnum() { return getBorderRight(); }
+
     /**
      * set the type of border to use for the top border of the cell
      * @param border type
@@ -476,28 +450,15 @@ public final class HSSFCellStyle implements CellStyle {
         _format.setBorderTop(border.getCode());
     }
 
-    /**
-     * get the type of border to use for the top border of the cell
-     * @return border type
-     * @deprecated POI 3.15. Will return a BorderStyle enum in the future. Use {@link #getBorderTopEnum()}.
-     */
-    @Deprecated
     @Override
-    public short getBorderTop()
-    {
-        return _format.getBorderTop();
-    }
-    /**
-     * get the type of border to use for the top border of the cell
-     * @return border type
-     * @since 3.15
-     */
-    @Override
-    public BorderStyle getBorderTopEnum()
+    public BorderStyle getBorderTop()
     {
         return BorderStyle.valueOf(_format.getBorderTop());
     }
-    
+
+    @Override
+    public BorderStyle getBorderTopEnum() { return getBorderTop(); }
+
     /**
      * set the type of border to use for the bottom border of the cell
      * @param border type
@@ -510,28 +471,15 @@ public final class HSSFCellStyle implements CellStyle {
         _format.setBorderBottom(border.getCode());
     }
 
-    /**
-     * get the type of border to use for the bottom border of the cell
-     * @return border type
-     * @deprecated POI 3.15. Will return a BorderStyle enum in the future. Use {@link #getBorderBottomEnum()}.
-     */
-    @Deprecated
     @Override
-    public short getBorderBottom()
-    {
-        return _format.getBorderBottom();
-    }
-    /**
-     * get the type of border to use for the bottom border of the cell
-     * @return border type
-     * @since 3.15
-     */
-    @Override
-    public BorderStyle getBorderBottomEnum()
+    public BorderStyle getBorderBottom()
     {
         return BorderStyle.valueOf(_format.getBorderBottom());
     }
 
+    @Override
+    public BorderStyle getBorderBottomEnum() { return getBorderBottom(); }
+
     /**
      * set the color to use for the left border
      * @param color The index of the color definition
index e260edfff27668b94e95786b64a8ecf9ac327288..cebdcf30471c0117e34f9769b018b74a3ed8ec18 100644 (file)
@@ -208,15 +208,17 @@ public interface CellStyle {
     /**
      * get the type of border to use for the left border of the cell
      * @return border type
-     * @deprecated POI 3.15. Use {@link #getBorderLeftEnum()} instead.
-     * This will return a BorderStyle enum in the future.
+     * @since POI 4.0.0
      */
-    short getBorderLeft();
+    BorderStyle getBorderLeft();
+
     /**
      * get the type of border to use for the left border of the cell
      * @return border type
      * @since POI 3.15
+     * @deprecated use <code>getBorderLeft()</code> instead
      */
+    @Removal(version = "4.2")
     BorderStyle getBorderLeftEnum();
 
     /**
@@ -229,15 +231,17 @@ public interface CellStyle {
     /**
      * get the type of border to use for the right border of the cell
      * @return border type
-     * @deprecated POI 3.15. Use {@link #getBorderRightEnum()} instead.
-     * This will return a BorderStyle enum in the future.
+     * @since POI 4.0.0
      */
-    short getBorderRight();
+    BorderStyle getBorderRight();
+
     /**
      * get the type of border to use for the right border of the cell
      * @return border type
      * @since POI 3.15
+     * @deprecated use <code>getBorderRight()</code> instead
      */
+    @Removal(version = "4.2")
     BorderStyle getBorderRightEnum();
 
     /**
@@ -250,17 +254,19 @@ public interface CellStyle {
     /**
      * get the type of border to use for the top border of the cell
      * @return border type
-     * @deprecated POI 3.15. Use {@link #getBorderTopEnum()} instead.
-     * This will return a BorderStyle enum in the future.
+     * @since POI 4.0.0
      */
-    short getBorderTop();
+    BorderStyle getBorderTop();
+
     /**
      * get the type of border to use for the top border of the cell
      * @return border type
      * @since POI 3.15
+     * @deprecated use <code>getBorderTop()</code> instead
      */
+    @Removal(version = "4.2")
     BorderStyle getBorderTopEnum();
-    
+
     /**
      * set the type of border to use for the bottom border of the cell
      * @param border type
@@ -271,15 +277,17 @@ public interface CellStyle {
     /**
      * get the type of border to use for the bottom border of the cell
      * @return border type
-     * @deprecated POI 3.15. Use {@link #getBorderBottomEnum()} instead.
-     * This will return a BorderStyle enum in the future.
+     * @since POI 4.0.0
      */
-    short getBorderBottom();
+    BorderStyle getBorderBottom();
+
     /**
      * get the type of border to use for the bottom border of the cell
      * @return border type
      * @since POI 3.15
+     * @deprecated use <code>getBorderBottom()</code> instead
      */
+    @Removal(version = "4.2")
     BorderStyle getBorderBottomEnum();
 
     /**
index 1b765b940128c7bcdbc0d38b4898e2719c1be302..e1b909917a0149f18a1aa2a92bcff37764719b17 100644 (file)
@@ -337,10 +337,10 @@ public final class CellUtil {
         Map<String, Object> properties = new HashMap<>();
         put(properties, ALIGNMENT, style.getAlignment());
         put(properties, VERTICAL_ALIGNMENT, style.getVerticalAlignment());
-        put(properties, BORDER_BOTTOM, style.getBorderBottomEnum());
-        put(properties, BORDER_LEFT, style.getBorderLeftEnum());
-        put(properties, BORDER_RIGHT, style.getBorderRightEnum());
-        put(properties, BORDER_TOP, style.getBorderTopEnum());
+        put(properties, BORDER_BOTTOM, style.getBorderBottom());
+        put(properties, BORDER_LEFT, style.getBorderLeft());
+        put(properties, BORDER_RIGHT, style.getBorderRight());
+        put(properties, BORDER_TOP, style.getBorderTop());
         put(properties, BOTTOM_BORDER_COLOR, style.getBottomBorderColor());
         put(properties, DATA_FORMAT, style.getDataFormat());
         put(properties, FILL_PATTERN, style.getFillPattern());
index 50ea1829f23b5d12b01c867f0fdedf9f1c2790df..423baf8a5f67fce95095b8b706d9295cece255e1 100644 (file)
@@ -230,15 +230,9 @@ public class XSSFCellStyle implements CellStyle {
     public HorizontalAlignment getAlignmentEnum() {
         return getAlignment();
     }
-    /**
-     * Get the type of border to use for the bottom border of the cell
-     * Will be removed when {@link #getBorderBottom()} returns a BorderStyle enum
-     *
-     * @return border type, default value is {@link org.apache.poi.ss.usermodel.BorderStyle#NONE}
-     * @since POI 3.15
-     */
+
     @Override
-    public BorderStyle getBorderBottomEnum() {
+    public BorderStyle getBorderBottom() {
         if(!_cellXf.getApplyBorder()) return BorderStyle.NONE;
 
         int idx = (int)_cellXf.getBorderId();
@@ -249,26 +243,14 @@ public class XSSFCellStyle implements CellStyle {
         }
         return BorderStyle.valueOf((short)(ptrn.intValue() - 1));
     }
-    /**
-     * Get the type of border to use for the bottom border of the cell
-     * This will return a BorderStyle enum in the future.
-     *
-     * @return border type code
-     * @deprecated 3.15 beta 2. Use {@link #getBorderBottomEnum()}
-     */
-    public short getBorderBottom() {
-        return getBorderBottomEnum().getCode();
+
+    @Override
+    public BorderStyle getBorderBottomEnum() {
+        return getBorderBottom();
     }
 
-    /**
-     * Get the type of border to use for the left border of the cell
-     * Will be removed when {@link #getBorderLeft()} returns a BorderStyle enum
-     *
-     * @return border type, default value is {@link org.apache.poi.ss.usermodel.BorderStyle#NONE}
-     * @since POI 3.15
-     */
     @Override
-    public BorderStyle getBorderLeftEnum() {
+    public BorderStyle getBorderLeft() {
         if(!_cellXf.getApplyBorder()) return BorderStyle.NONE;
 
         int idx = (int)_cellXf.getBorderId();
@@ -280,26 +262,11 @@ public class XSSFCellStyle implements CellStyle {
         return BorderStyle.valueOf((short)(ptrn.intValue() - 1));
     }
 
-    /**
-     * Get the type of border to use for the left border of the cell
-     * This will return a BorderStyle enum in the future.
-     *
-     * @return border type code
-     * @deprecated 3.15 beta 2. Use {@link #getBorderLeftEnum()}
-     */
-    public short getBorderLeft() {
-        return getBorderLeftEnum().getCode();
-    }
+    @Override
+    public BorderStyle getBorderLeftEnum() { return getBorderLeft(); }
 
-    /**
-     * Get the type of border to use for the right border of the cell
-     * Will be removed when {@link #getBorderRight()} returns a BorderStyle enum
-     *
-     * @return border type, default value is {@link org.apache.poi.ss.usermodel.BorderStyle#NONE}
-     * @since POI 3.15
-     */
     @Override
-    public BorderStyle getBorderRightEnum() {
+    public BorderStyle getBorderRight() {
         if(!_cellXf.getApplyBorder()) return BorderStyle.NONE;
 
         int idx = (int)_cellXf.getBorderId();
@@ -310,26 +277,14 @@ public class XSSFCellStyle implements CellStyle {
         }
         return BorderStyle.valueOf((short)(ptrn.intValue() - 1));
     }
-    /**
-     * Get the type of border to use for the right border of the cell
-     * This will return a BorderStyle enum in the future.
-     *
-     * @return border type, default value is {@link org.apache.poi.ss.usermodel.BorderStyle#NONE}
-     * @deprecated 3.15 beta 2. Use {@link #getBorderRightEnum()} instead
-     */
-    public short getBorderRight() {
-        return getBorderRightEnum().getCode();
+
+    @Override
+    public BorderStyle getBorderRightEnum() {
+        return getBorderRight();
     }
 
-    /**
-     * Get the type of border to use for the top border of the cell
-     * Will be removed when {@link #getBorderTop()} returns a BorderStyle enum
-     *
-     * @return border type, default value is {@link org.apache.poi.ss.usermodel.BorderStyle#NONE}
-     * @since POI 3.15
-     */
     @Override
-    public BorderStyle getBorderTopEnum() {
+    public BorderStyle getBorderTop() {
         if(!_cellXf.getApplyBorder()) return BorderStyle.NONE;
 
         int idx = (int)_cellXf.getBorderId();
@@ -340,15 +295,10 @@ public class XSSFCellStyle implements CellStyle {
         }
         return BorderStyle.valueOf((short) (ptrn.intValue() - 1));
     }
-     /**
-     * Get the type of border to use for the top border of the cell
-     * This will return a BorderStyle enum in the future.
-     *
-     * @return border type, default value is {@link org.apache.poi.ss.usermodel.BorderStyle#NONE}
-     * @deprecated 3.15 beta 2. Use {@link #getBorderTopEnum()} instead.
-     */
-    public short getBorderTop() {
-         return getBorderTopEnum().getCode();
+
+    @Override
+    public BorderStyle getBorderTopEnum() {
+         return getBorderTop();
     }
 
     /**
index 1c4b7adc38478941ded283df31baf28001bf6f4b..b1055e1631444589ae274aa62d0e3541a9c1d33a 100644 (file)
@@ -49,13 +49,13 @@ public class TestXSSFPropertyTemplate {
         for (Row row: sheet) {
             for (Cell cell: row) {
                 CellStyle cs = cell.getCellStyle();
-                assertEquals(BorderStyle.THIN, cs.getBorderTopEnum());
+                assertEquals(BorderStyle.THIN, cs.getBorderTop());
                 assertEquals(IndexedColors.RED.getIndex(), cs.getTopBorderColor());
-                assertEquals(BorderStyle.THIN, cs.getBorderBottomEnum());
+                assertEquals(BorderStyle.THIN, cs.getBorderBottom());
                 assertEquals(IndexedColors.RED.getIndex(), cs.getBottomBorderColor());
-                assertEquals(BorderStyle.THIN, cs.getBorderLeftEnum());
+                assertEquals(BorderStyle.THIN, cs.getBorderLeft());
                 assertEquals(IndexedColors.RED.getIndex(), cs.getLeftBorderColor());
-                assertEquals(BorderStyle.THIN, cs.getBorderRightEnum());
+                assertEquals(BorderStyle.THIN, cs.getBorderRight());
                 assertEquals(IndexedColors.RED.getIndex(), cs.getRightBorderColor());
             }
         }
@@ -67,28 +67,28 @@ public class TestXSSFPropertyTemplate {
             for (Cell cell: row) {
                 CellStyle cs = cell.getCellStyle();
                 if (cell.getColumnIndex() != 1 || row.getRowNum() == 0) {
-                assertEquals(BorderStyle.THIN, cs.getBorderTopEnum());
+                assertEquals(BorderStyle.THIN, cs.getBorderTop());
                 assertEquals(IndexedColors.RED.getIndex(), cs.getTopBorderColor());
                 } else {
-                    assertEquals(BorderStyle.NONE, cs.getBorderTopEnum());
+                    assertEquals(BorderStyle.NONE, cs.getBorderTop());
                 }
                 if (cell.getColumnIndex() != 1 || row.getRowNum() == 2) {
-                assertEquals(BorderStyle.THIN, cs.getBorderBottomEnum());
+                assertEquals(BorderStyle.THIN, cs.getBorderBottom());
                 assertEquals(IndexedColors.RED.getIndex(), cs.getBottomBorderColor());
                 } else {
-                    assertEquals(BorderStyle.NONE, cs.getBorderBottomEnum());
+                    assertEquals(BorderStyle.NONE, cs.getBorderBottom());
                 }
                 if (cell.getColumnIndex() == 0 || row.getRowNum() != 1) {
-                assertEquals(BorderStyle.THIN, cs.getBorderLeftEnum());
+                assertEquals(BorderStyle.THIN, cs.getBorderLeft());
                 assertEquals(IndexedColors.RED.getIndex(), cs.getLeftBorderColor());
                 } else {
-                    assertEquals(BorderStyle.NONE, cs.getBorderLeftEnum());
+                    assertEquals(BorderStyle.NONE, cs.getBorderLeft());
                 }
                 if (cell.getColumnIndex() == 2 || row.getRowNum() != 1) {
-                assertEquals(BorderStyle.THIN, cs.getBorderRightEnum());
+                assertEquals(BorderStyle.THIN, cs.getBorderRight());
                 assertEquals(IndexedColors.RED.getIndex(), cs.getRightBorderColor());
                 } else {
-                    assertEquals(BorderStyle.NONE, cs.getBorderRightEnum());
+                    assertEquals(BorderStyle.NONE, cs.getBorderRight());
                 }
             }
         }
@@ -120,10 +120,10 @@ public class TestXSSFPropertyTemplate {
         for (Row row : sheet) {
             for (Cell cell : row) {
                 CellStyle cs = cell.getCellStyle();
-                assertEquals(BorderStyle.MEDIUM, cs.getBorderTopEnum());
-                assertEquals(BorderStyle.MEDIUM, cs.getBorderBottomEnum());
-                assertEquals(BorderStyle.MEDIUM, cs.getBorderLeftEnum());
-                assertEquals(BorderStyle.MEDIUM, cs.getBorderRightEnum());
+                assertEquals(BorderStyle.MEDIUM, cs.getBorderTop());
+                assertEquals(BorderStyle.MEDIUM, cs.getBorderBottom());
+                assertEquals(BorderStyle.MEDIUM, cs.getBorderLeft());
+                assertEquals(BorderStyle.MEDIUM, cs.getBorderRight());
                 assertEquals(IndexedColors.RED.getIndex(), cs.getTopBorderColor());
                 assertEquals(IndexedColors.RED.getIndex(), cs.getBottomBorderColor());
                 assertEquals(IndexedColors.RED.getIndex(), cs.getLeftBorderColor());
index c79d8e9682c9f7c6731fc61535edd9f08bda218e..1b1c842704d7d0410ec249bc1c7f1c3d1fa3025f 100644 (file)
@@ -104,11 +104,11 @@ public class TestXSSFCellStyle {
        @Test
        public void testGetSetBorderBottom() {
         //default values
-        assertEquals(BorderStyle.NONE, cellStyle.getBorderBottomEnum());
+        assertEquals(BorderStyle.NONE, cellStyle.getBorderBottom());
 
         int num = stylesTable.getBorders().size();
         cellStyle.setBorderBottom(BorderStyle.MEDIUM);
-        assertEquals(BorderStyle.MEDIUM, cellStyle.getBorderBottomEnum());
+        assertEquals(BorderStyle.MEDIUM, cellStyle.getBorderBottom());
         //a new border has been added
         assertEquals(num + 1, stylesTable.getBorders().size());
         //id of the created border
@@ -122,7 +122,7 @@ public class TestXSSFCellStyle {
         //setting the same border multiple times should not change borderId
         for (int i = 0; i < 3; i++) {
             cellStyle.setBorderBottom(BorderStyle.MEDIUM);
-            assertEquals(BorderStyle.MEDIUM, cellStyle.getBorderBottomEnum());
+            assertEquals(BorderStyle.MEDIUM, cellStyle.getBorderBottom());
         }
         assertEquals(borderId, cellStyle.getCoreXf().getBorderId());
         assertEquals(num, stylesTable.getBorders().size());
@@ -139,11 +139,11 @@ public class TestXSSFCellStyle {
        @Test
     public void testGetSetBorderRight() {
         //default values
-        assertEquals(BorderStyle.NONE, cellStyle.getBorderRightEnum());
+        assertEquals(BorderStyle.NONE, cellStyle.getBorderRight());
 
         int num = stylesTable.getBorders().size();
         cellStyle.setBorderRight(BorderStyle.MEDIUM);
-        assertEquals(BorderStyle.MEDIUM, cellStyle.getBorderRightEnum());
+        assertEquals(BorderStyle.MEDIUM, cellStyle.getBorderRight());
         //a new border has been added
         assertEquals(num + 1, stylesTable.getBorders().size());
         //id of the created border
@@ -157,7 +157,7 @@ public class TestXSSFCellStyle {
         //setting the same border multiple times should not change borderId
         for (int i = 0; i < 3; i++) {
             cellStyle.setBorderRight(BorderStyle.MEDIUM);
-            assertEquals(BorderStyle.MEDIUM, cellStyle.getBorderRightEnum());
+            assertEquals(BorderStyle.MEDIUM, cellStyle.getBorderRight());
         }
         assertEquals(borderId, cellStyle.getCoreXf().getBorderId());
         assertEquals(num, stylesTable.getBorders().size());
@@ -174,11 +174,11 @@ public class TestXSSFCellStyle {
        @Test
     public void testGetSetBorderLeft() {
         //default values
-        assertEquals(BorderStyle.NONE, cellStyle.getBorderLeftEnum());
+        assertEquals(BorderStyle.NONE, cellStyle.getBorderLeft());
 
         int num = stylesTable.getBorders().size();
         cellStyle.setBorderLeft(BorderStyle.MEDIUM);
-        assertEquals(BorderStyle.MEDIUM, cellStyle.getBorderLeftEnum());
+        assertEquals(BorderStyle.MEDIUM, cellStyle.getBorderLeft());
         //a new border has been added
         assertEquals(num + 1, stylesTable.getBorders().size());
         //id of the created border
@@ -192,7 +192,7 @@ public class TestXSSFCellStyle {
         //setting the same border multiple times should not change borderId
         for (int i = 0; i < 3; i++) {
             cellStyle.setBorderLeft(BorderStyle.MEDIUM);
-            assertEquals(BorderStyle.MEDIUM, cellStyle.getBorderLeftEnum());
+            assertEquals(BorderStyle.MEDIUM, cellStyle.getBorderLeft());
         }
         assertEquals(borderId, cellStyle.getCoreXf().getBorderId());
         assertEquals(num, stylesTable.getBorders().size());
@@ -209,11 +209,11 @@ public class TestXSSFCellStyle {
        @Test
     public void testGetSetBorderTop() {
         //default values
-        assertEquals(BorderStyle.NONE, cellStyle.getBorderTopEnum());
+        assertEquals(BorderStyle.NONE, cellStyle.getBorderTop());
 
         int num = stylesTable.getBorders().size();
         cellStyle.setBorderTop(BorderStyle.MEDIUM);
-        assertEquals(BorderStyle.MEDIUM, cellStyle.getBorderTopEnum());
+        assertEquals(BorderStyle.MEDIUM, cellStyle.getBorderTop());
         //a new border has been added
         assertEquals(num + 1, stylesTable.getBorders().size());
         //id of the created border
@@ -227,7 +227,7 @@ public class TestXSSFCellStyle {
         //setting the same border multiple times should not change borderId
         for (int i = 0; i < 3; i++) {
             cellStyle.setBorderTop(BorderStyle.MEDIUM);
-            assertEquals(BorderStyle.MEDIUM, cellStyle.getBorderTopEnum());
+            assertEquals(BorderStyle.MEDIUM, cellStyle.getBorderTop());
         }
         assertEquals(borderId, cellStyle.getCoreXf().getBorderId());
         assertEquals(num, stylesTable.getBorders().size());
@@ -243,7 +243,7 @@ public class TestXSSFCellStyle {
     
     private void testGetSetBorderXMLBean(BorderStyle border, STBorderStyle.Enum expected) {
         cellStyle.setBorderTop(border);
-        assertEquals(border, cellStyle.getBorderTopEnum());
+        assertEquals(border, cellStyle.getBorderTop());
         int borderId = (int)cellStyle.getCoreXf().getBorderId();
         assertTrue(borderId > 0);
         //check changes in the underlying xml bean
@@ -256,7 +256,7 @@ public class TestXSSFCellStyle {
     @Test
     public void testGetSetBorderNone() {
         cellStyle.setBorderTop(BorderStyle.NONE);
-        assertEquals(BorderStyle.NONE, cellStyle.getBorderTopEnum());
+        assertEquals(BorderStyle.NONE, cellStyle.getBorderTop());
         int borderId = (int)cellStyle.getCoreXf().getBorderId();
         assertTrue(borderId > 0);
         //check changes in the underlying xml bean
@@ -563,10 +563,10 @@ public class TestXSSFCellStyle {
         assertEquals(style2.getRightBorderColor(), style1.getRightBorderColor());
         assertEquals(style2.getBottomBorderColor(), style1.getBottomBorderColor());
 
-        assertEquals(style2.getBorderBottomEnum(), style1.getBorderBottomEnum());
-        assertEquals(style2.getBorderLeftEnum(), style1.getBorderLeftEnum());
-        assertEquals(style2.getBorderRightEnum(), style1.getBorderRightEnum());
-        assertEquals(style2.getBorderTopEnum(), style1.getBorderTopEnum());
+        assertEquals(style2.getBorderBottom(), style1.getBorderBottom());
+        assertEquals(style2.getBorderLeft(), style1.getBorderLeft());
+        assertEquals(style2.getBorderRight(), style1.getBorderRight());
+        assertEquals(style2.getBorderTop(), style1.getBorderTop());
         wb2.close();
        }
 
@@ -1003,7 +1003,7 @@ public class TestXSSFCellStyle {
         Workbook copy = XSSFTestDataSamples.writeOutAndReadBack(target);
 
         // previously this failed because the border-element was not copied over 
-        copy.getCellStyleAt((short)1).getBorderBottomEnum();
+        copy.getCellStyleAt((short)1).getBorderBottom();
         
         copy.close();
         
index f90f44830ada29531211ed295b83ba52ed247dfa..6b05818a70c177b8f8d4ee920b3dba487e78d4a9 100644 (file)
@@ -196,10 +196,10 @@ public class ExcelToFoConverter extends AbstractExcelConverter
     protected boolean isEmptyStyle( CellStyle cellStyle ) {
         return cellStyle == null || (
                cellStyle.getFillPattern() == FillPatternType.NO_FILL
-            && cellStyle.getBorderTopEnum() == BorderStyle.NONE
-            && cellStyle.getBorderRightEnum() == BorderStyle.NONE
-            && cellStyle.getBorderBottomEnum() == BorderStyle.NONE
-            && cellStyle.getBorderLeftEnum() == BorderStyle.NONE
+            && cellStyle.getBorderTop() == BorderStyle.NONE
+            && cellStyle.getBorderRight() == BorderStyle.NONE
+            && cellStyle.getBorderBottom() == BorderStyle.NONE
+            && cellStyle.getBorderLeft() == BorderStyle.NONE
         );
     }
 
@@ -363,13 +363,13 @@ public class ExcelToFoConverter extends AbstractExcelConverter
         }
 
         processCellStyleBorder( workbook, cellTarget, "top",
-                cellStyle.getBorderTopEnum(), cellStyle.getTopBorderColor() );
+                cellStyle.getBorderTop(), cellStyle.getTopBorderColor() );
         processCellStyleBorder( workbook, cellTarget, "right",
-                cellStyle.getBorderRightEnum(), cellStyle.getRightBorderColor() );
+                cellStyle.getBorderRight(), cellStyle.getRightBorderColor() );
         processCellStyleBorder( workbook, cellTarget, "bottom",
-                cellStyle.getBorderBottomEnum(), cellStyle.getBottomBorderColor() );
+                cellStyle.getBorderBottom(), cellStyle.getBottomBorderColor() );
         processCellStyleBorder( workbook, cellTarget, "left",
-                cellStyle.getBorderLeftEnum(), cellStyle.getLeftBorderColor() );
+                cellStyle.getBorderLeft(), cellStyle.getLeftBorderColor() );
 
         HSSFFont font = cellStyle.getFont( workbook );
         processCellStyleFont( workbook, blockTarget, font );
index c0c8927b8fb37edaa463dd3dff3ffababa6d709b..d507dba99fa07ac83b7d9be86ca45b4cbd85ad4c 100644 (file)
@@ -209,13 +209,13 @@ public class ExcelToHtmlConverter extends AbstractExcelConverter
                 break;
         }
 
-        buildStyle_border( workbook, style, "top", cellStyle.getBorderTopEnum(),
+        buildStyle_border( workbook, style, "top", cellStyle.getBorderTop(),
                 cellStyle.getTopBorderColor() );
         buildStyle_border( workbook, style, "right",
-                cellStyle.getBorderRightEnum(), cellStyle.getRightBorderColor() );
+                cellStyle.getBorderRight(), cellStyle.getRightBorderColor() );
         buildStyle_border( workbook, style, "bottom",
-                cellStyle.getBorderBottomEnum(), cellStyle.getBottomBorderColor() );
-        buildStyle_border( workbook, style, "left", cellStyle.getBorderLeftEnum(),
+                cellStyle.getBorderBottom(), cellStyle.getBottomBorderColor() );
+        buildStyle_border( workbook, style, "left", cellStyle.getBorderLeft(),
                 cellStyle.getLeftBorderColor() );
 
         HSSFFont font = cellStyle.getFont( workbook );
index 362e079a430a8d83135ed1ced9f4c9d9da3774df..b68c92bccb3ceeebef59b27db3b80c67826b682b 100644 (file)
@@ -2595,7 +2595,7 @@ public final class TestBugs extends BaseTestBugzillaIssues {
         Row row = sheet.getRow(0);
         CellStyle rstyle = row.getRowStyle();
         assertNotNull(rstyle);
-        assertEquals(BorderStyle.DOUBLE, rstyle.getBorderBottomEnum());
+        assertEquals(BorderStyle.DOUBLE, rstyle.getBorderBottom());
         wb.close();
     }
 
index 844b61270dd8294b457d9766178c3f7244ff76df..f067725f46044928f6d3465bc22573f2a435c9df 100644 (file)
@@ -350,40 +350,40 @@ public final class TestCellStyle extends TestCase {
        HSSFCellStyle cs;
 
        cs = s.getRow(0).getCell(0).getCellStyle();
-       assertEquals(BorderStyle.HAIR, cs.getBorderRightEnum());
+       assertEquals(BorderStyle.HAIR, cs.getBorderRight());
 
        cs = s.getRow(1).getCell(1).getCellStyle();
-       assertEquals(BorderStyle.DOTTED, cs.getBorderRightEnum());
+       assertEquals(BorderStyle.DOTTED, cs.getBorderRight());
 
        cs = s.getRow(2).getCell(2).getCellStyle();
-       assertEquals(BorderStyle.DASH_DOT_DOT, cs.getBorderRightEnum());
+       assertEquals(BorderStyle.DASH_DOT_DOT, cs.getBorderRight());
 
        cs = s.getRow(3).getCell(3).getCellStyle();
-       assertEquals(BorderStyle.DASHED, cs.getBorderRightEnum());
+       assertEquals(BorderStyle.DASHED, cs.getBorderRight());
 
        cs = s.getRow(4).getCell(4).getCellStyle();
-       assertEquals(BorderStyle.THIN, cs.getBorderRightEnum());
+       assertEquals(BorderStyle.THIN, cs.getBorderRight());
 
        cs = s.getRow(5).getCell(5).getCellStyle();
-       assertEquals(BorderStyle.MEDIUM_DASH_DOT_DOT, cs.getBorderRightEnum());
+       assertEquals(BorderStyle.MEDIUM_DASH_DOT_DOT, cs.getBorderRight());
 
        cs = s.getRow(6).getCell(6).getCellStyle();
-       assertEquals(BorderStyle.SLANTED_DASH_DOT, cs.getBorderRightEnum());
+       assertEquals(BorderStyle.SLANTED_DASH_DOT, cs.getBorderRight());
 
        cs = s.getRow(7).getCell(7).getCellStyle();
-       assertEquals(BorderStyle.MEDIUM_DASH_DOT, cs.getBorderRightEnum());
+       assertEquals(BorderStyle.MEDIUM_DASH_DOT, cs.getBorderRight());
 
        cs = s.getRow(8).getCell(8).getCellStyle();
-       assertEquals(BorderStyle.MEDIUM_DASHED, cs.getBorderRightEnum());
+       assertEquals(BorderStyle.MEDIUM_DASHED, cs.getBorderRight());
 
        cs = s.getRow(9).getCell(9).getCellStyle();
-       assertEquals(BorderStyle.MEDIUM, cs.getBorderRightEnum());
+       assertEquals(BorderStyle.MEDIUM, cs.getBorderRight());
 
        cs = s.getRow(10).getCell(10).getCellStyle();
-       assertEquals(BorderStyle.THICK, cs.getBorderRightEnum());
+       assertEquals(BorderStyle.THICK, cs.getBorderRight());
 
        cs = s.getRow(11).getCell(11).getCellStyle();
-       assertEquals(BorderStyle.DOUBLE, cs.getBorderRightEnum());
+       assertEquals(BorderStyle.DOUBLE, cs.getBorderRight());
     }
 
     public void testShrinkToFit() {
@@ -502,7 +502,7 @@ public final class TestCellStyle extends TestCase {
         newCell.setCellValue("2testtext2");
 
         CellStyle newStyle = newCell.getCellStyle();
-        assertEquals(BorderStyle.DOTTED, newStyle.getBorderBottomEnum());
+        assertEquals(BorderStyle.DOTTED, newStyle.getBorderBottom());
         assertEquals(Font.COLOR_RED, ((HSSFCellStyle)newStyle).getFont(wb).getColor());
         
 //        OutputStream out = new FileOutputStream("/tmp/56959.xls");
index c3385c0fbb1fde55c4d21177cdf305ed1ecf13f4..c407778179a4e534a81b0711eca76630fdebc4f4 100644 (file)
@@ -309,8 +309,8 @@ public final class TestHSSFOptimiser extends TestCase {
            // Check
            assertEquals(23, wb.getNumCellStyles());
            
-           assertEquals(BorderStyle.THICK, r.getCell(0).getCellStyle().getBorderBottomEnum());
-           assertEquals(BorderStyle.DASH_DOT, r.getCell(1).getCellStyle().getBorderBottomEnum());
-           assertEquals(BorderStyle.THICK, r.getCell(2).getCellStyle().getBorderBottomEnum());
+           assertEquals(BorderStyle.THICK, r.getCell(0).getCellStyle().getBorderBottom());
+           assertEquals(BorderStyle.DASH_DOT, r.getCell(1).getCellStyle().getBorderBottom());
+           assertEquals(BorderStyle.THICK, r.getCell(2).getCellStyle().getBorderBottom());
        }
 }
index 666e72dc872e5ec81259c7500dbf280d9fc494a4..7e674281fa9bf57f2cf4453188df9190f60fe149 100644 (file)
@@ -155,10 +155,10 @@ public final class TestRowStyle extends TestCase {
             assertNotNull("Row is not null", r);
             
             cs = r.getRowStyle();
-            assertEquals("Bottom Border Style for row:", BorderStyle.THIN, cs.getBorderBottomEnum());
-            assertEquals("Left Border Style for row:",   BorderStyle.THIN, cs.getBorderLeftEnum());
-            assertEquals("Right Border Style for row:",  BorderStyle.THIN, cs.getBorderRightEnum());
-            assertEquals("Top Border Style for row:",    BorderStyle.THIN, cs.getBorderTopEnum());
+            assertEquals("Bottom Border Style for row:", BorderStyle.THIN, cs.getBorderBottom());
+            assertEquals("Left Border Style for row:",   BorderStyle.THIN, cs.getBorderLeft());
+            assertEquals("Right Border Style for row:",  BorderStyle.THIN, cs.getBorderRight());
+            assertEquals("Top Border Style for row:",    BorderStyle.THIN, cs.getBorderTop());
             assertEquals("FillForegroundColor for row:", 0xA, cs.getFillForegroundColor());
             assertEquals("FillPattern for row:",         FillPatternType.BRICKS, cs.getFillPattern());
             
index 2fd2c37bf8b82da857e1624ceb49d8f4884012e0..5ea2280b2ae8692673fa2dbc4adf926a287754d0 100644 (file)
@@ -73,10 +73,10 @@ public class BaseTestBorderStyle {
     
     protected void assertBorderStyleEquals(BorderStyle expected, Cell cell) {
         CellStyle style = cell.getCellStyle();
-        assertEquals(expected, style.getBorderTopEnum());
-        assertEquals(expected, style.getBorderBottomEnum());
-        assertEquals(expected, style.getBorderLeftEnum());
-        assertEquals(expected, style.getBorderRightEnum());
+        assertEquals(expected, style.getBorderTop());
+        assertEquals(expected, style.getBorderBottom());
+        assertEquals(expected, style.getBorderLeft());
+        assertEquals(expected, style.getBorderRight());
     }
 
 }
index 0f1079c9c0e2c3fbd93cd9c01786ba53c413b922..59536005a1f3e9095ee4ae28586ae70d724516f7 100644 (file)
@@ -277,10 +277,10 @@ public abstract class BaseTestCell {
 
         assertNotNull("Formula Cell Style", cs);
         assertEquals("Font Index Matches", f.getIndex(), cs.getFontIndex());
-        assertEquals("Top Border", BorderStyle.THIN, cs.getBorderTopEnum());
-        assertEquals("Left Border", BorderStyle.THIN, cs.getBorderLeftEnum());
-        assertEquals("Right Border", BorderStyle.THIN, cs.getBorderRightEnum());
-        assertEquals("Bottom Border", BorderStyle.THIN, cs.getBorderBottomEnum());
+        assertEquals("Top Border", BorderStyle.THIN, cs.getBorderTop());
+        assertEquals("Left Border", BorderStyle.THIN, cs.getBorderLeft());
+        assertEquals("Right Border", BorderStyle.THIN, cs.getBorderRight());
+        assertEquals("Bottom Border", BorderStyle.THIN, cs.getBorderBottom());
         wb2.close();
     }
 
index 090cf0ccb884258cf8504347aeb846c49cbf78c1..08bb9d4b2909ae4630c4828581d1deb8e04eaa4f 100644 (file)
@@ -96,11 +96,11 @@ public class BaseTestCellUtil {
 
         // A valid BorderStyle constant, as a Short
         CellUtil.setCellStyleProperty(c, CellUtil.BORDER_BOTTOM, BorderStyle.DASH_DOT.getCode());
-        assertEquals(BorderStyle.DASH_DOT, c.getCellStyle().getBorderBottomEnum());
+        assertEquals(BorderStyle.DASH_DOT, c.getCellStyle().getBorderBottom());
         
         // A valid BorderStyle constant, as an Enum
         CellUtil.setCellStyleProperty(c, CellUtil.BORDER_TOP, BorderStyle.MEDIUM_DASH_DOT);
-        assertEquals(BorderStyle.MEDIUM_DASH_DOT, c.getCellStyle().getBorderTopEnum());
+        assertEquals(BorderStyle.MEDIUM_DASH_DOT, c.getCellStyle().getBorderTop());
         
         wb.close();
     }
index 6325c65680277555437a24ccabb15dd43672b5fb..927f764280ed1a1b43b6560ac615521155a45849 100644 (file)
@@ -862,13 +862,13 @@ public final class TestPropertyTemplate {
         for (Row row: sheet) {
             for (Cell cell: row) {
                 CellStyle cs = cell.getCellStyle();
-                assertEquals(BorderStyle.THIN, cs.getBorderTopEnum());
+                assertEquals(BorderStyle.THIN, cs.getBorderTop());
                 assertEquals(IndexedColors.RED.getIndex(), cs.getTopBorderColor());
-                assertEquals(BorderStyle.THIN, cs.getBorderBottomEnum());
+                assertEquals(BorderStyle.THIN, cs.getBorderBottom());
                 assertEquals(IndexedColors.RED.getIndex(), cs.getBottomBorderColor());
-                assertEquals(BorderStyle.THIN, cs.getBorderLeftEnum());
+                assertEquals(BorderStyle.THIN, cs.getBorderLeft());
                 assertEquals(IndexedColors.RED.getIndex(), cs.getLeftBorderColor());
-                assertEquals(BorderStyle.THIN, cs.getBorderRightEnum());
+                assertEquals(BorderStyle.THIN, cs.getBorderRight());
                 assertEquals(IndexedColors.RED.getIndex(), cs.getRightBorderColor());
             }
         }
@@ -880,28 +880,28 @@ public final class TestPropertyTemplate {
             for (Cell cell: row) {
                 CellStyle cs = cell.getCellStyle();
                 if (cell.getColumnIndex() != 1 || row.getRowNum() == 0) {
-                assertEquals(BorderStyle.THIN, cs.getBorderTopEnum());
+                assertEquals(BorderStyle.THIN, cs.getBorderTop());
                 assertEquals(IndexedColors.RED.getIndex(), cs.getTopBorderColor());
                 } else {
-                    assertEquals(BorderStyle.NONE, cs.getBorderTopEnum());
+                    assertEquals(BorderStyle.NONE, cs.getBorderTop());
                 }
                 if (cell.getColumnIndex() != 1 || row.getRowNum() == 2) {
-                assertEquals(BorderStyle.THIN, cs.getBorderBottomEnum());
+                assertEquals(BorderStyle.THIN, cs.getBorderBottom());
                 assertEquals(IndexedColors.RED.getIndex(), cs.getBottomBorderColor());
                 } else {
-                    assertEquals(BorderStyle.NONE, cs.getBorderBottomEnum());
+                    assertEquals(BorderStyle.NONE, cs.getBorderBottom());
                 }
                 if (cell.getColumnIndex() == 0 || row.getRowNum() != 1) {
-                assertEquals(BorderStyle.THIN, cs.getBorderLeftEnum());
+                assertEquals(BorderStyle.THIN, cs.getBorderLeft());
                 assertEquals(IndexedColors.RED.getIndex(), cs.getLeftBorderColor());
                 } else {
-                    assertEquals(BorderStyle.NONE, cs.getBorderLeftEnum());
+                    assertEquals(BorderStyle.NONE, cs.getBorderLeft());
                 }
                 if (cell.getColumnIndex() == 2 || row.getRowNum() != 1) {
-                assertEquals(BorderStyle.THIN, cs.getBorderRightEnum());
+                assertEquals(BorderStyle.THIN, cs.getBorderRight());
                 assertEquals(IndexedColors.RED.getIndex(), cs.getRightBorderColor());
                 } else {
-                    assertEquals(BorderStyle.NONE, cs.getBorderRightEnum());
+                    assertEquals(BorderStyle.NONE, cs.getBorderRight());
                 }
             }
         }
@@ -933,10 +933,10 @@ public final class TestPropertyTemplate {
         for (Row row : sheet) {
             for (Cell cell : row) {
                 CellStyle cs = cell.getCellStyle();
-                assertEquals(BorderStyle.MEDIUM, cs.getBorderTopEnum());
-                assertEquals(BorderStyle.MEDIUM, cs.getBorderBottomEnum());
-                assertEquals(BorderStyle.MEDIUM, cs.getBorderLeftEnum());
-                assertEquals(BorderStyle.MEDIUM, cs.getBorderRightEnum());
+                assertEquals(BorderStyle.MEDIUM, cs.getBorderTop());
+                assertEquals(BorderStyle.MEDIUM, cs.getBorderBottom());
+                assertEquals(BorderStyle.MEDIUM, cs.getBorderLeft());
+                assertEquals(BorderStyle.MEDIUM, cs.getBorderRight());
                 assertEquals(IndexedColors.RED.getIndex(), cs.getTopBorderColor());
                 assertEquals(IndexedColors.RED.getIndex(), cs.getBottomBorderColor());
                 assertEquals(IndexedColors.RED.getIndex(), cs.getLeftBorderColor());
index 13fad63bf854b3affbc2991ba24356ff127e1707..6e3842b7a9d7291e9afcb589e4699cfb92ec1ff3 100644 (file)
@@ -66,43 +66,43 @@ public final class TestRegionUtil {
     
     @Test
     public void setBorderTop() {
-        assertEquals(NONE, getCellStyle(0, 0).getBorderTopEnum());
-        assertEquals(NONE, getCellStyle(0, 1).getBorderTopEnum());
-        assertEquals(NONE, getCellStyle(0, 2).getBorderTopEnum());
+        assertEquals(NONE, getCellStyle(0, 0).getBorderTop());
+        assertEquals(NONE, getCellStyle(0, 1).getBorderTop());
+        assertEquals(NONE, getCellStyle(0, 2).getBorderTop());
         RegionUtil.setBorderTop(THIN, A1C3, sheet);
-        assertEquals(THIN, getCellStyle(0, 0).getBorderTopEnum());
-        assertEquals(THIN, getCellStyle(0, 1).getBorderTopEnum());
-        assertEquals(THIN, getCellStyle(0, 2).getBorderTopEnum());
+        assertEquals(THIN, getCellStyle(0, 0).getBorderTop());
+        assertEquals(THIN, getCellStyle(0, 1).getBorderTop());
+        assertEquals(THIN, getCellStyle(0, 2).getBorderTop());
     }
     @Test
     public void setBorderBottom() {
-        assertEquals(NONE, getCellStyle(2, 0).getBorderBottomEnum());
-        assertEquals(NONE, getCellStyle(2, 1).getBorderBottomEnum());
-        assertEquals(NONE, getCellStyle(2, 2).getBorderBottomEnum());
+        assertEquals(NONE, getCellStyle(2, 0).getBorderBottom());
+        assertEquals(NONE, getCellStyle(2, 1).getBorderBottom());
+        assertEquals(NONE, getCellStyle(2, 2).getBorderBottom());
         RegionUtil.setBorderBottom(THIN, A1C3, sheet);
-        assertEquals(THIN, getCellStyle(2, 0).getBorderBottomEnum());
-        assertEquals(THIN, getCellStyle(2, 1).getBorderBottomEnum());
-        assertEquals(THIN, getCellStyle(2, 2).getBorderBottomEnum());
+        assertEquals(THIN, getCellStyle(2, 0).getBorderBottom());
+        assertEquals(THIN, getCellStyle(2, 1).getBorderBottom());
+        assertEquals(THIN, getCellStyle(2, 2).getBorderBottom());
     }
     @Test
     public void setBorderRight() {
-        assertEquals(NONE, getCellStyle(0, 2).getBorderRightEnum());
-        assertEquals(NONE, getCellStyle(1, 2).getBorderRightEnum());
-        assertEquals(NONE, getCellStyle(2, 2).getBorderRightEnum());
+        assertEquals(NONE, getCellStyle(0, 2).getBorderRight());
+        assertEquals(NONE, getCellStyle(1, 2).getBorderRight());
+        assertEquals(NONE, getCellStyle(2, 2).getBorderRight());
         RegionUtil.setBorderRight(THIN, A1C3, sheet);
-        assertEquals(THIN, getCellStyle(0, 2).getBorderRightEnum());
-        assertEquals(THIN, getCellStyle(1, 2).getBorderRightEnum());
-        assertEquals(THIN, getCellStyle(2, 2).getBorderRightEnum());
+        assertEquals(THIN, getCellStyle(0, 2).getBorderRight());
+        assertEquals(THIN, getCellStyle(1, 2).getBorderRight());
+        assertEquals(THIN, getCellStyle(2, 2).getBorderRight());
     }
     @Test
     public void setBorderLeft() {
-        assertEquals(NONE, getCellStyle(0, 0).getBorderLeftEnum());
-        assertEquals(NONE, getCellStyle(1, 0).getBorderLeftEnum());
-        assertEquals(NONE, getCellStyle(2, 0).getBorderLeftEnum());
+        assertEquals(NONE, getCellStyle(0, 0).getBorderLeft());
+        assertEquals(NONE, getCellStyle(1, 0).getBorderLeft());
+        assertEquals(NONE, getCellStyle(2, 0).getBorderLeft());
         RegionUtil.setBorderLeft(THIN, A1C3, sheet);
-        assertEquals(THIN, getCellStyle(0, 0).getBorderLeftEnum());
-        assertEquals(THIN, getCellStyle(1, 0).getBorderLeftEnum());
-        assertEquals(THIN, getCellStyle(2, 0).getBorderLeftEnum());
+        assertEquals(THIN, getCellStyle(0, 0).getBorderLeft());
+        assertEquals(THIN, getCellStyle(1, 0).getBorderLeft());
+        assertEquals(THIN, getCellStyle(2, 0).getBorderLeft());
     }
     
     @Test
@@ -149,9 +149,9 @@ public final class TestRegionUtil {
     @Test
     public void bordersCanBeAddedToNonExistantCells() {
         RegionUtil.setBorderTop(THIN, A1C3, sheet);
-        assertEquals(THIN, getCellStyle(0, 0).getBorderTopEnum());
-        assertEquals(THIN, getCellStyle(0, 1).getBorderTopEnum());
-        assertEquals(THIN, getCellStyle(0, 2).getBorderTopEnum());
+        assertEquals(THIN, getCellStyle(0, 0).getBorderTop());
+        assertEquals(THIN, getCellStyle(0, 1).getBorderTop());
+        assertEquals(THIN, getCellStyle(0, 2).getBorderTop());
     }
     @Test
     public void borderColorsCanBeAddedToNonExistantCells() {