Package org.apache.poi.hslf.record

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


  _highestSheetId = allIDs[(allIDs.length-1)];

  // Now convert the byte offsets back into record offsets
  for(int i=0; i<_records.length; i++) {
    if(_records[i] instanceof PositionDependentRecord) {
      PositionDependentRecord pdr = (PositionDependentRecord)_records[i];
      Integer recordAt = new Integer(pdr.getLastOnDiskOffset());

      // Is it one we care about?
      for(int j=0; j<allIDs.length; j++) {
        Integer thisID = new Integer(allIDs[j]);
        Integer thatRecordAt = (Integer)mostRecentByBytes.get(thisID);
View Full Code Here


  _highestSheetId = allIDs[(allIDs.length-1)];

  // Now convert the byte offsets back into record offsets
  for(int i=0; i<_records.length; i++) {
    if(_records[i] instanceof PositionDependentRecord) {
      PositionDependentRecord pdr = (PositionDependentRecord)_records[i];
      Integer recordAt = new Integer(pdr.getLastOnDiskOffset());

      // Is it one we care about?
      for(int j=0; j<allIDs.length; j++) {
        Integer thisID = new Integer(allIDs[j]);
        Integer thatRecordAt = (Integer)mostRecentByBytes.get(thisID);
View Full Code Here

  }

  // Now convert the byte offsets back into record offsets
  for(int i=0; i<_records.length; i++) {
    if(_records[i] instanceof PositionDependentRecord) {
      PositionDependentRecord pdr = (PositionDependentRecord)_records[i];
      Integer recordAt = new Integer(pdr.getLastOnDiskOffset());

      // Is it one we care about?
      for(int j=0; j<allIDs.length; j++) {
        Integer thisID = new Integer(allIDs[j]);
        Integer thatRecordAt = (Integer)mostRecentByBytes.get(thisID);
View Full Code Here

        // (Annoyingly, some powerpoing files have PersistPtrHolders
        //  that reference slides after the PersistPtrHolder)
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        for(int i=0; i<_records.length; i++) {
            if(_records[i] instanceof PositionDependentRecord) {
                PositionDependentRecord pdr = (PositionDependentRecord)_records[i];
                int oldPos = pdr.getLastOnDiskOffset();
                int newPos = baos.size();
                pdr.setLastOnDiskOffset(newPos);
                oldToNewPositions.put(Integer.valueOf(oldPos),Integer.valueOf(newPos));
                //System.out.println(oldPos + " -> " + newPos);
            }

            // Dummy write out, so the position winds on properly
            _records[i].writeOut(baos);
        }

        // No go back through, actually writing ourselves out
        baos.reset();
        for(int i=0; i<_records.length; i++) {
            // For now, we're only handling PositionDependentRecord's that
            //  happen at the top level.
            // In future, we'll need the handle them everywhere, but that's
            //  a bit trickier
            if(_records[i] instanceof PositionDependentRecord) {
                // We've already figured out their new location, and
                //  told them that
                // Tell them of the positions of the other records though
                PositionDependentRecord pdr = (PositionDependentRecord)_records[i];
                pdr.updateOtherRecordReferences(oldToNewPositions);
            }

            // Whatever happens, write out that record tree
            _records[i].writeOut(baos);
        }
View Full Code Here

        // (Annoyingly, some powerpoint files have PersistPtrHolders
        //  that reference slides after the PersistPtrHolder)
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        for (Record record : _records) {
            if(record instanceof PositionDependentRecord) {
                PositionDependentRecord pdr = (PositionDependentRecord)record;
                int oldPos = pdr.getLastOnDiskOffset();
                int newPos = baos.size();
                pdr.setLastOnDiskOffset(newPos);
                if (oldPos != UNSET_OFFSET) {
                    // new records don't need a mapping, as they aren't in a relation yet
                    oldToNewPositions.put(Integer.valueOf(oldPos),Integer.valueOf(newPos));
                }
            }
           
            // Dummy write out, so the position winds on properly
            record.writeOut(baos);
        }
        baos = null;
       
        // For now, we're only handling PositionDependentRecord's that
        // happen at the top level.
        // In future, we'll need the handle them everywhere, but that's
        // a bit trickier
      UserEditAtom usr = null;
        for (Record record : _records) {
            if (record instanceof PositionDependentRecord) {
                // We've already figured out their new location, and
                // told them that
                // Tell them of the positions of the other records though
                PositionDependentRecord pdr = (PositionDependentRecord)record;
                pdr.updateOtherRecordReferences(oldToNewPositions);
   
                // Grab interesting records as they come past
                // this will only save the very last record of each type
                RecordTypes.Type saveme = null;
                int recordType = (int)record.getRecordType();
View Full Code Here

   
    // Now convert the byte offsets back into record offsets
    for (Record record : _hslfSlideShow.getRecords()) {
      if (!(record instanceof PositionDependentRecord)) continue;
     
      PositionDependentRecord pdr = (PositionDependentRecord) record;
      int recordAt = pdr.getLastOnDiskOffset();

      Integer thisID = mostRecentByBytesRev.get(recordAt);
     
      if (thisID == null) continue;
     
View Full Code Here

        // (Annoyingly, some powerpoing files have PersistPtrHolders
        //  that reference slides after the PersistPtrHolder)
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        for(int i=0; i<_records.length; i++) {
            if(_records[i] instanceof PositionDependentRecord) {
                PositionDependentRecord pdr = (PositionDependentRecord)_records[i];
                int oldPos = pdr.getLastOnDiskOffset();
                int newPos = baos.size();
                pdr.setLastOnDiskOffset(newPos);
                oldToNewPositions.put(new Integer(oldPos),new Integer(newPos));
                //System.out.println(oldPos + " -> " + newPos);
            }

            // Dummy write out, so the position winds on properly
            _records[i].writeOut(baos);
        }

        // No go back through, actually writing ourselves out
        baos.reset();
        for(int i=0; i<_records.length; i++) {
            // For now, we're only handling PositionDependentRecord's that
            //  happen at the top level.
            // In future, we'll need the handle them everywhere, but that's
            //  a bit trickier
            if(_records[i] instanceof PositionDependentRecord) {
                // We've already figured out their new location, and
                //  told them that
                // Tell them of the positions of the other records though
                PositionDependentRecord pdr = (PositionDependentRecord)_records[i];
                pdr.updateOtherRecordReferences(oldToNewPositions);
            }

            // Whatever happens, write out that record tree
            _records[i].writeOut(baos);
        }
View Full Code Here

  _highestSheetId = allIDs[(allIDs.length-1)];

  // Now convert the byte offsets back into record offsets
  for(int i=0; i<_records.length; i++) {
    if(_records[i] instanceof PositionDependentRecord) {
      PositionDependentRecord pdr = (PositionDependentRecord)_records[i];
      Integer recordAt = new Integer(pdr.getLastOnDiskOffset());

      // Is it one we care about?
      for(int j=0; j<allIDs.length; j++) {
        Integer thisID = new Integer(allIDs[j]);
        Integer thatRecordAt = (Integer)mostRecentByBytes.get(thisID);
View Full Code Here

        // (Annoyingly, some powerpoing files have PersistPtrHolders
        //  that reference slides after the PersistPtrHolder)
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        for(int i=0; i<_records.length; i++) {
            if(_records[i] instanceof PositionDependentRecord) {
                PositionDependentRecord pdr = (PositionDependentRecord)_records[i];
                int oldPos = pdr.getLastOnDiskOffset();
                int newPos = baos.size();
                pdr.setLastOnDiskOffset(newPos);
                oldToNewPositions.put(Integer.valueOf(oldPos),Integer.valueOf(newPos));
                //System.out.println(oldPos + " -> " + newPos);
            }

            // Dummy write out, so the position winds on properly
            _records[i].writeOut(baos);
        }

        // No go back through, actually writing ourselves out
        baos.reset();
        for(int i=0; i<_records.length; i++) {
            // For now, we're only handling PositionDependentRecord's that
            //  happen at the top level.
            // In future, we'll need the handle them everywhere, but that's
            //  a bit trickier
            if(_records[i] instanceof PositionDependentRecord) {
                // We've already figured out their new location, and
                //  told them that
                // Tell them of the positions of the other records though
                PositionDependentRecord pdr = (PositionDependentRecord)_records[i];
                pdr.updateOtherRecordReferences(oldToNewPositions);
            }

            // Whatever happens, write out that record tree
            _records[i].writeOut(baos);
        }
View Full Code Here

        // (Annoyingly, some powerpoing files have PersistPtrHolders
        //  that reference slides after the PersistPtrHolder)
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        for(int i=0; i<_records.length; i++) {
            if(_records[i] instanceof PositionDependentRecord) {
                PositionDependentRecord pdr = (PositionDependentRecord)_records[i];
                int oldPos = pdr.getLastOnDiskOffset();
                int newPos = baos.size();
                pdr.setLastOnDiskOffset(newPos);
                oldToNewPositions.put(Integer.valueOf(oldPos),Integer.valueOf(newPos));
                //System.out.println(oldPos + " -> " + newPos);
            }

            // Dummy write out, so the position winds on properly
            _records[i].writeOut(baos);
        }

        // No go back through, actually writing ourselves out
        baos.reset();
        for(int i=0; i<_records.length; i++) {
            // For now, we're only handling PositionDependentRecord's that
            //  happen at the top level.
            // In future, we'll need the handle them everywhere, but that's
            //  a bit trickier
            if(_records[i] instanceof PositionDependentRecord) {
                // We've already figured out their new location, and
                //  told them that
                // Tell them of the positions of the other records though
                PositionDependentRecord pdr = (PositionDependentRecord)_records[i];
                pdr.updateOtherRecordReferences(oldToNewPositions);
            }

            // Whatever happens, write out that record tree
            _records[i].writeOut(baos);
        }
View Full Code Here

TOP

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

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.