acoliver    02/05/06 15:50:57

  Modified:    src/java/org/apache/poi/hssf/record SupBookRecord.java
  Log:
  sup book record -- comments, some rearranging of the furniture.
  
  Revision  Changes    Path
  1.2       +17 -6     
jakarta-poi/src/java/org/apache/poi/hssf/record/SupBookRecord.java
  
  Index: SupBookRecord.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-poi/src/java/org/apache/poi/hssf/record/SupBookRecord.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SupBookRecord.java        23 Apr 2002 22:24:41 -0000      1.1
  +++ SupBookRecord.java        6 May 2002 22:50:57 -0000       1.2
  @@ -65,7 +65,8 @@
    *               Its only a dummy record for making new ExternSheet Record <P>
    * REFERENCE:  <P>
    * @author Libin Roman (Vista Portal LDT. Developer)
  - * @version 1.0-pre
  + * @author Andrew C. Oliver ([EMAIL PROTECTED])
  + * 
    */
   
   public class SupBookRecord extends Record
  @@ -77,6 +78,7 @@
   
       public SupBookRecord()
       {
  +        setFlag((short)0x401);
       }
   
       /**
  @@ -95,7 +97,7 @@
       /**
        * Constructs a Extern Sheet record and sets its fields appropriately.
        *
  -     * @param id     id must be 0x16 or an exception will be throw upon validation
  +     * @param id     id must be 0x1ae or an exception will be throw upon validation
        * @param size  the size of the data area of the record
        * @param data  data of the record (should not contain sid/len)
        * @param offset of the record's data
  @@ -110,7 +112,7 @@
       {
           if (id != sid)
           {
  -            throw new RecordFormatException("NOT An ExternSheet RECORD");
  +            throw new RecordFormatException("NOT An Supbook RECORD");
           }
       }
   
  @@ -127,7 +129,8 @@
           //For now We use it only for one case
           //When we need to add an named range when no named ranges was 
           //before it
  -        
  +        field_1_number_of_sheets = LittleEndian.getShort(data,offset+0);
  +        field_2_flag = LittleEndian.getShort(data,offset+2);
       }
   
   
  @@ -160,8 +163,16 @@
           field_1_number_of_sheets = number;
       }
       
  -    public void setFlag(){
  -        field_2_flag = 0x0401;
  +    public short getNumberOfSheets(){
  +        return field_1_number_of_sheets;
  +    }    
  +    
  +    public void setFlag(short flag){        
  +        field_2_flag = flag;
  +    }
  +    
  +    public short getFlag() {
  +        return field_2_flag;
       }
   
       public int getRecordSize()
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to