Examples of SlideAtom


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

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

  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

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

    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

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

    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

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

   */
  public void setNotes(Notes notes) {
    _notes = notes;

    // Update the Slide Atom's ID of where to point to
    SlideAtom sa = getSlideRecord().getSlideAtom();

    if(notes == null) {
      // Set to 0
      sa.setNotesID(0);
    } else {
      // Set to the value from the notes' sheet id
      sa.setNotesID(notes._getSheetNumber());
    }
  }
View Full Code Here

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

     *
     * @return the master sheet associated with this slide.
     */
     public MasterSheet getMasterSheet(){
        SlideMaster[] master = getSlideShow().getSlidesMasters();
        SlideAtom sa = getSlideRecord().getSlideAtom();
        int masterId = sa.getMasterID();
        MasterSheet sheet = null;
        for (int i = 0; i < master.length; i++) {
            if (masterId == master[i]._getSheetNumber()) {
                sheet = master[i];
                break;
View Full Code Here

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

    /**
     * Change Master of this slide.
     */
    public void setMasterSheet(MasterSheet master){
        SlideAtom sa = getSlideRecord().getSlideAtom();
        int sheetNo = master._getSheetNumber();
        sa.setMasterID(sheetNo);
    }
View Full Code Here

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

     *
     * @param flag  <code>true</code> if the slide follows master,
     * <code>false</code> otherwise
     */
    public void setFollowMasterBackground(boolean flag){
        SlideAtom sa = getSlideRecord().getSlideAtom();
        sa.setFollowMasterBackground(flag);
    }
View Full Code Here

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

     *
     * @return <code>true</code> if the slide follows master background,
     * <code>false</code> otherwise
     */
    public boolean getFollowMasterBackground(){
        SlideAtom sa = getSlideRecord().getSlideAtom();
        return sa.getFollowMasterBackground();
    }
View Full Code Here

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

     *
     * @param flag  <code>true</code> if the slide draws master sheet objects,
     * <code>false</code> otherwise
     */
    public void setFollowMasterObjects(boolean flag){
        SlideAtom sa = getSlideRecord().getSlideAtom();
        sa.setFollowMasterObjects(flag);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.