Browse Source

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
tags/REL_3_2_FINAL
Josh Micich 15 years ago
parent
commit
15e0710fec
100 changed files with 80 additions and 1045 deletions
  1. 0
    6
      src/java/org/apache/poi/hssf/eventusermodel/dummyrecord/LastCellOfRowDummyRecord.java
  2. 0
    5
      src/java/org/apache/poi/hssf/eventusermodel/dummyrecord/MissingCellDummyRecord.java
  3. 0
    4
      src/java/org/apache/poi/hssf/eventusermodel/dummyrecord/MissingRowDummyRecord.java
  4. 0
    11
      src/java/org/apache/poi/hssf/record/AbstractEscherHolderRecord.java
  5. 0
    12
      src/java/org/apache/poi/hssf/record/AreaFormatRecord.java
  6. 0
    12
      src/java/org/apache/poi/hssf/record/AreaRecord.java
  7. 0
    12
      src/java/org/apache/poi/hssf/record/AxisLineFormatRecord.java
  8. 0
    12
      src/java/org/apache/poi/hssf/record/AxisOptionsRecord.java
  9. 0
    12
      src/java/org/apache/poi/hssf/record/AxisParentRecord.java
  10. 0
    12
      src/java/org/apache/poi/hssf/record/AxisRecord.java
  11. 0
    12
      src/java/org/apache/poi/hssf/record/AxisUsedRecord.java
  12. 0
    12
      src/java/org/apache/poi/hssf/record/BOFRecord.java
  13. 0
    10
      src/java/org/apache/poi/hssf/record/BackupRecord.java
  14. 0
    12
      src/java/org/apache/poi/hssf/record/BarRecord.java
  15. 4
    17
      src/java/org/apache/poi/hssf/record/BeginRecord.java
  16. 0
    9
      src/java/org/apache/poi/hssf/record/BlankRecord.java
  17. 0
    10
      src/java/org/apache/poi/hssf/record/BookBoolRecord.java
  18. 0
    10
      src/java/org/apache/poi/hssf/record/BoolErrRecord.java
  19. 1
    11
      src/java/org/apache/poi/hssf/record/BottomMarginRecord.java
  20. 1
    10
      src/java/org/apache/poi/hssf/record/BoundSheetRecord.java
  21. 0
    5
      src/java/org/apache/poi/hssf/record/CFHeaderRecord.java
  22. 0
    4
      src/java/org/apache/poi/hssf/record/CFRuleRecord.java
  23. 1
    5
      src/java/org/apache/poi/hssf/record/CRNCountRecord.java
  24. 1
    5
      src/java/org/apache/poi/hssf/record/CRNRecord.java
  25. 0
    11
      src/java/org/apache/poi/hssf/record/CalcCountRecord.java
  26. 0
    10
      src/java/org/apache/poi/hssf/record/CalcModeRecord.java
  27. 0
    12
      src/java/org/apache/poi/hssf/record/CategorySeriesAxisRecord.java
  28. 0
    10
      src/java/org/apache/poi/hssf/record/ChartFormatRecord.java
  29. 0
    12
      src/java/org/apache/poi/hssf/record/ChartRecord.java
  30. 0
    4
      src/java/org/apache/poi/hssf/record/ChartTitleFormatRecord.java
  31. 0
    10
      src/java/org/apache/poi/hssf/record/CodepageRecord.java
  32. 0
    10
      src/java/org/apache/poi/hssf/record/ColumnInfoRecord.java
  33. 0
    11
      src/java/org/apache/poi/hssf/record/CommonObjectDataSubRecord.java
  34. 1
    12
      src/java/org/apache/poi/hssf/record/ContinueRecord.java
  35. 0
    10
      src/java/org/apache/poi/hssf/record/CountryRecord.java
  36. 0
    9
      src/java/org/apache/poi/hssf/record/DBCellRecord.java
  37. 0
    10
      src/java/org/apache/poi/hssf/record/DSFRecord.java
  38. 1
    12
      src/java/org/apache/poi/hssf/record/DVALRecord.java
  39. 1
    10
      src/java/org/apache/poi/hssf/record/DVRecord.java
  40. 0
    12
      src/java/org/apache/poi/hssf/record/DatRecord.java
  41. 0
    12
      src/java/org/apache/poi/hssf/record/DataFormatRecord.java
  42. 0
    10
      src/java/org/apache/poi/hssf/record/DateWindow1904Record.java
  43. 0
    10
      src/java/org/apache/poi/hssf/record/DefaultColWidthRecord.java
  44. 0
    12
      src/java/org/apache/poi/hssf/record/DefaultDataLabelTextPropertiesRecord.java
  45. 0
    10
      src/java/org/apache/poi/hssf/record/DefaultRowHeightRecord.java
  46. 0
    10
      src/java/org/apache/poi/hssf/record/DeltaRecord.java
  47. 0
    10
      src/java/org/apache/poi/hssf/record/DimensionsRecord.java
  48. 0
    5
      src/java/org/apache/poi/hssf/record/DrawingRecord.java
  49. 1
    8
      src/java/org/apache/poi/hssf/record/EOFRecord.java
  50. 1
    11
      src/java/org/apache/poi/hssf/record/EmbeddedObjectRefSubRecord.java
  51. 4
    16
      src/java/org/apache/poi/hssf/record/EndRecord.java
  52. 4
    19
      src/java/org/apache/poi/hssf/record/EndSubRecord.java
  53. 31
    19
      src/java/org/apache/poi/hssf/record/EscherAggregate.java
  54. 0
    5
      src/java/org/apache/poi/hssf/record/ExtSSTInfoSubRecord.java
  55. 0
    10
      src/java/org/apache/poi/hssf/record/ExtSSTRecord.java
  56. 0
    10
      src/java/org/apache/poi/hssf/record/ExtendedFormatRecord.java
  57. 1
    10
      src/java/org/apache/poi/hssf/record/ExternSheetRecord.java
  58. 8
    25
      src/java/org/apache/poi/hssf/record/ExternalNameRecord.java
  59. 0
    10
      src/java/org/apache/poi/hssf/record/FilePassRecord.java
  60. 0
    10
      src/java/org/apache/poi/hssf/record/FileSharingRecord.java
  61. 0
    10
      src/java/org/apache/poi/hssf/record/FnGroupCountRecord.java
  62. 0
    12
      src/java/org/apache/poi/hssf/record/FontBasisRecord.java
  63. 0
    12
      src/java/org/apache/poi/hssf/record/FontIndexRecord.java
  64. 0
    11
      src/java/org/apache/poi/hssf/record/FontRecord.java
  65. 0
    10
      src/java/org/apache/poi/hssf/record/FooterRecord.java
  66. 0
    10
      src/java/org/apache/poi/hssf/record/FormatRecord.java
  67. 0
    13
      src/java/org/apache/poi/hssf/record/FormulaRecord.java
  68. 0
    12
      src/java/org/apache/poi/hssf/record/FrameRecord.java
  69. 0
    10
      src/java/org/apache/poi/hssf/record/GridsetRecord.java
  70. 0
    12
      src/java/org/apache/poi/hssf/record/GroupMarkerSubRecord.java
  71. 0
    10
      src/java/org/apache/poi/hssf/record/GutsRecord.java
  72. 5
    20
      src/java/org/apache/poi/hssf/record/HCenterRecord.java
  73. 0
    10
      src/java/org/apache/poi/hssf/record/HeaderRecord.java
  74. 0
    10
      src/java/org/apache/poi/hssf/record/HideObjRecord.java
  75. 1
    11
      src/java/org/apache/poi/hssf/record/HyperlinkRecord.java
  76. 0
    10
      src/java/org/apache/poi/hssf/record/IndexRecord.java
  77. 4
    16
      src/java/org/apache/poi/hssf/record/InterfaceEndRecord.java
  78. 0
    10
      src/java/org/apache/poi/hssf/record/InterfaceHdrRecord.java
  79. 0
    10
      src/java/org/apache/poi/hssf/record/IterationRecord.java
  80. 0
    10
      src/java/org/apache/poi/hssf/record/LabelRecord.java
  81. 0
    9
      src/java/org/apache/poi/hssf/record/LabelSSTRecord.java
  82. 1
    9
      src/java/org/apache/poi/hssf/record/LeftMarginRecord.java
  83. 0
    12
      src/java/org/apache/poi/hssf/record/LegendRecord.java
  84. 0
    12
      src/java/org/apache/poi/hssf/record/LineFormatRecord.java
  85. 1
    5
      src/java/org/apache/poi/hssf/record/LinkedDataFormulaField.java
  86. 1
    13
      src/java/org/apache/poi/hssf/record/LinkedDataRecord.java
  87. 0
    10
      src/java/org/apache/poi/hssf/record/MMSRecord.java
  88. 0
    3
      src/java/org/apache/poi/hssf/record/MergeCellsRecord.java
  89. 1
    12
      src/java/org/apache/poi/hssf/record/MulBlankRecord.java
  90. 1
    10
      src/java/org/apache/poi/hssf/record/MulRKRecord.java
  91. 1
    10
      src/java/org/apache/poi/hssf/record/NameRecord.java
  92. 1
    13
      src/java/org/apache/poi/hssf/record/NoteRecord.java
  93. 1
    11
      src/java/org/apache/poi/hssf/record/NoteStructureSubRecord.java
  94. 0
    12
      src/java/org/apache/poi/hssf/record/NumberFormatIndexRecord.java
  95. 0
    10
      src/java/org/apache/poi/hssf/record/NumberRecord.java
  96. 0
    11
      src/java/org/apache/poi/hssf/record/ObjRecord.java
  97. 0
    12
      src/java/org/apache/poi/hssf/record/ObjectLinkRecord.java
  98. 0
    10
      src/java/org/apache/poi/hssf/record/ObjectProtectRecord.java
  99. 1
    5
      src/java/org/apache/poi/hssf/record/PageBreakRecord.java
  100. 0
    0
      src/java/org/apache/poi/hssf/record/PaletteRecord.java

+ 0
- 6
src/java/org/apache/poi/hssf/eventusermodel/dummyrecord/LastCellOfRowDummyRecord.java View File

@@ -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) {
}

}

+ 0
- 5
src/java/org/apache/poi/hssf/eventusermodel/dummyrecord/MissingCellDummyRecord.java View File

@@ -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; }

+ 0
- 4
src/java/org/apache/poi/hssf/eventusermodel/dummyrecord/MissingRowDummyRecord.java View File

@@ -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;

+ 0
- 11
src/java/org/apache/poi/hssf/record/AbstractEscherHolderRecord.java View File

@@ -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 )

+ 0
- 12
src/java/org/apache/poi/hssf/record/AreaFormatRecord.java View File

@@ -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();

+ 0
- 12
src/java/org/apache/poi/hssf/record/AreaRecord.java View File

@@ -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();

+ 0
- 12
src/java/org/apache/poi/hssf/record/AxisLineFormatRecord.java View File

@@ -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();
}

+ 0
- 12
src/java/org/apache/poi/hssf/record/AxisOptionsRecord.java View File

@@ -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();

+ 0
- 12
src/java/org/apache/poi/hssf/record/AxisParentRecord.java View File

@@ -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();

+ 0
- 12
src/java/org/apache/poi/hssf/record/AxisRecord.java View File

@@ -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();

+ 0
- 12
src/java/org/apache/poi/hssf/record/AxisUsedRecord.java View File

@@ -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();
}

+ 0
- 12
src/java/org/apache/poi/hssf/record/BOFRecord.java View File

@@ -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();

+ 0
- 10
src/java/org/apache/poi/hssf/record/BackupRecord.java View File

@@ -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();
}

+ 0
- 12
src/java/org/apache/poi/hssf/record/BarRecord.java View File

@@ -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();

+ 4
- 17
src/java/org/apache/poi/hssf/record/BeginRecord.java View File

@@ -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,7 +14,6 @@
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */

package org.apache.poi.hssf.record;

@@ -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();
}


+ 0
- 9
src/java/org/apache/poi/hssf/record/BlankRecord.java View File

@@ -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();

+ 0
- 10
src/java/org/apache/poi/hssf/record/BookBoolRecord.java View File

@@ -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();
}

+ 0
- 10
src/java/org/apache/poi/hssf/record/BoolErrRecord.java View File

@@ -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();

+ 1
- 11
src/java/org/apache/poi/hssf/record/BottomMarginRecord.java View File

@@ -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

+ 1
- 10
src/java/org/apache/poi/hssf/record/BoundSheetRecord.java View File

@@ -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();

+ 0
- 5
src/java/org/apache/poi/hssf/record/CFHeaderRecord.java View File

@@ -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();

+ 0
- 4
src/java/org/apache/poi/hssf/record/CFRuleRecord.java View File

@@ -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();

+ 1
- 5
src/java/org/apache/poi/hssf/record/CRNCountRecord.java View File

@@ -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

+ 1
- 5
src/java/org/apache/poi/hssf/record/CRNRecord.java View File

@@ -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();

+ 0
- 11
src/java/org/apache/poi/hssf/record/CalcCountRecord.java View File

@@ -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();
}

+ 0
- 10
src/java/org/apache/poi/hssf/record/CalcModeRecord.java View File

@@ -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();
}

+ 0
- 12
src/java/org/apache/poi/hssf/record/CategorySeriesAxisRecord.java View File

@@ -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();

+ 0
- 10
src/java/org/apache/poi/hssf/record/ChartFormatRecord.java View File

@@ -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();

+ 0
- 12
src/java/org/apache/poi/hssf/record/ChartRecord.java View File

@@ -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();

+ 0
- 4
src/java/org/apache/poi/hssf/record/ChartTitleFormatRecord.java View File

@@ -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;

+ 0
- 10
src/java/org/apache/poi/hssf/record/CodepageRecord.java View File

@@ -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();
}

+ 0
- 10
src/java/org/apache/poi/hssf/record/ColumnInfoRecord.java View File

@@ -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();

+ 0
- 11
src/java/org/apache/poi/hssf/record/CommonObjectDataSubRecord.java View File

@@ -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();

+ 1
- 12
src/java/org/apache/poi/hssf/record/ContinueRecord.java View File

@@ -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();
}

+ 0
- 10
src/java/org/apache/poi/hssf/record/CountryRecord.java View File

@@ -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();

+ 0
- 9
src/java/org/apache/poi/hssf/record/DBCellRecord.java View File

@@ -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();

+ 0
- 10
src/java/org/apache/poi/hssf/record/DSFRecord.java View File

@@ -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();
}

+ 1
- 12
src/java/org/apache/poi/hssf/record/DVALRecord.java View File

@@ -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)
public DVALRecord(RecordInputStream in)
{
this.field_1_options = in.readShort();
this.field_2_horiz_pos = in.readInt();

+ 1
- 10
src/java/org/apache/poi/hssf/record/DVRecord.java View File

@@ -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();

+ 0
- 12
src/java/org/apache/poi/hssf/record/DatRecord.java View File

@@ -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();
}

+ 0
- 12
src/java/org/apache/poi/hssf/record/DataFormatRecord.java View File

@@ -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();

+ 0
- 10
src/java/org/apache/poi/hssf/record/DateWindow1904Record.java View File

@@ -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();
}

+ 0
- 10
src/java/org/apache/poi/hssf/record/DefaultColWidthRecord.java View File

@@ -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();
}

+ 0
- 12
src/java/org/apache/poi/hssf/record/DefaultDataLabelTextPropertiesRecord.java View File

@@ -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();
}

+ 0
- 10
src/java/org/apache/poi/hssf/record/DefaultRowHeightRecord.java View File

@@ -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();

+ 0
- 10
src/java/org/apache/poi/hssf/record/DeltaRecord.java View File

@@ -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();
}

+ 0
- 10
src/java/org/apache/poi/hssf/record/DimensionsRecord.java View File

@@ -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();

+ 0
- 5
src/java/org/apache/poi/hssf/record/DrawingRecord.java View File

@@ -30,11 +30,6 @@ public class DrawingRecord extends Record
}

public DrawingRecord( RecordInputStream in )
{
super( in );
}

protected void fillFields( RecordInputStream in )
{
recordData = in.readRemainder();
}

+ 1
- 8
src/java/org/apache/poi/hssf/record/EOFRecord.java View File

@@ -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)
{
}


+ 1
- 11
src/java/org/apache/poi/hssf/record/EmbeddedObjectRefSubRecord.java View File

@@ -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();

+ 4
- 16
src/java/org/apache/poi/hssf/record/EndRecord.java View File

@@ -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,7 +14,6 @@
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */

package org.apache.poi.hssf.record;

@@ -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();
}


+ 4
- 19
src/java/org/apache/poi/hssf/record/EndSubRecord.java View File

@@ -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,10 +26,8 @@ import org.apache.poi.util.*;

* @author Glen Stampoultzis (glens at apache.org)
*/
public class EndSubRecord
extends SubRecord
{
public final static short sid = 0x00;
public final class EndSubRecord extends SubRecord {
public final static short sid = 0x00;


public EndSubRecord()
@@ -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)
{
}


+ 31
- 19
src/java/org/apache/poi/hssf/record/EscherAggregate.java View File

@@ -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;
}

+ 0
- 5
src/java/org/apache/poi/hssf/record/ExtSSTInfoSubRecord.java View File

@@ -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();

+ 0
- 10
src/java/org/apache/poi/hssf/record/ExtSSTRecord.java View File

@@ -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();

+ 0
- 10
src/java/org/apache/poi/hssf/record/ExtendedFormatRecord.java View File

@@ -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();

+ 1
- 10
src/java/org/apache/poi/hssf/record/ExternSheetRecord.java View File

@@ -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();

+ 8
- 25
src/java/org/apache/poi/hssf/record/ExternalNameRecord.java View File

@@ -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;
}

+ 0
- 10
src/java/org/apache/poi/hssf/record/FilePassRecord.java View File

@@ -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();

+ 0
- 10
src/java/org/apache/poi/hssf/record/FileSharingRecord.java View File

@@ -36,18 +36,8 @@ public final class FileSharingRecord extends Record {
private String field_3_username_value;

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();

+ 0
- 10
src/java/org/apache/poi/hssf/record/FnGroupCountRecord.java View File

@@ -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();
}

+ 0
- 12
src/java/org/apache/poi/hssf/record/FontBasisRecord.java View File

@@ -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();

+ 0
- 12
src/java/org/apache/poi/hssf/record/FontIndexRecord.java View File

@@ -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();
}

+ 0
- 11
src/java/org/apache/poi/hssf/record/FontRecord.java View File

@@ -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();

+ 0
- 10
src/java/org/apache/poi/hssf/record/FooterRecord.java View File

@@ -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)
{

+ 0
- 10
src/java/org/apache/poi/hssf/record/FormatRecord.java View File

@@ -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();

+ 0
- 13
src/java/org/apache/poi/hssf/record/FormulaRecord.java View File

@@ -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();

+ 0
- 12
src/java/org/apache/poi/hssf/record/FrameRecord.java View File

@@ -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();

+ 0
- 10
src/java/org/apache/poi/hssf/record/GridsetRecord.java View File

@@ -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();
}

+ 0
- 12
src/java/org/apache/poi/hssf/record/GroupMarkerSubRecord.java View File

@@ -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();

+ 0
- 10
src/java/org/apache/poi/hssf/record/GutsRecord.java View File

@@ -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();

+ 5
- 20
src/java/org/apache/poi/hssf/record/HCenterRecord.java View File

@@ -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,42 +14,28 @@
See the License for the specific language governing permissions and
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();
}


+ 0
- 10
src/java/org/apache/poi/hssf/record/HeaderRecord.java View File

@@ -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)
{

+ 0
- 10
src/java/org/apache/poi/hssf/record/HideObjRecord.java View File

@@ -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();
}

+ 1
- 11
src/java/org/apache/poi/hssf/record/HyperlinkRecord.java View File

@@ -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();

+ 0
- 10
src/java/org/apache/poi/hssf/record/IndexRecord.java View File

@@ -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

+ 4
- 16
src/java/org/apache/poi/hssf/record/InterfaceEndRecord.java View File

@@ -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,41 +14,30 @@
See the License for the specific language governing permissions and
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)
{
}


+ 0
- 10
src/java/org/apache/poi/hssf/record/InterfaceHdrRecord.java View File

@@ -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();
}

+ 0
- 10
src/java/org/apache/poi/hssf/record/IterationRecord.java View File

@@ -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();
}

+ 0
- 10
src/java/org/apache/poi/hssf/record/LabelRecord.java View File

@@ -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();

+ 0
- 9
src/java/org/apache/poi/hssf/record/LabelSSTRecord.java View File

@@ -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();

+ 1
- 9
src/java/org/apache/poi/hssf/record/LeftMarginRecord.java View File

@@ -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

+ 0
- 12
src/java/org/apache/poi/hssf/record/LegendRecord.java View File

@@ -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();

+ 0
- 12
src/java/org/apache/poi/hssf/record/LineFormatRecord.java View File

@@ -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
- 5
src/java/org/apache/poi/hssf/record/LinkedDataFormulaField.java View File

@@ -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,7 +14,6 @@
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */

package org.apache.poi.hssf.record;

@@ -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()

+ 1
- 13
src/java/org/apache/poi/hssf/record/LinkedDataRecord.java View File

@@ -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;
}


+ 0
- 10
src/java/org/apache/poi/hssf/record/MMSRecord.java View File

@@ -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();

+ 0
- 3
src/java/org/apache/poi/hssf/record/MergeCellsRecord.java View File

@@ -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.

+ 1
- 12
src/java/org/apache/poi/hssf/record/MulBlankRecord.java View File

@@ -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();

+ 1
- 10
src/java/org/apache/poi/hssf/record/MulRKRecord.java View File

@@ -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);

+ 1
- 10
src/java/org/apache/poi/hssf/record/NameRecord.java View File

@@ -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();

+ 1
- 13
src/java/org/apache/poi/hssf/record/NoteRecord.java View File

@@ -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();

+ 1
- 11
src/java/org/apache/poi/hssf/record/NoteStructureSubRecord.java View File

@@ -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();

+ 0
- 12
src/java/org/apache/poi/hssf/record/NumberFormatIndexRecord.java View File

@@ -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();
}

+ 0
- 10
src/java/org/apache/poi/hssf/record/NumberRecord.java View File

@@ -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();

+ 0
- 11
src/java/org/apache/poi/hssf/record/ObjRecord.java View File

@@ -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

+ 0
- 12
src/java/org/apache/poi/hssf/record/ObjectLinkRecord.java View File

@@ -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();

+ 0
- 10
src/java/org/apache/poi/hssf/record/ObjectProtectRecord.java View File

@@ -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();
}

+ 1
- 5
src/java/org/apache/poi/hssf/record/PageBreakRecord.java View File

@@ -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);

+ 0
- 0
src/java/org/apache/poi/hssf/record/PaletteRecord.java View File


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

Loading…
Cancel
Save