ftCmo.setReserved2(0);
ftCmo.setReserved3(0);
obj.addSubRecord(ftCmo);
// FtCf (pictFormat)
FtCfSubRecord ftCf = new FtCfSubRecord();
HSSFPictureData pictData = getSheet().getWorkbook().getAllPictures().get(pictureIndex-1);
switch (pictData.getFormat()) {
case HSSFWorkbook.PICTURE_TYPE_WMF:
case HSSFWorkbook.PICTURE_TYPE_EMF:
// this needs patch #49658 to be applied to actually work
ftCf.setFlags(FtCfSubRecord.METAFILE_BIT);
break;
case HSSFWorkbook.PICTURE_TYPE_DIB:
case HSSFWorkbook.PICTURE_TYPE_PNG:
case HSSFWorkbook.PICTURE_TYPE_JPEG:
case HSSFWorkbook.PICTURE_TYPE_PICT:
ftCf.setFlags(FtCfSubRecord.BITMAP_BIT);
break;
}
obj.addSubRecord(ftCf);
// FtPioGrbit (pictFlags)
FtPioGrbitSubRecord ftPioGrbit = new FtPioGrbitSubRecord();