From: Yegor Kozlov Date: Mon, 16 Apr 2007 11:12:03 +0000 (+0000) Subject: applied the patch submitted in Bug 38976: added createPicture to HSSFShapeGroup X-Git-Tag: REL_3_0_RC4~12 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b970d27b0fb3d495130b9fe0ce38f0b4a53dd58d;p=poi.git applied the patch submitted in Bug 38976: added createPicture to HSSFShapeGroup git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@529206 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/poi/hssf/usermodel/HSSFShapeGroup.java b/src/java/org/apache/poi/hssf/usermodel/HSSFShapeGroup.java index 363758ca15..05b694739b 100644 --- a/src/java/org/apache/poi/hssf/usermodel/HSSFShapeGroup.java +++ b/src/java/org/apache/poi/hssf/usermodel/HSSFShapeGroup.java @@ -97,6 +97,22 @@ public class HSSFShapeGroup return shape; } + /** + * Creates a picture. + * + * @param anchor the client anchor describes how this group is attached + * to the sheet. + * @return the newly created shape. + * @author zunker + */ + public HSSFPicture createPicture(HSSFChildAnchor anchor, int pictureIndex) + { + HSSFPicture shape = new HSSFPicture(this, anchor); + shape.anchor = anchor; + shape.setPictureIndex( pictureIndex ); + shapes.add(shape); + return shape; + } /** * Return all children contained by this shape. */ @@ -162,4 +178,5 @@ public class HSSFShapeGroup } return count; } + }