*/
@Override
protected void buildXHTML(XHTMLContentHandler xhtml) throws SAXException,
XmlException, IOException {
XMLSlideShow slideShow = (XMLSlideShow) extractor.getDocument();
XSLFSlideShow rawSlideShow = null;
try {
rawSlideShow = slideShow._getXSLFSlideShow(); // TODO Avoid this in future
} catch(Exception e) {
throw new IOException(e.getMessage()); // Shouldn't happen
}
XSLFSlide[] slides = slideShow.getSlides();
for (XSLFSlide slide : slides) {
// Find the ID, until we ditch the raw slideshow
CTSlideIdListEntry slideId = null;
for(CTSlideIdListEntry id : rawSlideShow.getSlideReferences().getSldIdList()) {
if(rawSlideShow.getSlidePart(id).getPartName().equals(slide.getPackagePart().getPartName())) {
slideId = id;
}
}
if(slideId == null) {
// This shouldn't normally happen
continue;
}
XSLFSlideMaster master = slide.getMasterSheet();
CTNotesSlide notes = rawSlideShow.getNotes(slideId);
CTCommentList comments = rawSlideShow.getSlideComments(slideId);
// TODO In POI 3.8 beta 5, improve how we get this
xhtml.startElement("div");
XSLFCommonSlideData common = new XSLFCommonSlideData(slide.getXmlObject().getCSld());
extractShapeContent(common, xhtml);