Examples of EscherBlipRecord


Examples of org.apache.poi.ddf.EscherBlipRecord

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

          // Recursive call.
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.