/** * Add a shape to this group. * * @param shape - the Shape to add */ @Override public void addShape(HSLFShape shape){ getSpContainer().addChildRecord(shape.getSpContainer()); HSLFSheet sheet = getSheet(); shape.setSheet(sheet); shape.setShapeId(sheet.allocateShapeId()); shape.afterInsert(sheet); }
/** * Add a new Shape to this Slide * * @param shape - the Shape to add */ @Override public void addShape(HSLFShape shape) { PPDrawing ppdrawing = getPPDrawing(); EscherContainerRecord dgContainer = ppdrawing.getDgContainer(); EscherContainerRecord spgr = HSLFShape.getEscherChild(dgContainer, EscherContainerRecord.SPGR_CONTAINER); spgr.addChildRecord(shape.getSpContainer()); shape.setSheet(this); shape.setShapeId(allocateShapeId()); shape.afterInsert(this); }