diff --git a/src/scratchpad/src/org/apache/poi/hslf/extractor/QuickButCruddyTextExtractor.java b/src/scratchpad/src/org/apache/poi/hslf/extractor/QuickButCruddyTextExtractor.java index 0446d4fba..6983c4927 100644 --- a/src/scratchpad/src/org/apache/poi/hslf/extractor/QuickButCruddyTextExtractor.java +++ b/src/scratchpad/src/org/apache/poi/hslf/extractor/QuickButCruddyTextExtractor.java @@ -122,9 +122,8 @@ public final class QuickButCruddyTextExtractor { */ public String getTextAsString() { StringBuffer ret = new StringBuffer(); - Vector textV = getTextAsVector(); - for(int i=0; i textV = getTextAsVector(); + for(String text : textV) { ret.append(text); if(! text.endsWith("\n")) { ret.append('\n'); @@ -137,8 +136,8 @@ public final class QuickButCruddyTextExtractor { * Fetches the ALL the text of the powerpoint file, in a vector of * strings, one per text record */ - public Vector getTextAsVector() { - Vector textV = new Vector(); + public Vector getTextAsVector() { + Vector textV = new Vector(); // Set to the start of the file int walkPos = 0; @@ -159,7 +158,7 @@ public final class QuickButCruddyTextExtractor { * If it is a text record, grabs out the text. Whatever happens, returns * the position of the next record, or -1 if no more. */ - public int findTextRecords(int startPos, Vector textV) { + public int findTextRecords(int startPos, Vector textV) { // Grab the length, and the first option byte // Note that the length doesn't include the 8 byte atom header int len = (int)LittleEndian.getUInt(pptContents,startPos+4); diff --git a/src/scratchpad/src/org/apache/poi/hslf/record/PersistPtrHolder.java b/src/scratchpad/src/org/apache/poi/hslf/record/PersistPtrHolder.java index cc514ed46..de341acd1 100644 --- a/src/scratchpad/src/org/apache/poi/hslf/record/PersistPtrHolder.java +++ b/src/scratchpad/src/org/apache/poi/hslf/record/PersistPtrHolder.java @@ -48,13 +48,13 @@ public final class PersistPtrHolder extends PositionDependentRecordAtom * You always need to check the most recent PersistPtrHolder * that knows about a given slide to find the right location */ - private Hashtable _slideLocations; + private Hashtable _slideLocations; /** * Holds the lookup from slide id to where their offset is * held inside _ptrData. Used when writing out, and updating * the positions of the slides */ - private Hashtable _slideOffsetDataLocation; + private Hashtable _slideOffsetDataLocation; /** * Get the list of slides that this PersistPtrHolder knows about. @@ -63,9 +63,9 @@ public final class PersistPtrHolder extends PositionDependentRecordAtom */ public int[] getKnownSlideIDs() { int[] ids = new int[_slideLocations.size()]; - Enumeration e = _slideLocations.keys(); + Enumeration e = _slideLocations.keys(); for(int i=0; i getSlideLocationsLookup() { return _slideLocations; } /** * Get the lookup from slide numbers to their offsets inside * _ptrData, used when adding or moving slides. */ - public Hashtable getSlideOffsetDataLocationsLookup() { + public Hashtable getSlideOffsetDataLocationsLookup() { return _slideOffsetDataLocation; } @@ -140,8 +140,8 @@ public final class PersistPtrHolder extends PositionDependentRecordAtom // base number for these entries // count * 32 bit offsets // Repeat as many times as you have data - _slideLocations = new Hashtable(); - _slideOffsetDataLocation = new Hashtable(); + _slideLocations = new Hashtable(); + _slideOffsetDataLocation = new Hashtable(); _ptrData = new byte[len-8]; System.arraycopy(source,start+8,_ptrData,0,_ptrData.length); @@ -181,7 +181,7 @@ public final class PersistPtrHolder extends PositionDependentRecordAtom * At write-out time, update the references to the sheets to their * new positions */ - public void updateOtherRecordReferences(Hashtable oldToNewReferencesLookup) { + public void updateOtherRecordReferences(Hashtable oldToNewReferencesLookup) { int[] slideIDs = getKnownSlideIDs(); // Loop over all the slides we know about diff --git a/src/scratchpad/src/org/apache/poi/hslf/record/PositionDependentRecord.java b/src/scratchpad/src/org/apache/poi/hslf/record/PositionDependentRecord.java index d32f33073..e73323c02 100644 --- a/src/scratchpad/src/org/apache/poi/hslf/record/PositionDependentRecord.java +++ b/src/scratchpad/src/org/apache/poi/hslf/record/PositionDependentRecord.java @@ -47,5 +47,5 @@ public interface PositionDependentRecord * Offer the record the list of records that have changed their * location as part of the writeout. */ - public void updateOtherRecordReferences(Hashtable oldToNewReferencesLookup); + public void updateOtherRecordReferences(Hashtable oldToNewReferencesLookup); } diff --git a/src/scratchpad/src/org/apache/poi/hslf/record/PositionDependentRecordAtom.java b/src/scratchpad/src/org/apache/poi/hslf/record/PositionDependentRecordAtom.java index adec35908..28228eab3 100644 --- a/src/scratchpad/src/org/apache/poi/hslf/record/PositionDependentRecordAtom.java +++ b/src/scratchpad/src/org/apache/poi/hslf/record/PositionDependentRecordAtom.java @@ -48,5 +48,5 @@ public abstract class PositionDependentRecordAtom extends RecordAtom implements * Allows records to update their internal pointers to other records * locations */ - public abstract void updateOtherRecordReferences(Hashtable oldToNewReferencesLookup); + public abstract void updateOtherRecordReferences(Hashtable oldToNewReferencesLookup); }