XSLFCommentAuthors commentAuthors = slideshow.getCommentAuthors();
for (XSLFSlide slide : slides) {
try {
XSLFNotes notes = slide.getNotes();
XSLFComments comments = slide.getComments();
XSLFSlideLayout layout = slide.getSlideLayout();
XSLFSlideMaster master = layout.getSlideMaster();
// TODO Do the slide's name
// (Stored in docProps/app.xml)
// Do the slide's text if requested
if (slideText) {
extractText(slide.getCommonSlideData(), false, text);
// If requested, get text from the master and it's layout
if(masterText) {
if(layout != null) {
extractText(layout.getCommonSlideData(), true, text);
}
if(master != null) {
extractText(master.getCommonSlideData(), true, text);
}
}
// If the slide has comments, do those too
if (comments != null) {
for (CTComment comment : comments.getCTCommentsList().getCmArray()) {
// Do the author if we can
if (commentAuthors != null) {
CTCommentAuthor author = commentAuthors.getAuthorById(comment.getAuthorId());
if(author != null) {
text.append(author.getName() + ": ");