Examples of CurrentUserAtom


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

   */
  public static DocumentEncryptionAtom fetchDocumentEncryptionAtom(HSLFSlideShow hss) {
    // Will be the last Record pointed to by the
    //  first PersistPrtHolder, if there is one
   
    CurrentUserAtom cua = hss.getCurrentUserAtom();
    if(cua.getCurrentEditOffset() != 0) {
      // Grab the details of the UserEditAtom there
      Record r = Record.buildRecordAtOffset(
          hss.getUnderlyingBytes(),
          (int)cua.getCurrentEditOffset()
      );
      if(! (r instanceof UserEditAtom)) { return null; }
      UserEditAtom uea = (UserEditAtom)r;
     
      // Now get the PersistPtrHolder
View Full Code Here

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

   */
  public static DocumentEncryptionAtom fetchDocumentEncryptionAtom(HSLFSlideShow hss) {
    // Will be the last Record pointed to by the
    //  first PersistPrtHolder, if there is one

    CurrentUserAtom cua = hss.getCurrentUserAtom();
    if(cua.getCurrentEditOffset() != 0) {
      // Check it's not past the end of the file
      if(cua.getCurrentEditOffset() > hss.getUnderlyingBytes().length) {
        throw new CorruptPowerPointFileException("The CurrentUserAtom claims that the offset of last edit details are past the end of the file");
      }

      // Grab the details of the UserEditAtom there
      // If the record's messed up, we could AIOOB
      Record r = null;
      try {
        r = Record.buildRecordAtOffset(
            hss.getUnderlyingBytes(),
            (int)cua.getCurrentEditOffset()
        );
      } catch(ArrayIndexOutOfBoundsException e) {}
      if(r == null) { return null; }
      if(! (r instanceof UserEditAtom)) { return null; }
      UserEditAtom uea = (UserEditAtom)r;
View Full Code Here

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

  /**
   * Find the "Current User" stream, and load it
   */
  private void readCurrentUserStream() {
    try {
      currentUser = new CurrentUserAtom(directory);
    } catch(IOException ie) {
      logger.log(POILogger.ERROR, "Error finding Current User Atom:\n" + ie);
      currentUser = new CurrentUserAtom();
    }
  }
View Full Code Here

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

  /**
   * Find the "Current User" stream, and load it
   */
  private void readCurrentUserStream() {
    try {
      currentUser = new CurrentUserAtom(directory);
    } catch(IOException ie) {
      logger.log(POILogger.ERROR, "Error finding Current User Atom:\n" + ie);
      currentUser = new CurrentUserAtom();
    }
  }
View Full Code Here

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

   */
  public static DocumentEncryptionAtom fetchDocumentEncryptionAtom(HSLFSlideShow hss) {
    // Will be the last Record pointed to by the
    //  first PersistPrtHolder, if there is one
   
    CurrentUserAtom cua = hss.getCurrentUserAtom();
    if(cua.getCurrentEditOffset() != 0) {
      // Check it's not past the end of the file
      if(cua.getCurrentEditOffset() > hss.getUnderlyingBytes().length) {
        throw new CorruptPowerPointFileException("The CurrentUserAtom claims that the offset of last edit details are past the end of the file");
      }
     
      // Grab the details of the UserEditAtom there
      // If the record's messed up, we could AIOOB
      Record r = null;
      try {
        r = Record.buildRecordAtOffset(
            hss.getUnderlyingBytes(),
            (int)cua.getCurrentEditOffset()
        );
      } catch(ArrayIndexOutOfBoundsException e) {}
      if(r == null) { return null; }
      if(! (r instanceof UserEditAtom)) { return null; }
      UserEditAtom uea = (UserEditAtom)r;
View Full Code Here

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

   */
  public static DocumentEncryptionAtom fetchDocumentEncryptionAtom(HSLFSlideShow hss) {
    // Will be the last Record pointed to by the
    //  first PersistPrtHolder, if there is one

    CurrentUserAtom cua = hss.getCurrentUserAtom();
    if(cua.getCurrentEditOffset() != 0) {
      // Check it's not past the end of the file
      if(cua.getCurrentEditOffset() > hss.getUnderlyingBytes().length) {
        throw new CorruptPowerPointFileException("The CurrentUserAtom claims that the offset of last edit details are past the end of the file");
      }

      // Grab the details of the UserEditAtom there
      // If the record's messed up, we could AIOOB
      Record r = null;
      try {
        r = Record.buildRecordAtOffset(
            hss.getUnderlyingBytes(),
            (int)cua.getCurrentEditOffset()
        );
      } catch (ArrayIndexOutOfBoundsException e) {
        return null;
      }
      if(r == null) { return null; }
View Full Code Here

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

  /**
   * Find the "Current User" stream, and load it
   */
  private void readCurrentUserStream() {
    try {
      currentUser = new CurrentUserAtom(filesystem);
    } catch(IOException ie) {
      logger.log(POILogger.ERROR, "Error finding Current User Atom:\n" + ie);
      currentUser = new CurrentUserAtom();
    }
  }
View Full Code Here

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

   */
  public static DocumentEncryptionAtom fetchDocumentEncryptionAtom(HSLFSlideShow hss) {
    // Will be the last Record pointed to by the
    //  first PersistPrtHolder, if there is one
   
    CurrentUserAtom cua = hss.getCurrentUserAtom();
    if(cua.getCurrentEditOffset() != 0) {
      // Grab the details of the UserEditAtom there
      Record r = Record.buildRecordAtOffset(
          hss.getUnderlyingBytes(),
          (int)cua.getCurrentEditOffset()
      );
      if(! (r instanceof UserEditAtom)) { return null; }
      UserEditAtom uea = (UserEditAtom)r;
     
      // Now get the PersistPtrHolder
View Full Code Here

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

   */
  public static DocumentEncryptionAtom fetchDocumentEncryptionAtom(HSLFSlideShow hss) {
    // Will be the last Record pointed to by the
    //  first PersistPrtHolder, if there is one
   
    CurrentUserAtom cua = hss.getCurrentUserAtom();
    if(cua.getCurrentEditOffset() != 0) {
      // Check it's not past the end of the file
      if(cua.getCurrentEditOffset() > hss.getUnderlyingBytes().length) {
        throw new CorruptPowerPointFileException("The CurrentUserAtom claims that the offset of last edit details are past the end of the file");
      }
     
      // Grab the details of the UserEditAtom there
      Record r = Record.buildRecordAtOffset(
          hss.getUnderlyingBytes(),
          (int)cua.getCurrentEditOffset()
      );
      if(! (r instanceof UserEditAtom)) { return null; }
      UserEditAtom uea = (UserEditAtom)r;
     
      // Now get the PersistPtrHolder
View Full Code Here

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

  /**
   * Find the "Current User" stream, and load it
   */
  private void readCurrentUserStream() {
    try {
      currentUser = new CurrentUserAtom(directory);
    } catch(IOException ie) {
      logger.log(POILogger.ERROR, "Error finding Current User Atom:\n" + ie);
      currentUser = new CurrentUserAtom();
    }
  }
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.