use of org.apache.poi.hssf.record.AbstractEscherHolderRecord in project poi by apache.
the class HSSFWorkbook method getAllPictures.
/**
* Gets all pictures from the Workbook.
*
* @return the list of pictures (a list of {@link HSSFPictureData} objects.)
*/
@Override
public List<HSSFPictureData> getAllPictures() {
// The drawing group record always exists at the top level, so we won't need to do this recursively.
List<HSSFPictureData> pictures = new ArrayList<HSSFPictureData>();
for (Record r : workbook.getRecords()) {
if (r instanceof AbstractEscherHolderRecord) {
((AbstractEscherHolderRecord) r).decode();
List<EscherRecord> escherRecords = ((AbstractEscherHolderRecord) r).getEscherRecords();
searchForPictures(escherRecords, pictures);
}
}
return Collections.unmodifiableList(pictures);
}
Aggregations