org.apache.poi.hssf.record.ObjRecord Java Examples
The following examples show how to use
org.apache.poi.hssf.record.ObjRecord.
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: HSSFComment.java From lams with GNU General Public License v2.0 | 6 votes |
@Override protected ObjRecord createObjRecord() { ObjRecord obj = new ObjRecord(); CommonObjectDataSubRecord c = new CommonObjectDataSubRecord(); c.setObjectType(OBJECT_TYPE_COMMENT); c.setLocked(true); c.setPrintable(true); c.setAutofill(false); c.setAutoline(true); NoteStructureSubRecord u = new NoteStructureSubRecord(); EndSubRecord e = new EndSubRecord(); obj.addSubRecord(c); obj.addSubRecord(u); obj.addSubRecord(e); return obj; }
Example #2
Source File: RecordOrderer.java From lams with GNU General Public License v2.0 | 6 votes |
/** * @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 #3
Source File: RowBlock.java From dremio-oss with Apache License 2.0 | 6 votes |
/** * @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 #4
Source File: ObjRecordHandler.java From easyexcel with Apache License 2.0 | 5 votes |
@Override public void processRecord(XlsReadContext xlsReadContext, Record record) { ObjRecord or = (ObjRecord)record; for (SubRecord subRecord : or.getSubRecords()) { if (subRecord instanceof CommonObjectDataSubRecord) { CommonObjectDataSubRecord codsr = (CommonObjectDataSubRecord)subRecord; if (CommonObjectDataSubRecord.OBJECT_TYPE_COMMENT == codsr.getObjectType()) { xlsReadContext.xlsReadSheetHolder().setTempObjectIndex(codsr.getObjectId()); } break; } } }
Example #5
Source File: HSSFComment.java From lams with GNU General Public License v2.0 | 5 votes |
@Override protected HSSFShape cloneShape() { TextObjectRecord txo = (TextObjectRecord) getTextObjectRecord().cloneViaReserialise(); EscherContainerRecord spContainer = new EscherContainerRecord(); byte [] inSp = getEscherContainer().serialize(); spContainer.fillFields(inSp, 0, new DefaultEscherRecordFactory()); ObjRecord obj = (ObjRecord) getObjRecord().cloneViaReserialise(); NoteRecord note = (NoteRecord) getNoteRecord().cloneViaReserialise(); return new HSSFComment(spContainer, obj, txo, note); }
Example #6
Source File: HSSFSimpleShape.java From lams with GNU General Public License v2.0 | 5 votes |
@Override protected ObjRecord createObjRecord() { ObjRecord obj = new ObjRecord(); CommonObjectDataSubRecord c = new CommonObjectDataSubRecord(); c.setLocked(true); c.setPrintable(true); c.setAutofill(true); c.setAutoline(true); EndSubRecord e = new EndSubRecord(); obj.addSubRecord(c); obj.addSubRecord(e); return obj; }
Example #7
Source File: HSSFShapeFactory.java From lams with GNU General Public License v2.0 | 5 votes |
private static boolean isEmbeddedObject(ObjRecord obj) { for (SubRecord sub : obj.getSubRecords()) { if (sub instanceof EmbeddedObjectRefSubRecord) { return true; } } return false; }
Example #8
Source File: HSSFPicture.java From lams with GNU General Public License v2.0 | 5 votes |
@Override protected HSSFShape cloneShape() { EscherContainerRecord spContainer = new EscherContainerRecord(); byte [] inSp = getEscherContainer().serialize(); spContainer.fillFields(inSp, 0, new DefaultEscherRecordFactory()); ObjRecord obj = (ObjRecord) getObjRecord().cloneViaReserialise(); return new HSSFPicture(spContainer, obj); }
Example #9
Source File: HSSFShape.java From lams with GNU General Public License v2.0 | 5 votes |
/** * creates shapes from existing file * @param spContainer * @param objRecord */ public HSSFShape(EscherContainerRecord spContainer, ObjRecord objRecord) { this._escherContainer = spContainer; this._objRecord = objRecord; this._optRecord = spContainer.getChildById(EscherOptRecord.RECORD_ID); this.anchor = HSSFAnchor.createAnchorFromEscher(spContainer); }
Example #10
Source File: HSSFComment.java From lams with GNU General Public License v2.0 | 4 votes |
public HSSFComment(EscherContainerRecord spContainer, ObjRecord objRecord, TextObjectRecord textObjectRecord, NoteRecord note) { super(spContainer, objRecord, textObjectRecord); _note = note; }
Example #11
Source File: HSSFSimpleShape.java From lams with GNU General Public License v2.0 | 4 votes |
public HSSFSimpleShape(EscherContainerRecord spContainer, ObjRecord objRecord, TextObjectRecord textObjectRecord) { super(spContainer, objRecord); this._textObjectRecord = textObjectRecord; }
Example #12
Source File: HSSFSimpleShape.java From lams with GNU General Public License v2.0 | 4 votes |
public HSSFSimpleShape(EscherContainerRecord spContainer, ObjRecord objRecord) { super(spContainer, objRecord); }
Example #13
Source File: HSSFPicture.java From lams with GNU General Public License v2.0 | 4 votes |
public HSSFPicture(EscherContainerRecord spContainer, ObjRecord objRecord) { super(spContainer, objRecord); }
Example #14
Source File: HSSFShape.java From lams with GNU General Public License v2.0 | 4 votes |
protected ObjRecord getObjRecord() { return _objRecord; }
Example #15
Source File: HSSFShape.java From lams with GNU General Public License v2.0 | votes |
protected abstract ObjRecord createObjRecord();