Java Code Examples for org.apache.poi.hssf.record.EOFRecord#sid()

The following examples show how to use org.apache.poi.hssf.record.EOFRecord#sid() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RecordOrderer.java    From lams with GNU General Public License v2.0 6 votes vote down vote up
/**
 * @return <code>true</code> if the specified record ID terminates a sequence of Row block records
 * It is assumed that at least one row or cell value record has been found prior to the current
 * record
 */
public static boolean isEndOfRowBlock(int sid) {
	switch(sid) {
		case ViewDefinitionRecord.sid:
			// should have been prefixed with DrawingRecord (0x00EC), but bug 46280 seems to allow this
		case DrawingRecord.sid:
		case DrawingSelectionRecord.sid:
		case ObjRecord.sid:
		case TextObjectRecord.sid:
           case ColumnInfoRecord.sid: // See Bugzilla 53984
           case GutsRecord.sid:   // see Bugzilla 50426
		case WindowOneRecord.sid:
			// should really be part of workbook stream, but some apps seem to put this before WINDOW2
		case WindowTwoRecord.sid:
			return true;

		case DVALRecord.sid:
			return true;
		case EOFRecord.sid:
			// WINDOW2 should always be present, so shouldn't have got this far
			throw new RuntimeException("Found EOFRecord before WindowTwoRecord was encountered");
	}
	return PageSettingsBlock.isComponentRecord(sid);
}
 
Example 2
Source File: RowBlock.java    From dremio-oss with Apache License 2.0 6 votes vote down vote up
/**
 * @return <code>true</code> if the specified record ID terminates a sequence of Row block records
 * It is assumed that at least one row or cell value record has been found prior to the current
 * record
 */
static boolean isEndOfRowBlock(int sid) {
  switch(sid) {
    case ViewDefinitionRecord.sid:
      // should have been prefixed with DrawingRecord (0x00EC), but bug 46280 seems to allow this
    case DrawingRecord.sid:
    case DrawingSelectionRecord.sid:
    case ObjRecord.sid:
    case TextObjectRecord.sid:
    case ColumnInfoRecord.sid: // See Bugzilla 53984
    case GutsRecord.sid:   // see Bugzilla 50426
    case WindowOneRecord.sid:
      // should really be part of workbook stream, but some apps seem to put this before WINDOW2
    case WindowTwoRecord.sid:
      return true;

    case DVALRecord.sid:
      return true;
    case EOFRecord.sid:
      // WINDOW2 should always be present, so shouldn't have got this far
      throw new RuntimeException("Found EOFRecord before WindowTwoRecord was encountered");
  }
  return PageSettingsBlock.isComponentRecord(sid);
}
 
Example 3
Source File: RecordOrderer.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
private static boolean isDVTSubsequentRecord(short sid) {
	switch(sid) {
		case UnknownRecord.SHEETEXT_0862:
		case UnknownRecord.SHEETPROTECTION_0867:
		case UnknownRecord.PLV_MAC:
		case FeatRecord.sid:
		case EOFRecord.sid:
			return true;
	}
	return false;
}
 
Example 4
Source File: EofRecordHandler.java    From easyexcel with Apache License 2.0 4 votes vote down vote up
@Override
public boolean couldDecode(Record record) {
	return EOFRecord.sid == record.getSid();
}