* @throws IllegalArgumentException if the type of the specified shape
* is incompatible with this sheet (optional)
*/
public boolean removeShape(XSLFShape xShape) {
XmlObject obj = xShape.getXmlObject();
CTGroupShape spTree = getSpTree();
if(obj instanceof CTShape){
spTree.getSpList().remove(obj);
} else if (obj instanceof CTGroupShape){
spTree.getGrpSpList().remove(obj);
} else if (obj instanceof CTConnector){
spTree.getCxnSpList().remove(obj);
} else {
throw new IllegalArgumentException("Unsupported shape: " + xShape);
}
return getShapeList().remove(xShape);
}