Search in sources :

Example 1 with SlideAtom

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();
}
Also used : SlideAtom(org.apache.poi.hslf.record.SlideAtom) Slide(org.apache.poi.hslf.record.Slide) Record(org.apache.poi.hslf.record.Record) HSLFSlideShowImpl(org.apache.poi.hslf.usermodel.HSLFSlideShowImpl) Notes(org.apache.poi.hslf.record.Notes) NotesAtom(org.apache.poi.hslf.record.NotesAtom)

Example 2 with SlideAtom

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);
}
Also used : SlideAtom(org.apache.poi.hslf.record.SlideAtom)

Example 3 with SlideAtom

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);
}
Also used : SlideAtom(org.apache.poi.hslf.record.SlideAtom)

Example 4 with SlideAtom

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());
}
Also used : SlideAtom(org.apache.poi.hslf.record.SlideAtom) Test(org.junit.Test)

Example 5 with SlideAtom

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);
}
Also used : SlideAtom(org.apache.poi.hslf.record.SlideAtom)

Aggregations

SlideAtom (org.apache.poi.hslf.record.SlideAtom)10 Notes (org.apache.poi.hslf.record.Notes)2 NotesAtom (org.apache.poi.hslf.record.NotesAtom)2 Record (org.apache.poi.hslf.record.Record)2 Slide (org.apache.poi.hslf.record.Slide)2 HSLFSlideShowImpl (org.apache.poi.hslf.usermodel.HSLFSlideShowImpl)2 Test (org.junit.Test)2 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 Document (org.apache.poi.hslf.record.Document)1 PersistPtrHolder (org.apache.poi.hslf.record.PersistPtrHolder)1 PositionDependentRecord (org.apache.poi.hslf.record.PositionDependentRecord)1 SlideListWithText (org.apache.poi.hslf.record.SlideListWithText)1 SlidePersistAtom (org.apache.poi.hslf.record.SlidePersistAtom)1 HSLFSlideShow (org.apache.poi.hslf.usermodel.HSLFSlideShow)1