}
// Slide text
TextRun[] runs = slide.getTextRuns();
for(int j=0; j<runs.length; j++) {
TextRun run = runs[j];
if(run != null) {
String text = run.getText();
ret.append(text);
if(! text.endsWith("\n")) {
ret.append("\n");
}
}
}
// Slide footer, if set
if(hf != null && hf.isFooterVisible() && hf.getFooterText() != null) {
ret.append(hf.getFooterText() + "\n");
}
// Comments, if requested and present
if(getCommentText) {
Comment[] comments = slide.getComments();
for(int j=0; j<comments.length; j++) {
ret.append(
comments[j].getAuthor() +
" - " +
comments[j].getText() +
"\n"
);
}
}
}
if(getNoteText) {
ret.append("\n");
}
}
if(getNoteText) {
// Not currently using _notes, as that can have the notes of
// master sheets in. Grab Slide list, then work from there,
// but ensure no duplicates
HashSet seenNotes = new HashSet();
HeadersFooters hf = _show.getNotesHeadersFooters();
for(int i=0; i<_slides.length; i++) {
Notes notes = _slides[i].getNotesSheet();
if(notes == null) { continue; }
Integer id = new Integer(notes._getSheetNumber());
if(seenNotes.contains(id)) { continue; }
seenNotes.add(id);
// Repeat the Notes header, if set
if(hf != null && hf.isHeaderVisible() && hf.getHeaderText() != null) {
ret.append(hf.getHeaderText() + "\n");
}
// Notes text
TextRun[] runs = notes.getTextRuns();
if(runs != null && runs.length > 0) {
for(int j=0; j<runs.length; j++) {
TextRun run = runs[j];
String text = run.getText();
ret.append(text);
if(! text.endsWith("\n")) {
ret.append("\n");
}
}