/** * Creates a picture. * * @param anchor the client anchor describes how this group is attached * to the sheet. * @param pictureIndex - pointer to the byte array saved inside workbook in escher bse record * @return the newly created shape. */ public HSSFPicture createPicture(HSSFClientAnchor anchor, int pictureIndex) { HSSFPicture shape = new HSSFPicture(null, anchor); shape.setPictureIndex(pictureIndex); addShape(shape); //open existing file onCreate(shape); return shape; }
@Override protected HSSFShape cloneShape() { EscherContainerRecord spContainer = new EscherContainerRecord(); byte [] inSp = getEscherContainer().serialize(); spContainer.fillFields(inSp, 0, new DefaultEscherRecordFactory()); ObjRecord obj = (ObjRecord) getObjRecord().cloneViaReserialise(); return new HSSFPicture(spContainer, obj); }
/** * Creates a picture. * * @param anchor the client anchor describes how this group is attached * to the sheet. * @return the newly created shape. */ public HSSFPicture createPicture(HSSFChildAnchor anchor, int pictureIndex) { HSSFPicture shape = new HSSFPicture(this, anchor); shape.setParent(this); shape.setAnchor(anchor); shape.setPictureIndex(pictureIndex); shapes.add(shape); onCreate(shape); EscherSpRecord sp = shape.getEscherContainer().getChildById(EscherSpRecord.RECORD_ID); if (shape.getAnchor().isHorizontallyFlipped()){ sp.setFlags(sp.getFlags() | EscherSpRecord.FLAG_FLIPHORIZ); } if (shape.getAnchor().isVerticallyFlipped()){ sp.setFlags(sp.getFlags() | EscherSpRecord.FLAG_FLIPVERT); } return shape; }
switch (cmo.getObjectType()) { case CommonObjectDataSubRecord.OBJECT_TYPE_PICTURE: shape = new HSSFPicture(container, objRecord); break; case CommonObjectDataSubRecord.OBJECT_TYPE_RECTANGLE:
HSSFPicture shape = new HSSFPicture(null, (HSSFClientAnchor)anchor); shape.setPictureIndex(pictureIndex); EscherContainerRecord spContainer = shape.getEscherContainer();
/** * Creates a picture. * * @param anchor the client anchor describes how this group is attached * to the sheet. * @return the newly created shape. */ public HSSFPicture createPicture(HSSFChildAnchor anchor, int pictureIndex) { HSSFPicture shape = new HSSFPicture(this, anchor); shape.anchor = anchor; shape.setPictureIndex( pictureIndex ); shapes.add(shape); return shape; } /**
/** * Creates a picture. * * @param anchor the client anchor describes how this group is attached * to the sheet. * @param pictureIndex - pointer to the byte array saved inside workbook in escher bse record * @return the newly created shape. */ public HSSFPicture createPicture(HSSFClientAnchor anchor, int pictureIndex) { HSSFPicture shape = new HSSFPicture(null, anchor); shape.setPictureIndex(pictureIndex); addShape(shape); //open existing file onCreate(shape); return shape; }
/** * Creates a picture. * * @param anchor the client anchor describes how this group is attached * to the sheet. * @param pictureIndex - pointer to the byte array saved inside workbook in escher bse record * @return the newly created shape. */ public HSSFPicture createPicture(HSSFClientAnchor anchor, int pictureIndex) { HSSFPicture shape = new HSSFPicture(null, anchor); shape.setPictureIndex(pictureIndex); addShape(shape); //open existing file onCreate(shape); return shape; }
@Override protected HSSFShape cloneShape() { EscherContainerRecord spContainer = new EscherContainerRecord(); byte [] inSp = getEscherContainer().serialize(); spContainer.fillFields(inSp, 0, new DefaultEscherRecordFactory()); ObjRecord obj = (ObjRecord) getObjRecord().cloneViaReserialise(); return new HSSFPicture(spContainer, obj); }
@Override protected HSSFShape cloneShape() { EscherContainerRecord spContainer = new EscherContainerRecord(); byte [] inSp = getEscherContainer().serialize(); spContainer.fillFields(inSp, 0, new DefaultEscherRecordFactory()); ObjRecord obj = (ObjRecord) getObjRecord().cloneViaReserialise(); return new HSSFPicture(spContainer, obj); } }
/** * Creates a picture. * * @param anchor the client anchor describes how this group is attached * to the sheet. * @return the newly created shape. */ public HSSFPicture createPicture(HSSFClientAnchor anchor, int pictureIndex) { HSSFPicture shape = new HSSFPicture(null, anchor); shape.setPictureIndex( pictureIndex ); shape.anchor = anchor; addShape(shape); EscherBSERecord bse = _sheet.getWorkbook().getWorkbook().getBSERecord(pictureIndex); bse.setRef(bse.getRef() + 1); return shape; }
/** * Creates a picture. * * @param anchor the client anchor describes how this group is attached * to the sheet. * @return the newly created shape. */ public HSSFPicture createPicture(HSSFChildAnchor anchor, int pictureIndex) { HSSFPicture shape = new HSSFPicture(this, anchor); shape.setParent(this); shape.setAnchor(anchor); shape.setPictureIndex(pictureIndex); shapes.add(shape); onCreate(shape); EscherSpRecord sp = shape.getEscherContainer().getChildById(EscherSpRecord.RECORD_ID); if (shape.getAnchor().isHorizontallyFlipped()){ sp.setFlags(sp.getFlags() | EscherSpRecord.FLAG_FLIPHORIZ); } if (shape.getAnchor().isVerticallyFlipped()){ sp.setFlags(sp.getFlags() | EscherSpRecord.FLAG_FLIPVERT); } return shape; }
/** * Creates a picture. * * @param anchor the client anchor describes how this group is attached * to the sheet. * @return the newly created shape. */ public HSSFPicture createPicture(HSSFChildAnchor anchor, int pictureIndex) { HSSFPicture shape = new HSSFPicture(this, anchor); shape.setParent(this); shape.setAnchor(anchor); shape.setPictureIndex(pictureIndex); shapes.add(shape); onCreate(shape); EscherSpRecord sp = shape.getEscherContainer().getChildById(EscherSpRecord.RECORD_ID); if (shape.getAnchor().isHorizontallyFlipped()){ sp.setFlags(sp.getFlags() | EscherSpRecord.FLAG_FLIPHORIZ); } if (shape.getAnchor().isVerticallyFlipped()){ sp.setFlags(sp.getFlags() | EscherSpRecord.FLAG_FLIPVERT); } return shape; }
switch (cmo.getObjectType()) { case CommonObjectDataSubRecord.OBJECT_TYPE_PICTURE: shape = new HSSFPicture(container, objRecord); break; case CommonObjectDataSubRecord.OBJECT_TYPE_RECTANGLE:
switch (cmo.getObjectType()) { case CommonObjectDataSubRecord.OBJECT_TYPE_PICTURE: shape = new HSSFPicture(container, objRecord); break; case CommonObjectDataSubRecord.OBJECT_TYPE_RECTANGLE:
HSSFPicture shape = new HSSFPicture(null, (HSSFClientAnchor)anchor); shape.setPictureIndex(pictureIndex); EscherContainerRecord spContainer = shape.getEscherContainer();
HSSFPicture picture = new HSSFPicture( parent, anchor ); picture.setPictureIndex( pictureIndex );