*/
private void searchForPictures(List<EscherRecord> escherRecords, List<Picture> pictures)
{
for(EscherRecord escherRecord : escherRecords) {
if (escherRecord instanceof EscherBSERecord) {
EscherBSERecord bse = (EscherBSERecord) escherRecord;
EscherBlipRecord blip = bse.getBlipRecord();
if (blip != null)
{
pictures.add(new Picture(blip.getPicturedata()));
}
else if (bse.getOffset() > 0)
{
// Blip stored in delay stream, which in a word doc, is the main stream
EscherRecordFactory recordFactory = new DefaultEscherRecordFactory();
EscherRecord record = recordFactory.createRecord(_mainStream, bse.getOffset());
if (record instanceof EscherBlipRecord) {
record.fillFields(_mainStream, bse.getOffset(), recordFactory);
blip = (EscherBlipRecord) record;
pictures.add(new Picture(blip.getPicturedata()));
}
}
}