poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject cvs commit: jakarta-poi/src/testcases/org/apache/poi/hssf/usermodel TestHSSFCell.java
Date Thu, 30 Oct 2003 18:07:33 GMT
avik        2003/10/30 10:07:33

  Modified:    src/java/org/apache/poi/hssf/record Tag: REL_2_BRANCH
                        BoolErrRecord.java
               src/testcases/org/apache/poi/hssf/usermodel Tag:
                        REL_2_BRANCH TestHSSFCell.java
  Log:
  fix for bug 16560. Probably more documentation reqd.
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.6.2.1   +8 -2      jakarta-poi/src/java/org/apache/poi/hssf/record/BoolErrRecord.java
  
  Index: BoolErrRecord.java
  ===================================================================
  RCS file: /home/cvs/jakarta-poi/src/java/org/apache/poi/hssf/record/BoolErrRecord.java,v
  retrieving revision 1.6
  retrieving revision 1.6.2.1
  diff -u -r1.6 -r1.6.2.1
  --- BoolErrRecord.java	30 Apr 2003 04:38:48 -0000	1.6
  +++ BoolErrRecord.java	30 Oct 2003 18:07:33 -0000	1.6.2.1
  @@ -172,12 +172,18 @@
        * set the error value for the cell
        *
        * @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)
       {
  -        field_4_bBoolErr = value;
  -        field_5_fError   = ( byte ) 1;
  +        if ( (value==0)||(value==7)||(value==15)||(value==23)||(value==29)||(value==36)||(value==42))
{
  +            field_4_bBoolErr = value;
  +            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()
  
  
  
  No                   revision
  No                   revision
  1.8.2.1   +2 -2      jakarta-poi/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFCell.java
  
  Index: TestHSSFCell.java
  ===================================================================
  RCS file: /home/cvs/jakarta-poi/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFCell.java,v
  retrieving revision 1.8
  retrieving revision 1.8.2.1
  diff -u -r1.8 -r1.8.2.1
  --- TestHSSFCell.java	30 Apr 2003 04:38:58 -0000	1.8
  +++ TestHSSFCell.java	30 Oct 2003 18:07:33 -0000	1.8.2.1
  @@ -116,7 +116,7 @@
   
               c=r.createCell((short)2);
               //c.setCellType(HSSFCell.CELL_TYPE_ERROR);
  -            c.setCellErrorValue((byte)1);
  +            c.setCellErrorValue((byte)7);
   
   
               wb.write(out);
  @@ -136,7 +136,7 @@
               c = r.getCell((short)1);
               assertTrue("boolean value 0,1 = 0",c.getErrorCellValue() == 0);
               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();
       }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-dev-help@jakarta.apache.org


Mime
View raw message