mirror of https://github.com/apache/poi.git
bugfix: ClassCastException it PicturesTable.getAllPictures():
UnknownEscherRecord cannot be cast to EscherBlipRecord git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@931111 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c8d66033f0
commit
e53e3a376e
|
@ -168,11 +168,15 @@ public final class PicturesTable
|
|||
{
|
||||
// Blip stored in delay stream, which in a word doc, is the main stream
|
||||
EscherRecordFactory recordFactory = new DefaultEscherRecordFactory();
|
||||
blip = (EscherBlipRecord) recordFactory.createRecord(_mainStream, bse.getOffset());
|
||||
blip.fillFields(_mainStream, bse.getOffset(), recordFactory);
|
||||
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()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Recursive call.
|
||||
searchForPictures(escherRecord.getChildRecords(), pictures);
|
||||
|
|
Loading…
Reference in New Issue