Refactored fillFields() method into constructor in Record class hierarchy
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@700356 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
fa90245b96
commit
f30070f18a
@ -18,7 +18,6 @@
|
||||
package org.apache.poi.hssf.eventusermodel.dummyrecord;
|
||||
|
||||
import org.apache.poi.hssf.record.Record;
|
||||
import org.apache.poi.hssf.record.RecordInputStream;
|
||||
|
||||
/**
|
||||
* A dummy record to indicate that we've now had the last
|
||||
@ -47,15 +46,10 @@ public class LastCellOfRowDummyRecord extends Record {
|
||||
*/
|
||||
public int getLastColumnNumber() { return lastColumnNumber; }
|
||||
|
||||
protected void fillFields(RecordInputStream in) {
|
||||
}
|
||||
public short getSid() {
|
||||
return -1;
|
||||
}
|
||||
public int serialize(int offset, byte[] data) {
|
||||
return -1;
|
||||
}
|
||||
protected void validateSid(short id) {
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -18,7 +18,6 @@
|
||||
package org.apache.poi.hssf.eventusermodel.dummyrecord;
|
||||
|
||||
import org.apache.poi.hssf.record.Record;
|
||||
import org.apache.poi.hssf.record.RecordInputStream;
|
||||
|
||||
/**
|
||||
* A dummy record for when we're missing a cell in a row,
|
||||
@ -33,16 +32,12 @@ public class MissingCellDummyRecord extends Record {
|
||||
this.column = column;
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in) {
|
||||
}
|
||||
public short getSid() {
|
||||
return -1;
|
||||
}
|
||||
public int serialize(int offset, byte[] data) {
|
||||
return -1;
|
||||
}
|
||||
protected void validateSid(short id) {
|
||||
}
|
||||
|
||||
public int getRow() { return row; }
|
||||
public int getColumn() { return column; }
|
||||
|
@ -31,16 +31,12 @@ public class MissingRowDummyRecord extends Record {
|
||||
this.rowNumber = rowNumber;
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in) {
|
||||
}
|
||||
public short getSid() {
|
||||
return -1;
|
||||
}
|
||||
public int serialize(int offset, byte[] data) {
|
||||
return -1;
|
||||
}
|
||||
protected void validateSid(short id) {
|
||||
}
|
||||
|
||||
public int getRowNumber() {
|
||||
return rowNumber;
|
||||
|
@ -57,18 +57,7 @@ public abstract class AbstractEscherHolderRecord
|
||||
escherRecords = new ArrayList();
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a Bar record and sets its fields appropriately.
|
||||
*
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
public AbstractEscherHolderRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
escherRecords = new ArrayList();
|
||||
if (! DESERIALISE )
|
||||
|
@ -48,19 +48,7 @@ public final class AreaFormatRecord extends Record {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a AreaFormat record and sets its fields appropriately.
|
||||
*
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
|
||||
public AreaFormatRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
field_1_foregroundColor = in.readInt();
|
||||
field_2_backgroundColor = in.readInt();
|
||||
|
@ -42,19 +42,7 @@ public final class AreaRecord extends Record {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a Area record and sets its fields appropriately.
|
||||
*
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
|
||||
public AreaRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
|
||||
field_1_formatFlags = in.readShort();
|
||||
|
@ -46,19 +46,7 @@ public class AxisLineFormatRecord
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a AxisLineFormat record and sets its fields appropriately.
|
||||
*
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
|
||||
public AxisLineFormatRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
field_1_axisType = in.readShort();
|
||||
}
|
||||
|
@ -57,19 +57,7 @@ public final class AxisOptionsRecord extends Record {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a AxisOptions record and sets its fields appropriately.
|
||||
*
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
|
||||
public AxisOptionsRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
field_1_minimumCategory = in.readShort();
|
||||
field_2_maximumCategory = in.readShort();
|
||||
|
@ -48,19 +48,7 @@ public class AxisParentRecord
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a AxisParent record and sets its fields appropriately.
|
||||
*
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
|
||||
public AxisParentRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
field_1_axisType = in.readShort();
|
||||
field_2_x = in.readInt();
|
||||
|
@ -49,19 +49,7 @@ public class AxisRecord
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a Axis record and sets its fields appropriately.
|
||||
*
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
|
||||
public AxisRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
field_1_axisType = in.readShort();
|
||||
field_2_reserved1 = in.readInt();
|
||||
|
@ -42,19 +42,7 @@ public class AxisUsedRecord
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a AxisUsed record and sets its fields appropriately.
|
||||
*
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
|
||||
public AxisUsedRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
field_1_numAxis = in.readShort();
|
||||
}
|
||||
|
@ -86,19 +86,7 @@ public class BOFRecord
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a BOFRecord and sets its fields appropriately
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
|
||||
public BOFRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
|
||||
// fillFields(data,size);
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
field_1_version = in.readShort();
|
||||
field_2_type = in.readShort();
|
||||
|
@ -40,17 +40,7 @@ public class BackupRecord
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a BackupRecord and sets its fields appropriately
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
|
||||
public BackupRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
field_1_backup = in.readShort();
|
||||
}
|
||||
|
@ -47,19 +47,7 @@ public final class BarRecord extends Record {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a Bar record and sets its fields appropriately.
|
||||
*
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
|
||||
public BarRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
field_1_barSpace = in.readShort();
|
||||
field_2_categorySpace = in.readShort();
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/* ====================================================================
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
@ -16,7 +15,6 @@
|
||||
limitations under the License.
|
||||
==================================================================== */
|
||||
|
||||
|
||||
package org.apache.poi.hssf.record;
|
||||
|
||||
import org.apache.poi.util.LittleEndian;
|
||||
@ -29,10 +27,7 @@ import org.apache.poi.util.LittleEndian;
|
||||
*
|
||||
* @author Glen Stampoultzis (glens at apache.org)
|
||||
*/
|
||||
|
||||
public class BeginRecord
|
||||
extends Record
|
||||
{
|
||||
public class BeginRecord extends Record {
|
||||
public static final short sid = 0x1033;
|
||||
|
||||
public BeginRecord()
|
||||
@ -40,16 +35,9 @@ public class BeginRecord
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a BeginRecord record and sets its fields appropriately.
|
||||
* @param in the RecordInputstream to read the record from
|
||||
* @param in unused (since this record has no data)
|
||||
*/
|
||||
|
||||
public BeginRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
}
|
||||
|
||||
@ -64,9 +52,8 @@ public class BeginRecord
|
||||
|
||||
public int serialize(int offset, byte [] data)
|
||||
{
|
||||
LittleEndian.putShort(data, 0 + offset, sid);
|
||||
LittleEndian.putShort(data, 2 + offset,
|
||||
(( short ) 0)); // no record info
|
||||
LittleEndian.putUShort(data, 0 + offset, sid);
|
||||
LittleEndian.putUShort(data, 2 + offset, 0); // no record info
|
||||
return getRecordSize();
|
||||
}
|
||||
|
||||
|
@ -39,16 +39,7 @@ public final class BlankRecord extends Record implements CellValueRecordInterfac
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a BlankRecord and sets its fields appropriately
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
public BlankRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
field_1_row = in.readUShort();
|
||||
field_2_col = in.readShort();
|
||||
|
@ -40,17 +40,7 @@ public class BookBoolRecord
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a BookBoolRecord and sets its fields appropriately
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
|
||||
public BookBoolRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
field_1_save_link_values = in.readShort();
|
||||
}
|
||||
|
@ -41,19 +41,9 @@ public final class BoolErrRecord extends Record implements CellValueRecordInterf
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a BoolErr record and sets its fields appropriately.
|
||||
*
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
public BoolErrRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
//field_1_row = LittleEndian.getShort(data, 0 + offset);
|
||||
field_1_row = in.readUShort();
|
||||
|
@ -39,17 +39,7 @@ public class BottomMarginRecord
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a BottomMargin record and sets its fields appropriately.
|
||||
*
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
public BottomMarginRecord( RecordInputStream in )
|
||||
{
|
||||
super( in );
|
||||
}
|
||||
|
||||
protected void fillFields( RecordInputStream in )
|
||||
{
|
||||
field_1_margin = in.readDouble();
|
||||
}
|
||||
@ -108,4 +98,4 @@ public class BottomMarginRecord
|
||||
return rec;
|
||||
}
|
||||
|
||||
} // END OF CLASS
|
||||
} // END OF CLAS
|
@ -52,15 +52,6 @@ public final class BoundSheetRecord extends Record {
|
||||
setSheetname(sheetname);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a BoundSheetRecord and sets its fields appropriately
|
||||
*
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
public BoundSheetRecord(RecordInputStream in) {
|
||||
super(in);
|
||||
}
|
||||
|
||||
/**
|
||||
* UTF8: sid + len + bof + flags + len(str) + unicode + str 2 + 2 + 4 + 2 +
|
||||
* 1 + 1 + len(str)
|
||||
@ -69,7 +60,7 @@ public final class BoundSheetRecord extends Record {
|
||||
* 1 + 1 + 2 * len(str)
|
||||
*
|
||||
*/
|
||||
protected void fillFields(RecordInputStream in) {
|
||||
public BoundSheetRecord(RecordInputStream in) {
|
||||
field_1_position_of_BOF = in.readInt();
|
||||
field_2_option_flags = in.readUShort();
|
||||
int field_3_sheetname_length = in.readUByte();
|
||||
|
@ -48,11 +48,6 @@ public final class CFHeaderRecord extends Record {
|
||||
}
|
||||
|
||||
public CFHeaderRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
field_1_numcf = in.readShort();
|
||||
field_2_need_recalculation = in.readShort();
|
||||
|
@ -159,10 +159,6 @@ public final class CFRuleRecord extends Record {
|
||||
}
|
||||
|
||||
public CFRuleRecord(RecordInputStream in) {
|
||||
super(in);
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in) {
|
||||
field_1_condition_type = in.readByte();
|
||||
field_2_comparison_operator = in.readByte();
|
||||
int field_3_formula1_len = in.readUShort();
|
||||
|
@ -38,16 +38,12 @@ public final class CRNCountRecord extends Record {
|
||||
throw new RuntimeException("incomplete code");
|
||||
}
|
||||
|
||||
public CRNCountRecord(RecordInputStream in) {
|
||||
super(in);
|
||||
}
|
||||
|
||||
public int getNumberOfCRNs() {
|
||||
return field_1_number_crn_records;
|
||||
}
|
||||
|
||||
|
||||
protected void fillFields(RecordInputStream in) {
|
||||
public CRNCountRecord(RecordInputStream in) {
|
||||
field_1_number_crn_records = in.readShort();
|
||||
if(field_1_number_crn_records < 0) {
|
||||
// TODO - seems like the sign bit of this field might be used for some other purpose
|
||||
|
@ -39,16 +39,12 @@ public final class CRNRecord extends Record {
|
||||
throw new RuntimeException("incomplete code");
|
||||
}
|
||||
|
||||
public CRNRecord(RecordInputStream in) {
|
||||
super(in);
|
||||
}
|
||||
|
||||
public int getNumberOfCRNs() {
|
||||
return field_1_last_column_index;
|
||||
}
|
||||
|
||||
|
||||
protected void fillFields(RecordInputStream in) {
|
||||
public CRNRecord(RecordInputStream in) {
|
||||
field_1_last_column_index = in.readByte() & 0x00FF;
|
||||
field_2_first_column_index = in.readByte() & 0x00FF;
|
||||
field_3_row_index = in.readShort();
|
||||
|
@ -45,18 +45,7 @@ public class CalcCountRecord
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a CalcCountRecord and sets its fields appropriately
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*
|
||||
*/
|
||||
|
||||
public CalcCountRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
field_1_iterations = in.readShort();
|
||||
}
|
||||
|
@ -61,17 +61,7 @@ public class CalcModeRecord
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a CalcModeRecord and sets its fields appropriately
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
|
||||
public CalcModeRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
field_1_calcmode = in.readShort();
|
||||
}
|
||||
|
@ -47,19 +47,7 @@ public final class CategorySeriesAxisRecord extends Record {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a CategorySeriesAxis record and sets its fields appropriately.
|
||||
*
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
|
||||
public CategorySeriesAxisRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
field_1_crossingPoint = in.readShort();
|
||||
field_2_labelFrequency = in.readShort();
|
||||
|
@ -44,17 +44,7 @@ public final class ChartFormatRecord extends Record {
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a ChartFormatRecord record and sets its fields appropriately.
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
|
||||
public ChartFormatRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
field1_x_position = in.readInt();
|
||||
field2_y_position = in.readInt();
|
||||
|
@ -45,19 +45,7 @@ public class ChartRecord
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a Chart record and sets its fields appropriately.
|
||||
*
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
|
||||
public ChartRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
field_1_x = in.readInt();
|
||||
field_2_y = in.readInt();
|
||||
|
@ -59,10 +59,6 @@ public class ChartTitleFormatRecord extends Record {
|
||||
}
|
||||
|
||||
public ChartTitleFormatRecord(RecordInputStream in) {
|
||||
super(in);
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in) {
|
||||
m_recs = in.readUShort();
|
||||
int idx;
|
||||
CTFormat ctf;
|
||||
|
@ -47,17 +47,7 @@ public class CodepageRecord
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a CodepageRecord and sets its fields appropriately
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
|
||||
public CodepageRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
field_1_codepage = in.readShort();
|
||||
}
|
||||
|
@ -52,17 +52,7 @@ public final class ColumnInfoRecord extends Record {
|
||||
field_6_reserved = 2; // seems to be the most common value
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a ColumnInfo record and sets its fields appropriately
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
|
||||
public ColumnInfoRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
field_1_first_col = in.readUShort();
|
||||
field_2_last_col = in.readUShort();
|
||||
|
@ -82,18 +82,7 @@ public final class CommonObjectDataSubRecord extends SubRecord {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a CommonObjectData record and sets its fields appropriately.
|
||||
*
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
|
||||
public CommonObjectDataSubRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
field_1_objectType = in.readShort();
|
||||
field_2_objectId = in.readShort();
|
||||
|
@ -45,17 +45,6 @@ public class ContinueRecord
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Main constructor -- kinda dummy because we don't validate or fill fields
|
||||
*
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
|
||||
public ContinueRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
}
|
||||
|
||||
/**
|
||||
* USE ONLY within "processContinue"
|
||||
*/
|
||||
@ -125,7 +114,7 @@ public class ContinueRecord
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
public ContinueRecord(RecordInputStream in)
|
||||
{
|
||||
field_1_data = in.readRemainder();
|
||||
}
|
||||
|
@ -44,17 +44,7 @@ public class CountryRecord
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a CountryRecord and sets its fields appropriately
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
|
||||
public CountryRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
field_1_default_country = in.readShort();
|
||||
field_2_current_country = in.readShort();
|
||||
|
@ -38,16 +38,7 @@ public final class DBCellRecord extends Record {
|
||||
field_2_cell_offsets = new short[0];
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a DBCellRecord and sets its fields appropriately
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
public DBCellRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
field_1_row_offset = in.readUShort();
|
||||
int size = in.remaining();
|
||||
|
@ -40,17 +40,7 @@ public class DSFRecord
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a DBCellRecord and sets its fields appropriately.
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
|
||||
public DSFRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
field_1_dsf = in.readShort();
|
||||
}
|
||||
|
@ -48,18 +48,7 @@ public class DVALRecord extends Record
|
||||
field_5_dv_no = 0x00000000;
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a DVAL record and sets its fields appropriately.
|
||||
*
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
|
||||
public DVALRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
this.field_1_options = in.readShort();
|
||||
this.field_2_horiz_pos = in.readInt();
|
||||
|
@ -75,15 +75,6 @@ public final class DVRecord extends Record {
|
||||
private static final BitField opt_show_error_on_invalid_value = new BitField(0x00080000);
|
||||
private static final BitField opt_condition_operator = new BitField(0x00700000);
|
||||
|
||||
/**
|
||||
* Constructs a DV record and sets its fields appropriately.
|
||||
*
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
public DVRecord(RecordInputStream in) {
|
||||
super(in);
|
||||
}
|
||||
|
||||
public DVRecord(int validationType, int operator, int errorStyle, boolean emptyCellAllowed,
|
||||
boolean suppressDropDownArrow, boolean isExplicitList,
|
||||
boolean showPromptBox, String promptTitle, String promptText,
|
||||
@ -110,7 +101,7 @@ public final class DVRecord extends Record {
|
||||
_regions = regions;
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in) {
|
||||
public DVRecord(RecordInputStream in) {
|
||||
|
||||
_option_flags = in.readInt();
|
||||
|
||||
|
@ -45,19 +45,7 @@ public final class DatRecord extends Record {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a Dat record and sets its fields appropriately.
|
||||
*
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
|
||||
public DatRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
field_1_options = in.readShort();
|
||||
}
|
||||
|
@ -45,19 +45,7 @@ public final class DataFormatRecord extends Record {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a DataFormat record and sets its fields appropriately.
|
||||
*
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
|
||||
public DataFormatRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
field_1_pointNumber = in.readShort();
|
||||
field_2_seriesIndex = in.readShort();
|
||||
|
@ -40,17 +40,7 @@ public class DateWindow1904Record
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a DateWindow1904 record and sets its fields appropriately.
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
|
||||
public DateWindow1904Record(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
field_1_window = in.readShort();
|
||||
}
|
||||
|
@ -36,17 +36,7 @@ public final class DefaultColWidthRecord extends Record {
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a DefaultColumnWidth record and sets its fields appropriately.
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
|
||||
public DefaultColWidthRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
field_1_col_width = in.readUShort();
|
||||
}
|
||||
|
@ -45,19 +45,7 @@ public class DefaultDataLabelTextPropertiesRecord
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a DefaultDataLabelTextProperties record and sets its fields appropriately.
|
||||
*
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
|
||||
public DefaultDataLabelTextPropertiesRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
field_1_categoryDataType = in.readShort();
|
||||
}
|
||||
|
@ -42,17 +42,7 @@ public class DefaultRowHeightRecord
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a DefaultRowHeight record and sets its fields appropriately.
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
|
||||
public DefaultRowHeightRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
field_1_option_flags = in.readShort();
|
||||
field_2_row_height = in.readShort();
|
||||
|
@ -44,17 +44,7 @@ public class DeltaRecord
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a Delta record and sets its fields appropriately.
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
|
||||
public DeltaRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
field_1_max_change = in.readDouble();
|
||||
}
|
||||
|
@ -45,17 +45,7 @@ public class DimensionsRecord
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a Dimensions record and sets its fields appropriately.
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
|
||||
public DimensionsRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
field_1_first_row = in.readInt();
|
||||
field_2_last_row = in.readInt();
|
||||
|
@ -30,11 +30,6 @@ public class DrawingRecord extends Record
|
||||
}
|
||||
|
||||
public DrawingRecord( RecordInputStream in )
|
||||
{
|
||||
super( in );
|
||||
}
|
||||
|
||||
protected void fillFields( RecordInputStream in )
|
||||
{
|
||||
recordData = in.readRemainder();
|
||||
}
|
||||
|
@ -40,16 +40,9 @@ public final class EOFRecord extends Record {
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a EOFRecord record and sets its fields appropriately.
|
||||
* @param in the RecordInputstream to read the record from
|
||||
* @param in unused (since this record has no data)
|
||||
*/
|
||||
|
||||
public EOFRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -54,22 +54,12 @@ public class EmbeddedObjectRefSubRecord
|
||||
field_5_ole_classname = "";
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs an EmbeddedObjectRef record and sets its fields appropriately.
|
||||
*
|
||||
* @param in the record input stream.
|
||||
*/
|
||||
public EmbeddedObjectRefSubRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
}
|
||||
|
||||
public short getSid()
|
||||
{
|
||||
return sid;
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
public EmbeddedObjectRefSubRecord(RecordInputStream in)
|
||||
{
|
||||
field_1_stream_id_offset = in.readShort();
|
||||
field_2_unknown = in.readShortArray();
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/* ====================================================================
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
@ -16,7 +15,6 @@
|
||||
limitations under the License.
|
||||
==================================================================== */
|
||||
|
||||
|
||||
package org.apache.poi.hssf.record;
|
||||
|
||||
import org.apache.poi.util.LittleEndian;
|
||||
@ -30,9 +28,7 @@ import org.apache.poi.util.LittleEndian;
|
||||
* @author Glen Stampoultzis (glens at apache.org)
|
||||
*/
|
||||
|
||||
public class EndRecord
|
||||
extends Record
|
||||
{
|
||||
public final class EndRecord extends Record {
|
||||
public static final short sid = 0x1034;
|
||||
|
||||
public EndRecord()
|
||||
@ -40,16 +36,9 @@ public class EndRecord
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a EndRecord record and sets its fields appropriately.
|
||||
* @param in the RecordInputstream to read the record from
|
||||
* @param in unused (since this record has no data)
|
||||
*/
|
||||
|
||||
public EndRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
}
|
||||
|
||||
@ -64,9 +53,8 @@ public class EndRecord
|
||||
|
||||
public int serialize(int offset, byte [] data)
|
||||
{
|
||||
LittleEndian.putShort(data, 0 + offset, sid);
|
||||
LittleEndian.putShort(data, 2 + offset,
|
||||
(( short ) 0)); // no record info
|
||||
LittleEndian.putUShort(data, 0 + offset, sid);
|
||||
LittleEndian.putUShort(data, 2 + offset, 0); // no record info
|
||||
return getRecordSize();
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/* ====================================================================
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
@ -16,12 +15,9 @@
|
||||
limitations under the License.
|
||||
==================================================================== */
|
||||
|
||||
|
||||
package org.apache.poi.hssf.record;
|
||||
|
||||
|
||||
|
||||
import org.apache.poi.util.*;
|
||||
import org.apache.poi.util.LittleEndian;
|
||||
|
||||
/**
|
||||
* The end data record is used to denote the end of the subrecords.
|
||||
@ -30,9 +26,7 @@ import org.apache.poi.util.*;
|
||||
|
||||
* @author Glen Stampoultzis (glens at apache.org)
|
||||
*/
|
||||
public class EndSubRecord
|
||||
extends SubRecord
|
||||
{
|
||||
public final class EndSubRecord extends SubRecord {
|
||||
public final static short sid = 0x00;
|
||||
|
||||
|
||||
@ -42,18 +36,9 @@ public class EndSubRecord
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a End record and sets its fields appropriately.
|
||||
*
|
||||
* @param in the RecordInputstream to read the record from
|
||||
* @param in unused (since this record has no data)
|
||||
*/
|
||||
|
||||
public EndSubRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -17,18 +17,41 @@
|
||||
|
||||
package org.apache.poi.hssf.record;
|
||||
|
||||
import org.apache.poi.ddf.*;
|
||||
import org.apache.poi.hssf.usermodel.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.poi.ddf.DefaultEscherRecordFactory;
|
||||
import org.apache.poi.ddf.EscherBoolProperty;
|
||||
import org.apache.poi.ddf.EscherClientAnchorRecord;
|
||||
import org.apache.poi.ddf.EscherClientDataRecord;
|
||||
import org.apache.poi.ddf.EscherContainerRecord;
|
||||
import org.apache.poi.ddf.EscherDgRecord;
|
||||
import org.apache.poi.ddf.EscherDggRecord;
|
||||
import org.apache.poi.ddf.EscherOptRecord;
|
||||
import org.apache.poi.ddf.EscherProperties;
|
||||
import org.apache.poi.ddf.EscherRecord;
|
||||
import org.apache.poi.ddf.EscherRecordFactory;
|
||||
import org.apache.poi.ddf.EscherSerializationListener;
|
||||
import org.apache.poi.ddf.EscherSpRecord;
|
||||
import org.apache.poi.ddf.EscherSpgrRecord;
|
||||
import org.apache.poi.ddf.EscherTextboxRecord;
|
||||
import org.apache.poi.hssf.model.AbstractShape;
|
||||
import org.apache.poi.hssf.model.TextboxShape;
|
||||
import org.apache.poi.hssf.model.DrawingManager2;
|
||||
import org.apache.poi.hssf.model.ConvertAnchor;
|
||||
import org.apache.poi.hssf.model.CommentShape;
|
||||
import org.apache.poi.hssf.model.ConvertAnchor;
|
||||
import org.apache.poi.hssf.model.DrawingManager2;
|
||||
import org.apache.poi.hssf.model.TextboxShape;
|
||||
import org.apache.poi.hssf.usermodel.HSSFClientAnchor;
|
||||
import org.apache.poi.hssf.usermodel.HSSFPatriarch;
|
||||
import org.apache.poi.hssf.usermodel.HSSFShape;
|
||||
import org.apache.poi.hssf.usermodel.HSSFShapeContainer;
|
||||
import org.apache.poi.hssf.usermodel.HSSFShapeGroup;
|
||||
import org.apache.poi.hssf.usermodel.HSSFTextbox;
|
||||
import org.apache.poi.util.POILogFactory;
|
||||
import org.apache.poi.util.POILogger;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* This class is used to aggregate the MSODRAWING and OBJ record
|
||||
* combinations. This is necessary due to the bizare way in which
|
||||
@ -282,16 +305,6 @@ public class EscherAggregate extends AbstractEscherHolderRecord
|
||||
return sid;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unused since this is an aggregate record. Use createAggregate().
|
||||
*
|
||||
* @see #createAggregate
|
||||
*/
|
||||
protected void fillFields( byte[] data, short size, int offset )
|
||||
{
|
||||
throw new IllegalStateException( "Should not reach here" );
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculates the string representation of this record. This is
|
||||
* simply a dump of all the records.
|
||||
@ -539,8 +552,7 @@ public class EscherAggregate extends AbstractEscherHolderRecord
|
||||
// The top level container ought to have
|
||||
// the DgRecord and the container of one container
|
||||
// per shape group (patriach overall first)
|
||||
EscherContainerRecord topContainer =
|
||||
(EscherContainerRecord)getEscherContainer();
|
||||
EscherContainerRecord topContainer = getEscherContainer();
|
||||
if(topContainer == null) {
|
||||
return;
|
||||
}
|
||||
|
@ -51,11 +51,6 @@ public class ExtSSTInfoSubRecord
|
||||
}
|
||||
|
||||
public ExtSSTInfoSubRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
field_1_stream_pos = in.readInt();
|
||||
field_2_bucket_sst_offset = in.readShort();
|
||||
|
@ -53,17 +53,7 @@ public class ExtSSTRecord
|
||||
field_2_sst_info = new ArrayList();
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a EOFRecord record and sets its fields appropriately.
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
|
||||
public ExtSSTRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
field_2_sst_info = new ArrayList();
|
||||
field_1_strings_per_bucket = in.readShort();
|
||||
|
@ -195,17 +195,7 @@ public class ExtendedFormatRecord
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs an ExtendedFormat record and sets its fields appropriately.
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
|
||||
public ExtendedFormatRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
field_1_font_index = in.readShort();
|
||||
field_2_format_index = in.readShort();
|
||||
|
@ -95,22 +95,13 @@ public class ExternSheetRecord extends Record {
|
||||
_list = new ArrayList();
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a Extern Sheet record and sets its fields appropriately.
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
|
||||
public ExternSheetRecord(RecordInputStream in) {
|
||||
super(in);
|
||||
}
|
||||
|
||||
/**
|
||||
* called by the constructor, should set class level fields. Should throw
|
||||
* runtime exception for bad/icomplete data.
|
||||
*
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
protected void fillFields(RecordInputStream in) {
|
||||
public ExternSheetRecord(RecordInputStream in) {
|
||||
_list = new ArrayList();
|
||||
|
||||
int nItems = in.readShort();
|
||||
|
@ -47,11 +47,7 @@ public final class ExternalNameRecord extends Record {
|
||||
private short field_2_index;
|
||||
private short field_3_not_used;
|
||||
private String field_4_name;
|
||||
private Ptg[] field_5_name_definition; // TODO - junits for name definition field
|
||||
|
||||
public ExternalNameRecord(RecordInputStream in) {
|
||||
super(in);
|
||||
}
|
||||
private Ptg[] field_5_name_definition;
|
||||
|
||||
/**
|
||||
* Convenience Function to determine if the name is a built-in name
|
||||
@ -116,13 +112,13 @@ public final class ExternalNameRecord extends Record {
|
||||
LittleEndian.putShort( data, 4 + offset, field_1_option_flag );
|
||||
LittleEndian.putShort( data, 6 + offset, field_2_index );
|
||||
LittleEndian.putShort( data, 8 + offset, field_3_not_used );
|
||||
short nameLen = (short) field_4_name.length();
|
||||
LittleEndian.putShort( data, 10 + offset, nameLen );
|
||||
int nameLen = field_4_name.length();
|
||||
LittleEndian.putUShort( data, 10 + offset, nameLen );
|
||||
StringUtil.putCompressedUnicode( field_4_name, data, 12 + offset );
|
||||
if(hasFormula()) {
|
||||
short defLen = (short) getNameDefinitionSize();
|
||||
LittleEndian.putShort( data, 12 + nameLen + offset, defLen );
|
||||
Ptg.serializePtgStack(toStack(field_5_name_definition), data, 14 + nameLen + offset );
|
||||
int defLen = getNameDefinitionSize();
|
||||
LittleEndian.putUShort( data, 12 + nameLen + offset, defLen );
|
||||
Ptg.serializePtgs(field_5_name_definition, data, 14 + nameLen + offset );
|
||||
}
|
||||
return dataSize + 4;
|
||||
}
|
||||
@ -141,7 +137,7 @@ public final class ExternalNameRecord extends Record {
|
||||
}
|
||||
|
||||
|
||||
protected void fillFields(RecordInputStream in) {
|
||||
public ExternalNameRecord(RecordInputStream in) {
|
||||
field_1_option_flag = in.readShort();
|
||||
field_2_index = in.readShort();
|
||||
field_3_not_used = in.readShort();
|
||||
@ -158,7 +154,7 @@ public final class ExternalNameRecord extends Record {
|
||||
throw readFail("Ran out of record data trying to read formula.");
|
||||
}
|
||||
short formulaLen = in.readShort();
|
||||
field_5_name_definition = toPtgArray(Ptg.createParsedExpressionTokens(formulaLen, in));
|
||||
field_5_name_definition = Ptg.readTokens(formulaLen, in);
|
||||
}
|
||||
/*
|
||||
* Makes better error messages (while hasFormula() is not reliable)
|
||||
@ -196,19 +192,6 @@ public final class ExternalNameRecord extends Record {
|
||||
return true;
|
||||
}
|
||||
|
||||
private static Ptg[] toPtgArray(Stack s) {
|
||||
Ptg[] result = new Ptg[s.size()];
|
||||
s.toArray(result);
|
||||
return result;
|
||||
}
|
||||
private static Stack toStack(Ptg[] ptgs) {
|
||||
Stack result = new Stack();
|
||||
for (int i = 0; i < ptgs.length; i++) {
|
||||
result.push(ptgs[i]);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public short getSid() {
|
||||
return sid;
|
||||
}
|
||||
|
@ -40,17 +40,7 @@ public class FilePassRecord
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a FILEPASS record and sets its fields appropriately.
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
|
||||
public FilePassRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
field_1_encryptedpassword = in.readInt();
|
||||
|
||||
|
@ -37,17 +37,7 @@ public final class FileSharingRecord extends Record {
|
||||
|
||||
public FileSharingRecord() {}
|
||||
|
||||
|
||||
/**
|
||||
* Constructs a FileSharing record and sets its fields appropriately.
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
|
||||
public FileSharingRecord(RecordInputStream in) {
|
||||
super(in);
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in) {
|
||||
field_1_readonly = in.readShort();
|
||||
field_2_password = in.readShort();
|
||||
|
||||
|
@ -46,17 +46,7 @@ public class FnGroupCountRecord
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a FnGroupCount record and sets its fields appropriately.
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
|
||||
public FnGroupCountRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
field_1_count = in.readShort();
|
||||
}
|
||||
|
@ -46,19 +46,7 @@ public class FontBasisRecord
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a FontBasis record and sets its fields appropriately.
|
||||
*
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
|
||||
public FontBasisRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
field_1_xBasis = in.readShort();
|
||||
field_2_yBasis = in.readShort();
|
||||
|
@ -42,19 +42,7 @@ public class FontIndexRecord
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a FontIndex record and sets its fields appropriately.
|
||||
*
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
|
||||
public FontIndexRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
field_1_fontIndex = in.readShort();
|
||||
}
|
||||
|
@ -76,18 +76,7 @@ public class FontRecord
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a Font record and sets its fields appropriately.
|
||||
*
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
|
||||
public FontRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
field_1_font_height = in.readShort();
|
||||
field_2_attributes = in.readShort();
|
||||
|
@ -45,17 +45,7 @@ public class FooterRecord
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a FooterRecord record and sets its fields appropriately.
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
|
||||
public FooterRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
if (in.remaining() > 0)
|
||||
{
|
||||
|
@ -46,17 +46,7 @@ public class FormatRecord
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a Format record and sets its fields appropriately.
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
|
||||
public FormatRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
field_1_index_code = in.readShort();
|
||||
field_3_unicode_len = in.readShort();
|
||||
|
@ -186,20 +186,7 @@ public final class FormulaRecord extends Record implements CellValueRecordInterf
|
||||
field_8_parsed_expr = Ptg.EMPTY_PTG_ARRAY;
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a Formula record and sets its fields appropriately.
|
||||
* Note - id must be 0x06 (NOT 0x406 see MSKB #Q184647 for an
|
||||
* "explanation of this bug in the documentation) or an exception
|
||||
* will be throw upon validation
|
||||
*
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
|
||||
public FormulaRecord(RecordInputStream in) {
|
||||
super(in);
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in) {
|
||||
field_1_row = in.readUShort();
|
||||
field_2_column = in.readShort();
|
||||
field_3_xf = in.readShort();
|
||||
|
@ -46,19 +46,7 @@ public final class FrameRecord extends Record {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a Frame record and sets its fields appropriately.
|
||||
*
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
|
||||
public FrameRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
field_1_borderType = in.readShort();
|
||||
field_2_options = in.readShort();
|
||||
|
@ -44,17 +44,7 @@ public class GridsetRecord
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a GridSet record and sets its fields appropriately.
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
|
||||
public GridsetRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
field_1_gridset_flag = in.readShort();
|
||||
}
|
||||
|
@ -41,19 +41,7 @@ public class GroupMarkerSubRecord
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a group marker record and sets its fields appropriately.
|
||||
*
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
|
||||
public GroupMarkerSubRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
// int pos = 0;
|
||||
reserved = in.readRemainder();
|
||||
|
@ -43,17 +43,7 @@ public class GutsRecord
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a Guts record and sets its fields appropriately.
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
|
||||
public GutsRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
field_1_left_row_gutter = in.readShort();
|
||||
field_2_top_col_gutter = in.readShort();
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/* ====================================================================
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
@ -16,41 +15,27 @@
|
||||
limitations under the License.
|
||||
==================================================================== */
|
||||
|
||||
|
||||
package org.apache.poi.hssf.record;
|
||||
|
||||
import org.apache.poi.util.LittleEndian;
|
||||
|
||||
/**
|
||||
* Title: HCenter record<P>
|
||||
* Title: HCenter record (0x0083)<P>
|
||||
* Description: whether to center between horizontal margins<P>
|
||||
* REFERENCE: PG 320 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)<P>
|
||||
* @author Andrew C. Oliver (acoliver at apache dot org)
|
||||
* @author Jason Height (jheight at chariot dot net dot au)
|
||||
* @version 2.0-pre
|
||||
*/
|
||||
|
||||
public class HCenterRecord
|
||||
extends Record
|
||||
{
|
||||
public final static short sid = 0x83;
|
||||
public final class HCenterRecord extends Record {
|
||||
public final static short sid = 0x0083;
|
||||
private short field_1_hcenter;
|
||||
|
||||
public HCenterRecord()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs an HCenter record and sets its fields appropriately.
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
|
||||
public HCenterRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
field_1_hcenter = in.readShort();
|
||||
}
|
||||
@ -96,8 +81,8 @@ public class HCenterRecord
|
||||
public int serialize(int offset, byte [] data)
|
||||
{
|
||||
LittleEndian.putShort(data, 0 + offset, sid);
|
||||
LittleEndian.putShort(data, 2 + offset, ( short ) 0x2);
|
||||
LittleEndian.putShort(data, 4 + offset, ( short ) field_1_hcenter);
|
||||
LittleEndian.putUShort(data, 2 + offset, 0x2);
|
||||
LittleEndian.putUShort(data, 4 + offset, field_1_hcenter);
|
||||
return getRecordSize();
|
||||
}
|
||||
|
||||
|
@ -45,17 +45,7 @@ public class HeaderRecord
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs an Header record and sets its fields appropriately.
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
|
||||
public HeaderRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
if (in.remaining() > 0)
|
||||
{
|
||||
|
@ -42,17 +42,7 @@ public class HideObjRecord
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs an HideObj record and sets its fields appropriately.
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
|
||||
public HideObjRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
field_1_hide_obj = in.readShort();
|
||||
}
|
||||
|
@ -130,16 +130,6 @@ public class HyperlinkRecord extends Record {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Read hyperlink from input stream
|
||||
*
|
||||
* @param in the stream to read from
|
||||
*/
|
||||
public HyperlinkRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the column of the first cell that contains the hyperlink
|
||||
*
|
||||
@ -315,7 +305,7 @@ public class HyperlinkRecord extends Record {
|
||||
/**
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
protected void fillFields(RecordInputStream in)
|
||||
public HyperlinkRecord(RecordInputStream in)
|
||||
{
|
||||
try {
|
||||
rwFirst = in.readShort();
|
||||
|
@ -48,17 +48,7 @@ public class IndexRecord
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs an Index record and sets its fields appropriately.
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
|
||||
public IndexRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
field_5_dbcells =
|
||||
new IntList(DBCELL_CAPACITY); // initial capacity of 30
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/* ====================================================================
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
@ -16,40 +15,29 @@
|
||||
limitations under the License.
|
||||
==================================================================== */
|
||||
|
||||
|
||||
package org.apache.poi.hssf.record;
|
||||
|
||||
import org.apache.poi.util.LittleEndian;
|
||||
|
||||
/**
|
||||
* Title: Interface End Record<P>
|
||||
* Title: Interface End Record (0x00E2)<P>
|
||||
* Description: Shows where the Interface Records end (MMS)
|
||||
* (has no fields)<P>
|
||||
* REFERENCE: PG 324 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)<P>
|
||||
* @author Andrew C. Oliver (acoliver at apache dot org)
|
||||
* @version 2.0-pre
|
||||
*/
|
||||
|
||||
public class InterfaceEndRecord
|
||||
extends Record
|
||||
{
|
||||
public final static short sid = 0xe2;
|
||||
public final class InterfaceEndRecord extends Record {
|
||||
public final static short sid = 0x00E2;
|
||||
|
||||
public InterfaceEndRecord()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs an InterfaceEnd record and sets its fields appropriately.
|
||||
* @param in the RecordInputstream to read the record from
|
||||
* @param in unused (since this record has no data)
|
||||
*/
|
||||
|
||||
public InterfaceEndRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -45,17 +45,7 @@ public class InterfaceHdrRecord
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs an Codepage record and sets its fields appropriately.
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
|
||||
public InterfaceHdrRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
field_1_codepage = in.readShort();
|
||||
}
|
||||
|
@ -43,17 +43,7 @@ public class IterationRecord
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs an Iteration record and sets its fields appropriately.
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
|
||||
public IterationRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
field_1_iteration = in.readShort();
|
||||
}
|
||||
|
@ -44,19 +44,9 @@ public final class LabelRecord extends Record implements CellValueRecordInterfac
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs an Label record and sets its fields appropriately.
|
||||
*
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
public LabelRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
field_1_row = in.readUShort();
|
||||
field_2_column = in.readShort();
|
||||
|
@ -40,16 +40,7 @@ public final class LabelSSTRecord extends Record implements CellValueRecordInter
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs an LabelSST record and sets its fields appropriately.
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
public LabelSSTRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
field_1_row = in.readUShort();
|
||||
field_2_column = in.readUShort();
|
||||
|
@ -31,15 +31,7 @@ public class LeftMarginRecord extends Record implements Margin
|
||||
|
||||
public LeftMarginRecord() { }
|
||||
|
||||
/**
|
||||
* Constructs a LeftMargin record and sets its fields appropriately.
|
||||
*
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
public LeftMarginRecord(RecordInputStream in)
|
||||
{ super(in); }
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
field_1_margin = in.readDouble();
|
||||
}
|
||||
@ -93,4 +85,4 @@ public class LeftMarginRecord extends Record implements Margin
|
||||
rec.field_1_margin = this.field_1_margin;
|
||||
return rec;
|
||||
}
|
||||
} // END OF CLASS
|
||||
} // END OF CLAS
|
@ -62,19 +62,7 @@ public final class LegendRecord extends Record {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a Legend record and sets its fields appropriately.
|
||||
*
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
|
||||
public LegendRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
field_1_xAxisUpperLeft = in.readInt();
|
||||
field_2_yAxisUpperLeft = in.readInt();
|
||||
|
@ -61,19 +61,7 @@ public final class LineFormatRecord extends Record {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a LineFormat record and sets its fields appropriately.
|
||||
*
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
|
||||
public LineFormatRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
field_1_lineColor = in.readInt();
|
||||
field_2_linePattern = in.readShort();
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/* ====================================================================
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
@ -16,7 +15,6 @@
|
||||
limitations under the License.
|
||||
==================================================================== */
|
||||
|
||||
|
||||
package org.apache.poi.hssf.record;
|
||||
|
||||
import org.apache.poi.hssf.record.formula.Ptg;
|
||||
@ -31,9 +29,7 @@ import java.util.Iterator;
|
||||
*
|
||||
* @author Glen Stampoultzis (glens at apache.org)
|
||||
*/
|
||||
public class LinkedDataFormulaField
|
||||
implements CustomField
|
||||
{
|
||||
public final class LinkedDataFormulaField implements CustomField {
|
||||
Stack formulaTokens = new Stack();
|
||||
|
||||
public int getSize()
|
||||
|
@ -54,19 +54,7 @@ public final class LinkedDataRecord extends Record {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a LinkedData record and sets its fields appropriately.
|
||||
*
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
|
||||
public LinkedDataRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
field_1_linkType = in.readByte();
|
||||
field_2_referenceType = in.readByte();
|
||||
@ -142,7 +130,7 @@ public final class LinkedDataRecord extends Record {
|
||||
rec.field_2_referenceType = field_2_referenceType;
|
||||
rec.field_3_options = field_3_options;
|
||||
rec.field_4_indexNumberFmtRecord = field_4_indexNumberFmtRecord;
|
||||
rec.field_5_formulaOfLink = ((LinkedDataFormulaField)field_5_formulaOfLink.clone());;
|
||||
rec.field_5_formulaOfLink = ((LinkedDataFormulaField)field_5_formulaOfLink.clone());
|
||||
return rec;
|
||||
}
|
||||
|
||||
|
@ -41,17 +41,7 @@ public class MMSRecord
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a MMS record and sets its fields appropriately.
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
|
||||
public MMSRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
field_1_addMenuCount = in.readByte();
|
||||
field_2_delMenuCount = in.readByte();
|
||||
|
@ -56,9 +56,6 @@ public final class MergeCellsRecord extends Record {
|
||||
_startIndex = 0;
|
||||
_regions = cras;
|
||||
}
|
||||
protected void fillFields(RecordInputStream in) {
|
||||
throw new RuntimeException("obsolete");
|
||||
}
|
||||
/**
|
||||
* get the number of merged areas. If this drops down to 0 you should just go
|
||||
* ahead and delete the record.
|
||||
|
@ -52,17 +52,6 @@ public class MulBlankRecord
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a MulBlank record and sets its fields appropriately.
|
||||
*
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
|
||||
public MulBlankRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
}
|
||||
|
||||
/**
|
||||
* get the row number of the cells this represents
|
||||
*
|
||||
@ -119,7 +108,7 @@ public class MulBlankRecord
|
||||
/**
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
protected void fillFields(RecordInputStream in)
|
||||
public MulBlankRecord(RecordInputStream in)
|
||||
{
|
||||
//field_1_row = LittleEndian.getShort(data, 0 + offset);
|
||||
field_1_row = in.readUShort();
|
||||
|
@ -37,15 +37,6 @@ public final class MulRKRecord extends Record {
|
||||
private RkRec[] field_3_rks;
|
||||
private short field_4_last_col;
|
||||
|
||||
/**
|
||||
* Constructs a MulRK record and sets its fields appropriately.
|
||||
*
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
public MulRKRecord(RecordInputStream in) {
|
||||
super(in);
|
||||
}
|
||||
|
||||
public int getRow() {
|
||||
return field_1_row;
|
||||
}
|
||||
@ -93,7 +84,7 @@ public final class MulRKRecord extends Record {
|
||||
/**
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
protected void fillFields(RecordInputStream in) {
|
||||
public MulRKRecord(RecordInputStream in) {
|
||||
field_1_row = in.readUShort();
|
||||
field_2_first_col = in.readShort();
|
||||
field_3_rks = RkRec.parseRKs(in);
|
||||
|
@ -107,15 +107,6 @@ public final class NameRecord extends Record {
|
||||
field_17_status_bar_text = "";
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a Name record and sets its fields appropriately.
|
||||
*
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
public NameRecord(RecordInputStream in) {
|
||||
super(in);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor to create a built-in named region
|
||||
* @param builtin Built-in byte representation for the name record, use the public constants
|
||||
@ -539,7 +530,7 @@ public final class NameRecord extends Record {
|
||||
*
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
protected void fillFields(RecordInputStream in) {
|
||||
public NameRecord(RecordInputStream in) {
|
||||
field_1_option_flag = in.readShort();
|
||||
field_2_keyboard_shortcut = in.readByte();
|
||||
int field_3_length_name_text = in.readByte();
|
||||
|
@ -53,18 +53,6 @@ public class NoteRecord extends Record {
|
||||
field_3_flags = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>NoteRecord</code> and fills its fields
|
||||
* from the supplied <code>RecordInputStream</code>.
|
||||
*
|
||||
* @param in the stream to read from
|
||||
*/
|
||||
public NoteRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @return id of this record.
|
||||
*/
|
||||
@ -76,7 +64,7 @@ public class NoteRecord extends Record {
|
||||
/**
|
||||
* Read the record data from the supplied <code>RecordInputStream</code>
|
||||
*/
|
||||
protected void fillFields(RecordInputStream in)
|
||||
public NoteRecord(RecordInputStream in)
|
||||
{
|
||||
field_1_row = in.readShort();
|
||||
field_2_col = in.readShort();
|
||||
|
@ -45,20 +45,10 @@ public class NoteStructureSubRecord
|
||||
reserved = new byte[22];
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a NoteStructureSubRecord and sets its fields appropriately.
|
||||
*
|
||||
*/
|
||||
public NoteStructureSubRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Read the record data from the supplied <code>RecordInputStream</code>
|
||||
*/
|
||||
protected void fillFields(RecordInputStream in)
|
||||
public NoteStructureSubRecord(RecordInputStream in)
|
||||
{
|
||||
//just grab the raw data
|
||||
reserved = in.readRemainder();
|
||||
|
@ -42,19 +42,7 @@ public class NumberFormatIndexRecord
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a NumberFormatIndex record and sets its fields appropriately.
|
||||
*
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
|
||||
public NumberFormatIndexRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
field_1_formatIndex = in.readShort();
|
||||
}
|
||||
|
@ -41,19 +41,9 @@ public final class NumberRecord extends Record implements CellValueRecordInterfa
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a Number record and sets its fields appropriately.
|
||||
*
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
public NumberRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
field_1_row = in.readUShort();
|
||||
field_2_col = in.readUShort();
|
||||
|
@ -43,18 +43,7 @@ public final class ObjRecord extends Record {
|
||||
// TODO - ensure 2 sub-records (ftCmo 15h, and ftEnd 00h) are always created
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a OBJ record and sets its fields appropriately.
|
||||
*
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
|
||||
public ObjRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
// TODO - problems with OBJ sub-records stream
|
||||
// MS spec says first sub-records is always CommonObjectDataSubRecord, and last is
|
||||
|
@ -49,19 +49,7 @@ public class ObjectLinkRecord
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a ObjectLink record and sets its fields appropriately.
|
||||
*
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
|
||||
public ObjectLinkRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
field_1_anchorId = in.readShort();
|
||||
field_2_link1 = in.readShort();
|
||||
|
@ -41,17 +41,7 @@ public class ObjectProtectRecord
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a Protect record and sets its fields appropriately.
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
|
||||
public ObjectProtectRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
field_1_protect = in.readShort();
|
||||
}
|
||||
|
@ -83,11 +83,7 @@ public abstract class PageBreakRecord extends Record {
|
||||
_breakMap = new HashMap();
|
||||
}
|
||||
|
||||
protected PageBreakRecord(RecordInputStream in) {
|
||||
super(in);
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
public PageBreakRecord(RecordInputStream in)
|
||||
{
|
||||
int nBreaks = in.readShort();
|
||||
_breaks = new ArrayList(nBreaks + 2);
|
||||
|
@ -48,17 +48,7 @@ public class PaletteRecord
|
||||
createDefaultPalette();
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a PaletteRecord record and sets its fields appropriately.
|
||||
* @param in the RecordInputstream to read the record from
|
||||
*/
|
||||
|
||||
public PaletteRecord(RecordInputStream in)
|
||||
{
|
||||
super(in);
|
||||
}
|
||||
|
||||
protected void fillFields(RecordInputStream in)
|
||||
{
|
||||
field_1_numcolors = in.readShort();
|
||||
field_2_colors = new ArrayList(field_1_numcolors);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user