* @param escherRecords the escher records.
* @param pictures the list to populate with the pictures.
*/
- private void searchForPictures(List escherRecords, List<HSSFPictureData> pictures)
+ private void searchForPictures(List<EscherRecord> escherRecords, List<HSSFPictureData> pictures)
{
- Iterator recordIter = escherRecords.iterator();
- while (recordIter.hasNext())
- {
- Object obj = recordIter.next();
- if (obj instanceof EscherRecord)
- {
- EscherRecord escherRecord = (EscherRecord) obj;
-
- if (escherRecord instanceof EscherBSERecord)
- {
- EscherBlipRecord blip = ((EscherBSERecord) escherRecord).getBlipRecord();
- if (blip != null)
- {
- // TODO: Some kind of structure.
- pictures.add(new HSSFPictureData(blip));
- }
- }
-
- // Recursive call.
- searchForPictures(escherRecord.getChildRecords(), pictures);
- }
+ for(EscherRecord escherRecord : escherRecords) {
+ if (escherRecord instanceof EscherBSERecord)
+ {
+ EscherBlipRecord blip = ((EscherBSERecord) escherRecord).getBlipRecord();
+ if (blip != null)
+ {
+ // TODO: Some kind of structure.
+ pictures.add(new HSSFPictureData(blip));
+ }
+ }
+
+ // Recursive call.
+ searchForPictures(escherRecord.getChildRecords(), pictures);
}
}