fix for bug 16560. But the testcase in HEAD was already failing, so continues to fail even now.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353427 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
58623a5194
commit
e16e9b24e1
@ -172,14 +172,19 @@ public class BoolErrRecord
|
|||||||
* set the error value for the cell
|
* set the error value for the cell
|
||||||
*
|
*
|
||||||
* @param value error representing the error value
|
* @param value error representing the error value
|
||||||
|
* this value can only be 0,7,15,23,29,36 or 42
|
||||||
|
* see bugzilla bug 16560 for an explanation
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public void setValue(byte value)
|
public void setValue(byte value)
|
||||||
{
|
{
|
||||||
|
if ( (value==0)||(value==7)||(value==15)||(value==23)||(value==29)||(value==36)||(value==42)) {
|
||||||
field_4_bBoolErr = value;
|
field_4_bBoolErr = value;
|
||||||
field_5_fError = ( byte ) 1;
|
field_5_fError = ( byte ) 1;
|
||||||
|
} else {
|
||||||
|
throw new RuntimeException("Error Value can only be 0,7,15,23,29,36 or 42. It cannot be "+value);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//public short getRow()
|
//public short getRow()
|
||||||
public int getRow()
|
public int getRow()
|
||||||
{
|
{
|
||||||
|
@ -116,7 +116,7 @@ extends TestCase {
|
|||||||
|
|
||||||
c=r.createCell((short)2);
|
c=r.createCell((short)2);
|
||||||
//c.setCellType(HSSFCell.CELL_TYPE_ERROR);
|
//c.setCellType(HSSFCell.CELL_TYPE_ERROR);
|
||||||
c.setCellErrorValue((byte)1);
|
c.setCellErrorValue((byte)7);
|
||||||
|
|
||||||
|
|
||||||
wb.write(out);
|
wb.write(out);
|
||||||
@ -136,7 +136,7 @@ extends TestCase {
|
|||||||
c = r.getCell((short)1);
|
c = r.getCell((short)1);
|
||||||
assertTrue("boolean value 0,1 = 0",c.getErrorCellValue() == 0);
|
assertTrue("boolean value 0,1 = 0",c.getErrorCellValue() == 0);
|
||||||
c = r.getCell((short)2);
|
c = r.getCell((short)2);
|
||||||
assertTrue("boolean value 0,2 = 1",c.getErrorCellValue() == 1);
|
assertTrue("boolean value 0,2 = 7",c.getErrorCellValue() == 7);
|
||||||
|
|
||||||
in.close();
|
in.close();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user