use of org.openxmlformats.schemas.presentationml.x2006.main.CTPicture in project poi by apache.
the class XSLFGroupShape method removeShape.
/**
* Remove the specified shape from this group
*/
@Override
public boolean removeShape(XSLFShape xShape) {
XmlObject obj = xShape.getXmlObject();
CTGroupShape grpSp = (CTGroupShape) getXmlObject();
if (obj instanceof CTShape) {
grpSp.getSpList().remove(obj);
} else if (obj instanceof CTGroupShape) {
grpSp.getGrpSpList().remove(obj);
} else if (obj instanceof CTConnector) {
grpSp.getCxnSpList().remove(obj);
} else if (obj instanceof CTGraphicalObjectFrame) {
grpSp.getGraphicFrameList().remove(obj);
} else if (obj instanceof CTPicture) {
XSLFPictureShape ps = (XSLFPictureShape) xShape;
XSLFSheet sh = getSheet();
if (sh != null) {
sh.removePictureRelation(ps);
}
grpSp.getPicList().remove(obj);
} else {
throw new IllegalArgumentException("Unsupported shape: " + xShape);
}
return _shapes.remove(xShape);
}
Aggregations