Examples of CorruptPowerPointFileException


Examples of org.apache.poi.hslf.exceptions.CorruptPowerPointFileException

   */
  private void buildSlidesAndNotes() {
  // Ensure we really found a Document record earlier
  // If we didn't, then the file is probably corrupt
  if(_documentRecord == null) {
    throw new CorruptPowerPointFileException("The PowerPoint file didn't contain a Document Record in its PersistPtr blocks. It is probably corrupt.");
  }


  // Fetch the SlideListWithTexts in the most up-to-date Document Record
  //
View Full Code Here

Examples of org.apache.poi.hslf.exceptions.CorruptPowerPointFileException

      // The image size must be 0 or greater
      // (0 is allowed, but odd, since we do wind on by the header each
      //  time, so we won't get stuck)
      if(imgsize < 0) {
        throw new CorruptPowerPointFileException("The file contains a picture, at position " + p.size() + ", which has a negatively sized data length, so we can't trust any of the picture data");
      }

      // If they type (including the bonus 0xF018) is 0, skip it
      if(type == 0) {
        System.err.println("Problem reading picture: Invalid image type 0, on picture with length " + imgsize + ".\nYou document will probably become corrupted if you save it!");
View Full Code Here

Examples of org.apache.poi.hslf.exceptions.CorruptPowerPointFileException

   */
  private void buildSlidesAndNotes() {
  // Ensure we really found a Document record earlier
  // If we didn't, then the file is probably corrupt
  if(_documentRecord == null) {
    throw new CorruptPowerPointFileException("The PowerPoint file didn't contain a Document Record in its PersistPtr blocks. It is probably corrupt.");
  }


  // Fetch the SlideListWithTexts in the most up-to-date Document Record
  //
View Full Code Here

Examples of org.apache.poi.hslf.exceptions.CorruptPowerPointFileException

      if(rleni < 0) { rleni = 0; }

      // Abort if first record is of type 0000 and length FFFF,
      //  as that's a sign of a screwed up record
      if(pos == 0 && type == 0l && rleni == 0xffff) {
        throw new CorruptPowerPointFileException("Corrupt document - starts with record of type 0000 and length 0xFFFF");
      }

      Record r = createRecordForType(type,b,pos,8+rleni);
      if(r != null) {
        children.add(r);
View Full Code Here

Examples of org.apache.poi.hslf.exceptions.CorruptPowerPointFileException

    _contents = new byte[docProps.getSize()];

    // Check it's big enough - if it's not at least 28 bytes long, then
    //  the record is corrupt
    if(_contents.length < 28) {
      throw new CorruptPowerPointFileException("The Current User stream must be at least 28 bytes long, but was only " + _contents.length);
    }

    // Grab the contents
    InputStream in = fs.createDocumentInputStream("Current User");
    in.read(_contents);
View Full Code Here

Examples of org.apache.poi.hslf.exceptions.CorruptPowerPointFileException

   */
  private void buildSlidesAndNotes() {
    // Ensure we really found a Document record earlier
    // If we didn't, then the file is probably corrupt
    if (_documentRecord == null) {
      throw new CorruptPowerPointFileException(
          "The PowerPoint file didn't contain a Document Record in its PersistPtr blocks. It is probably corrupt.");
    }

    // Fetch the SlideListWithTexts in the most up-to-date Document Record
    //
View Full Code Here

Examples of org.apache.poi.hslf.exceptions.CorruptPowerPointFileException

      // The image size must be 0 or greater
      // (0 is allowed, but odd, since we do wind on by the header each
      //  time, so we won't get stuck)
      if(imgsize < 0) {
        throw new CorruptPowerPointFileException("The file contains a picture, at position " + _pictures.size() + ", which has a negatively sized data length, so we can't trust any of the picture data");
      }

      // If they type (including the bonus 0xF018) is 0, skip it
      if(type == 0) {
        logger.log(POILogger.ERROR, "Problem reading picture: Invalid image type 0, on picture with length " + imgsize + ".\nYou document will probably become corrupted if you save it!");
View Full Code Here

Examples of org.apache.poi.hslf.exceptions.CorruptPowerPointFileException

    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;
View Full Code Here

Examples of org.apache.poi.hslf.exceptions.CorruptPowerPointFileException

   */
  private void buildSlidesAndNotes() {
  // Ensure we really found a Document record earlier
  // If we didn't, then the file is probably corrupt
  if(_documentRecord == null) {
    throw new CorruptPowerPointFileException("The PowerPoint file didn't contain a Document Record in its PersistPtr blocks. It is probably corrupt.");
  }


  // Fetch the SlideListWithTexts in the most up-to-date Document Record
  //
View Full Code Here

Examples of org.apache.poi.hslf.exceptions.CorruptPowerPointFileException

      // The image size must be 0 or greater
      // (0 is allowed, but odd, since we do wind on by the header each
      //  time, so we won't get stuck)
      if(imgsize < 0) {
        throw new CorruptPowerPointFileException("The file contains a picture, at position " + _pictures.size() + ", which has a negatively sized data length, so we can't trust any of the picture data");
      }

      // If they type (including the bonus 0xF018) is 0, skip it
      if(type == 0) {
        logger.log(POILogger.ERROR, "Problem reading picture: Invalid image type 0, on picture with length " + imgsize + ".\nYou document will probably become corrupted if you save it!");
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.