use of org.apache.poi.hslf.record.SlideAtom in project poi by apache.
the class SlideAndNotesAtomListing method main.
public static void main(String[] args) throws IOException {
if (args.length < 1) {
System.err.println("Need to give a filename");
System.exit(1);
}
HSLFSlideShowImpl ss = new HSLFSlideShowImpl(args[0]);
System.out.println("");
// Find either Slides or Notes
Record[] records = ss.getRecords();
for (int i = 0; i < records.length; i++) {
Record r = records[i];
// When we find them, print out their IDs
if (r instanceof Slide) {
Slide s = (Slide) r;
SlideAtom sa = s.getSlideAtom();
System.out.println("Found Slide at " + i);
System.out.println(" Slide's master ID is " + sa.getMasterID());
System.out.println(" Slide's notes ID is " + sa.getNotesID());
System.out.println("");
}
if (r instanceof Notes) {
Notes n = (Notes) r;
NotesAtom na = n.getNotesAtom();
System.out.println("Found Notes at " + i);
System.out.println(" Notes ID is " + na.getSlideID());
System.out.println("");
}
}
ss.close();
}
use of org.apache.poi.hslf.record.SlideAtom in project poi by apache.
the class HSLFSlide method setFollowMasterScheme.
/**
* Sets whether this slide draws master color scheme
*
* @param flag <code>true</code> if the slide draws master color scheme,
* <code>false</code> otherwise
*/
public void setFollowMasterScheme(boolean flag) {
SlideAtom sa = getSlideRecord().getSlideAtom();
sa.setFollowMasterScheme(flag);
}
use of org.apache.poi.hslf.record.SlideAtom in project poi by apache.
the class HSLFSlide method setFollowMasterBackground.
/**
* Sets whether this slide follows master background
*
* @param flag <code>true</code> if the slide follows master,
* <code>false</code> otherwise
*/
@Override
public void setFollowMasterBackground(boolean flag) {
SlideAtom sa = getSlideRecord().getSlideAtom();
sa.setFollowMasterBackground(flag);
}
use of org.apache.poi.hslf.record.SlideAtom in project poi by apache.
the class TestSlideChangeNotes method testSetToNone.
@Test
public void testSetToNone() {
HSLFSlide slideOne = ss.getSlides().get(0);
SlideAtom sa = slideOne.getSlideRecord().getSlideAtom();
slideOne.setNotes(null);
assertEquals(0, sa.getNotesID());
}
use of org.apache.poi.hslf.record.SlideAtom in project poi by apache.
the class HSLFSlide method setFollowMasterObjects.
/**
* Sets whether this slide draws master sheet objects
*
* @param flag <code>true</code> if the slide draws master sheet objects,
* <code>false</code> otherwise
*/
@Override
public void setFollowMasterObjects(boolean flag) {
SlideAtom sa = getSlideRecord().getSlideAtom();
sa.setFollowMasterObjects(flag);
}
Aggregations