You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by jo...@apache.org on 2008/09/30 04:30:57 UTC
svn commit: r700327 [2/3] - in /poi/trunk/src:
java/org/apache/poi/hssf/record/ testcases/org/apache/poi/hssf/record/
Modified: poi/trunk/src/java/org/apache/poi/hssf/record/NoteRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/NoteRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/NoteRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/NoteRecord.java Mon Sep 29 19:30:53 2008
@@ -74,19 +74,6 @@
}
/**
- * 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>
*/
protected void fillFields(RecordInputStream in)
Modified: poi/trunk/src/java/org/apache/poi/hssf/record/NoteStructureSubRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/NoteStructureSubRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/NoteStructureSubRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/NoteStructureSubRecord.java Mon Sep 29 19:30:53 2008
@@ -56,19 +56,6 @@
}
/**
- * 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>
*/
protected void fillFields(RecordInputStream in)
Modified: poi/trunk/src/java/org/apache/poi/hssf/record/NumberFormatIndexRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/NumberFormatIndexRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/NumberFormatIndexRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/NumberFormatIndexRecord.java Mon Sep 29 19:30:53 2008
@@ -54,19 +54,6 @@
}
- /**
- * 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();
Modified: poi/trunk/src/java/org/apache/poi/hssf/record/NumberRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/NumberRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/NumberRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/NumberRecord.java Mon Sep 29 19:30:53 2008
@@ -157,21 +157,6 @@
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;
Modified: poi/trunk/src/java/org/apache/poi/hssf/record/ObjRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/ObjRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/ObjRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/ObjRecord.java Mon Sep 29 19:30:53 2008
@@ -54,19 +54,6 @@
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
Modified: poi/trunk/src/java/org/apache/poi/hssf/record/ObjectLinkRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/ObjectLinkRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/ObjectLinkRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/ObjectLinkRecord.java Mon Sep 29 19:30:53 2008
@@ -61,19 +61,6 @@
}
- /**
- * 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();
Modified: poi/trunk/src/java/org/apache/poi/hssf/record/ObjectProtectRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/ObjectProtectRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/ObjectProtectRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/ObjectProtectRecord.java Mon Sep 29 19:30:53 2008
@@ -51,14 +51,6 @@
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();
Modified: poi/trunk/src/java/org/apache/poi/hssf/record/PaletteRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/PaletteRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/PaletteRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/PaletteRecord.java Mon Sep 29 19:30:53 2008
@@ -58,14 +58,6 @@
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();
Modified: poi/trunk/src/java/org/apache/poi/hssf/record/PaneRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/PaneRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/PaneRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/PaneRecord.java Mon Sep 29 19:30:53 2008
@@ -61,19 +61,6 @@
}
- /**
- * 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();
Modified: poi/trunk/src/java/org/apache/poi/hssf/record/PasswordRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/PasswordRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/PasswordRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/PasswordRecord.java Mon Sep 29 19:30:53 2008
@@ -45,12 +45,6 @@
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();
}
Modified: poi/trunk/src/java/org/apache/poi/hssf/record/PasswordRev4Record.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/PasswordRev4Record.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/PasswordRev4Record.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/PasswordRev4Record.java Mon Sep 29 19:30:53 2008
@@ -50,14 +50,6 @@
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();
Modified: poi/trunk/src/java/org/apache/poi/hssf/record/PlotAreaRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/PlotAreaRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/PlotAreaRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/PlotAreaRecord.java Mon Sep 29 19:30:53 2008
@@ -53,19 +53,6 @@
}
- /**
- * 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)
{
Modified: poi/trunk/src/java/org/apache/poi/hssf/record/PlotGrowthRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/PlotGrowthRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/PlotGrowthRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/PlotGrowthRecord.java Mon Sep 29 19:30:53 2008
@@ -55,19 +55,6 @@
}
- /**
- * 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();
Modified: poi/trunk/src/java/org/apache/poi/hssf/record/PrecisionRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/PrecisionRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/PrecisionRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/PrecisionRecord.java Mon Sep 29 19:30:53 2008
@@ -50,14 +50,6 @@
super(in);
}
- protected void validateSid(short id)
- {
- if (id != sid)
- {
- throw new RecordFormatException("NOT A PRECISION RECORD");
- }
- }
-
protected void fillFields(RecordInputStream in)
{
field_1_precision = in.readShort();
Modified: poi/trunk/src/java/org/apache/poi/hssf/record/PrintGridlinesRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/PrintGridlinesRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/PrintGridlinesRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/PrintGridlinesRecord.java Mon Sep 29 19:30:53 2008
@@ -50,14 +50,6 @@
super(in);
}
- protected void validateSid(short id)
- {
- if (id != sid)
- {
- throw new RecordFormatException("NOT A PrintGridlines RECORD");
- }
- }
-
protected void fillFields(RecordInputStream in)
{
field_1_print_gridlines = in.readShort();
Modified: poi/trunk/src/java/org/apache/poi/hssf/record/PrintHeadersRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/PrintHeadersRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/PrintHeadersRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/PrintHeadersRecord.java Mon Sep 29 19:30:53 2008
@@ -51,14 +51,6 @@
super(in);
}
- protected void validateSid(short id)
- {
- if (id != sid)
- {
- throw new RecordFormatException("NOT A PrintHeaders RECORD");
- }
- }
-
protected void fillFields(RecordInputStream in)
{
field_1_print_headers = in.readShort();
Modified: poi/trunk/src/java/org/apache/poi/hssf/record/PrintSetupRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/PrintSetupRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/PrintSetupRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/PrintSetupRecord.java Mon Sep 29 19:30:53 2008
@@ -76,15 +76,6 @@
super(in);
}
- protected void validateSid(short id)
- {
- if (id != sid)
- {
- throw new RecordFormatException(
- "NOT A valid PrintSetup record RECORD");
- }
- }
-
protected void fillFields(RecordInputStream in)
{
field_1_paper_size = in.readShort();
Modified: poi/trunk/src/java/org/apache/poi/hssf/record/ProtectRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/ProtectRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/ProtectRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/ProtectRecord.java Mon Sep 29 19:30:53 2008
@@ -52,14 +52,6 @@
super(in);
}
- protected void validateSid(short id)
- {
- if (id != sid)
- {
- throw new RecordFormatException("NOT A PROTECT RECORD");
- }
- }
-
protected void fillFields(RecordInputStream in)
{
field_1_protect = in.readShort();
Modified: poi/trunk/src/java/org/apache/poi/hssf/record/ProtectionRev4Record.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/ProtectionRev4Record.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/ProtectionRev4Record.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/ProtectionRev4Record.java Mon Sep 29 19:30:53 2008
@@ -50,14 +50,6 @@
super(in);
}
- protected void validateSid(short id)
- {
- if (id != sid)
- {
- throw new RecordFormatException("NOT A PROTECTION REV 4 RECORD");
- }
- }
-
protected void fillFields(RecordInputStream in)
{
field_1_protect = in.readShort();
Modified: poi/trunk/src/java/org/apache/poi/hssf/record/RKRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/RKRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/RKRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/RKRecord.java Mon Sep 29 19:30:53 2008
@@ -61,14 +61,6 @@
super(in);
}
- protected void validateSid(short id)
- {
- if (id != sid)
- {
- throw new RecordFormatException("NOT A valid RK RECORD");
- }
- }
-
protected void fillFields(RecordInputStream in)
{
field_1_row = in.readUShort();
Modified: poi/trunk/src/java/org/apache/poi/hssf/record/RecalcIdRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/RecalcIdRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/RecalcIdRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/RecalcIdRecord.java Mon Sep 29 19:30:53 2008
@@ -59,14 +59,6 @@
super(in);
}
- protected void validateSid(short id)
- {
- if (id != sid)
- {
- throw new RecordFormatException("NOT A RECALCID RECORD");
- }
- }
-
protected void fillFields(RecordInputStream in)
{
field_1_recalcids = new short[ in.remaining() / 2 ];
Modified: poi/trunk/src/java/org/apache/poi/hssf/record/Record.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/Record.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/Record.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/Record.java Mon Sep 29 19:30:53 2008
@@ -47,20 +47,10 @@
*/
protected Record(RecordInputStream in)
{
- validateSid(in.getSid());
fillFields(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 abstract void validateSid(short id);
-
- /**
* called by the constructor, should set class level fields. Should throw
* runtime exception for bad/icomplete data.
*
Modified: poi/trunk/src/java/org/apache/poi/hssf/record/RefModeRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/RefModeRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/RefModeRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/RefModeRecord.java Mon Sep 29 19:30:53 2008
@@ -52,14 +52,6 @@
super(in);
}
- protected void validateSid(short id)
- {
- if (id != sid)
- {
- throw new RecordFormatException("NOT An RefMode RECORD");
- }
- }
-
protected void fillFields(RecordInputStream in)
{
field_1_mode = in.readShort();
Modified: poi/trunk/src/java/org/apache/poi/hssf/record/RefreshAllRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/RefreshAllRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/RefreshAllRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/RefreshAllRecord.java Mon Sep 29 19:30:53 2008
@@ -50,14 +50,6 @@
super(in);
}
- protected void validateSid(short id)
- {
- if (id != sid)
- {
- throw new RecordFormatException("NOT A REFRESHALL RECORD");
- }
- }
-
protected void fillFields(RecordInputStream in)
{
field_1_refreshall = in.readShort();
Modified: poi/trunk/src/java/org/apache/poi/hssf/record/RightMarginRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/RightMarginRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/RightMarginRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/RightMarginRecord.java Mon Sep 29 19:30:53 2008
@@ -36,17 +36,6 @@
public RightMarginRecord( 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 RightMargin record" );
- }
- }
-
protected void fillFields( RecordInputStream in )
{
field_1_margin = in.readDouble();
@@ -93,4 +82,4 @@
rec.field_1_margin = this.field_1_margin;
return rec;
}
-} // END OF CLASS
\ No newline at end of file
+} // END OF CLAS
\ No newline at end of file
Modified: poi/trunk/src/java/org/apache/poi/hssf/record/RowRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/RowRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/RowRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/RowRecord.java Mon Sep 29 19:30:53 2008
@@ -83,14 +83,6 @@
super(in);
}
- protected void validateSid(short id)
- {
- if (id != sid)
- {
- throw new RecordFormatException("NOT A valid ROW RECORD");
- }
- }
-
protected void fillFields(RecordInputStream in)
{
field_1_row_number = in.readUShort();
Modified: poi/trunk/src/java/org/apache/poi/hssf/record/SCLRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/SCLRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/SCLRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/SCLRecord.java Mon Sep 29 19:30:53 2008
@@ -55,19 +55,6 @@
}
- /**
- * 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 SCL record");
- }
- }
-
protected void fillFields(RecordInputStream in)
{
field_1_numerator = in.readShort();
Modified: poi/trunk/src/java/org/apache/poi/hssf/record/SSTRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/SSTRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/SSTRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/SSTRecord.java Mon Sep 29 19:30:53 2008
@@ -257,23 +257,6 @@
}
/**
- * validate SID
- *
- * @param id the alleged SID
- *
- * @exception RecordFormatException if validation fails
- */
-
- protected void validateSid( final short id )
- throws RecordFormatException
- {
- if ( id != sid )
- {
- throw new RecordFormatException( "NOT An SST RECORD" );
- }
- }
-
- /**
* Fill the fields from the data
* <P>
* The data consists of sets of string data. This string data is
Modified: poi/trunk/src/java/org/apache/poi/hssf/record/SaveRecalcRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/SaveRecalcRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/SaveRecalcRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/SaveRecalcRecord.java Mon Sep 29 19:30:53 2008
@@ -50,14 +50,6 @@
super(in);
}
- protected void validateSid(short id)
- {
- if (id != sid)
- {
- throw new RecordFormatException("NOT A Save Recalc RECORD");
- }
- }
-
protected void fillFields(RecordInputStream in)
{
field_1_recalc = in.readShort();
Modified: poi/trunk/src/java/org/apache/poi/hssf/record/ScenarioProtectRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/ScenarioProtectRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/ScenarioProtectRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/ScenarioProtectRecord.java Mon Sep 29 19:30:53 2008
@@ -52,14 +52,6 @@
super(in);
}
- protected void validateSid(short id)
- {
- if (id != sid)
- {
- throw new RecordFormatException("NOT A SCENARIOPROTECT RECORD");
- }
- }
-
protected void fillFields(RecordInputStream in)
{
field_1_protect = in.readShort();
Modified: poi/trunk/src/java/org/apache/poi/hssf/record/SelectionRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/SelectionRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/SelectionRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/SelectionRecord.java Mon Sep 29 19:30:53 2008
@@ -59,12 +59,6 @@
super(in);
}
- protected void validateSid(short id) {
- if (id != sid) {
- throw new RecordFormatException("NOT A valid Selection RECORD");
- }
- }
-
protected void fillFields(RecordInputStream in) {
field_1_pane = in.readByte();
field_2_row_active_cell = in.readUShort();
Modified: poi/trunk/src/java/org/apache/poi/hssf/record/SeriesChartGroupIndexRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/SeriesChartGroupIndexRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/SeriesChartGroupIndexRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/SeriesChartGroupIndexRecord.java Mon Sep 29 19:30:53 2008
@@ -54,19 +54,6 @@
}
- /**
- * 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 SeriesChartGroupIndex record");
- }
- }
-
protected void fillFields(RecordInputStream in)
{
field_1_chartGroupIndex = in.readShort();
Modified: poi/trunk/src/java/org/apache/poi/hssf/record/SeriesIndexRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/SeriesIndexRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/SeriesIndexRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/SeriesIndexRecord.java Mon Sep 29 19:30:53 2008
@@ -54,19 +54,6 @@
}
- /**
- * 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 SeriesIndex record");
- }
- }
-
protected void fillFields(RecordInputStream in)
{
field_1_index = in.readShort();
Modified: poi/trunk/src/java/org/apache/poi/hssf/record/SeriesLabelsRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/SeriesLabelsRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/SeriesLabelsRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/SeriesLabelsRecord.java Mon Sep 29 19:30:53 2008
@@ -58,19 +58,6 @@
}
- /**
- * 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 SeriesLabels record");
- }
- }
-
protected void fillFields(RecordInputStream in)
{
field_1_formatFlags = in.readShort();
Modified: poi/trunk/src/java/org/apache/poi/hssf/record/SeriesListRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/SeriesListRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/SeriesListRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/SeriesListRecord.java Mon Sep 29 19:30:53 2008
@@ -54,19 +54,6 @@
}
- /**
- * 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 SeriesList record");
- }
- }
-
protected void fillFields(RecordInputStream in)
{
field_1_seriesNumbers = in.readShortArray();
Modified: poi/trunk/src/java/org/apache/poi/hssf/record/SeriesRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/SeriesRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/SeriesRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/SeriesRecord.java Mon Sep 29 19:30:53 2008
@@ -71,19 +71,6 @@
}
- /**
- * 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 Series record");
- }
- }
-
protected void fillFields(RecordInputStream in)
{
field_1_categoryDataType = in.readShort();
Modified: poi/trunk/src/java/org/apache/poi/hssf/record/SeriesTextRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/SeriesTextRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/SeriesTextRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/SeriesTextRecord.java Mon Sep 29 19:30:53 2008
@@ -57,19 +57,6 @@
}
- /**
- * 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 SeriesText record");
- }
- }
-
protected void fillFields(RecordInputStream in)
{
field_1_id = in.readShort();
Modified: poi/trunk/src/java/org/apache/poi/hssf/record/SeriesToChartGroupRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/SeriesToChartGroupRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/SeriesToChartGroupRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/SeriesToChartGroupRecord.java Mon Sep 29 19:30:53 2008
@@ -54,19 +54,6 @@
}
- /**
- * 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 SeriesToChartGroup record");
- }
- }
-
protected void fillFields(RecordInputStream in)
{
field_1_chartGroupIndex = in.readShort();
Modified: poi/trunk/src/java/org/apache/poi/hssf/record/SharedValueRecordBase.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/SharedValueRecordBase.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/SharedValueRecordBase.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/SharedValueRecordBase.java Mon Sep 29 19:30:53 2008
@@ -45,12 +45,6 @@
_range = new CellRangeAddress8Bit(in);
}
- protected final void validateSid(short id) {
- if (id != getSid()) {
- throw new RecordFormatException("Not a valid SharedFormula");
- }
- }
-
public final CellRangeAddress8Bit getRange() {
return _range;
}
Modified: poi/trunk/src/java/org/apache/poi/hssf/record/SheetPropertiesRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/SheetPropertiesRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/SheetPropertiesRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/SheetPropertiesRecord.java Mon Sep 29 19:30:53 2008
@@ -62,19 +62,6 @@
}
- /**
- * 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 SheetProperties record");
- }
- }
-
protected void fillFields(RecordInputStream in)
{
field_1_flags = in.readShort();
Modified: poi/trunk/src/java/org/apache/poi/hssf/record/StringRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/StringRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/StringRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/StringRecord.java Mon Sep 29 19:30:53 2008
@@ -46,21 +46,6 @@
super(in);
}
-
- /**
- * Throw a 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 StringRecord");
- }
- }
-
/**
* @param in the RecordInputstream to read the record from
*/
Modified: poi/trunk/src/java/org/apache/poi/hssf/record/StyleRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/StyleRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/StyleRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/StyleRecord.java Mon Sep 29 19:30:53 2008
@@ -64,14 +64,6 @@
super(in);
}
- protected void validateSid(short id)
- {
- if (id != sid)
- {
- throw new RecordFormatException("NOT A STYLE RECORD");
- }
- }
-
protected void fillFields(RecordInputStream in)
{
field_1_xf_index = in.readShort();
Modified: poi/trunk/src/java/org/apache/poi/hssf/record/SupBookRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/SupBookRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/SupBookRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/SupBookRecord.java Mon Sep 29 19:30:53 2008
@@ -77,12 +77,6 @@
super(in);
}
- protected void validateSid(short id) {
- if (id != sid) {
- throw new RecordFormatException("NOT An ExternSheet RECORD");
- }
- }
-
public boolean isExternalReferences() {
return field_3_sheet_names != null;
}
Modified: poi/trunk/src/java/org/apache/poi/hssf/record/TabIdRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/TabIdRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/TabIdRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/TabIdRecord.java Mon Sep 29 19:30:53 2008
@@ -50,14 +50,6 @@
super(in);
}
- protected void validateSid(short id)
- {
- if (id != sid)
- {
- throw new RecordFormatException("NOT A TABID RECORD");
- }
- }
-
protected void fillFields(RecordInputStream in)
{
field_1_tabids = new short[ in.remaining() / 2 ];
Modified: poi/trunk/src/java/org/apache/poi/hssf/record/TextObjectBaseRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/TextObjectBaseRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/TextObjectBaseRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/TextObjectBaseRecord.java Mon Sep 29 19:30:53 2008
@@ -81,19 +81,6 @@
}
- /**
- * 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 TextObjectBase record");
- }
- }
-
protected void fillFields(RecordInputStream in)
{
field_1_options = in.readShort();
Modified: poi/trunk/src/java/org/apache/poi/hssf/record/TextRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/TextRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/TextRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/TextRecord.java Mon Sep 29 19:30:53 2008
@@ -105,19 +105,6 @@
}
- /**
- * 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 Text record");
- }
- }
-
protected void fillFields(RecordInputStream in)
{
field_1_horizontalAlignment = in.readByte();
Modified: poi/trunk/src/java/org/apache/poi/hssf/record/TickRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/TickRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/TickRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/TickRecord.java Mon Sep 29 19:30:53 2008
@@ -68,19 +68,6 @@
}
- /**
- * 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 Tick record");
- }
- }
-
protected void fillFields(RecordInputStream in)
{
Modified: poi/trunk/src/java/org/apache/poi/hssf/record/TopMarginRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/TopMarginRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/TopMarginRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/TopMarginRecord.java Mon Sep 29 19:30:53 2008
@@ -41,19 +41,6 @@
{ 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 TopMargin record" );
- }
- }
-
- /**
* @param in the RecordInputstream to read the record from
*/
protected void fillFields( RecordInputStream in )
@@ -102,4 +89,4 @@
rec.field_1_margin = this.field_1_margin;
return rec;
}
-} // END OF CLASS
+} // END OF CLASS
\ No newline at end of file
Modified: poi/trunk/src/java/org/apache/poi/hssf/record/UncalcedRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/UncalcedRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/UncalcedRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/UncalcedRecord.java Mon Sep 29 19:30:53 2008
@@ -48,12 +48,6 @@
return sid;
}
- protected void validateSid(short id) {
- if (id != sid) {
- throw new RecordFormatException("NOT AN UNCALCED RECORD");
- }
- }
-
protected void fillFields(RecordInputStream in) {
short unused = in.readShort();
}
Modified: poi/trunk/src/java/org/apache/poi/hssf/record/UnicodeString.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/UnicodeString.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/UnicodeString.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/UnicodeString.java Mon Sep 29 19:30:53 2008
@@ -111,8 +111,7 @@
public UnicodeString(RecordInputStream in)
{
- validateSid(in.getSid());
- fillFields(in);
+ fillFields(in); // TODO - inline
}
@@ -189,16 +188,6 @@
}
/**
- * NO OP
- */
-
- protected void validateSid(short id)
- {
-
- // included only for interface compliance
- }
-
- /**
* @param in the RecordInputstream to read the record from
*/
protected void fillFields(RecordInputStream in)
Modified: poi/trunk/src/java/org/apache/poi/hssf/record/UnitsRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/UnitsRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/UnitsRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/UnitsRecord.java Mon Sep 29 19:30:53 2008
@@ -53,19 +53,6 @@
}
- /**
- * 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 Units record");
- }
- }
-
protected void fillFields(RecordInputStream in)
{
field_1_units = in.readShort();
Modified: poi/trunk/src/java/org/apache/poi/hssf/record/UnknownRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/UnknownRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/UnknownRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/UnknownRecord.java Mon Sep 29 19:30:53 2008
@@ -92,13 +92,6 @@
}
/**
- * NO OP!
- */
- protected void validateSid(short id) {
- // if we had a valid sid we wouldn't be using the "Unknown Record" record now would we?
- }
-
- /**
* print a sort of string representation ([UNKNOWN RECORD] id = x [/UNKNOWN RECORD])
*/
public final String toString() {
Modified: poi/trunk/src/java/org/apache/poi/hssf/record/UseSelFSRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/UseSelFSRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/UseSelFSRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/UseSelFSRecord.java Mon Sep 29 19:30:53 2008
@@ -52,14 +52,6 @@
super(in);
}
- protected void validateSid(short id)
- {
- if (id != sid)
- {
- throw new RecordFormatException("NOT A UseSelFS RECORD");
- }
- }
-
protected void fillFields(RecordInputStream in)
{
field_1_flag = in.readShort();
Modified: poi/trunk/src/java/org/apache/poi/hssf/record/VCenterRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/VCenterRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/VCenterRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/VCenterRecord.java Mon Sep 29 19:30:53 2008
@@ -50,14 +50,6 @@
super(in);
}
- protected void validateSid(short id)
- {
- if (id != sid)
- {
- throw new RecordFormatException("NOT A VCenter RECORD");
- }
- }
-
protected void fillFields(RecordInputStream in)
{
field_1_vcenter = in.readShort();
Modified: poi/trunk/src/java/org/apache/poi/hssf/record/ValueRangeRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/ValueRangeRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/ValueRangeRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/ValueRangeRecord.java Mon Sep 29 19:30:53 2008
@@ -67,19 +67,6 @@
}
- /**
- * 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 ValueRange record");
- }
- }
-
protected void fillFields(RecordInputStream in)
{
field_1_minimumAxisValue = in.readDouble();
Modified: poi/trunk/src/java/org/apache/poi/hssf/record/VerticalPageBreakRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/VerticalPageBreakRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/VerticalPageBreakRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/VerticalPageBreakRecord.java Mon Sep 29 19:30:53 2008
@@ -43,13 +43,6 @@
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;
}
Modified: poi/trunk/src/java/org/apache/poi/hssf/record/WSBoolRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/WSBoolRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/WSBoolRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/WSBoolRecord.java Mon Sep 29 19:30:53 2008
@@ -81,14 +81,6 @@
super(in);
}
- protected void validateSid(short id)
- {
- if (id != sid)
- {
- throw new RecordFormatException("NOT A WSBoolRECORD");
- }
- }
-
protected void fillFields(RecordInputStream in)
{
byte data[] = in.readRemainder();
Modified: poi/trunk/src/java/org/apache/poi/hssf/record/WindowOneRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/WindowOneRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/WindowOneRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/WindowOneRecord.java Mon Sep 29 19:30:53 2008
@@ -76,14 +76,6 @@
super(in);
}
- protected void validateSid(short id)
- {
- if (id != sid)
- {
- throw new RecordFormatException("NOT A WINDOW1 RECORD");
- }
- }
-
protected void fillFields(RecordInputStream in)
{
field_1_h_hold = in.readShort();
Modified: poi/trunk/src/java/org/apache/poi/hssf/record/WindowProtectRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/WindowProtectRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/WindowProtectRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/WindowProtectRecord.java Mon Sep 29 19:30:53 2008
@@ -49,14 +49,6 @@
super(in);
}
- protected void validateSid(short id)
- {
- if (id != sid)
- {
- throw new RecordFormatException("NOT A WINDOWPROTECT RECORD");
- }
- }
-
protected void fillFields(RecordInputStream in)
{
field_1_protect = in.readShort();
Modified: poi/trunk/src/java/org/apache/poi/hssf/record/WindowTwoRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/WindowTwoRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/WindowTwoRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/WindowTwoRecord.java Mon Sep 29 19:30:53 2008
@@ -71,14 +71,6 @@
super(in);
}
- protected void validateSid(short id)
- {
- if (id != sid)
- {
- throw new RecordFormatException("NOT A valid WindowTwo RECORD");
- }
- }
-
protected void fillFields(RecordInputStream in)
{
int size = in.remaining();
Modified: poi/trunk/src/java/org/apache/poi/hssf/record/WriteAccessRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/WriteAccessRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/WriteAccessRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/WriteAccessRecord.java Mon Sep 29 19:30:53 2008
@@ -52,14 +52,6 @@
super(in);
}
- protected void validateSid(short id)
- {
- if (id != sid)
- {
- throw new RecordFormatException("NOT A WRITEACCESS RECORD");
- }
- }
-
protected void fillFields(RecordInputStream in)
{
byte[] data = in.readRemainder();
Modified: poi/trunk/src/java/org/apache/poi/hssf/record/WriteProtectRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/WriteProtectRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/WriteProtectRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/WriteProtectRecord.java Mon Sep 29 19:30:53 2008
@@ -48,14 +48,6 @@
super(in);
}
- protected void validateSid(short id)
- {
- if (id != sid)
- {
- throw new RecordFormatException("NOT A WRITEPROTECT RECORD");
- }
- }
-
protected void fillFields(RecordInputStream in)
{
}
Modified: poi/trunk/src/testcases/org/apache/poi/hssf/record/TestAreaFormatRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/record/TestAreaFormatRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/record/TestAreaFormatRecord.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/record/TestAreaFormatRecord.java Mon Sep 29 19:30:53 2008
@@ -1,4 +1,3 @@
-
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -15,8 +14,6 @@
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
-
-
package org.apache.poi.hssf.record;
@@ -31,9 +28,7 @@
* @author Glen Stampoultzis (glens at apache.org)
*/
-public class TestAreaFormatRecord
- extends TestCase
-{
+public final class TestAreaFormatRecord extends TestCase {
byte[] data = new byte[] {
(byte)0xFF,(byte)0xFF,(byte)0xFF,(byte)0x00, // forecolor
(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00, // backcolor
@@ -44,14 +39,7 @@
};
- public TestAreaFormatRecord(String name)
- {
- super(name);
- }
-
- public void testLoad()
- throws Exception
- {
+ public void testLoad() {
AreaFormatRecord record = new AreaFormatRecord(new TestcaseRecordInputStream((short)0x100a, (short)data.length, data));
assertEquals( 0xFFFFFF, record.getForegroundColor());
@@ -65,8 +53,6 @@
assertEquals( 20, record.getRecordSize() );
-
- record.validateSid((short)0x100a);
}
public void testStore()
Modified: poi/trunk/src/testcases/org/apache/poi/hssf/record/TestAreaRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/record/TestAreaRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/record/TestAreaRecord.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/record/TestAreaRecord.java Mon Sep 29 19:30:53 2008
@@ -1,4 +1,3 @@
-
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -15,8 +14,6 @@
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
-
-
package org.apache.poi.hssf.record;
@@ -31,21 +28,12 @@
*
* @author Glen Stampoultzis (glens at apache.org)
*/
-public class TestAreaRecord
- extends TestCase
-{
+public final class TestAreaRecord extends TestCase {
byte[] data = new byte[] {
(byte)0x02,(byte)0x00 // format flags
};
- public TestAreaRecord(String name)
- {
- super(name);
- }
-
- public void testLoad()
- throws Exception
- {
+ public void testLoad() {
AreaRecord record = new AreaRecord(new TestcaseRecordInputStream((short)0x101A, (short)data.length, data));
assertEquals( 2, record.getFormatFlags());
@@ -55,8 +43,6 @@
assertEquals( 6, record.getRecordSize() );
-
- record.validateSid((short)0x101A);
}
public void testStore()
Modified: poi/trunk/src/testcases/org/apache/poi/hssf/record/TestAxisLineFormatRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/record/TestAxisLineFormatRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/record/TestAxisLineFormatRecord.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/record/TestAxisLineFormatRecord.java Mon Sep 29 19:30:53 2008
@@ -1,4 +1,3 @@
-
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -15,8 +14,6 @@
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
-
-
package org.apache.poi.hssf.record;
@@ -31,28 +28,16 @@
* @author Glen Stampoultzis (glens at apache.org)
*/
-public class TestAxisLineFormatRecord
- extends TestCase
-{
+public final class TestAxisLineFormatRecord extends TestCase {
byte[] data = new byte[] {
(byte)0x01,(byte)0x00
};
- public TestAxisLineFormatRecord(String name)
- {
- super(name);
- }
-
- public void testLoad()
- throws Exception
- {
+ public void testLoad() {
AxisLineFormatRecord record = new AxisLineFormatRecord(new TestcaseRecordInputStream((short)0x1021, (short)data.length, data));
assertEquals( AxisLineFormatRecord.AXIS_TYPE_MAJOR_GRID_LINE, record.getAxisType());
-
assertEquals( 6, record.getRecordSize() );
-
- record.validateSid((short)0x1021);
}
public void testStore()
Modified: poi/trunk/src/testcases/org/apache/poi/hssf/record/TestAxisOptionsRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/record/TestAxisOptionsRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/record/TestAxisOptionsRecord.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/record/TestAxisOptionsRecord.java Mon Sep 29 19:30:53 2008
@@ -1,4 +1,3 @@
-
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -15,8 +14,6 @@
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
-
-
package org.apache.poi.hssf.record;
@@ -31,9 +28,7 @@
* @author Andrew C. Oliver(acoliver at apache.org)
*/
-public class TestAxisOptionsRecord
- extends TestCase
-{
+public final class TestAxisOptionsRecord extends TestCase {
byte[] data = new byte[] {
(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x01,
(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x01,(byte)0x00,
@@ -41,14 +36,7 @@
(byte)0x00,(byte)0xEF,(byte)0x00
};
- public TestAxisOptionsRecord(String name)
- {
- super(name);
- }
-
- public void testLoad()
- throws Exception
- {
+ public void testLoad() {
AxisOptionsRecord record = new AxisOptionsRecord(new TestcaseRecordInputStream((short)0x1062, (short)data.length, data));
assertEquals( 0, record.getMinimumCategory());
assertEquals( 0, record.getMaximumCategory());
@@ -68,10 +56,7 @@
assertEquals( true, record.isDefaultCross() );
assertEquals( true, record.isDefaultDateSettings() );
-
assertEquals( 22, record.getRecordSize() );
-
- record.validateSid((short)0x1062);
}
public void testStore()
Modified: poi/trunk/src/testcases/org/apache/poi/hssf/record/TestAxisParentRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/record/TestAxisParentRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/record/TestAxisParentRecord.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/record/TestAxisParentRecord.java Mon Sep 29 19:30:53 2008
@@ -1,4 +1,3 @@
-
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -15,8 +14,6 @@
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
-
-
package org.apache.poi.hssf.record;
@@ -30,9 +27,7 @@
*
* @author Glen Stampoultzis (glens at apache.org)
*/
-public class TestAxisParentRecord
- extends TestCase
-{
+public final class TestAxisParentRecord extends TestCase {
byte[] data = new byte[] {
(byte)0x00,(byte)0x00, // axis type
(byte)0x1D,(byte)0x02,(byte)0x00,(byte)0x00, // x
@@ -41,14 +36,7 @@
(byte)0x56,(byte)0x0B,(byte)0x00,(byte)0x00 // height
};
- public TestAxisParentRecord(String name)
- {
- super(name);
- }
-
- public void testLoad()
- throws Exception
- {
+ public void testLoad() {
AxisParentRecord record = new AxisParentRecord(new TestcaseRecordInputStream((short)0x1041, (short)data.length, data));
assertEquals( AxisParentRecord.AXIS_TYPE_MAIN, record.getAxisType());
assertEquals( 0x021d, record.getX());
@@ -56,10 +44,7 @@
assertEquals( 0x0b31, record.getWidth());
assertEquals( 0x0b56, record.getHeight());
-
assertEquals( 22, record.getRecordSize() );
-
- record.validateSid((short)0x1041);
}
public void testStore()
Modified: poi/trunk/src/testcases/org/apache/poi/hssf/record/TestAxisRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/record/TestAxisRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/record/TestAxisRecord.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/record/TestAxisRecord.java Mon Sep 29 19:30:53 2008
@@ -1,4 +1,3 @@
-
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -15,8 +14,6 @@
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
-
-
package org.apache.poi.hssf.record;
@@ -31,26 +28,16 @@
* @author Glen Stampoultzis (glens at apache.org)
*/
-public class TestAxisRecord
- extends TestCase
-{
+public final class TestAxisRecord extends TestCase {
byte[] data = new byte[] {
(byte)0x00,(byte)0x00, // type
(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,
(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,
(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,
(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00
-
};
- public TestAxisRecord(String name)
- {
- super(name);
- }
-
- public void testLoad()
- throws Exception
- {
+ public void testLoad() {
AxisRecord record = new AxisRecord(new TestcaseRecordInputStream((short)0x101d, (short)data.length, data));
assertEquals( AxisRecord.AXIS_TYPE_CATEGORY_OR_X_AXIS, record.getAxisType());
@@ -59,10 +46,7 @@
assertEquals( 0, record.getReserved3());
assertEquals( 0, record.getReserved4());
-
assertEquals( 4 + 18, record.getRecordSize() );
-
- record.validateSid((short)0x101d);
}
public void testStore()
Modified: poi/trunk/src/testcases/org/apache/poi/hssf/record/TestAxisUsedRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/record/TestAxisUsedRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/record/TestAxisUsedRecord.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/record/TestAxisUsedRecord.java Mon Sep 29 19:30:53 2008
@@ -1,4 +1,3 @@
-
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -15,8 +14,6 @@
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
-
-
package org.apache.poi.hssf.record;
@@ -31,28 +28,16 @@
* @author Glen Stampoultzis (glens at apache.org)
*/
-public class TestAxisUsedRecord
- extends TestCase
-{
+public final class TestAxisUsedRecord extends TestCase {
byte[] data = new byte[] {
(byte)0x01,(byte)0x00,
};
- public TestAxisUsedRecord(String name)
- {
- super(name);
- }
-
- public void testLoad()
- throws Exception
- {
+ public void testLoad() {
AxisUsedRecord record = new AxisUsedRecord(new TestcaseRecordInputStream((short)0x1046, (short)data.length, data));
assertEquals( 1, record.getNumAxis());
-
assertEquals( 6, record.getRecordSize() );
-
- record.validateSid((short)0x1046);
}
public void testStore()
Modified: poi/trunk/src/testcases/org/apache/poi/hssf/record/TestBarRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/record/TestBarRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/record/TestBarRecord.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/record/TestBarRecord.java Mon Sep 29 19:30:53 2008
@@ -1,4 +1,3 @@
-
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -15,8 +14,6 @@
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
-
-
package org.apache.poi.hssf.record;
@@ -31,23 +28,14 @@
* @author Glen Stampoultzis (glens at apache.org)
*/
-public class TestBarRecord
- extends TestCase
-{
+public final class TestBarRecord extends TestCase {
byte[] data = new byte[] {
(byte)0x00,(byte)0x00, // bar space
(byte)0x96,(byte)0x00, // category space
(byte)0x00,(byte)0x00 // format flags
};
- public TestBarRecord(String name)
- {
- super(name);
- }
-
- public void testLoad()
- throws Exception
- {
+ public void testLoad() {
BarRecord record = new BarRecord(new TestcaseRecordInputStream((short)0x1017, (short)data.length, data));
assertEquals( 0, record.getBarSpace());
@@ -58,10 +46,7 @@
assertEquals( false, record.isDisplayAsPercentage() );
assertEquals( false, record.isShadow() );
-
assertEquals( 10, record.getRecordSize() );
-
- record.validateSid((short)0x1017);
}
public void testStore()
Modified: poi/trunk/src/testcases/org/apache/poi/hssf/record/TestCategorySeriesAxisRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/record/TestCategorySeriesAxisRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/record/TestCategorySeriesAxisRecord.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/record/TestCategorySeriesAxisRecord.java Mon Sep 29 19:30:53 2008
@@ -1,4 +1,3 @@
-
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -15,8 +14,6 @@
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
-
-
package org.apache.poi.hssf.record;
@@ -31,9 +28,7 @@
* @author Glen Stampoultzis (glens at apache.org)
*/
-public class TestCategorySeriesAxisRecord
- extends TestCase
-{
+public final class TestCategorySeriesAxisRecord extends TestCase {
byte[] data = new byte[] {
(byte)0x01,(byte)0x00, // crossing point
(byte)0x01,(byte)0x00, // label frequency
@@ -41,14 +36,7 @@
(byte)0x01,(byte)0x00 // options
};
- public TestCategorySeriesAxisRecord(String name)
- {
- super(name);
- }
-
- public void testLoad()
- throws Exception
- {
+ public void testLoad() {
CategorySeriesAxisRecord record = new CategorySeriesAxisRecord(new TestcaseRecordInputStream((short)0x1020, (short)data.length, data));
assertEquals( 1, record.getCrossingPoint());
@@ -59,10 +47,7 @@
assertEquals( false, record.isCrossesFarRight() );
assertEquals( false, record.isReversed() );
-
assertEquals( 4 + 8, record.getRecordSize() );
-
- record.validateSid((short)0x1020);
}
public void testStore()
Modified: poi/trunk/src/testcases/org/apache/poi/hssf/record/TestChartRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/record/TestChartRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/record/TestChartRecord.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/record/TestChartRecord.java Mon Sep 29 19:30:53 2008
@@ -1,4 +1,3 @@
-
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -15,8 +14,6 @@
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
-
-
package org.apache.poi.hssf.record;
@@ -31,9 +28,7 @@
* @author Glen Stampoultzis (glens at apache.org)
*/
-public class TestChartRecord
- extends TestCase
-{
+public final class TestChartRecord extends TestCase {
byte[] data = new byte[] {
(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,
(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,
@@ -41,14 +36,7 @@
(byte)0xC8,(byte)0xCC,(byte)0xE5,(byte)0x00
};
- public TestChartRecord(String name)
- {
- super(name);
- }
-
- public void testLoad()
- throws Exception
- {
+ public void testLoad() {
ChartRecord record = new ChartRecord(new TestcaseRecordInputStream((short)0x1002, (short)data.length, data));
assertEquals( 0, record.getX());
@@ -56,10 +44,7 @@
assertEquals( 30474216, record.getWidth());
assertEquals( 15060168, record.getHeight());
-
assertEquals( 20, record.getRecordSize() );
-
- record.validateSid((short)0x1002);
}
public void testStore()
Modified: poi/trunk/src/testcases/org/apache/poi/hssf/record/TestCommonObjectDataSubRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/record/TestCommonObjectDataSubRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/record/TestCommonObjectDataSubRecord.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/record/TestCommonObjectDataSubRecord.java Mon Sep 29 19:30:53 2008
@@ -1,4 +1,3 @@
-
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -15,8 +14,6 @@
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
-
-
package org.apache.poi.hssf.record;
@@ -31,9 +28,7 @@
* @author Glen Stampoultzis (glens at apache.org)
*/
-public class TestCommonObjectDataSubRecord
- extends TestCase
-{
+public final class TestCommonObjectDataSubRecord extends TestCase {
byte[] data = new byte[] {
(byte)0x12,(byte)0x00,(byte)0x01,(byte)0x00,
(byte)0x01,(byte)0x00,(byte)0x11,(byte)0x60,
@@ -42,16 +37,8 @@
(byte)0x00,(byte)0x00,
};
- public TestCommonObjectDataSubRecord(String name)
- {
- super(name);
- }
-
- public void testLoad()
- throws Exception
- {
+ public void testLoad() {
CommonObjectDataSubRecord record = new CommonObjectDataSubRecord(new TestcaseRecordInputStream((short)0x15, (short)data.length, data));
-
assertEquals( CommonObjectDataSubRecord.OBJECT_TYPE_LIST_BOX, record.getObjectType());
assertEquals( (short)1, record.getObjectId());
@@ -64,8 +51,6 @@
assertEquals( (int)218103808, record.getReserved2());
assertEquals( (int)294, record.getReserved3());
assertEquals( 22 , record.getRecordSize() );
-
- record.validateSid((short)0x15);
}
public void testStore()
Modified: poi/trunk/src/testcases/org/apache/poi/hssf/record/TestDatRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/record/TestDatRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/record/TestDatRecord.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/record/TestDatRecord.java Mon Sep 29 19:30:53 2008
@@ -1,4 +1,3 @@
-
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -15,8 +14,6 @@
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
-
-
package org.apache.poi.hssf.record;
@@ -31,21 +28,12 @@
* @author Glen Stampoultzis (glens at apache.org)
*/
-public class TestDatRecord
- extends TestCase
-{
+public final class TestDatRecord extends TestCase {
byte[] data = new byte[] {
(byte)0x0D,(byte)0x00 // options
};
- public TestDatRecord(String name)
- {
- super(name);
- }
-
- public void testLoad()
- throws Exception
- {
+ public void testLoad() {
DatRecord record = new DatRecord(new TestcaseRecordInputStream((short)0x1063, (short)data.length, data));
assertEquals( 0xD, record.getOptions());
@@ -54,10 +42,7 @@
assertEquals( true, record.isBorder() );
assertEquals( true, record.isShowSeriesKey() );
-
assertEquals( 6, record.getRecordSize() );
-
- record.validateSid((short)0x1063);
}
public void testStore()
Modified: poi/trunk/src/testcases/org/apache/poi/hssf/record/TestDataFormatRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/record/TestDataFormatRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/record/TestDataFormatRecord.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/record/TestDataFormatRecord.java Mon Sep 29 19:30:53 2008
@@ -1,4 +1,3 @@
-
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -15,8 +14,6 @@
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
-
-
package org.apache.poi.hssf.record;
@@ -31,9 +28,7 @@
* @author Glen Stampoultzis (glens at apache.org)
*/
-public class TestDataFormatRecord
- extends TestCase
-{
+public final class TestDataFormatRecord extends TestCase {
byte[] data = new byte[] {
(byte)0xFF,(byte)0xFF, // point number
(byte)0x00,(byte)0x00, // series index
@@ -41,14 +36,7 @@
(byte)0x00,(byte)0x00 // format flags
};
- public TestDataFormatRecord(String name)
- {
- super(name);
- }
-
- public void testLoad()
- throws Exception
- {
+ public void testLoad() {
DataFormatRecord record = new DataFormatRecord(new TestcaseRecordInputStream((short)0x1006, (short)data.length, data));
assertEquals( (short)0xFFFF, record.getPointNumber());
@@ -57,10 +45,7 @@
assertEquals( 0, record.getFormatFlags());
assertEquals( false, record.isUseExcel4Colors() );
-
assertEquals( 12, record.getRecordSize() );
-
- record.validateSid((short)0x1006);
}
public void testStore()
Modified: poi/trunk/src/testcases/org/apache/poi/hssf/record/TestDefaultDataLabelTextPropertiesRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/record/TestDefaultDataLabelTextPropertiesRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/record/TestDefaultDataLabelTextPropertiesRecord.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/record/TestDefaultDataLabelTextPropertiesRecord.java Mon Sep 29 19:30:53 2008
@@ -1,4 +1,3 @@
-
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -15,8 +14,6 @@
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
-
-
package org.apache.poi.hssf.record;
@@ -31,29 +28,17 @@
* @author Glen Stampoultzis (glens at apache.org)
*/
-public class TestDefaultDataLabelTextPropertiesRecord
- extends TestCase
-{
+public final class TestDefaultDataLabelTextPropertiesRecord extends TestCase {
byte[] data = new byte[] {
(byte)0x02,(byte)0x00
};
- public TestDefaultDataLabelTextPropertiesRecord(String name)
- {
- super(name);
- }
-
- public void testLoad()
- throws Exception
- {
+ public void testLoad() {
DefaultDataLabelTextPropertiesRecord record = new DefaultDataLabelTextPropertiesRecord(new TestcaseRecordInputStream((short)0x1024, (short)data.length, data));
assertEquals( 2, record.getCategoryDataType());
-
assertEquals( 6, record.getRecordSize() );
-
- record.validateSid((short)0x1024);
}
public void testStore()
Modified: poi/trunk/src/testcases/org/apache/poi/hssf/record/TestEndSubRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/record/TestEndSubRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/record/TestEndSubRecord.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/record/TestEndSubRecord.java Mon Sep 29 19:30:53 2008
@@ -1,4 +1,3 @@
-
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -15,8 +14,6 @@
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
-
-
package org.apache.poi.hssf.record;
@@ -30,28 +27,15 @@
*
* @author Glen Stampoultzis (glens at apache.org)
*/
-public class TestEndSubRecord
- extends TestCase
-{
+public final class TestEndSubRecord extends TestCase {
byte[] data = new byte[] {
};
- public TestEndSubRecord(String name)
- {
- super(name);
- }
-
- public void testLoad()
- throws Exception
- {
+ public void testLoad() {
EndSubRecord record = new EndSubRecord(new TestcaseRecordInputStream((short)0x00, (short)data.length, data));
-
-
assertEquals( 4, record.getRecordSize() );
-
- record.validateSid((short)0x00);
}
public void testStore()
Modified: poi/trunk/src/testcases/org/apache/poi/hssf/record/TestExtendedFormatRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/record/TestExtendedFormatRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/record/TestExtendedFormatRecord.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/record/TestExtendedFormatRecord.java Mon Sep 29 19:30:53 2008
@@ -36,14 +36,7 @@
0xC0-256, 0x20 // Fill Palette 20c0
};
- public TestExtendedFormatRecord(String name)
- {
- super(name);
- }
-
- public void testLoad()
- throws Exception
- {
+ public void testLoad() {
ExtendedFormatRecord record = new ExtendedFormatRecord(new TestcaseRecordInputStream((short)0xe0, (short)data.length, data));
assertEquals(0, record.getFontIndex());
assertEquals(0, record.getFormatIndex());
@@ -56,7 +49,6 @@
assertEquals(0x20c0, record.getFillPaletteOptions());
assertEquals( 20 + 4, record.getRecordSize() );
- record.validateSid((short)0xe0);
}
public void testStore()
Modified: poi/trunk/src/testcases/org/apache/poi/hssf/record/TestFontBasisRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/record/TestFontBasisRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/record/TestFontBasisRecord.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/record/TestFontBasisRecord.java Mon Sep 29 19:30:53 2008
@@ -1,4 +1,3 @@
-
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -29,9 +28,7 @@
* @author Glen Stampoultzis (glens at apache.org)
*/
-public class TestFontBasisRecord
- extends TestCase
-{
+public final class TestFontBasisRecord extends TestCase {
byte[] data = new byte[] {
(byte)0x28,(byte)0x1A, // x basis
(byte)0x9C,(byte)0x0F, // y basis
@@ -40,14 +37,7 @@
(byte)0x05,(byte)0x00 // index to font table
};
- public TestFontBasisRecord(String name)
- {
- super(name);
- }
-
- public void testLoad()
- throws Exception
- {
+ public void testLoad() {
FontBasisRecord record = new FontBasisRecord(new TestcaseRecordInputStream((short)0x1060, (short)data.length, data));
assertEquals( 0x1a28, record.getXBasis());
@@ -56,10 +46,7 @@
assertEquals( 0x00, record.getScale());
assertEquals( 0x05, record.getIndexToFontTable());
-
assertEquals( 14, record.getRecordSize() );
-
- record.validateSid((short)0x1060);
}
public void testStore()
Modified: poi/trunk/src/testcases/org/apache/poi/hssf/record/TestFontIndexRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/record/TestFontIndexRecord.java?rev=700327&r1=700326&r2=700327&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/record/TestFontIndexRecord.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/record/TestFontIndexRecord.java Mon Sep 29 19:30:53 2008
@@ -1,4 +1,3 @@
-
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -15,8 +14,6 @@
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
-
-
package org.apache.poi.hssf.record;
@@ -31,29 +28,17 @@
* @author Glen Stampoultzis (glens at apache.org)
*/
-public class TestFontIndexRecord
- extends TestCase
-{
+public final class TestFontIndexRecord extends TestCase {
byte[] data = new byte[] {
(byte)0x05,(byte)0x00
};
- public TestFontIndexRecord(String name)
- {
- super(name);
- }
-
- public void testLoad()
- throws Exception
- {
+ public void testLoad() {
FontIndexRecord record = new FontIndexRecord(new TestcaseRecordInputStream((short)0x1026, (short)data.length, data));
assertEquals( 5, record.getFontIndex());
-
assertEquals( 6, record.getRecordSize() );
-
- record.validateSid((short)0x1026);
}
public void testStore()
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org