mirror of
https://github.com/apache/poi.git
synced 2026-02-27 20:40:08 +08:00
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,9 +168,13 @@ 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);
|
||||
pictures.add(new Picture(blip.getPicturedata()));
|
||||
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()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user