/**
* Returns all the comments for the given slide
*/
public CTCommentList getSlideComments(CTSlideIdListEntry slide) throws IOException, XmlException {
PackageRelationshipCollection commentRels;
PackagePart slidePart = getSlidePart(slide);
try {
commentRels = slidePart.getRelationshipsByType(COMMENT_RELATION_TYPE);
} catch(InvalidFormatException e) {
throw new IllegalStateException(e);
}
if(commentRels.size() == 0) {
// No comments for this slide
return null;
}
if(commentRels.size() > 1) {
throw new IllegalStateException("Expecting 0 or 1 comments for a slide, but found " + commentRels.size());
}
try {
PackagePart cPart = getTargetPart(
commentRels.getRelationship(0)
);
CmLstDocument commDoc =
CmLstDocument.Factory.parse(cPart.getInputStream());
return commDoc.getCmLst();
} catch(InvalidFormatException e) {