Examples of EscherRecord


Examples of org.apache.poi.ddf.EscherRecord

            shape,
            drawingManager.allocateShapeId(drawingGroupId) );
        shapeToObj.put( findClientData( shapeModel.getSpContainer() ), shapeModel.getObjRecord() );
        if ( shapeModel instanceof TextboxShape )
        {
          EscherRecord escherTextbox = ( (TextboxShape) shapeModel ).getEscherTextbox();
          shapeToObj.put( escherTextbox, ( (TextboxShape) shapeModel ).getTextObjectRecord() );
          //          escherParent.addChildRecord(escherTextbox);
         
          if ( shapeModel instanceof CommentShape ){
            CommentShape comment = (CommentShape)shapeModel;
View Full Code Here

Examples of org.apache.poi.ddf.EscherRecord

    EscherContainerRecord spgrContainer = new EscherContainerRecord();
    EscherContainerRecord spContainer = new EscherContainerRecord();
    EscherSpgrRecord spgr = new EscherSpgrRecord();
    EscherSpRecord sp = new EscherSpRecord();
    EscherOptRecord opt = new EscherOptRecord();
    EscherRecord anchor;
    EscherClientDataRecord clientData = new EscherClientDataRecord();

    spgrContainer.setRecordId( EscherContainerRecord.SPGR_CONTAINER );
    spgrContainer.setOptions( (short) 0x000F );
    spContainer.setRecordId( EscherContainerRecord.SP_CONTAINER );
View Full Code Here

Examples of org.apache.poi.ddf.EscherRecord

  }

  private EscherRecord findClientData( EscherContainerRecord spContainer )
  {
    for (Iterator<EscherRecord> iterator = spContainer.getChildIterator(); iterator.hasNext();) {
      EscherRecord r = iterator.next();
      if (r.getRecordId() == EscherClientDataRecord.RECORD_ID) {
        return r;
      }
    }
    throw new IllegalArgumentException( "Can not find client data record" );
  }
View Full Code Here

Examples of org.apache.poi.ddf.EscherRecord

        {
            byte[] buffer = new byte[getRawDataSize()];
            int pos = 0;
            for ( Iterator iterator = getEscherRecords().iterator(); iterator.hasNext(); )
            {
                EscherRecord r = (EscherRecord) iterator.next();
                pos += r.serialize(pos, buffer, new NullEscherSerializationListener() );
            }

            return writeData( offset, data, buffer );
        }
    }
View Full Code Here

Examples of org.apache.poi.ddf.EscherRecord

            return rawData.length;
        }
        int size = 0;
        for ( Iterator iterator = escherRecords.iterator(); iterator.hasNext(); )
        {
            EscherRecord r = (EscherRecord) iterator.next();
            size += r.getRecordSize();
        }
        return size;
    }
View Full Code Here

Examples of org.apache.poi.ddf.EscherRecord

        EscherAggregate r = (EscherAggregate) getSheet().findFirstRecordBySid(EscherAggregate.sid);
        List<EscherRecord> escherRecords = r.getEscherRecords();
        PrintWriter w = new PrintWriter(System.out);
        for (Iterator<EscherRecord> iterator = escherRecords.iterator(); iterator.hasNext();) {
            EscherRecord escherRecord = iterator.next();
            if (fat) {
        System.out.println(escherRecord.toString());
      } else {
        escherRecord.display(w, 0);
      }
        }
        w.flush();
    }
View Full Code Here

Examples of org.apache.poi.ddf.EscherRecord

        r.decode();
        List escherRecords = r.getEscherRecords();
        PrintWriter w = new PrintWriter(System.out);
        for ( Iterator iterator = escherRecords.iterator(); iterator.hasNext(); )
        {
            EscherRecord escherRecord = (EscherRecord) iterator.next();
            if (fat)
                System.out.println(escherRecord.toString());
            else
                escherRecord.display(w, 0);
        }
        w.flush();
    }
View Full Code Here

Examples of org.apache.poi.ddf.EscherRecord

        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);
            }
        }
    }
View Full Code Here

Examples of org.apache.poi.ddf.EscherRecord

    {
        EscherRecordFactory recordFactory = new DefaultEscherRecordFactory();
        int pos = offset;
        while ( pos < offset + size )
        {
            EscherRecord r = recordFactory.createRecord(data, pos);
            int bytesRead = r.fillFields(data, pos, recordFactory );
            escherRecords.add(r);
            pos += bytesRead;
        }
    }
View Full Code Here

Examples of org.apache.poi.ddf.EscherRecord

        buffer.append('[' + getRecordName() + ']' + nl);
        if (escherRecords.size() == 0)
            buffer.append("No Escher Records Decoded" + nl);
        for ( Iterator iterator = escherRecords.iterator(); iterator.hasNext(); )
        {
            EscherRecord r = (EscherRecord) iterator.next();
            buffer.append(r.toString());
        }
        buffer.append("[/" + getRecordName() + ']' + nl);

        return buffer.toString();
    }
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.