Top Description Fields Constructors Methods
org.apache.poi.hssf.record

public final Class EmbeddedObjectRefSubRecord

extends SubRecord
Class Inheritance
Imports
java.io.IOException, java.util.Map, java.util.function.Supplier, org.apache.commons.io.input.UnsynchronizedByteArrayInputStream, org.apache.logging.log4j.LogManager, .Logger, org.apache.poi.hssf.usermodel.HSSFWorkbook, org.apache.poi.ss.formula.ptg.Area3DPtg, .AreaPtg, .Ptg, .Ref3DPtg, .RefPtg, org.apache.poi.util.GenericRecordUtil, .IOUtils, .LittleEndianConsts, .LittleEndianInput, .LittleEndianInputStream, .LittleEndianOutput, .RecordFormatException, .StringUtil

ftPictFmla (0x0009)

A sub-record within the OBJ record which stores a reference to an object stored in a separate entry within the OLE2 compound file.

Field Summary

Modifier and TypeField and Description
private static final byte[]
private int
private Ptg
field_2_refPtg

either an area or a cell ref

private byte[]
field_2_unknownFormulaData

for when the 'formula' doesn't parse properly

private boolean
field_3_unicode_flag

note- this byte is not present in the encoding if the string length is zero

private String
private Byte
field_4_unknownByte

Formulas often have a single non-zero trailing byte.

private Integer
private byte[]
private static final Logger
public static final short

Constructor Summary

AccessConstructor and Description
public
public
public
pack-priv

Method Summary

Modifier and TypeMethod and Description
public EmbeddedObjectRefSubRecord
private int
getDataSize(int idOffset)

protected int
public Map<String, Supplier<?>>
public SubRecord.SubRecordTypes
public byte[]
public String
public short
public Integer

Returns:

the data stream ID. Possibly null
getStreamId
()

Gets the stream ID containing the actual data.

private int
getStreamIDOffset(int formulaSize)

private static byte[]
private static Ptg
readRefPtg(byte[] formulaRawBytes)

public void
public void
setOleClassname(String oleClassname)

public void
setStorageId(int storageId)

public void
setUnknownFormulaData(byte[] formularData)

Inherited from org.apache.poi.hssf.record.SubRecord:
createSubRecordgetMaxRecordLengthisTerminatingserializesetMaxRecordLengthtoString

Field Detail

EMPTY_BYTE_ARRAYback to summary
private static final byte[] EMPTY_BYTE_ARRAY
field_1_unknown_intback to summary
private int field_1_unknown_int
field_2_refPtgback to summary
private Ptg field_2_refPtg

either an area or a cell ref

field_2_unknownFormulaDataback to summary
private byte[] field_2_unknownFormulaData

for when the 'formula' doesn't parse properly

field_3_unicode_flagback to summary
private boolean field_3_unicode_flag

note- this byte is not present in the encoding if the string length is zero

field_4_ole_classnameback to summary
private String field_4_ole_classname
field_4_unknownByteback to summary
private Byte field_4_unknownByte

Formulas often have a single non-zero trailing byte. This is in a similar position to he pre-streamId padding It is unknown if the value is important (it seems to mirror a value a few bytes earlier)

field_5_stream_idback to summary
private Integer field_5_stream_id
field_6_unknownback to summary
private byte[] field_6_unknown
LOGback to summary
private static final Logger LOG
sidback to summary
public static final short sid

Constructor Detail

EmbeddedObjectRefSubRecordback to summary
public EmbeddedObjectRefSubRecord()
EmbeddedObjectRefSubRecordback to summary
public EmbeddedObjectRefSubRecord(EmbeddedObjectRefSubRecord other)
EmbeddedObjectRefSubRecordback to summary
public EmbeddedObjectRefSubRecord(LittleEndianInput in, int size)
EmbeddedObjectRefSubRecordback to summary
pack-priv EmbeddedObjectRefSubRecord(LittleEndianInput in, int size, int cmoOt)

Method Detail

copyback to summary
public EmbeddedObjectRefSubRecord copy()

Implements abstract org.apache.poi.hssf.record.SubRecord.copy.

Implements org.apache.poi.common.Duplicatable.copy.

Returns:EmbeddedObjectRefSubRecord

Doc from org.apache.poi.common.Duplicatable.copy.

a deep copy of the implementing class / instance

Annotations
@Override
getDataSizeback to summary
private int getDataSize(int idOffset)
getDataSizeback to summary
protected int getDataSize()

Implements abstract org.apache.poi.hssf.record.SubRecord.getDataSize.

Returns:int

Doc from org.apache.poi.hssf.record.SubRecord.getDataSize.

the size of the data for this record (which is always 4 bytes less than the total record size). Note however, that ushort encoded after the record sid is usually but not always the data size.

getGenericPropertiesback to summary
public Map<String, Supplier<?>> getGenericProperties()

Implements org.apache.poi.common.usermodel.GenericRecord.getGenericProperties.

Annotations
@Override
getGenericRecordTypeback to summary
public SubRecord.SubRecordTypes getGenericRecordType()

Overrides default org.apache.poi.common.usermodel.GenericRecord.getGenericRecordType.

Implements abstract org.apache.poi.hssf.record.SubRecord.getGenericRecordType.

Annotations
@Override
getObjectDataback to summary
public byte[] getObjectData()
getOLEClassNameback to summary
public String getOLEClassName()
getSidback to summary
public short getSid()
getStreamIdback to summary
public Integer getStreamId()

Gets the stream ID containing the actual data. The data itself can be found under a top-level directory entry in the OLE2 filesystem under the name "MBDxxxxxxxx" where xxxxxxxx is this ID converted into hex (in big endian order, funnily enough.)

Returns:Integer

the data stream ID. Possibly null

getStreamIDOffsetback to summary
private int getStreamIDOffset(int formulaSize)
readRawDataback to summary
private static byte[] readRawData(LittleEndianInput in, int size)
readRefPtgback to summary
private static Ptg readRefPtg(byte[] formulaRawBytes)
serializeback to summary
public void serialize(LittleEndianOutput out)

Implements abstract org.apache.poi.hssf.record.SubRecord.serialize.

setOleClassnameback to summary
public void setOleClassname(String oleClassname)
setStorageIdback to summary
public void setStorageId(int storageId)
setUnknownFormulaDataback to summary
public void setUnknownFormulaData(byte[] formularData)