Removed validateSid method from Record classes

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@700327 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Josh Micich 2008-09-30 02:30:53 +00:00
parent d683ddaa80
commit fa90245b96
197 changed files with 101 additions and 2304 deletions

View File

@ -68,19 +68,6 @@ public abstract class AbstractEscherHolderRecord
}
/**
* Checks the sid matches the expected side for this record
*
* @param id the expected sid.
*/
protected void validateSid(short id)
{
if (id != getSid())
{
throw new RecordFormatException("Not an escher record! (sid was " + id + ", expecting " + getSid() + ")");
}
}
protected void fillFields(RecordInputStream in)
{
escherRecords = new ArrayList();

View File

@ -60,19 +60,6 @@ public final class AreaFormatRecord extends Record {
}
/**
* Checks the sid matches the expected side for this record
*
* @param id the expected sid.
*/
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("Not a AreaFormat record");
}
}
protected void fillFields(RecordInputStream in)
{
field_1_foregroundColor = in.readInt();

View File

@ -54,19 +54,6 @@ public final class AreaRecord extends Record {
}
/**
* Checks the sid matches the expected side for this record
*
* @param id the expected sid.
*/
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("Not a Area record");
}
}
protected void fillFields(RecordInputStream in)
{

View File

@ -58,19 +58,6 @@ public class AxisLineFormatRecord
}
/**
* Checks the sid matches the expected side for this record
*
* @param id the expected sid.
*/
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("Not a AxisLineFormat record");
}
}
protected void fillFields(RecordInputStream in)
{
field_1_axisType = in.readShort();

View File

@ -69,19 +69,6 @@ public final class AxisOptionsRecord extends Record {
}
/**
* Checks the sid matches the expected side for this record
*
* @param id the expected sid.
*/
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("Not a AxisOptions record");
}
}
protected void fillFields(RecordInputStream in)
{
field_1_minimumCategory = in.readShort();

View File

@ -60,19 +60,6 @@ public class AxisParentRecord
}
/**
* Checks the sid matches the expected side for this record
*
* @param id the expected sid.
*/
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("Not a AxisParent record");
}
}
protected void fillFields(RecordInputStream in)
{
field_1_axisType = in.readShort();

View File

@ -61,19 +61,6 @@ public class AxisRecord
}
/**
* Checks the sid matches the expected side for this record
*
* @param id the expected sid.
*/
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("Not a Axis record");
}
}
protected void fillFields(RecordInputStream in)
{
field_1_axisType = in.readShort();

View File

@ -54,19 +54,6 @@ public class AxisUsedRecord
}
/**
* Checks the sid matches the expected side for this record
*
* @param id the expected sid.
*/
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("Not a AxisUsed record");
}
}
protected void fillFields(RecordInputStream in)
{
field_1_numAxis = in.readShort();

View File

@ -98,14 +98,6 @@ public class BOFRecord
// fillFields(data,size);
}
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("NOT A BOF RECORD");
}
}
protected void fillFields(RecordInputStream in)
{
field_1_version = in.readShort();

View File

@ -50,14 +50,6 @@ public class BackupRecord
super(in);
}
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("NOT A BACKUP RECORD");
}
}
protected void fillFields(RecordInputStream in)
{
field_1_backup = in.readShort();

View File

@ -59,19 +59,6 @@ public final class BarRecord extends Record {
}
/**
* Checks the sid matches the expected side for this record
*
* @param id the expected sid.
*/
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("Not a Bar record");
}
}
protected void fillFields(RecordInputStream in)
{
field_1_barSpace = in.readShort();

View File

@ -49,14 +49,6 @@ public class BeginRecord
super(in);
}
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("NOT A BEGIN RECORD");
}
}
protected void fillFields(RecordInputStream in)
{
}

View File

@ -55,20 +55,6 @@ public final class BlankRecord extends Record implements CellValueRecordInterfac
field_3_xf = in.readShort();
}
/**
* called by constructor, should throw runtime exception in the event of a
* record passed with a differing ID.
*
* @param id alleged id for this record
*/
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("NOT A BLANKRECORD!");
}
}
/**
* set the row this cell occurs on
* @param row the row this cell occurs within

View File

@ -50,14 +50,6 @@ public class BookBoolRecord
super(in);
}
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("NOT A BOOKBOOL RECORD");
}
}
protected void fillFields(RecordInputStream in)
{
field_1_save_link_values = in.readShort();

View File

@ -221,20 +221,6 @@ public final class BoolErrRecord extends Record implements CellValueRecordInterf
return 12;
}
/**
* called by constructor, should throw runtime exception in the event of a
* record passed with a differing ID.
*
* @param id alleged id for this record
*/
protected void validateSid(short id)
{
if (id != BoolErrRecord.sid)
{
throw new RecordFormatException("Not a valid BoolErrRecord");
}
}
public short getSid()
{
return sid;

View File

@ -49,19 +49,6 @@ public class BottomMarginRecord
super( in );
}
/**
* Checks the sid matches the expected side for this record
*
* @param id the expected sid.
*/
protected void validateSid( short id )
{
if ( id != sid )
{
throw new RecordFormatException( "Not a BottomMargin record" );
}
}
protected void fillFields( RecordInputStream in )
{
field_1_margin = in.readDouble();

View File

@ -61,12 +61,6 @@ public final class BoundSheetRecord extends Record {
super(in);
}
protected void validateSid(short id) {
if (id != sid) {
throw new RecordFormatException("NOT A Bound Sheet RECORD");
}
}
/**
* UTF8: sid + len + bof + flags + len(str) + unicode + str 2 + 2 + 4 + 2 +
* 1 + 1 + len(str)

View File

@ -160,22 +160,6 @@ public final class CFHeaderRecord extends Record {
return 4 + getDataSize();
}
/**
* called by constructor, should throw runtime exception in the event of a
* record passed with a differing ID.
*
* @param id alleged id for this record
*/
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException(
"NOT A ConditionalFormattingHeaderRecord RECORD");
}
}
public short getSid()
{
return sid;

View File

@ -447,21 +447,6 @@ public final class CFRuleRecord extends Record {
field_18_formula2 = safeClone(ptgs);
}
/**
* called by constructor, should throw runtime exception in the event of a
* record passed with a differing ID.
*
* @param id alleged id for this record
*/
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("NOT A CFRULE RECORD");
}
}
public short getSid()
{
return sid;

View File

@ -42,12 +42,6 @@ public final class CRNCountRecord extends Record {
super(in);
}
protected void validateSid(short id) {
if (id != sid) {
throw new RecordFormatException("NOT An XCT RECORD");
}
}
public int getNumberOfCRNs() {
return field_1_number_crn_records;
}

View File

@ -43,12 +43,6 @@ public final class CRNRecord extends Record {
super(in);
}
protected void validateSid(short id) {
if (id != sid) {
throw new RecordFormatException("NOT An XCT RECORD");
}
}
public int getNumberOfCRNs() {
return field_1_last_column_index;
}

View File

@ -56,14 +56,6 @@ public class CalcCountRecord
super(in);
}
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("NOT An Calc Count RECORD");
}
}
protected void fillFields(RecordInputStream in)
{
field_1_iterations = in.readShort();

View File

@ -71,14 +71,6 @@ public class CalcModeRecord
super(in);
}
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("NOT An Calc Mode RECORD");
}
}
protected void fillFields(RecordInputStream in)
{
field_1_calcmode = in.readShort();

View File

@ -59,19 +59,6 @@ public final class CategorySeriesAxisRecord extends Record {
}
/**
* Checks the sid matches the expected side for this record
*
* @param id the expected sid.
*/
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("Not a CategorySeriesAxis record");
}
}
protected void fillFields(RecordInputStream in)
{
field_1_crossingPoint = in.readShort();

View File

@ -54,14 +54,6 @@ public final class ChartFormatRecord extends Record {
super(in);
}
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("NOT A CHARTFORMAT RECORD");
}
}
protected void fillFields(RecordInputStream in)
{
field1_x_position = in.readInt();

View File

@ -57,19 +57,6 @@ public class ChartRecord
}
/**
* Checks the sid matches the expected side for this record
*
* @param id the expected sid.
*/
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("Not a Chart record");
}
}
protected void fillFields(RecordInputStream in)
{
field_1_x = in.readInt();

View File

@ -62,13 +62,6 @@ public class ChartTitleFormatRecord extends Record {
super(in);
}
protected void validateSid(short id) {
if (id != sid)
{
throw new RecordFormatException("NOT A CHARTTITLEFORMAT RECORD");
}
}
protected void fillFields(RecordInputStream in) {
m_recs = in.readUShort();
int idx;

View File

@ -57,14 +57,6 @@ public class CodepageRecord
super(in);
}
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("NOT A CODEPAGE RECORD");
}
}
protected void fillFields(RecordInputStream in)
{
field_1_codepage = in.readShort();

View File

@ -83,14 +83,6 @@ public final class ColumnInfoRecord extends Record {
}
}
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("NOT A COLINFO RECORD!!");
}
}
/**
* set the first column this record defines formatting info for
* @param fc - the first column index (0-based)

View File

@ -93,19 +93,6 @@ public final class CommonObjectDataSubRecord extends SubRecord {
super(in);
}
/**
* Checks the sid matches the expected side for this record
*
* @param id the expected sid.
*/
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("Not a CommonObjectData record");
}
}
protected void fillFields(RecordInputStream in)
{
field_1_objectType = in.readShort();

View File

@ -97,20 +97,6 @@ public class ContinueRecord
return field_1_data;
}
/**
* Make sure we have a good id
*
* @param id the alleged id
*/
protected void validateSid(short id)
{
if (id != ContinueRecord.sid)
{
throw new RecordFormatException("Not a Continue Record");
}
}
/**
* Debugging toString
*

View File

@ -54,14 +54,6 @@ public class CountryRecord
super(in);
}
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("NOT A Country RECORD");
}
}
protected void fillFields(RecordInputStream in)
{
field_1_default_country = in.readShort();

View File

@ -47,14 +47,6 @@ public final class DBCellRecord extends Record {
super(in);
}
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("NOT A valid DBCell RECORD");
}
}
protected void fillFields(RecordInputStream in)
{
field_1_row_offset = in.readUShort();

View File

@ -50,14 +50,6 @@ public class DSFRecord
super(in);
}
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("NOT A DSF RECORD");
}
}
protected void fillFields(RecordInputStream in)
{
field_1_dsf = in.readShort();

View File

@ -59,14 +59,6 @@ public class DVALRecord extends Record
super(in);
}
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("NOT A valid DVAL RECORD");
}
}
protected void fillFields(RecordInputStream in)
{
this.field_1_options = in.readShort();

View File

@ -110,12 +110,6 @@ public final class DVRecord extends Record {
_regions = regions;
}
protected void validateSid(short id) {
if (id != sid) {
throw new RecordFormatException("NOT a valid DV RECORD");
}
}
protected void fillFields(RecordInputStream in) {
_option_flags = in.readInt();

View File

@ -57,19 +57,6 @@ public final class DatRecord extends Record {
}
/**
* Checks the sid matches the expected side for this record
*
* @param id the expected sid.
*/
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("Not a Dat record");
}
}
protected void fillFields(RecordInputStream in)
{
field_1_options = in.readShort();

View File

@ -57,19 +57,6 @@ public final class DataFormatRecord extends Record {
}
/**
* Checks the sid matches the expected side for this record
*
* @param id the expected sid.
*/
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("Not a DataFormat record");
}
}
protected void fillFields(RecordInputStream in)
{
field_1_pointNumber = in.readShort();

View File

@ -50,14 +50,6 @@ public class DateWindow1904Record
super(in);
}
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("NOT A 1904 RECORD");
}
}
protected void fillFields(RecordInputStream in)
{
field_1_window = in.readShort();

View File

@ -46,14 +46,6 @@ public final class DefaultColWidthRecord extends Record {
super(in);
}
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("NOT A DefaultColWidth RECORD");
}
}
protected void fillFields(RecordInputStream in)
{
field_1_col_width = in.readUShort();

View File

@ -57,19 +57,6 @@ public class DefaultDataLabelTextPropertiesRecord
}
/**
* Checks the sid matches the expected side for this record
*
* @param id the expected sid.
*/
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("Not a DefaultDataLabelTextProperties record");
}
}
protected void fillFields(RecordInputStream in)
{
field_1_categoryDataType = in.readShort();

View File

@ -52,14 +52,6 @@ public class DefaultRowHeightRecord
super(in);
}
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("NOT A DefaultRowHeight RECORD");
}
}
protected void fillFields(RecordInputStream in)
{
field_1_option_flags = in.readShort();

View File

@ -54,14 +54,6 @@ public class DeltaRecord
super(in);
}
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("NOT A DELTA RECORD");
}
}
protected void fillFields(RecordInputStream in)
{
field_1_max_change = in.readDouble();

View File

@ -55,14 +55,6 @@ public class DimensionsRecord
super(in);
}
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("NOT A valid DIMENSIONS RECORD");
}
}
protected void fillFields(RecordInputStream in)
{
field_1_first_row = in.readInt();

View File

@ -34,19 +34,6 @@ public class DrawingRecord extends Record
super( in );
}
/**
* Checks the sid matches the expected side for this record
*
* @param id the expected sid.
*/
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("Not a MSODRAWING record");
}
}
protected void fillFields( RecordInputStream in )
{
recordData = in.readRemainder();

View File

@ -49,14 +49,6 @@ public final class EOFRecord extends Record {
super(in);
}
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("NOT An EOF RECORD");
}
}
protected void fillFields(RecordInputStream in)
{
}

View File

@ -64,19 +64,6 @@ public class EmbeddedObjectRefSubRecord
super(in);
}
/**
* Checks the sid matches the expected side for this record
*
* @param id the expected sid.
*/
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("Not a EmbeddedObjectRef record");
}
}
public short getSid()
{
return sid;

View File

@ -49,15 +49,6 @@ public class EndRecord
super(in);
}
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("NOT An END RECORD");
}
}
protected void fillFields(RecordInputStream in)
{
}

View File

@ -53,19 +53,6 @@ public class EndSubRecord
}
/**
* Checks the sid matches the expected side for this record
*
* @param id the expected sid.
*/
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("Not a End record");
}
}
protected void fillFields(RecordInputStream in)
{
}

View File

@ -55,12 +55,6 @@ public class ExtSSTInfoSubRecord
super(in);
}
protected void validateSid(short id)
{
// do nothing
}
protected void fillFields(RecordInputStream in)
{
field_1_stream_pos = in.readInt();

View File

@ -63,14 +63,6 @@ public class ExtSSTRecord
super(in);
}
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("NOT An EXTSST RECORD");
}
}
protected void fillFields(RecordInputStream in)
{
field_2_sst_info = new ArrayList();

View File

@ -205,14 +205,6 @@ public class ExtendedFormatRecord
super(in);
}
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("NOT A EXTENDED FORMAT RECORD");
}
}
protected void fillFields(RecordInputStream in)
{
field_1_font_index = in.readShort();

View File

@ -104,18 +104,6 @@ public class ExternSheetRecord extends Record {
super(in);
}
/**
* called by constructor, should throw runtime exception in the event of a
* record passed with a differing ID.
*
* @param id alleged id for this record
*/
protected void validateSid(short id) {
if (id != sid) {
throw new RecordFormatException("NOT An ExternSheet RECORD");
}
}
/**
* called by the constructor, should set class level fields. Should throw
* runtime exception for bad/icomplete data.

View File

@ -90,19 +90,6 @@ public final class ExternalNameRecord extends Record {
return field_4_name;
}
/**
* called by constructor, should throw runtime exception in the event of a
* record passed with a differing ID.
*
* @param id alleged id for this record
*/
protected void validateSid(short id) {
if (id != sid) {
throw new RecordFormatException("NOT A valid ExternalName RECORD");
}
}
private int getDataSize(){
int result = 3 * 2 // 3 short fields
+ 2 + field_4_name.length(); // nameLen and name

View File

@ -50,14 +50,6 @@ public class FilePassRecord
super(in);
}
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("NOT A FILEPASS RECORD");
}
}
protected void fillFields(RecordInputStream in)
{
field_1_encryptedpassword = in.readInt();

View File

@ -47,12 +47,6 @@ public final class FileSharingRecord extends Record {
super(in);
}
protected void validateSid(short id) {
if (id != sid) {
throw new RecordFormatException("NOT A FILESHARING RECORD");
}
}
protected void fillFields(RecordInputStream in) {
field_1_readonly = in.readShort();
field_2_password = in.readShort();

View File

@ -56,14 +56,6 @@ public class FnGroupCountRecord
super(in);
}
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("NOT A FNGROUPCOUNT RECORD");
}
}
protected void fillFields(RecordInputStream in)
{
field_1_count = in.readShort();

View File

@ -58,19 +58,6 @@ public class FontBasisRecord
}
/**
* Checks the sid matches the expected side for this record
*
* @param id the expected sid.
*/
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("Not a FontBasis record");
}
}
protected void fillFields(RecordInputStream in)
{
field_1_xBasis = in.readShort();

View File

@ -54,19 +54,6 @@ public class FontIndexRecord
}
/**
* Checks the sid matches the expected side for this record
*
* @param id the expected sid.
*/
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("Not a FontIndex record");
}
}
protected void fillFields(RecordInputStream in)
{
field_1_fontIndex = in.readShort();

View File

@ -87,14 +87,6 @@ public class FontRecord
super(in);
}
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("NOT A FONT RECORD");
}
}
protected void fillFields(RecordInputStream in)
{
field_1_font_height = in.readShort();

View File

@ -55,14 +55,6 @@ public class FooterRecord
super(in);
}
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("NOT A FooterRECORD");
}
}
protected void fillFields(RecordInputStream in)
{
if (in.remaining() > 0)

View File

@ -56,14 +56,6 @@ public class FormatRecord
super(in);
}
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("NOT A FORMAT RECORD");
}
}
protected void fillFields(RecordInputStream in)
{
field_1_index_code = in.readShort();

View File

@ -356,18 +356,6 @@ public final class FormulaRecord extends Record implements CellValueRecordInterf
field_8_parsed_expr = ptgs;
}
/**
* called by constructor, should throw runtime exception in the event of a
* record passed with a differing ID.
*
* @param id alleged id for this record
*/
protected void validateSid(short id) {
if (id != sid) {
throw new RecordFormatException("NOT A FORMULA RECORD");
}
}
public short getSid() {
return sid;
}

View File

@ -58,19 +58,6 @@ public final class FrameRecord extends Record {
}
/**
* Checks the sid matches the expected side for this record
*
* @param id the expected sid.
*/
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("Not a Frame record");
}
}
protected void fillFields(RecordInputStream in)
{
field_1_borderType = in.readShort();

View File

@ -54,14 +54,6 @@ public class GridsetRecord
super(in);
}
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("NOT A Gridset RECORD");
}
}
protected void fillFields(RecordInputStream in)
{
field_1_gridset_flag = in.readShort();

View File

@ -53,19 +53,6 @@ public class GroupMarkerSubRecord
}
/**
* Checks the sid matches the expected side for this record
*
* @param id the expected sid.
*/
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("Not a Group Marker record");
}
}
protected void fillFields(RecordInputStream in)
{
// int pos = 0;

View File

@ -53,14 +53,6 @@ public class GutsRecord
super(in);
}
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("NOT A Guts RECORD");
}
}
protected void fillFields(RecordInputStream in)
{
field_1_left_row_gutter = in.readShort();

View File

@ -50,14 +50,6 @@ public class HCenterRecord
super(in);
}
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("NOT A HCenter RECORD");
}
}
protected void fillFields(RecordInputStream in)
{
field_1_hcenter = in.readShort();

View File

@ -55,14 +55,6 @@ public class HeaderRecord
super(in);
}
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("NOT A HEADERRECORD");
}
}
protected void fillFields(RecordInputStream in)
{
if (in.remaining() > 0)

View File

@ -52,14 +52,6 @@ public class HideObjRecord
super(in);
}
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("NOT A HIDEOBJ RECORD");
}
}
protected void fillFields(RecordInputStream in)
{
field_1_hide_obj = in.readShort();

View File

@ -44,13 +44,6 @@ public final class HorizontalPageBreakRecord extends PageBreakRecord {
super(in);
}
protected void validateSid(short id) {
if (id != getSid()) {
throw new RecordFormatException(
"NOT A HorizontalPageBreak or VerticalPageBreak RECORD!! " + id);
}
}
public short getSid() {
return sid;
}

View File

@ -372,14 +372,6 @@ public class HyperlinkRecord extends Record {
return HyperlinkRecord.sid;
}
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("NOT A HYPERLINKRECORD!");
}
}
public int serialize(int offset, byte[] data)
{
int pos = offset;

View File

@ -58,14 +58,6 @@ public class IndexRecord
super(in);
}
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("NOT An Index RECORD");
}
}
protected void fillFields(RecordInputStream in)
{
field_5_dbcells =

View File

@ -49,14 +49,6 @@ public class InterfaceEndRecord
super(in);
}
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("NOT A INTERFACEEND RECORD");
}
}
protected void fillFields(RecordInputStream in)
{
}

View File

@ -55,14 +55,6 @@ public class InterfaceHdrRecord
super(in);
}
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("NOT A INTERFACEHDR RECORD");
}
}
protected void fillFields(RecordInputStream in)
{
field_1_codepage = in.readShort();

View File

@ -53,14 +53,6 @@ public class IterationRecord
super(in);
}
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("NOT An ITERATION RECORD");
}
}
protected void fillFields(RecordInputStream in)
{
field_1_iteration = in.readShort();

View File

@ -53,20 +53,6 @@ public final class LabelRecord extends Record implements CellValueRecordInterfac
super(in);
}
/**
* called by constructor, should throw runtime exception in the event of a
* record passed with a differing ID.
*
* @param id alleged id for this record
*/
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("Not a valid LabelRecord");
}
}
/**
* @param in the RecordInputstream to read the record from
*/

View File

@ -49,15 +49,6 @@ public final class LabelSSTRecord extends Record implements CellValueRecordInter
super(in);
}
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("NOT A valid LabelSST RECORD");
}
}
protected void fillFields(RecordInputStream in)
{
field_1_row = in.readUShort();

View File

@ -39,19 +39,6 @@ public class LeftMarginRecord extends Record implements Margin
public LeftMarginRecord(RecordInputStream in)
{ super(in); }
/**
* Checks the sid matches the expected side for this record
*
* @param id the expected sid.
*/
protected void validateSid( short id )
{
if ( id != sid )
{
throw new RecordFormatException( "Not a LeftMargin record" );
}
}
protected void fillFields(RecordInputStream in)
{
field_1_margin = in.readDouble();

View File

@ -74,19 +74,6 @@ public final class LegendRecord extends Record {
}
/**
* Checks the sid matches the expected side for this record
*
* @param id the expected sid.
*/
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("Not a Legend record");
}
}
protected void fillFields(RecordInputStream in)
{
field_1_xAxisUpperLeft = in.readInt();

View File

@ -73,19 +73,6 @@ public final class LineFormatRecord extends Record {
}
/**
* Checks the sid matches the expected side for this record
*
* @param id the expected sid.
*/
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("Not a LineFormat record");
}
}
protected void fillFields(RecordInputStream in)
{
field_1_lineColor = in.readInt();

View File

@ -66,19 +66,6 @@ public final class LinkedDataRecord extends Record {
}
/**
* Checks the sid matches the expected side for this record
*
* @param id the expected sid.
*/
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("Not a LinkedData record");
}
}
protected void fillFields(RecordInputStream in)
{
field_1_linkType = in.readByte();

View File

@ -51,14 +51,6 @@ public class MMSRecord
super(in);
}
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("NOT A MMS RECORD");
}
}
protected void fillFields(RecordInputStream in)
{
field_1_addMenuCount = in.readByte();

View File

@ -119,13 +119,6 @@ public final class MergeCellsRecord extends Record {
return retval.toString();
}
protected void validateSid(short id) {
if (id != sid) {
throw new RecordFormatException("NOT A MERGEDCELLS RECORD!! "
+ id);
}
}
public Object clone() {
int nRegions = _numberOfRegions;
CellRangeAddress[] clonedRegions = new CellRangeAddress[nRegions];

View File

@ -159,21 +159,6 @@ public class MulBlankRecord
return buffer.toString();
}
/**
* called by constructor, should throw runtime exception in the event of a
* record passed with a differing ID.
*
* @param id alleged id for this record
*/
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("Not a MulBlankRecord!");
}
}
public short getSid()
{
return sid;

View File

@ -117,21 +117,6 @@ public final class MulRKRecord extends Record {
return buffer.toString();
}
/**
* called by constructor, should throw runtime exception in the event of a
* record passed with a differing ID.
*
* @param id alleged id for this record
*/
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("Not a MulRKRecord!");
}
}
public short getSid()
{
return sid;

View File

@ -340,18 +340,6 @@ public final class NameRecord extends Record {
return field_17_status_bar_text;
}
/**
* called by constructor, should throw runtime exception in the event of a
* record passed with a differing ID.
*
* @param id alleged id for this record
*/
protected void validateSid(short id) {
if (id != sid) {
throw new RecordFormatException("NOT A valid Name RECORD");
}
}
/**
* called by the class that is responsible for writing this sucker.

View File

@ -73,19 +73,6 @@ public class NoteRecord extends Record {
return sid;
}
/**
* Checks the sid matches the expected side for this record
*
* @param id the expected sid.
*/
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("Not a NoteRecord record");
}
}
/**
* Read the record data from the supplied <code>RecordInputStream</code>
*/

View File

@ -55,19 +55,6 @@ public class NoteStructureSubRecord
}
/**
* Checks the sid matches the expected side for this record
*
* @param id the expected sid.
*/
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("Not a Note Structure record");
}
}
/**
* Read the record data from the supplied <code>RecordInputStream</code>
*/

View File

@ -54,19 +54,6 @@ public class NumberFormatIndexRecord
}
/**
* Checks the sid matches the expected side for this record
*
* @param id the expected sid.
*/
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("Not a NumberFormatIndex record");
}
}
protected void fillFields(RecordInputStream in)
{
field_1_formatIndex = in.readShort();

View File

@ -157,21 +157,6 @@ public final class NumberRecord extends Record implements CellValueRecordInterfa
return 18;
}
/**
* called by constructor, should throw runtime exception in the event of a
* record passed with a differing ID.
*
* @param id alleged id for this record
*/
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("NOT A Number RECORD");
}
}
public short getSid()
{
return sid;

View File

@ -54,19 +54,6 @@ public final class ObjRecord extends Record {
super(in);
}
/**
* Checks the sid matches the expected side for this record
*
* @param id the expected sid.
*/
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("Not an OBJ record");
}
}
protected void fillFields(RecordInputStream in)
{
// TODO - problems with OBJ sub-records stream

View File

@ -61,19 +61,6 @@ public class ObjectLinkRecord
}
/**
* Checks the sid matches the expected side for this record
*
* @param id the expected sid.
*/
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("Not a ObjectLink record");
}
}
protected void fillFields(RecordInputStream in)
{
field_1_anchorId = in.readShort();

View File

@ -51,14 +51,6 @@ public class ObjectProtectRecord
super(in);
}
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("NOT AN OBJECTPROTECT RECORD");
}
}
protected void fillFields(RecordInputStream in)
{
field_1_protect = in.readShort();

View File

@ -58,14 +58,6 @@ public class PaletteRecord
super(in);
}
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("NOT An Palette RECORD");
}
}
protected void fillFields(RecordInputStream in)
{
field_1_numcolors = in.readShort();

View File

@ -61,19 +61,6 @@ public final class PaneRecord extends Record {
}
/**
* Checks the sid matches the expected side for this record
*
* @param id the expected sid.
*/
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("Not a Pane record");
}
}
protected void fillFields(RecordInputStream in)
{
field_1_x = in.readShort();

View File

@ -45,12 +45,6 @@ public class PasswordRecord extends Record {
super(in);
}
protected void validateSid(short id) {
if (id != sid) {
throw new RecordFormatException("NOT A PASSWORD RECORD");
}
}
protected void fillFields(RecordInputStream in) {
field_1_password = in.readShort();
}

View File

@ -50,14 +50,6 @@ public class PasswordRev4Record
super(in);
}
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("NOT A PROT4REVPASSWORD RECORD");
}
}
protected void fillFields(RecordInputStream in)
{
field_1_password = in.readShort();

View File

@ -53,19 +53,6 @@ public class PlotAreaRecord
}
/**
* Checks the sid matches the expected side for this record
*
* @param id the expected sid.
*/
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("Not a PlotArea record");
}
}
protected void fillFields(RecordInputStream in)
{

View File

@ -55,19 +55,6 @@ public class PlotGrowthRecord
}
/**
* Checks the sid matches the expected side for this record
*
* @param id the expected sid.
*/
protected void validateSid(short id)
{
if (id != sid)
{
throw new RecordFormatException("Not a PlotGrowth record");
}
}
protected void fillFields(RecordInputStream in)
{
field_1_horizontalScale = in.readInt();

Some files were not shown because too many files have changed in this diff Show More