ソースを参照

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
tags/REL_3_7_BETA1
Maxim Valyanskiy 14年前
コミット
e53e3a376e
1個のファイルの変更7行の追加3行の削除
  1. 7
    3
      src/scratchpad/src/org/apache/poi/hwpf/model/PicturesTable.java

+ 7
- 3
src/scratchpad/src/org/apache/poi/hwpf/model/PicturesTable.java ファイルの表示

@@ -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()));
}
}
}


読み込み中…
キャンセル
保存