Exemplo n.º 1
0
    /**
     * Add a new Shape to this Slide
     *
     * @param shape - the Shape to add
     */
    public void AddShape(Shape shape) {
        PPDrawing ppdrawing = GetPPDrawing();

        EscherContainerRecord dgContainer = (EscherContainerRecord) ppdrawing.GetEscherRecords()[0];
        EscherContainerRecord spgr = (EscherContainerRecord) Shape.GetEscherChild(dgContainer, EscherContainerRecord.SPGR_CONTAINER);
        spgr.AddChildRecord(shape.GetSpContainer());

        shape.SetSheet(this);
        shape.SetShapeId(allocateShapeId());
        shape.afterInsert(this);
    }
Exemplo n.º 2
0
    /**
     * Add a shape to this group.
     *
     * @param shape - the Shape to add
     */
    public void AddShape(Shape shape){
        _escherContainer.AddChildRecord(shape.GetSpContainer());

        Sheet sheet = Sheet;
        shape.SetSheet(sheet);
        shape.SetShapeId(sheet.allocateShapeId());
        shape.afterInsert(sheet);
    }