You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ki...@apache.org on 2016/09/19 00:20:45 UTC
svn commit: r1761376 [4/4] - in /poi/branches/hssf_cryptoapi: ./ sonar/
sonar/examples/ sonar/excelant/ sonar/main/ sonar/ooxml-schema-encryption/
sonar/ooxml-schema-security/ sonar/ooxml-schema/ sonar/ooxml/
sonar/scratchpad/ src/examples/src/org/apac...
Modified: poi/branches/hssf_cryptoapi/src/scratchpad/src/org/apache/poi/hssf/converter/ExcelToFoConverter.java
URL: http://svn.apache.org/viewvc/poi/branches/hssf_cryptoapi/src/scratchpad/src/org/apache/poi/hssf/converter/ExcelToFoConverter.java?rev=1761376&r1=1761375&r2=1761376&view=diff
==============================================================================
--- poi/branches/hssf_cryptoapi/src/scratchpad/src/org/apache/poi/hssf/converter/ExcelToFoConverter.java (original)
+++ poi/branches/hssf_cryptoapi/src/scratchpad/src/org/apache/poi/hssf/converter/ExcelToFoConverter.java Mon Sep 19 00:20:44 2016
@@ -193,10 +193,10 @@ public class ExcelToFoConverter extends
protected boolean isEmptyStyle( CellStyle cellStyle ) {
return cellStyle == null || (
cellStyle.getFillPattern() == 0
- && cellStyle.getBorderTop() == BorderStyle.NONE
- && cellStyle.getBorderRight() == BorderStyle.NONE
- && cellStyle.getBorderBottom() == BorderStyle.NONE
- && cellStyle.getBorderLeft() == BorderStyle.NONE
+ && cellStyle.getBorderTopEnum() == BorderStyle.NONE
+ && cellStyle.getBorderRightEnum() == BorderStyle.NONE
+ && cellStyle.getBorderBottomEnum() == BorderStyle.NONE
+ && cellStyle.getBorderLeftEnum() == BorderStyle.NONE
);
}
@@ -361,13 +361,13 @@ public class ExcelToFoConverter extends
}
processCellStyleBorder( workbook, cellTarget, "top",
- cellStyle.getBorderTop(), cellStyle.getTopBorderColor() );
+ cellStyle.getBorderTopEnum(), cellStyle.getTopBorderColor() );
processCellStyleBorder( workbook, cellTarget, "right",
- cellStyle.getBorderRight(), cellStyle.getRightBorderColor() );
+ cellStyle.getBorderRightEnum(), cellStyle.getRightBorderColor() );
processCellStyleBorder( workbook, cellTarget, "bottom",
- cellStyle.getBorderBottom(), cellStyle.getBottomBorderColor() );
+ cellStyle.getBorderBottomEnum(), cellStyle.getBottomBorderColor() );
processCellStyleBorder( workbook, cellTarget, "left",
- cellStyle.getBorderLeft(), cellStyle.getLeftBorderColor() );
+ cellStyle.getBorderLeftEnum(), cellStyle.getLeftBorderColor() );
HSSFFont font = cellStyle.getFont( workbook );
processCellStyleFont( workbook, blockTarget, font );
Modified: poi/branches/hssf_cryptoapi/src/scratchpad/src/org/apache/poi/hssf/converter/ExcelToHtmlConverter.java
URL: http://svn.apache.org/viewvc/poi/branches/hssf_cryptoapi/src/scratchpad/src/org/apache/poi/hssf/converter/ExcelToHtmlConverter.java?rev=1761376&r1=1761375&r2=1761376&view=diff
==============================================================================
--- poi/branches/hssf_cryptoapi/src/scratchpad/src/org/apache/poi/hssf/converter/ExcelToHtmlConverter.java (original)
+++ poi/branches/hssf_cryptoapi/src/scratchpad/src/org/apache/poi/hssf/converter/ExcelToHtmlConverter.java Mon Sep 19 00:20:44 2016
@@ -175,13 +175,13 @@ public class ExcelToHtmlConverter extend
break;
}
- buildStyle_border( workbook, style, "top", cellStyle.getBorderTop(),
+ buildStyle_border( workbook, style, "top", cellStyle.getBorderTopEnum(),
cellStyle.getTopBorderColor() );
buildStyle_border( workbook, style, "right",
- cellStyle.getBorderRight(), cellStyle.getRightBorderColor() );
+ cellStyle.getBorderRightEnum(), cellStyle.getRightBorderColor() );
buildStyle_border( workbook, style, "bottom",
- cellStyle.getBorderBottom(), cellStyle.getBottomBorderColor() );
- buildStyle_border( workbook, style, "left", cellStyle.getBorderLeft(),
+ cellStyle.getBorderBottomEnum(), cellStyle.getBottomBorderColor() );
+ buildStyle_border( workbook, style, "left", cellStyle.getBorderLeftEnum(),
cellStyle.getLeftBorderColor() );
HSSFFont font = cellStyle.getFont( workbook );
Modified: poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ddf/TestEscherDump.java
URL: http://svn.apache.org/viewvc/poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ddf/TestEscherDump.java?rev=1761376&r1=1761375&r2=1761376&view=diff
==============================================================================
--- poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ddf/TestEscherDump.java (original)
+++ poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ddf/TestEscherDump.java Mon Sep 19 00:20:44 2016
@@ -20,9 +20,7 @@ package org.apache.poi.ddf;
import static org.junit.Assert.assertTrue;
import java.io.ByteArrayInputStream;
-import java.io.IOException;
import java.io.InputStream;
-import java.io.OutputStream;
import java.io.PrintStream;
import java.io.UnsupportedEncodingException;
@@ -30,6 +28,7 @@ import org.apache.poi.POIDataSamples;
import org.apache.poi.hssf.HSSFTestDataSamples;
import org.apache.poi.util.IOUtils;
import org.apache.poi.util.LocaleUtil;
+import org.apache.poi.util.NullOutputStream;
import org.junit.BeforeClass;
import org.junit.Test;
@@ -83,23 +82,6 @@ public class TestEscherDump {
@SuppressWarnings("resource")
private NullPrinterStream() throws UnsupportedEncodingException {
super(new NullOutputStream(),true,LocaleUtil.CHARSET_1252.name());
- }
- /**
- * Implementation of an OutputStream which does nothing, used
- * to redirect stdout to avoid spamming the console with output
- */
- private static class NullOutputStream extends OutputStream {
- @Override
- public void write(byte[] b, int off, int len) {
- }
-
- @Override
- public void write(int b) {
- }
-
- @Override
- public void write(byte[] b) throws IOException {
- }
- }
+ }
}
}
Modified: poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/hssf/dev/BaseXLSIteratingTest.java
URL: http://svn.apache.org/viewvc/poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/hssf/dev/BaseXLSIteratingTest.java?rev=1761376&r1=1761375&r2=1761376&view=diff
==============================================================================
--- poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/hssf/dev/BaseXLSIteratingTest.java (original)
+++ poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/hssf/dev/BaseXLSIteratingTest.java Mon Sep 19 00:20:44 2016
@@ -21,7 +21,6 @@ import static org.junit.Assert.assertNot
import java.io.File;
import java.io.FileInputStream;
import java.io.FilenameFilter;
-import java.io.IOException;
import java.io.OutputStream;
import java.util.ArrayList;
import java.util.HashMap;
@@ -32,6 +31,7 @@ import java.util.Map;
import org.apache.poi.POIDataSamples;
import org.apache.poi.hssf.record.crypto.Biff8EncryptionKey;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.util.NullOutputStream;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
@@ -119,22 +119,4 @@ public abstract class BaseXLSIteratingTe
}
abstract void runOneFile(File pFile) throws Exception;
-
- /**
- * Implementation of an OutputStream which does nothing, used
- * to redirect stdout to avoid spamming the console with output
- */
- private static class NullOutputStream extends OutputStream {
- @Override
- public void write(byte[] b, int off, int len) {
- }
-
- @Override
- public void write(int b) {
- }
-
- @Override
- public void write(byte[] b) throws IOException {
- }
- }
}
Modified: poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/hssf/model/TestFormulaParserEval.java
URL: http://svn.apache.org/viewvc/poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/hssf/model/TestFormulaParserEval.java?rev=1761376&r1=1761375&r2=1761376&view=diff
==============================================================================
--- poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/hssf/model/TestFormulaParserEval.java (original)
+++ poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/hssf/model/TestFormulaParserEval.java Mon Sep 19 00:20:44 2016
@@ -99,7 +99,7 @@ public final class TestFormulaParserEval
}
throw e;
}
- assertEquals(CellType.NUMERIC, result.getCellType());
+ assertEquals(CellType.NUMERIC, result.getCellTypeEnum());
assertEquals(42.0, result.getNumberValue(), 0.0);
}
}
Modified: poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/hssf/record/TestSharedFormulaRecord.java
URL: http://svn.apache.org/viewvc/poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/hssf/record/TestSharedFormulaRecord.java?rev=1761376&r1=1761375&r2=1761376&view=diff
==============================================================================
--- poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/hssf/record/TestSharedFormulaRecord.java (original)
+++ poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/hssf/record/TestSharedFormulaRecord.java Mon Sep 19 00:20:44 2016
@@ -228,7 +228,7 @@ public final class TestSharedFormulaReco
private static void confirmCellEvaluation(HSSFWorkbook wb, HSSFCell cell, double expectedValue) {
HSSFFormulaEvaluator fe = new HSSFFormulaEvaluator(wb);
CellValue cv = fe.evaluate(cell);
- assertEquals(CellType.NUMERIC, cv.getCellType());
+ assertEquals(CellType.NUMERIC, cv.getCellTypeEnum());
assertEquals(expectedValue, cv.getNumberValue(), 0.0);
}
Modified: poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java
URL: http://svn.apache.org/viewvc/poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java?rev=1761376&r1=1761375&r2=1761376&view=diff
==============================================================================
--- poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java (original)
+++ poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java Mon Sep 19 00:20:44 2016
@@ -2567,7 +2567,7 @@ public final class TestBugs extends Base
HSSFSheet sheet = wb.getSheetAt(0);
HSSFRow row = sheet.getRow(0);
HSSFCellStyle rstyle = row.getRowStyle();
- assertEquals(BorderStyle.DOUBLE, rstyle.getBorderBottom());
+ assertEquals(BorderStyle.DOUBLE, rstyle.getBorderBottomEnum());
wb.close();
}
@@ -3051,7 +3051,7 @@ public final class TestBugs extends Base
HSSFBorderFormatting bord = rule.createBorderFormatting();
bord.setBorderDiagonal(BorderStyle.THICK);
- assertEquals(BorderStyle.THICK, bord.getBorderDiagonal());
+ assertEquals(BorderStyle.THICK, bord.getBorderDiagonalEnum());
bord.setBackwardDiagonalOn(true);
assertTrue(bord.isBackwardDiagonalOn());
@@ -3064,7 +3064,7 @@ public final class TestBugs extends Base
// Create the bottom border style so we know what a border is supposed to look like
bord.setBorderBottom(BorderStyle.THICK);
- assertEquals(BorderStyle.THICK, bord.getBorderBottom());
+ assertEquals(BorderStyle.THICK, bord.getBorderBottomEnum());
bord.setBottomBorderColor(BLUE);
assertEquals(BLUE, bord.getBottomBorderColor());
Modified: poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/hssf/usermodel/TestCellStyle.java
URL: http://svn.apache.org/viewvc/poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/hssf/usermodel/TestCellStyle.java?rev=1761376&r1=1761375&r2=1761376&view=diff
==============================================================================
--- poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/hssf/usermodel/TestCellStyle.java (original)
+++ poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/hssf/usermodel/TestCellStyle.java Mon Sep 19 00:20:44 2016
@@ -348,40 +348,40 @@ public final class TestCellStyle extends
HSSFCellStyle cs;
cs = s.getRow(0).getCell(0).getCellStyle();
- assertEquals(BorderStyle.HAIR, cs.getBorderRight());
+ assertEquals(BorderStyle.HAIR, cs.getBorderRightEnum());
cs = s.getRow(1).getCell(1).getCellStyle();
- assertEquals(BorderStyle.DOTTED, cs.getBorderRight());
+ assertEquals(BorderStyle.DOTTED, cs.getBorderRightEnum());
cs = s.getRow(2).getCell(2).getCellStyle();
- assertEquals(BorderStyle.DASH_DOT_DOT, cs.getBorderRight());
+ assertEquals(BorderStyle.DASH_DOT_DOT, cs.getBorderRightEnum());
cs = s.getRow(3).getCell(3).getCellStyle();
- assertEquals(BorderStyle.DASHED, cs.getBorderRight());
+ assertEquals(BorderStyle.DASHED, cs.getBorderRightEnum());
cs = s.getRow(4).getCell(4).getCellStyle();
- assertEquals(BorderStyle.THIN, cs.getBorderRight());
+ assertEquals(BorderStyle.THIN, cs.getBorderRightEnum());
cs = s.getRow(5).getCell(5).getCellStyle();
- assertEquals(BorderStyle.MEDIUM_DASH_DOT_DOT, cs.getBorderRight());
+ assertEquals(BorderStyle.MEDIUM_DASH_DOT_DOT, cs.getBorderRightEnum());
cs = s.getRow(6).getCell(6).getCellStyle();
- assertEquals(BorderStyle.SLANTED_DASH_DOT, cs.getBorderRight());
+ assertEquals(BorderStyle.SLANTED_DASH_DOT, cs.getBorderRightEnum());
cs = s.getRow(7).getCell(7).getCellStyle();
- assertEquals(BorderStyle.MEDIUM_DASH_DOT, cs.getBorderRight());
+ assertEquals(BorderStyle.MEDIUM_DASH_DOT, cs.getBorderRightEnum());
cs = s.getRow(8).getCell(8).getCellStyle();
- assertEquals(BorderStyle.MEDIUM_DASHED, cs.getBorderRight());
+ assertEquals(BorderStyle.MEDIUM_DASHED, cs.getBorderRightEnum());
cs = s.getRow(9).getCell(9).getCellStyle();
- assertEquals(BorderStyle.MEDIUM, cs.getBorderRight());
+ assertEquals(BorderStyle.MEDIUM, cs.getBorderRightEnum());
cs = s.getRow(10).getCell(10).getCellStyle();
- assertEquals(BorderStyle.THICK, cs.getBorderRight());
+ assertEquals(BorderStyle.THICK, cs.getBorderRightEnum());
cs = s.getRow(11).getCell(11).getCellStyle();
- assertEquals(BorderStyle.DOUBLE, cs.getBorderRight());
+ assertEquals(BorderStyle.DOUBLE, cs.getBorderRightEnum());
}
public void testShrinkToFit() {
@@ -500,7 +500,7 @@ public final class TestCellStyle extends
newCell.setCellValue("2testtext2");
CellStyle newStyle = newCell.getCellStyle();
- assertEquals(BorderStyle.DOTTED, newStyle.getBorderBottom());
+ assertEquals(BorderStyle.DOTTED, newStyle.getBorderBottomEnum());
assertEquals(Font.COLOR_RED, ((HSSFCellStyle)newStyle).getFont(wb).getColor());
// OutputStream out = new FileOutputStream("/tmp/56959.xls");
Modified: poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFConditionalFormatting.java
URL: http://svn.apache.org/viewvc/poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFConditionalFormatting.java?rev=1761376&r1=1761375&r2=1761376&view=diff
==============================================================================
--- poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFConditionalFormatting.java (original)
+++ poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFConditionalFormatting.java Mon Sep 19 00:20:44 2016
@@ -136,45 +136,45 @@ public final class TestHSSFConditionalFo
Row row = sheet.createRow(0);
Cell cell0 = row.createCell(0);
- cell0.setCellType(org.apache.poi.ss.usermodel.Cell.CELL_TYPE_NUMERIC);
+ cell0.setCellType(CellType.NUMERIC);
cell0.setCellValue(100);
Cell cell1 = row.createCell(1);
- cell1.setCellType(org.apache.poi.ss.usermodel.Cell.CELL_TYPE_NUMERIC);
+ cell1.setCellType(CellType.NUMERIC);
cell1.setCellValue(120);
Cell cell2 = row.createCell(2);
- cell2.setCellType(org.apache.poi.ss.usermodel.Cell.CELL_TYPE_NUMERIC);
+ cell2.setCellType(CellType.NUMERIC);
cell2.setCellValue(130);
// row 1
row = sheet.createRow(1);
cell0 = row.createCell(0);
- cell0.setCellType(org.apache.poi.ss.usermodel.Cell.CELL_TYPE_NUMERIC);
+ cell0.setCellType(CellType.NUMERIC);
cell0.setCellValue(200);
cell1 = row.createCell(1);
- cell1.setCellType(org.apache.poi.ss.usermodel.Cell.CELL_TYPE_NUMERIC);
+ cell1.setCellType(CellType.NUMERIC);
cell1.setCellValue(220);
cell2 = row.createCell(2);
- cell2.setCellType(org.apache.poi.ss.usermodel.Cell.CELL_TYPE_NUMERIC);
+ cell2.setCellType(CellType.NUMERIC);
cell2.setCellValue(230);
// row 2
row = sheet.createRow(2);
cell0 = row.createCell(0);
- cell0.setCellType(org.apache.poi.ss.usermodel.Cell.CELL_TYPE_NUMERIC);
+ cell0.setCellType(CellType.NUMERIC);
cell0.setCellValue(300);
cell1 = row.createCell(1);
- cell1.setCellType(org.apache.poi.ss.usermodel.Cell.CELL_TYPE_NUMERIC);
+ cell1.setCellType(CellType.NUMERIC);
cell1.setCellValue(320);
cell2 = row.createCell(2);
- cell2.setCellType(org.apache.poi.ss.usermodel.Cell.CELL_TYPE_NUMERIC);
+ cell2.setCellType(CellType.NUMERIC);
cell2.setCellValue(330);
// Create conditional formatting, CELL1 should be yellow if CELL0 is not blank.
Modified: poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFFormulaEvaluator.java
URL: http://svn.apache.org/viewvc/poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFFormulaEvaluator.java?rev=1761376&r1=1761375&r2=1761376&view=diff
==============================================================================
--- poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFFormulaEvaluator.java (original)
+++ poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFFormulaEvaluator.java Mon Sep 19 00:20:44 2016
@@ -55,7 +55,7 @@ public final class TestHSSFFormulaEvalua
HSSFCell cell = sheet.getRow(8).getCell(0);
HSSFFormulaEvaluator fe = new HSSFFormulaEvaluator(wb);
CellValue cv = fe.evaluate(cell);
- assertEquals(CellType.NUMERIC, cv.getCellType());
+ assertEquals(CellType.NUMERIC, cv.getCellTypeEnum());
assertEquals(3.72, cv.getNumberValue(), 0.0);
wb.close();
}
@@ -127,7 +127,7 @@ public final class TestHSSFFormulaEvalua
try {
value = hsf.evaluate(cellA1);
- assertEquals(CellType.NUMERIC, value.getCellType());
+ assertEquals(CellType.NUMERIC, value.getCellTypeEnum());
assertEquals(5.33, value.getNumberValue(), 0.0);
} catch (RuntimeException e) {
Modified: poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFOptimiser.java
URL: http://svn.apache.org/viewvc/poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFOptimiser.java?rev=1761376&r1=1761375&r2=1761376&view=diff
==============================================================================
--- poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFOptimiser.java (original)
+++ poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFOptimiser.java Mon Sep 19 00:20:44 2016
@@ -308,8 +308,8 @@ public final class TestHSSFOptimiser ext
// Check
assertEquals(23, wb.getNumCellStyles());
- 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());
+ 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());
}
}
Modified: poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/hssf/usermodel/TestRowStyle.java
URL: http://svn.apache.org/viewvc/poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/hssf/usermodel/TestRowStyle.java?rev=1761376&r1=1761375&r2=1761376&view=diff
==============================================================================
--- poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/hssf/usermodel/TestRowStyle.java (original)
+++ poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/hssf/usermodel/TestRowStyle.java Mon Sep 19 00:20:44 2016
@@ -151,10 +151,10 @@ public final class TestRowStyle extends
assertNotNull("Row is not null", r);
cs = r.getRowStyle();
- 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("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("FillForegroundColor for row:", 0xA, cs.getFillForegroundColor());
assertEquals("FillPattern for row:", 0x1, cs.getFillPattern());
Modified: poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/TestWorkbookEvaluator.java
URL: http://svn.apache.org/viewvc/poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/TestWorkbookEvaluator.java?rev=1761376&r1=1761375&r2=1761376&view=diff
==============================================================================
--- poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/TestWorkbookEvaluator.java (original)
+++ poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/TestWorkbookEvaluator.java Mon Sep 19 00:20:44 2016
@@ -203,7 +203,7 @@ public class TestWorkbookEvaluator {
} catch (RuntimeException e) {
fail("Missing arg result not being handled correctly.");
}
- assertEquals(CellType.NUMERIC, cv.getCellType());
+ assertEquals(CellType.NUMERIC, cv.getCellTypeEnum());
// adding blank to 1.0 gives 1.0
assertEquals(1.0, cv.getNumberValue(), 0.0);
@@ -211,7 +211,7 @@ public class TestWorkbookEvaluator {
cell.setCellFormula("\"abc\"&IF(1,,)");
fe.notifySetFormula(cell);
cv = fe.evaluate(cell);
- assertEquals(CellType.STRING, cv.getCellType());
+ assertEquals(CellType.STRING, cv.getCellTypeEnum());
// adding blank to "abc" gives "abc"
assertEquals("abc", cv.getStringValue());
@@ -219,7 +219,7 @@ public class TestWorkbookEvaluator {
cell.setCellFormula("\"abc\"&CHOOSE(2,5,,9)");
fe.notifySetFormula(cell);
cv = fe.evaluate(cell);
- assertEquals(CellType.STRING, cv.getCellType());
+ assertEquals(CellType.STRING, cv.getCellTypeEnum());
// adding blank to "abc" gives "abc"
assertEquals("abc", cv.getStringValue());
}
@@ -245,14 +245,14 @@ public class TestWorkbookEvaluator {
}
throw new RuntimeException(e);
}
- assertEquals(CellType.ERROR, cv.getCellType());
+ assertEquals(CellType.ERROR, cv.getCellTypeEnum());
assertEquals(ErrorEval.VALUE_INVALID.getErrorCode(), cv.getErrorValue());
// verify circular refs are still detected properly
fe.clearAllCachedResultValues();
cell.setCellFormula("OFFSET(A1,0,0)");
cv = fe.evaluate(cell);
- assertEquals(CellType.ERROR, cv.getCellType());
+ assertEquals(CellType.ERROR, cv.getCellTypeEnum());
assertEquals(ErrorEval.CIRCULAR_REF_ERROR.getErrorCode(), cv.getErrorValue());
} finally {
wb.close();
@@ -396,7 +396,7 @@ public class TestWorkbookEvaluator {
assertEquals(CellType.FORMULA, D1.getCellTypeEnum());
assertEquals(expectedFormula, D1.getCellFormula());
- assertEquals(CellType.NUMERIC, result.getCellType());
+ assertEquals(CellType.NUMERIC, result.getCellTypeEnum());
assertEquals(expectedResult, result.getNumberValue(), EPSILON);
testIFEqualsFormulaEvaluation_teardown(wb);
Modified: poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/atp/TestIfError.java
URL: http://svn.apache.org/viewvc/poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/atp/TestIfError.java?rev=1761376&r1=1761375&r2=1761376&view=diff
==============================================================================
--- poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/atp/TestIfError.java (original)
+++ poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/atp/TestIfError.java Mon Sep 19 00:20:44 2016
@@ -78,18 +78,18 @@ public class TestIfError extends TestCas
FormulaEvaluator evaluator = wb.getCreationHelper().createFormulaEvaluator();
assertEquals("Checks that the cell is numeric",
- CellType.NUMERIC, evaluator.evaluate(cell1).getCellType());
+ CellType.NUMERIC, evaluator.evaluate(cell1).getCellTypeEnum());
assertEquals("Divides 210 by 35 and returns 6.0",
6.0, evaluator.evaluate(cell1).getNumberValue(), accuracy);
assertEquals("Checks that the cell is numeric",
- CellType.STRING, evaluator.evaluate(cell2).getCellType());
+ CellType.STRING, evaluator.evaluate(cell2).getCellTypeEnum());
assertEquals("Rounds -10 to a nearest multiple of -3 (-9)",
"Error in calculation", evaluator.evaluate(cell2).getStringValue());
assertEquals("Check that C1 returns string",
- CellType.STRING, evaluator.evaluate(cell3).getCellType());
+ CellType.STRING, evaluator.evaluate(cell3).getCellTypeEnum());
assertEquals("Check that C1 returns string \"error\"",
"error", evaluator.evaluate(cell3).getStringValue());
}
Modified: poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/eval/BaseTestCircularReferences.java
URL: http://svn.apache.org/viewvc/poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/eval/BaseTestCircularReferences.java?rev=1761376&r1=1761375&r2=1761376&view=diff
==============================================================================
--- poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/eval/BaseTestCircularReferences.java (original)
+++ poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/eval/BaseTestCircularReferences.java Mon Sep 19 00:20:44 2016
@@ -66,7 +66,7 @@ public abstract class BaseTestCircularRe
* Makes sure that the specified evaluated cell value represents a circular reference error.
*/
private static void confirmCycleErrorCode(CellValue cellValue) {
- assertTrue(cellValue.getCellType() == CellType.ERROR);
+ assertTrue(cellValue.getCellTypeEnum() == CellType.ERROR);
assertEquals(ErrorEval.CIRCULAR_REF_ERROR.getErrorCode(), cellValue.getErrorValue());
}
@@ -96,7 +96,7 @@ public abstract class BaseTestCircularRe
CellValue cellValue = evaluateWithCycles(wb, testCell);
- assertTrue(cellValue.getCellType() == CellType.NUMERIC);
+ assertTrue(cellValue.getCellTypeEnum() == CellType.NUMERIC);
assertEquals(2, cellValue.getNumberValue(), 0);
wb.close();
}
@@ -166,24 +166,24 @@ public abstract class BaseTestCircularRe
// Happy day flow - evaluate A1 first
cv = fe.evaluate(cellA1);
- assertEquals(CellType.NUMERIC, cv.getCellType());
+ assertEquals(CellType.NUMERIC, cv.getCellTypeEnum());
assertEquals(42.0, cv.getNumberValue(), 0.0);
cv = fe.evaluate(cellB1); // no circ-ref-error because A1 result is cached
- assertEquals(CellType.NUMERIC, cv.getCellType());
+ assertEquals(CellType.NUMERIC, cv.getCellTypeEnum());
assertEquals(46.0, cv.getNumberValue(), 0.0);
// Show the bug - evaluate another cell from the loop first
fe.clearAllCachedResultValues();
cv = fe.evaluate(cellB1);
// Identified bug 46898
- assertNotEquals(cv.getCellType(), ErrorEval.CIRCULAR_REF_ERROR.getErrorCode());
- assertEquals(CellType.NUMERIC, cv.getCellType());
+ assertNotEquals(cv.getCellTypeEnum(), ErrorEval.CIRCULAR_REF_ERROR.getErrorCode());
+ assertEquals(CellType.NUMERIC, cv.getCellTypeEnum());
assertEquals(46.0, cv.getNumberValue(), 0.0);
// start evaluation on another cell
fe.clearAllCachedResultValues();
cv = fe.evaluate(cellE1);
- assertEquals(CellType.NUMERIC, cv.getCellType());
+ assertEquals(CellType.NUMERIC, cv.getCellTypeEnum());
assertEquals(43.0, cv.getNumberValue(), 0.0);
wb.close();
Modified: poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/eval/TestFormulaBugs.java
URL: http://svn.apache.org/viewvc/poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/eval/TestFormulaBugs.java?rev=1761376&r1=1761375&r2=1761376&view=diff
==============================================================================
--- poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/eval/TestFormulaBugs.java (original)
+++ poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/eval/TestFormulaBugs.java Mon Sep 19 00:20:44 2016
@@ -58,7 +58,7 @@ public final class TestFormulaBugs {
FormulaEvaluator fe = wb.getCreationHelper().createFormulaEvaluator();
CellValue cv = fe.evaluate(cell);
- assertEquals(CellType.NUMERIC, cv.getCellType());
+ assertEquals(CellType.NUMERIC, cv.getCellTypeEnum());
assertEquals(3.0, cv.getNumberValue(), 0.0);
wb.close();
@@ -106,11 +106,11 @@ public final class TestFormulaBugs {
FormulaEvaluator fe = wb.getCreationHelper().createFormulaEvaluator();
CellValue cv;
cv = fe.evaluate(cell);
- assertEquals(CellType.NUMERIC, cv.getCellType());
+ assertEquals(CellType.NUMERIC, cv.getCellTypeEnum());
assertEquals(1.0, cv.getNumberValue(), 0.0);
cv = fe.evaluate(row.getCell(1));
- assertEquals(CellType.BOOLEAN, cv.getCellType());
+ assertEquals(CellType.BOOLEAN, cv.getCellTypeEnum());
assertEquals(true, cv.getBooleanValue());
wb.close();
@@ -161,7 +161,7 @@ public final class TestFormulaBugs {
FormulaEvaluator fe = wb.getCreationHelper().createFormulaEvaluator();
CellValue cv = fe.evaluate(cell);
- assertEquals(CellType.NUMERIC, cv.getCellType());
+ assertEquals(CellType.NUMERIC, cv.getCellTypeEnum());
assertEquals(expectedResult, cv.getNumberValue(), 0.0);
wb.close();
Modified: poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/eval/TestFormulasFromSpreadsheet.java
URL: http://svn.apache.org/viewvc/poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/eval/TestFormulasFromSpreadsheet.java?rev=1761376&r1=1761375&r2=1761376&view=diff
==============================================================================
--- poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/eval/TestFormulasFromSpreadsheet.java (original)
+++ poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/eval/TestFormulasFromSpreadsheet.java Mon Sep 19 00:20:44 2016
@@ -190,24 +190,24 @@ public final class TestFormulasFromSprea
final CellType cellType = expValue.getCellTypeEnum();
switch (cellType) {
case BLANK:
- assertEquals(msg, CellType.BLANK, actValue.getCellType());
+ assertEquals(msg, CellType.BLANK, actValue.getCellTypeEnum());
break;
case BOOLEAN:
- assertEquals(msg, CellType.BOOLEAN, actValue.getCellType());
+ assertEquals(msg, CellType.BOOLEAN, actValue.getCellTypeEnum());
assertEquals(msg, expValue.getBooleanCellValue(), actValue.getBooleanValue());
break;
case ERROR:
- assertEquals(msg, CellType.ERROR, actValue.getCellType());
+ assertEquals(msg, CellType.ERROR, actValue.getCellTypeEnum());
assertEquals(msg, ErrorEval.getText(expValue.getErrorCellValue()), ErrorEval.getText(actValue.getErrorValue()));
break;
case FORMULA: // will never be used, since we will call method after formula evaluation
fail("Cannot expect formula as result of formula evaluation: " + msg);
case NUMERIC:
- assertEquals(msg, CellType.NUMERIC, actValue.getCellType());
+ assertEquals(msg, CellType.NUMERIC, actValue.getCellTypeEnum());
TestMathX.assertEquals(msg, expValue.getNumericCellValue(), actValue.getNumberValue(), TestMathX.POS_ZERO, TestMathX.DIFF_TOLERANCE_FACTOR);
break;
case STRING:
- assertEquals(msg, CellType.STRING, actValue.getCellType());
+ assertEquals(msg, CellType.STRING, actValue.getCellTypeEnum());
assertEquals(msg, expValue.getRichStringCellValue().getString(), actValue.getStringValue());
break;
default:
Modified: poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/eval/TestMultiSheetEval.java
URL: http://svn.apache.org/viewvc/poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/eval/TestMultiSheetEval.java?rev=1761376&r1=1761375&r2=1761376&view=diff
==============================================================================
--- poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/eval/TestMultiSheetEval.java (original)
+++ poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/eval/TestMultiSheetEval.java Mon Sep 19 00:20:44 2016
@@ -110,24 +110,24 @@ public final class TestMultiSheetEval ex
switch (cellType) {
case BLANK:
- assertEquals(msg, CellType.BLANK, actual.getCellType());
+ assertEquals(msg, CellType.BLANK, actual.getCellTypeEnum());
break;
case BOOLEAN:
- assertEquals(msg, CellType.BOOLEAN, actual.getCellType());
+ assertEquals(msg, CellType.BOOLEAN, actual.getCellTypeEnum());
assertEquals(msg, expected.getBooleanCellValue(), actual.getBooleanValue());
break;
case ERROR:
- assertEquals(msg, CellType.ERROR, actual.getCellType());
+ assertEquals(msg, CellType.ERROR, actual.getCellTypeEnum());
assertEquals(msg, ErrorEval.getText(expected.getErrorCellValue()), ErrorEval.getText(actual.getErrorValue()));
break;
case FORMULA: // will never be used, since we will call method after formula evaluation
throw new AssertionFailedError("Cannot expect formula as result of formula evaluation: " + msg);
case NUMERIC:
- assertEquals(msg, CellType.NUMERIC, actual.getCellType());
+ assertEquals(msg, CellType.NUMERIC, actual.getCellTypeEnum());
TestMathX.assertEquals(msg, expected.getNumericCellValue(), actual.getNumberValue(), TestMathX.POS_ZERO, TestMathX.DIFF_TOLERANCE_FACTOR);
break;
case STRING:
- assertEquals(msg, CellType.STRING, actual.getCellType());
+ assertEquals(msg, CellType.STRING, actual.getCellTypeEnum());
assertEquals(msg, expected.getRichStringCellValue().getString(), actual.getStringValue());
break;
default:
Modified: poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/eval/TestPercentEval.java
URL: http://svn.apache.org/viewvc/poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/eval/TestPercentEval.java?rev=1761376&r1=1761375&r2=1761376&view=diff
==============================================================================
--- poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/eval/TestPercentEval.java (original)
+++ poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/eval/TestPercentEval.java Mon Sep 19 00:20:44 2016
@@ -78,7 +78,7 @@ public final class TestPercentEval exten
// else some other unexpected error
throw e;
}
- assertEquals(CellType.NUMERIC, cv.getCellType());
+ assertEquals(CellType.NUMERIC, cv.getCellTypeEnum());
assertEquals(0.5, cv.getNumberValue(), 0.0);
}
}
Modified: poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/functions/BaseTestFunctionsFromSpreadsheet.java
URL: http://svn.apache.org/viewvc/poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/functions/BaseTestFunctionsFromSpreadsheet.java?rev=1761376&r1=1761375&r2=1761376&view=diff
==============================================================================
--- poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/functions/BaseTestFunctionsFromSpreadsheet.java (original)
+++ poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/functions/BaseTestFunctionsFromSpreadsheet.java Mon Sep 19 00:20:44 2016
@@ -155,7 +155,7 @@ public abstract class BaseTestFunctionsF
if (expectedCell.getCellTypeEnum() == CellType.ERROR) {
int expectedErrorCode = expectedCell.getErrorCellValue();
- assertEquals(msg, CellType.ERROR, actualValue.getCellType());
+ assertEquals(msg, CellType.ERROR, actualValue.getCellTypeEnum());
assertEquals(msg, ErrorEval.getText(expectedErrorCode), actualValue.formatAsString());
assertEquals(msg, expectedErrorCode, actualValue.getErrorValue());
assertEquals(msg, ErrorEval.getText(expectedErrorCode), ErrorEval.getText(actualValue.getErrorValue()));
@@ -163,11 +163,11 @@ public abstract class BaseTestFunctionsF
}
// unexpected error
- assertNotEquals(msg, CellType.ERROR, actualValue.getCellType());
+ assertNotEquals(msg, CellType.ERROR, actualValue.getCellTypeEnum());
assertNotEquals(msg, formatValue(expectedCell), ErrorEval.getText(actualValue.getErrorValue()));
// wrong type error
- assertEquals(msg, expectedCell.getCellTypeEnum(), actualValue.getCellType());
+ assertEquals(msg, expectedCell.getCellTypeEnum(), actualValue.getCellTypeEnum());
final CellType expectedCellType = expectedCell.getCellTypeEnum();
switch (expectedCellType) {
Modified: poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/functions/TestAddress.java
URL: http://svn.apache.org/viewvc/poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/functions/TestAddress.java?rev=1761376&r1=1761375&r2=1761376&view=diff
==============================================================================
--- poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/functions/TestAddress.java (original)
+++ poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/functions/TestAddress.java Mon Sep 19 00:20:44 2016
@@ -73,7 +73,7 @@ public final class TestAddress extends T
cell.setCellFormula(formulaText);
fe.notifyUpdateCell(cell);
CellValue result = fe.evaluate(cell);
- assertEquals(result.getCellType(), CellType.STRING);
+ assertEquals(result.getCellTypeEnum(), CellType.STRING);
assertEquals(expectedResult, result.getStringValue());
}
}
Modified: poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/functions/TestCalendarFieldFunction.java
URL: http://svn.apache.org/viewvc/poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/functions/TestCalendarFieldFunction.java?rev=1761376&r1=1761375&r2=1761376&view=diff
==============================================================================
--- poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/functions/TestCalendarFieldFunction.java (original)
+++ poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/functions/TestCalendarFieldFunction.java Mon Sep 19 00:20:44 2016
@@ -103,7 +103,7 @@ public final class TestCalendarFieldFunc
cell11.setCellFormula(formulaText);
evaluator.clearAllCachedResultValues();
CellValue cv = evaluator.evaluate(cell11);
- if (cv.getCellType() != CellType.NUMERIC) {
+ if (cv.getCellTypeEnum() != CellType.NUMERIC) {
throw new AssertionFailedError("Wrong result type: " + cv.formatAsString());
}
double actualValue = cv.getNumberValue();
Modified: poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/functions/TestClean.java
URL: http://svn.apache.org/viewvc/poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/functions/TestClean.java?rev=1761376&r1=1761375&r2=1761376&view=diff
==============================================================================
--- poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/functions/TestClean.java (original)
+++ poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/functions/TestClean.java Mon Sep 19 00:20:44 2016
@@ -60,7 +60,7 @@ public final class TestClean extends Tes
cell.setCellFormula(formulaText);
fe.notifyUpdateCell(cell);
CellValue result = fe.evaluate(cell);
- assertEquals(result.getCellType(), CellType.STRING);
+ assertEquals(result.getCellTypeEnum(), CellType.STRING);
assertEquals(expectedResult, result.getStringValue());
}
}
Modified: poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/functions/TestDate.java
URL: http://svn.apache.org/viewvc/poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/functions/TestDate.java?rev=1761376&r1=1761375&r2=1761376&view=diff
==============================================================================
--- poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/functions/TestDate.java (original)
+++ poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/functions/TestDate.java Mon Sep 19 00:20:44 2016
@@ -81,7 +81,7 @@ public final class TestDate extends Test
cell11.setCellFormula(formulaText);
evaluator.clearAllCachedResultValues();
CellValue cv = evaluator.evaluate(cell11);
- if (cv.getCellType() != CellType.NUMERIC) {
+ if (cv.getCellTypeEnum() != CellType.NUMERIC) {
throw new AssertionFailedError("Wrong result type: " + cv.formatAsString());
}
double actualValue = cv.getNumberValue();
Modified: poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/functions/TestFind.java
URL: http://svn.apache.org/viewvc/poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/functions/TestFind.java?rev=1761376&r1=1761375&r2=1761376&view=diff
==============================================================================
--- poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/functions/TestFind.java (original)
+++ poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/functions/TestFind.java Mon Sep 19 00:20:44 2016
@@ -66,7 +66,7 @@ public final class TestFind {
cell.setCellFormula(formulaText);
fe.notifyUpdateCell(cell);
CellValue result = fe.evaluate(cell);
- assertEquals(result.getCellType(), CellType.NUMERIC);
+ assertEquals(result.getCellTypeEnum(), CellType.NUMERIC);
assertEquals(expectedResult, result.getNumberValue(), 0.0);
}
@@ -75,7 +75,7 @@ public final class TestFind {
cell.setCellFormula(formulaText);
fe.notifyUpdateCell(cell);
CellValue result = fe.evaluate(cell);
- assertEquals(result.getCellType(), CellType.ERROR);
+ assertEquals(result.getCellTypeEnum(), CellType.ERROR);
assertEquals(expectedErrorCode.getCode(), result.getErrorValue());
}
}
Modified: poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/functions/TestFixed.java
URL: http://svn.apache.org/viewvc/poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/functions/TestFixed.java?rev=1761376&r1=1761375&r2=1761376&view=diff
==============================================================================
--- poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/functions/TestFixed.java (original)
+++ poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/functions/TestFixed.java Mon Sep 19 00:20:44 2016
@@ -117,7 +117,7 @@ public final class TestFixed {
cell11.setCellFormula(formulaText);
evaluator.clearAllCachedResultValues();
CellValue cv = evaluator.evaluate(cell11);
- assertEquals("Wrong result type: " + cv.formatAsString(), CellType.STRING, cv.getCellType());
+ assertEquals("Wrong result type: " + cv.formatAsString(), CellType.STRING, cv.getCellTypeEnum());
String actualValue = cv.getStringValue();
assertEquals(expectedResult, actualValue);
}
@@ -127,7 +127,7 @@ public final class TestFixed {
evaluator.clearAllCachedResultValues();
CellValue cv = evaluator.evaluate(cell11);
assertTrue("Wrong result type: " + cv.formatAsString(),
- cv.getCellType() == CellType.ERROR
+ cv.getCellTypeEnum() == CellType.ERROR
&& cv.getErrorValue() == FormulaError.VALUE.getCode());
}
}
Modified: poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/functions/TestIndirect.java
URL: http://svn.apache.org/viewvc/poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/functions/TestIndirect.java?rev=1761376&r1=1761375&r2=1761376&view=diff
==============================================================================
--- poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/functions/TestIndirect.java (original)
+++ poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/functions/TestIndirect.java Mon Sep 19 00:20:44 2016
@@ -185,7 +185,7 @@ public final class TestIndirect {
fe.clearAllCachedResultValues();
cell.setCellFormula(formula);
CellValue cv = fe.evaluate(cell);
- if (cv.getCellType() != CellType.NUMERIC) {
+ if (cv.getCellTypeEnum() != CellType.NUMERIC) {
fail("expected numeric cell type but got " + cv.formatAsString());
}
assertEquals(expectedResult, cv.getNumberValue(), 0.0);
@@ -196,7 +196,7 @@ public final class TestIndirect {
fe.clearAllCachedResultValues();
cell.setCellFormula(formula);
CellValue cv = fe.evaluate(cell);
- if (cv.getCellType() != CellType.ERROR) {
+ if (cv.getCellTypeEnum() != CellType.ERROR) {
fail("expected error cell type but got " + cv.formatAsString());
}
int expCode = expectedResult.getErrorCode();
Modified: poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/functions/TestIrr.java
URL: http://svn.apache.org/viewvc/poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/functions/TestIrr.java?rev=1761376&r1=1761375&r2=1761376&view=diff
==============================================================================
--- poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/functions/TestIrr.java (original)
+++ poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/functions/TestIrr.java Mon Sep 19 00:20:44 2016
@@ -128,7 +128,7 @@ public final class TestIrr extends TestC
private static void assertFormulaResult(CellValue cv, HSSFCell cell){
double actualValue = cv.getNumberValue();
double expectedValue = cell.getNumericCellValue(); // cached formula result calculated by Excel
- assertEquals("Invalid formula result: " + cv.toString(), CellType.NUMERIC, cv.getCellType());
+ assertEquals("Invalid formula result: " + cv.toString(), CellType.NUMERIC, cv.getCellTypeEnum());
assertEquals(expectedValue, actualValue, 1E-4); // should agree within 0.01%
}
}
Modified: poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/functions/TestIsBlank.java
URL: http://svn.apache.org/viewvc/poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/functions/TestIsBlank.java?rev=1761376&r1=1761375&r2=1761376&view=diff
==============================================================================
--- poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/functions/TestIsBlank.java (original)
+++ poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/functions/TestIsBlank.java Mon Sep 19 00:20:44 2016
@@ -47,13 +47,13 @@ public final class TestIsBlank extends T
HSSFFormulaEvaluator fe = new HSSFFormulaEvaluator(wb);
CellValue result = fe.evaluate(cell);
- assertEquals(CellType.BOOLEAN, result.getCellType());
+ assertEquals(CellType.BOOLEAN, result.getCellTypeEnum());
assertEquals(true, result.getBooleanValue());
cell.setCellFormula("isblank(D7:D7)");
result = fe.evaluate(cell);
- assertEquals(CellType.BOOLEAN, result.getCellType());
+ assertEquals(CellType.BOOLEAN, result.getCellTypeEnum());
assertEquals(true, result.getBooleanValue());
}
}
Modified: poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/functions/TestMirr.java
URL: http://svn.apache.org/viewvc/poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/functions/TestMirr.java?rev=1761376&r1=1761375&r2=1761376&view=diff
==============================================================================
--- poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/functions/TestMirr.java (original)
+++ poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/formula/functions/TestMirr.java Mon Sep 19 00:20:44 2016
@@ -162,7 +162,7 @@ public final class TestMirr extends Test
private static void assertFormulaResult(CellValue cv, HSSFCell cell) {
double actualValue = cv.getNumberValue();
double expectedValue = cell.getNumericCellValue(); // cached formula result calculated by Excel
- assertEquals("Invalid formula result: " + cv.toString(), CellType.NUMERIC, cv.getCellType());
+ assertEquals("Invalid formula result: " + cv.toString(), CellType.NUMERIC, cv.getCellTypeEnum());
assertEquals(expectedValue, actualValue, 1E-8);
}
}
Modified: poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/usermodel/BaseTestBorderStyle.java
URL: http://svn.apache.org/viewvc/poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/usermodel/BaseTestBorderStyle.java?rev=1761376&r1=1761375&r2=1761376&view=diff
==============================================================================
--- poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/usermodel/BaseTestBorderStyle.java (original)
+++ poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/usermodel/BaseTestBorderStyle.java Mon Sep 19 00:20:44 2016
@@ -73,10 +73,10 @@ public class BaseTestBorderStyle {
protected void assertBorderStyleEquals(BorderStyle expected, Cell cell) {
CellStyle style = cell.getCellStyle();
- assertEquals(expected, style.getBorderTop());
- assertEquals(expected, style.getBorderBottom());
- assertEquals(expected, style.getBorderLeft());
- assertEquals(expected, style.getBorderRight());
+ assertEquals(expected, style.getBorderTopEnum());
+ assertEquals(expected, style.getBorderBottomEnum());
+ assertEquals(expected, style.getBorderLeftEnum());
+ assertEquals(expected, style.getBorderRightEnum());
}
}
Modified: poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/usermodel/BaseTestBugzillaIssues.java
URL: http://svn.apache.org/viewvc/poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/usermodel/BaseTestBugzillaIssues.java?rev=1761376&r1=1761375&r2=1761376&view=diff
==============================================================================
--- poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/usermodel/BaseTestBugzillaIssues.java (original)
+++ poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/usermodel/BaseTestBugzillaIssues.java Mon Sep 19 00:20:44 2016
@@ -1133,8 +1133,8 @@ public abstract class BaseTestBugzillaIs
cfs.setCellFormula("B1");
FormulaEvaluator fe = wb.getCreationHelper().createFormulaEvaluator();
- assertEquals(CellType.NUMERIC, fe.evaluate(cfn).getCellType());
- assertEquals(CellType.STRING, fe.evaluate(cfs).getCellType());
+ assertEquals(CellType.NUMERIC, fe.evaluate(cfn).getCellTypeEnum());
+ assertEquals(CellType.STRING, fe.evaluate(cfs).getCellTypeEnum());
fe.evaluateFormulaCellEnum(cfn);
fe.evaluateFormulaCellEnum(cfs);
Modified: poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/usermodel/BaseTestCell.java
URL: http://svn.apache.org/viewvc/poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/usermodel/BaseTestCell.java?rev=1761376&r1=1761375&r2=1761376&view=diff
==============================================================================
--- poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/usermodel/BaseTestCell.java (original)
+++ poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/usermodel/BaseTestCell.java Mon Sep 19 00:20:44 2016
@@ -278,10 +278,10 @@ public abstract class BaseTestCell {
assertNotNull("Formula Cell Style", cs);
assertEquals("Font Index Matches", f.getIndex(), cs.getFontIndex());
- 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());
+ 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());
wb2.close();
}
@@ -1015,4 +1015,36 @@ public abstract class BaseTestCell {
wb.close();
}
+
+ @Test
+ public void primitiveToEnumReplacementDoesNotBreakBackwardsCompatibility() {
+ // bug 59836
+ // until we have changes POI from working on primitives (int) to enums,
+ // we should make sure we minimize backwards compatibility breakages.
+ // This method tests the old way of working with cell types, alignment, etc.
+ Workbook wb = _testDataProvider.createWorkbook();
+ Sheet sheet = wb.createSheet();
+ Row row = sheet.createRow(0);
+ Cell cell = row.createCell(0);
+
+ // Cell.CELL_TYPE_* -> CellType.*
+ cell.setCellValue(5.0);
+ assertEquals(Cell.CELL_TYPE_NUMERIC, cell.getCellType());
+ assertEquals(0, cell.getCellType()); //make sure that hard-coded int literals still work, even though users should be using the named constants
+ assertEquals(CellType.NUMERIC, cell.getCellTypeEnum()); // make sure old way and new way are compatible
+
+ // make sure switch(int|Enum) still works. Cases must be statically resolvable in Java 6 ("constant expression required")
+ switch(cell.getCellType()) {
+ case Cell.CELL_TYPE_NUMERIC:
+ // expected
+ break;
+ case Cell.CELL_TYPE_STRING:
+ case Cell.CELL_TYPE_BOOLEAN:
+ case Cell.CELL_TYPE_ERROR:
+ case Cell.CELL_TYPE_FORMULA:
+ case Cell.CELL_TYPE_BLANK:
+ default:
+ fail("unexpected cell type: " + cell.getCellType());
+ }
+ }
}
Modified: poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/usermodel/BaseTestConditionalFormatting.java
URL: http://svn.apache.org/viewvc/poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/usermodel/BaseTestConditionalFormatting.java?rev=1761376&r1=1761375&r2=1761376&view=diff
==============================================================================
--- poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/usermodel/BaseTestConditionalFormatting.java (original)
+++ poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/usermodel/BaseTestConditionalFormatting.java Mon Sep 19 00:20:44 2016
@@ -363,10 +363,10 @@ public abstract class BaseTestConditiona
BorderFormatting r1bf = rule1.getBorderFormatting();
assertNotNull(r1bf);
- assertEquals(BorderStyle.THIN, r1bf.getBorderBottom());
- assertEquals(BorderStyle.THICK,r1bf.getBorderTop());
- assertEquals(BorderStyle.DASHED,r1bf.getBorderLeft());
- assertEquals(BorderStyle.DOTTED,r1bf.getBorderRight());
+ assertEquals(BorderStyle.THIN, r1bf.getBorderBottomEnum());
+ assertEquals(BorderStyle.THICK,r1bf.getBorderTopEnum());
+ assertEquals(BorderStyle.DASHED,r1bf.getBorderLeftEnum());
+ assertEquals(BorderStyle.DOTTED,r1bf.getBorderRightEnum());
PatternFormatting r1pf = rule1.getPatternFormatting();
assertNotNull(r1pf);
@@ -1021,19 +1021,19 @@ public abstract class BaseTestConditiona
for (BorderStyle border : BorderStyle.values()) {
borderFmt.setBorderTop(border);
- assertEquals(border, borderFmt.getBorderTop());
+ assertEquals(border, borderFmt.getBorderTopEnum());
borderFmt.setBorderBottom(border);
- assertEquals(border, borderFmt.getBorderBottom());
+ assertEquals(border, borderFmt.getBorderBottomEnum());
borderFmt.setBorderLeft(border);
- assertEquals(border, borderFmt.getBorderLeft());
+ assertEquals(border, borderFmt.getBorderLeftEnum());
borderFmt.setBorderRight(border);
- assertEquals(border, borderFmt.getBorderRight());
+ assertEquals(border, borderFmt.getBorderRightEnum());
borderFmt.setBorderDiagonal(border);
- assertEquals(border, borderFmt.getBorderDiagonal());
+ assertEquals(border, borderFmt.getBorderDiagonalEnum());
}
workbook.close();
@@ -1049,37 +1049,37 @@ public abstract class BaseTestConditiona
ConditionalFormattingRule rule1 = sheetCF.createConditionalFormattingRule(ComparisonOperator.EQUAL, "7");
BorderFormatting borderFmt = rule1.createBorderFormatting();
- assertEquals(BorderStyle.NONE, borderFmt.getBorderBottom());
+ assertEquals(BorderStyle.NONE, borderFmt.getBorderBottomEnum());
borderFmt.setBorderBottom(BorderStyle.DOTTED);
- assertEquals(BorderStyle.DOTTED, borderFmt.getBorderBottom());
+ assertEquals(BorderStyle.DOTTED, borderFmt.getBorderBottomEnum());
borderFmt.setBorderBottom(BorderStyle.NONE);
- assertEquals(BorderStyle.NONE, borderFmt.getBorderBottom());
+ assertEquals(BorderStyle.NONE, borderFmt.getBorderBottomEnum());
borderFmt.setBorderBottom(BorderStyle.THICK);
- assertEquals(BorderStyle.THICK, borderFmt.getBorderBottom());
+ assertEquals(BorderStyle.THICK, borderFmt.getBorderBottomEnum());
- assertEquals(BorderStyle.NONE, borderFmt.getBorderTop());
+ assertEquals(BorderStyle.NONE, borderFmt.getBorderTopEnum());
borderFmt.setBorderTop(BorderStyle.DOTTED);
- assertEquals(BorderStyle.DOTTED, borderFmt.getBorderTop());
+ assertEquals(BorderStyle.DOTTED, borderFmt.getBorderTopEnum());
borderFmt.setBorderTop(BorderStyle.NONE);
- assertEquals(BorderStyle.NONE, borderFmt.getBorderTop());
+ assertEquals(BorderStyle.NONE, borderFmt.getBorderTopEnum());
borderFmt.setBorderTop(BorderStyle.THICK);
- assertEquals(BorderStyle.THICK, borderFmt.getBorderTop());
+ assertEquals(BorderStyle.THICK, borderFmt.getBorderTopEnum());
- assertEquals(BorderStyle.NONE, borderFmt.getBorderLeft());
+ assertEquals(BorderStyle.NONE, borderFmt.getBorderLeftEnum());
borderFmt.setBorderLeft(BorderStyle.DOTTED);
- assertEquals(BorderStyle.DOTTED, borderFmt.getBorderLeft());
+ assertEquals(BorderStyle.DOTTED, borderFmt.getBorderLeftEnum());
borderFmt.setBorderLeft(BorderStyle.NONE);
- assertEquals(BorderStyle.NONE, borderFmt.getBorderLeft());
+ assertEquals(BorderStyle.NONE, borderFmt.getBorderLeftEnum());
borderFmt.setBorderLeft(BorderStyle.THIN);
- assertEquals(BorderStyle.THIN, borderFmt.getBorderLeft());
+ assertEquals(BorderStyle.THIN, borderFmt.getBorderLeftEnum());
- assertEquals(BorderStyle.NONE, borderFmt.getBorderRight());
+ assertEquals(BorderStyle.NONE, borderFmt.getBorderRightEnum());
borderFmt.setBorderRight(BorderStyle.DOTTED);
- assertEquals(BorderStyle.DOTTED, borderFmt.getBorderRight());
+ assertEquals(BorderStyle.DOTTED, borderFmt.getBorderRightEnum());
borderFmt.setBorderRight(BorderStyle.NONE);
- assertEquals(BorderStyle.NONE, borderFmt.getBorderRight());
+ assertEquals(BorderStyle.NONE, borderFmt.getBorderRightEnum());
borderFmt.setBorderRight(BorderStyle.HAIR);
- assertEquals(BorderStyle.HAIR, borderFmt.getBorderRight());
+ assertEquals(BorderStyle.HAIR, borderFmt.getBorderRightEnum());
ConditionalFormattingRule [] cfRules = { rule1 };
@@ -1095,10 +1095,10 @@ public abstract class BaseTestConditiona
BorderFormatting r1fp = cf.getRule(0).getBorderFormatting();
assertNotNull(r1fp);
- assertEquals(BorderStyle.THICK, r1fp.getBorderBottom());
- assertEquals(BorderStyle.THICK, r1fp.getBorderTop());
- assertEquals(BorderStyle.THIN, r1fp.getBorderLeft());
- assertEquals(BorderStyle.HAIR, r1fp.getBorderRight());
+ assertEquals(BorderStyle.THICK, r1fp.getBorderBottomEnum());
+ assertEquals(BorderStyle.THICK, r1fp.getBorderTopEnum());
+ assertEquals(BorderStyle.THIN, r1fp.getBorderLeftEnum());
+ assertEquals(BorderStyle.HAIR, r1fp.getBorderRightEnum());
workbook.close();
}
Modified: poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/usermodel/BaseTestFormulaEvaluator.java
URL: http://svn.apache.org/viewvc/poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/usermodel/BaseTestFormulaEvaluator.java?rev=1761376&r1=1761375&r2=1761376&view=diff
==============================================================================
--- poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/usermodel/BaseTestFormulaEvaluator.java (original)
+++ poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/usermodel/BaseTestFormulaEvaluator.java Mon Sep 19 00:20:44 2016
@@ -19,6 +19,7 @@ package org.apache.poi.ss.usermodel;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertSame;
import static org.junit.Assert.fail;
import java.io.IOException;
@@ -326,4 +327,15 @@ public abstract class BaseTestFormulaEva
wb.close();
}
+
+ @Test
+ public void evaluateInCellReturnsSameCell() throws IOException {
+ Workbook wb = _testDataProvider.createWorkbook();
+ wb.createSheet().createRow(0).createCell(0);
+ FormulaEvaluator evaluator = wb.getCreationHelper().createFormulaEvaluator();
+ Cell cell = wb.getSheetAt(0).getRow(0).getCell(0);
+ Cell same = evaluator.evaluateInCell(cell);
+ assertSame(cell, same);
+ wb.close();
+ }
}
\ No newline at end of file
Modified: poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/usermodel/BaseTestWorkbook.java
URL: http://svn.apache.org/viewvc/poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/usermodel/BaseTestWorkbook.java?rev=1761376&r1=1761375&r2=1761376&view=diff
==============================================================================
--- poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/usermodel/BaseTestWorkbook.java (original)
+++ poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/usermodel/BaseTestWorkbook.java Mon Sep 19 00:20:44 2016
@@ -34,6 +34,7 @@ import java.util.Iterator;
import org.apache.poi.hssf.HSSFTestDataSamples;
import org.apache.poi.ss.ITestDataProvider;
import org.apache.poi.ss.util.CellRangeAddress;
+import org.apache.poi.util.NullOutputStream;
import org.junit.Test;
public abstract class BaseTestWorkbook {
@@ -781,15 +782,6 @@ public abstract class BaseTestWorkbook {
}
}
- protected static class NullOutputStream extends OutputStream {
- public NullOutputStream() {
- }
-
- @Override
- public void write(int b) throws IOException {
- }
- }
-
@Test
public void test58499() throws IOException {
Workbook workbook = _testDataProvider.createWorkbook();
Modified: poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/usermodel/TestDataFormatter.java
URL: http://svn.apache.org/viewvc/poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/usermodel/TestDataFormatter.java?rev=1761376&r1=1761375&r2=1761376&view=diff
==============================================================================
--- poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/usermodel/TestDataFormatter.java (original)
+++ poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/usermodel/TestDataFormatter.java Mon Sep 19 00:20:44 2016
@@ -597,6 +597,27 @@ public class TestDataFormatter {
}
}
+ @Test
+ public void testBoolean() throws IOException {
+ DataFormatter formatter = new DataFormatter();
+
+ // Create a spreadsheet with some TRUE/FALSE boolean values in it
+ Workbook wb = new HSSFWorkbook();
+ try {
+ Sheet s = wb.createSheet();
+ Row r = s.createRow(0);
+ Cell c = r.createCell(0);
+
+ c.setCellValue(true);
+ assertEquals("TRUE", formatter.formatCellValue(c));
+
+ c.setCellValue(false);
+ assertEquals("FALSE", formatter.formatCellValue(c));
+ } finally {
+ wb.close();
+ }
+ }
+
/**
* While we don't currently support using a locale code at
* the start of a format string to format it differently, we
Modified: poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/util/BaseTestCellUtil.java
URL: http://svn.apache.org/viewvc/poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/util/BaseTestCellUtil.java?rev=1761376&r1=1761375&r2=1761376&view=diff
==============================================================================
--- poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/util/BaseTestCellUtil.java (original)
+++ poi/branches/hssf_cryptoapi/src/testcases/org/apache/poi/ss/util/BaseTestCellUtil.java Mon Sep 19 00:20:44 2016
@@ -99,11 +99,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().getBorderBottom());
+ assertEquals(BorderStyle.DASH_DOT, c.getCellStyle().getBorderBottomEnum());
// A valid BorderStyle constant, as an Enum
CellUtil.setCellStyleProperty(c, CellUtil.BORDER_TOP, BorderStyle.MEDIUM_DASH_DOT);
- assertEquals(BorderStyle.MEDIUM_DASH_DOT, c.getCellStyle().getBorderTop());
+ assertEquals(BorderStyle.MEDIUM_DASH_DOT, c.getCellStyle().getBorderTopEnum());
wb.close();
}
Added: poi/branches/hssf_cryptoapi/test-data/slideshow/60003.ppt
URL: http://svn.apache.org/viewvc/poi/branches/hssf_cryptoapi/test-data/slideshow/60003.ppt?rev=1761376&view=auto
==============================================================================
Binary file - no diff available.
Propchange: poi/branches/hssf_cryptoapi/test-data/slideshow/60003.ppt
------------------------------------------------------------------------------
svn:mime-type = application/vnd.ms-powerpoint
Modified: poi/branches/hssf_cryptoapi/test-data/spreadsheet/DGet.xls
URL: http://svn.apache.org/viewvc/poi/branches/hssf_cryptoapi/test-data/spreadsheet/DGet.xls?rev=1761376&r1=1761375&r2=1761376&view=diff
==============================================================================
Binary files - no diff available.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org