dggContainer.addChildBefore(bstore, EscherOptRecord.RECORD_ID);
} else {
Iterator<EscherRecord> iter = bstore.getChildIterator();
for (int i = 0; iter.hasNext(); i++) {
EscherBSERecord bse = (EscherBSERecord) iter.next();
if (Arrays.equals(bse.getUid(), uid)) {
return i + 1;
}
}
}
PictureData pict = PictureData.create(format);
pict.setData(data);
int offset = _hslfSlideShow.addPicture(pict);
EscherBSERecord bse = new EscherBSERecord();
bse.setRecordId(EscherBSERecord.RECORD_ID);
bse.setOptions((short) (0x0002 | (format << 4)));
bse.setSize(pict.getRawData().length + 8);
bse.setUid(uid);
bse.setBlipTypeMacOS((byte) format);
bse.setBlipTypeWin32((byte) format);
if (format == Picture.EMF)
bse.setBlipTypeMacOS((byte) Picture.PICT);
else if (format == Picture.WMF)
bse.setBlipTypeMacOS((byte) Picture.PICT);
else if (format == Picture.PICT)
bse.setBlipTypeWin32((byte) Picture.WMF);
bse.setRef(0);
bse.setOffset(offset);
bse.setRemainingData(new byte[0]);
bstore.addChildRecord(bse);
int count = bstore.getChildRecords().size();
bstore.setOptions((short) ((count << 4) | 0xF));