Package org.apache.poi.hslf.record

Examples of org.apache.poi.hslf.record.SlideAtom


    // Should also check the placehold IDs at some point
  }

  public void testWrite() throws Exception {
    SlideAtom sa = new SlideAtom(data_a, 0, data_a.length);
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    sa.writeOut(baos);
    byte[] b = baos.toByteArray();

    assertEquals(data_a.length, b.length);
    for(int i=0; i<data_a.length; i++) {
      assertEquals(data_a[i],b[i]);
View Full Code Here


    ss = new SlideShow(hss);
    }

    public void testSetToNone() throws Exception {
    Slide slideOne = ss.getSlides()[0];
    SlideAtom sa = slideOne.getSlideRecord().getSlideAtom();

    slideOne.setNotes(null);

    assertEquals(0, sa.getNotesID());
    }
View Full Code Here

    }

    public void testSetToSomething() throws Exception {
    Slide slideOne = ss.getSlides()[0];
    Notes notesOne = ss.getNotes()[1];
    SlideAtom sa = slideOne.getSlideRecord().getSlideAtom();

    slideOne.setNotes(notesOne);

    assertEquals(notesOne.getSheetNumber(), sa.getNotesID());
    }
View Full Code Here

    }

    // Do they have a Notes?
    Notes thisNotes = null;
    // Find their SlideAtom, and use this to check for a Notes
    SlideAtom sa = slideRecord.getSlideAtom();
    int notesID = sa.getNotesID();
    if(notesID != 0) {
      for(int k=0; k<_notes.length; k++) {
        if(_notes[k].getSheetNumber() == notesID) {
          thisNotes = _notes[k];
        }
View Full Code Here

    ss = new SlideShow(hss);
    }

    public void testSetToNone() throws Exception {
    Slide slideOne = ss.getSlides()[0];
    SlideAtom sa = slideOne.getSlideRecord().getSlideAtom();

    slideOne.setNotes(null);

    assertEquals(0, sa.getNotesID());
    }
View Full Code Here

    }

    public void testSetToSomething() throws Exception {
    Slide slideOne = ss.getSlides()[0];
    Notes notesOne = ss.getNotes()[1];
    SlideAtom sa = slideOne.getSlideRecord().getSlideAtom();

    slideOne.setNotes(notesOne);

    assertEquals(notesOne._getSheetNumber(), sa.getNotesID());
    }
View Full Code Here

  private byte[] data_a = new byte[] { 1, 0, 0xEF-256, 3, 0x18, 0, 0, 0,
    0, 0, 0, 0, 0x0F, 0x10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x80-256,
    0, 1, 0, 0, 7, 0, 0x0C, 0x30 };

    public void testRecordType() throws Exception {
    SlideAtom sa = new SlideAtom(data_a, 0, data_a.length);
    assertEquals(1007l, sa.getRecordType());
  }
View Full Code Here

    public void testRecordType() throws Exception {
    SlideAtom sa = new SlideAtom(data_a, 0, data_a.length);
    assertEquals(1007l, sa.getRecordType());
  }
  public void testFlags() throws Exception {
    SlideAtom sa = new SlideAtom(data_a, 0, data_a.length);

    // First 12 bytes are a SSlideLayoutAtom, checked elsewhere

    // Check the IDs
    assertEquals(0x80000000, sa.getMasterID());
    assertEquals(256, sa.getNotesID());

    // Check the flags
    assertEquals(true, sa.getFollowMasterObjects());
    assertEquals(true, sa.getFollowMasterScheme());
    assertEquals(true, sa.getFollowMasterBackground());
  }
View Full Code Here

    assertEquals(true, sa.getFollowMasterObjects());
    assertEquals(true, sa.getFollowMasterScheme());
    assertEquals(true, sa.getFollowMasterBackground());
  }
  public void testSSlideLayoutAtom() throws Exception {
    SlideAtom sa = new SlideAtom(data_a, 0, data_a.length);
    SSlideLayoutAtom ssla = sa.getSSlideLayoutAtom();

    assertEquals(0, ssla.getGeometryType());

    // Should also check the placehold IDs at some point
  }
View Full Code Here

    // Should also check the placehold IDs at some point
  }

  public void testWrite() throws Exception {
    SlideAtom sa = new SlideAtom(data_a, 0, data_a.length);
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    sa.writeOut(baos);
    byte[] b = baos.toByteArray();

    assertEquals(data_a.length, b.length);
    for(int i=0; i<data_a.length; i++) {
      assertEquals(data_a[i],b[i]);
View Full Code Here

TOP

Related Classes of org.apache.poi.hslf.record.SlideAtom

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.