Package org.apache.poi.hssf.record
Class SharedFormulaRecord
- java.lang.Object
- 
- org.apache.poi.hssf.record.RecordBase
- 
- org.apache.poi.hssf.record.Record
- 
- org.apache.poi.hssf.record.StandardRecord
- 
- org.apache.poi.hssf.record.SharedValueRecordBase
- 
- org.apache.poi.hssf.record.SharedFormulaRecord
 
 
 
 
 
- 
- All Implemented Interfaces:
- Duplicatable,- GenericRecord
 
 public final class SharedFormulaRecord extends SharedValueRecordBase Primarily used as an excel optimization so that multiple similar formulas are not written out too many times. We should recognize this record and serialize as is since this is used when reading templates.Note: the documentation says that the SID is BC where biffviewer reports 4BC. The hex dump shows that the two byte sid representation to be 'BC 04' that is consistent with the other high byte record types. 
- 
- 
Field SummaryFields Modifier and Type Field Description static shortsid
 - 
Constructor SummaryConstructors Constructor Description SharedFormulaRecord()SharedFormulaRecord(RecordInputStream in)SharedFormulaRecord(SharedFormulaRecord other)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description SharedFormulaRecordcopy()protected intgetExtraDataSize()Ptg[]getFormulaTokens(FormulaRecord formula)Convert formula into an array ofPtgtokens.Map<String,Supplier<?>>getGenericProperties()HSSFRecordTypesgetGenericRecordType()shortgetSid()return the non static version of the id for this record.booleanisFormulaSame(SharedFormulaRecord other)protected voidserializeExtraData(LittleEndianOutput out)- 
Methods inherited from class org.apache.poi.hssf.record.SharedValueRecordBasegetDataSize, getFirstColumn, getFirstRow, getLastColumn, getLastRow, getRange, isFirstCell, isInRange, serialize
 - 
Methods inherited from class org.apache.poi.hssf.record.StandardRecordgetRecordSize, serialize
 - 
Methods inherited from class org.apache.poi.hssf.record.RecordcloneViaReserialise, serialize, toString
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface org.apache.poi.common.usermodel.GenericRecordgetGenericChildren
 
- 
 
- 
- 
- 
Field Detail- 
sidpublic static final short sid - See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
SharedFormulaRecordpublic SharedFormulaRecord() 
 - 
SharedFormulaRecordpublic SharedFormulaRecord(SharedFormulaRecord other) 
 - 
SharedFormulaRecordpublic SharedFormulaRecord(RecordInputStream in) - Parameters:
- in- the RecordInputstream to read the record from
 
 
- 
 - 
Method Detail- 
serializeExtraDataprotected void serializeExtraData(LittleEndianOutput out) - Specified by:
- serializeExtraDatain class- SharedValueRecordBase
 
 - 
getExtraDataSizeprotected int getExtraDataSize() - Specified by:
- getExtraDataSizein class- SharedValueRecordBase
 
 - 
getSidpublic short getSid() Description copied from class:Recordreturn the non static version of the id for this record.
 - 
getFormulaTokenspublic Ptg[] getFormulaTokens(FormulaRecord formula) Convert formula into an array ofPtgtokens.- Parameters:
- formula- The record to break into tokens, cannot be null
- Returns:
- the equivalent Ptgarray that the formula would have, were it not shared.
 
 - 
copypublic SharedFormulaRecord copy() - Specified by:
- copyin interface- Duplicatable
- Specified by:
- copyin class- StandardRecord
- Returns:
- a deep copy of the implementing class / instance
 
 - 
isFormulaSamepublic boolean isFormulaSame(SharedFormulaRecord other) 
 - 
getGenericRecordTypepublic HSSFRecordTypes getGenericRecordType() - Specified by:
- getGenericRecordTypein interface- GenericRecord
- Specified by:
- getGenericRecordTypein class- Record
 
 
- 
 
-