Examples of HSSFShape


Examples of org.apache.poi.hssf.usermodel.HSSFShape

        }
        else if(r instanceof EscherClientAnchorRecord) {
          EscherClientAnchorRecord car = (EscherClientAnchorRecord)r;
         
          if(model instanceof HSSFShape) {
            HSSFShape g = (HSSFShape)model;
            g.getAnchor().setDx1(car.getDx1());
            g.getAnchor().setDx2(car.getDx2());
            g.getAnchor().setDy1(car.getDy1());
            g.getAnchor().setDy2(car.getDy2());
          } else {
            throw new IllegalStateException("Got top level anchor but not processing a group or shape");
          }
        }
        else if(r instanceof EscherTextboxRecord) {
View Full Code Here

Examples of org.apache.poi.hssf.usermodel.HSSFShape

        if ( escherParent == null ) throw new IllegalArgumentException( "Parent record required" );

        List shapes = parent.getChildren();
        for ( Iterator iterator = shapes.iterator(); iterator.hasNext(); )
        {
            HSSFShape shape = (HSSFShape) iterator.next();
            if ( shape instanceof HSSFShapeGroup )
            {
                convertGroup( (HSSFShapeGroup) shape, escherParent, shapeToObj );
            }
            else
View Full Code Here

Examples of org.apache.poi.hssf.usermodel.HSSFShape

      }
      else if(r instanceof EscherClientAnchorRecord) {
        EscherClientAnchorRecord car = (EscherClientAnchorRecord)r;

        if(model instanceof HSSFShape) {
          HSSFShape g = (HSSFShape)model;
          g.getAnchor().setDx1(car.getDx1());
          g.getAnchor().setDx2(car.getDx2());
          g.getAnchor().setDy1(car.getDy1());
          g.getAnchor().setDy2(car.getDy2());
        } else {
          throw new IllegalStateException("Got top level anchor but not processing a group or shape");
        }
      }
      else if(r instanceof EscherTextboxRecord) {
View Full Code Here

Examples of org.apache.poi.hssf.usermodel.HSSFShape

    if ( escherParent == null ) throw new IllegalArgumentException( "Parent record required" );

    List shapes = parent.getChildren();
    for ( Iterator iterator = shapes.iterator(); iterator.hasNext(); )
    {
      HSSFShape shape = (HSSFShape) iterator.next();
      if ( shape instanceof HSSFShapeGroup )
      {
        convertGroup( (HSSFShapeGroup) shape, escherParent, shapeToObj );
      }
      else
View Full Code Here

Examples of org.apache.poi.hssf.usermodel.HSSFShape

     * @param hssfShape
     * @param shapeId
     */
    private EscherContainerRecord createSpContainer( HSSFSimpleShape hssfShape, int shapeId )
    {
        HSSFShape shape = hssfShape;

        EscherContainerRecord spContainer = new EscherContainerRecord();
        EscherSpRecord sp = new EscherSpRecord();
        EscherOptRecord opt = new EscherOptRecord();
        EscherClientDataRecord clientData = new EscherClientDataRecord();

        spContainer.setRecordId( EscherContainerRecord.SP_CONTAINER );
        spContainer.setOptions( (short) 0x000F );
        sp.setRecordId( EscherSpRecord.RECORD_ID );
        short shapeType = objTypeToShapeType( hssfShape.getShapeType() );
        sp.setOptions( (short) ( ( shapeType << 4 ) | 0x2 ) );
        sp.setShapeId( shapeId );
        sp.setFlags( EscherSpRecord.FLAG_HAVEANCHOR | EscherSpRecord.FLAG_HASSHAPETYPE );
        opt.setRecordId( EscherOptRecord.RECORD_ID );
        addStandardOptions(shape, opt);
        EscherRecord anchor = createAnchor( shape.getAnchor() );
        clientData.setRecordId( EscherClientDataRecord.RECORD_ID );
        clientData.setOptions( (short) 0x0000 );

        spContainer.addChildRecord( sp );
        spContainer.addChildRecord( opt );
View Full Code Here

Examples of org.apache.poi.hssf.usermodel.HSSFShape

    /**
     * Creates the low level OBJ record for this shape.
     */
    private ObjRecord createObjRecord( HSSFShape hssfShape, int shapeId )
    {
        HSSFShape shape = hssfShape;

        ObjRecord obj = new ObjRecord();
        CommonObjectDataSubRecord c = new CommonObjectDataSubRecord();
        c.setObjectType( (short) ( (HSSFSimpleShape) shape ).getShapeType() );
        c.setObjectIdgetCmoObjectId(shapeId) );
View Full Code Here

Examples of org.apache.poi.hssf.usermodel.HSSFShape

      }
      else if(r instanceof EscherClientAnchorRecord) {
        EscherClientAnchorRecord car = (EscherClientAnchorRecord)r;

        if(model instanceof HSSFShape) {
          HSSFShape g = (HSSFShape)model;
          g.getAnchor().setDx1(car.getDx1());
          g.getAnchor().setDx2(car.getDx2());
          g.getAnchor().setDy1(car.getDy1());
          g.getAnchor().setDy2(car.getDy2());
        } else {
          throw new IllegalStateException("Got top level anchor but not processing a group or shape");
        }
      }
      else if(r instanceof EscherTextboxRecord) {
View Full Code Here

Examples of org.apache.poi.hssf.usermodel.HSSFShape

    if ( escherParent == null ) throw new IllegalArgumentException( "Parent record required" );

    List shapes = parent.getChildren();
    for ( Iterator iterator = shapes.iterator(); iterator.hasNext(); )
    {
      HSSFShape shape = (HSSFShape) iterator.next();
      if ( shape instanceof HSSFShapeGroup )
      {
        convertGroup( (HSSFShapeGroup) shape, escherParent, shapeToObj );
      }
      else
View Full Code Here

Examples of org.apache.poi.hssf.usermodel.HSSFShape

        }
        else if(r instanceof EscherClientAnchorRecord) {
          EscherClientAnchorRecord car = (EscherClientAnchorRecord)r;
         
          if(model instanceof HSSFShape) {
            HSSFShape g = (HSSFShape)model;
            g.getAnchor().setDx1(car.getDx1());
            g.getAnchor().setDx2(car.getDx2());
            g.getAnchor().setDy1(car.getDy1());
            g.getAnchor().setDy2(car.getDy2());
          } else {
            throw new IllegalStateException("Got top level anchor but not processing a group or shape");
          }
        }
        else if(r instanceof EscherTextboxRecord) {
View Full Code Here

Examples of org.apache.poi.hssf.usermodel.HSSFShape

        if ( escherParent == null ) throw new IllegalArgumentException( "Parent record required" );

        List shapes = parent.getChildren();
        for ( Iterator iterator = shapes.iterator(); iterator.hasNext(); )
        {
            HSSFShape shape = (HSSFShape) iterator.next();
            if ( shape instanceof HSSFShapeGroup )
            {
                convertGroup( (HSSFShapeGroup) shape, escherParent, shapeToObj );
            }
            else
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.