sup book record -- comments, some rearranging of the furniture.

git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@352602 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Andrew C. Oliver 2002-05-06 22:50:57 +00:00
parent 15617dc8c9
commit d730457ed7

View File

@ -65,7 +65,8 @@ import java.util.ArrayList;
* Its only a dummy record for making new ExternSheet Record <P> * Its only a dummy record for making new ExternSheet Record <P>
* REFERENCE: <P> * REFERENCE: <P>
* @author Libin Roman (Vista Portal LDT. Developer) * @author Libin Roman (Vista Portal LDT. Developer)
* @version 1.0-pre * @author Andrew C. Oliver (acoliver@apache.org)
*
*/ */
public class SupBookRecord extends Record public class SupBookRecord extends Record
@ -77,6 +78,7 @@ public class SupBookRecord extends Record
public SupBookRecord() public SupBookRecord()
{ {
setFlag((short)0x401);
} }
/** /**
@ -95,7 +97,7 @@ public class SupBookRecord extends Record
/** /**
* Constructs a Extern Sheet record and sets its fields appropriately. * 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 size the size of the data area of the record
* @param data data of the record (should not contain sid/len) * @param data data of the record (should not contain sid/len)
* @param offset of the record's data * @param offset of the record's data
@ -110,7 +112,7 @@ public class SupBookRecord extends Record
{ {
if (id != sid) if (id != sid)
{ {
throw new RecordFormatException("NOT An ExternSheet RECORD"); throw new RecordFormatException("NOT An Supbook RECORD");
} }
} }
@ -127,7 +129,8 @@ public class SupBookRecord extends Record
//For now We use it only for one case //For now We use it only for one case
//When we need to add an named range when no named ranges was //When we need to add an named range when no named ranges was
//before it //before it
field_1_number_of_sheets = LittleEndian.getShort(data,offset+0);
field_2_flag = LittleEndian.getShort(data,offset+2);
} }
@ -160,8 +163,16 @@ public class SupBookRecord extends Record
field_1_number_of_sheets = number; field_1_number_of_sheets = number;
} }
public void setFlag(){ public short getNumberOfSheets(){
field_2_flag = 0x0401; 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() public int getRecordSize()