You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by jo...@apache.org on 2009/05/21 20:15:01 UTC

svn commit: r777204 [12/21] - in /poi/trunk/src/scratchpad: examples/src/org/apache/poi/hslf/examples/ examples/src/org/apache/poi/hwpf/ src/org/apache/poi/hdf/event/ src/org/apache/poi/hdf/extractor/ src/org/apache/poi/hdf/extractor/data/ src/org/apac...

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/SoundData.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/SoundData.java?rev=777204&r1=777203&r2=777204&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/SoundData.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/SoundData.java Thu May 21 18:12:22 2009
@@ -1,93 +1,94 @@
-/* ====================================================================
-   Licensed to the Apache Software Foundation (ASF) under one or more
-   contributor license agreements.  See the NOTICE file distributed with
-   this work for additional information regarding copyright ownership.
-   The ASF licenses this file to You under the Apache License, Version 2.0
-   (the "License"); you may not use this file except in compliance with
-   the License.  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-==================================================================== */
-package org.apache.poi.hslf.usermodel;
-
-import org.apache.poi.hslf.record.*;
-
-import java.util.ArrayList;
-
-/**
- * A class that represents sound data embedded in a slide show.
- *
- * @author Yegor Kozlov
- */
-public class SoundData {
-    /**
-     * The record that contains the object data.
-     */
-    private Sound _container;
-
-    /**
-     * Creates the object data wrapping the record that contains the sound data.
-     *
-     * @param container the record that contains the sound data.
-     */
-    public SoundData(Sound container) {
-        this._container = container;
-    }
-
-    /**
-     * Name of the sound (e.g. "crash")
-     *
-     * @return name of the sound
-     */
-    public String getSoundName(){
-        return _container.getSoundName();
-    }
-
-    /**
-     * Type of the sound (e.g. ".wav")
-     *
-     * @return type of the sound
-     */
-    public String getSoundType(){
-        return _container.getSoundType();
-    }
-
-    /**
-     * Gets an input stream which returns the binary of the sound data.
-     *
-     * @return the input stream which will contain the binary of the sound data.
-     */
-    public byte[] getData() {
-        return _container.getSoundData();
-    }
-
-    /**
-     * Find all sound records in the supplied Document records
-     *
-     * @param document the document to find in
-     * @return the array with the sound data
-     */
-    public static SoundData[] find(Document document){
-        ArrayList lst = new ArrayList();
-        Record[] ch = document.getChildRecords();
-        for (int i = 0; i < ch.length; i++) {
-            if(ch[i].getRecordType() == RecordTypes.SoundCollection.typeID){
-                RecordContainer col = (RecordContainer)ch[i];
-                Record[] sr = col.getChildRecords();
-                for (int j = 0; j < sr.length; j++) {
-                    if(sr[j] instanceof Sound){
-                        lst.add(new SoundData((Sound)sr[j]));
-                    }
-                }
-            }
-
-        }
-        return (SoundData[])lst.toArray(new SoundData[lst.size()]);
-    }
-}
+/* ====================================================================
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+==================================================================== */
+
+package org.apache.poi.hslf.usermodel;
+
+import org.apache.poi.hslf.record.*;
+
+import java.util.ArrayList;
+
+/**
+ * A class that represents sound data embedded in a slide show.
+ *
+ * @author Yegor Kozlov
+ */
+public final class SoundData {
+    /**
+     * The record that contains the object data.
+     */
+    private Sound _container;
+
+    /**
+     * Creates the object data wrapping the record that contains the sound data.
+     *
+     * @param container the record that contains the sound data.
+     */
+    public SoundData(Sound container) {
+        this._container = container;
+    }
+
+    /**
+     * Name of the sound (e.g. "crash")
+     *
+     * @return name of the sound
+     */
+    public String getSoundName(){
+        return _container.getSoundName();
+    }
+
+    /**
+     * Type of the sound (e.g. ".wav")
+     *
+     * @return type of the sound
+     */
+    public String getSoundType(){
+        return _container.getSoundType();
+    }
+
+    /**
+     * Gets an input stream which returns the binary of the sound data.
+     *
+     * @return the input stream which will contain the binary of the sound data.
+     */
+    public byte[] getData() {
+        return _container.getSoundData();
+    }
+
+    /**
+     * Find all sound records in the supplied Document records
+     *
+     * @param document the document to find in
+     * @return the array with the sound data
+     */
+    public static SoundData[] find(Document document){
+        ArrayList lst = new ArrayList();
+        Record[] ch = document.getChildRecords();
+        for (int i = 0; i < ch.length; i++) {
+            if(ch[i].getRecordType() == RecordTypes.SoundCollection.typeID){
+                RecordContainer col = (RecordContainer)ch[i];
+                Record[] sr = col.getChildRecords();
+                for (int j = 0; j < sr.length; j++) {
+                    if(sr[j] instanceof Sound){
+                        lst.add(new SoundData((Sound)sr[j]));
+                    }
+                }
+            }
+
+        }
+        return (SoundData[])lst.toArray(new SoundData[lst.size()]);
+    }
+}

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hslf/util/MutableByteArrayOutputStream.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/util/MutableByteArrayOutputStream.java?rev=777204&r1=777203&r2=777204&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hslf/util/MutableByteArrayOutputStream.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hslf/util/MutableByteArrayOutputStream.java Thu May 21 18:12:22 2009
@@ -1,4 +1,3 @@
-
 /* ====================================================================
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
@@ -15,7 +14,6 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 ==================================================================== */
-        
 
 package org.apache.poi.hslf.util;
 
@@ -29,7 +27,7 @@
  * @author Nick Burch
  */
 
-public class MutableByteArrayOutputStream extends ByteArrayOutputStream
+public final class MutableByteArrayOutputStream extends ByteArrayOutputStream
 {
 	/** Return how many bytes we've stuffed in so far */
 	public int getBytesWritten() { return -1; }

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hslf/util/SystemTimeUtils.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/util/SystemTimeUtils.java?rev=777204&r1=777203&r2=777204&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hslf/util/SystemTimeUtils.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hslf/util/SystemTimeUtils.java Thu May 21 18:12:22 2009
@@ -26,7 +26,7 @@
 /**
  * A helper class for dealing with SystemTime Structs, as defined at
  * http://msdn.microsoft.com/library/en-us/sysinfo/base/systemtime_str.asp .
- * 
+ *
  * Discrepancies between Calendar and SYSTEMTIME:
  *  - that January = 1 in SYSTEMTIME, 0 in Calendar.
  *  - that the day of the week (0) starts on Sunday in SYSTEMTIME, and Monday in Calendar
@@ -36,7 +36,7 @@
  * @author Daniel Noll
  * @author Nick Burch
  */
-public class SystemTimeUtils {
+public final class SystemTimeUtils {
 	/**
 	 * Get the date found in the byte array, as a java Data object
 	 */
@@ -48,10 +48,10 @@
 	 */
 	public static Date getDate(byte[] data, int offset) {
         Calendar cal = new GregorianCalendar();
-        
+
         cal.set(Calendar.YEAR,         LittleEndian.getShort(data,offset));
         cal.set(Calendar.MONTH,        LittleEndian.getShort(data,offset+2)-1);
-        // Not actually needed - can be found from day of month 
+        // Not actually needed - can be found from day of month
         //cal.set(Calendar.DAY_OF_WEEK,  LittleEndian.getShort(data,offset+4)+1);
         cal.set(Calendar.DAY_OF_MONTH, LittleEndian.getShort(data,offset+6));
         cal.set(Calendar.HOUR_OF_DAY,  LittleEndian.getShort(data,offset+8));
@@ -61,17 +61,17 @@
 
         return cal.getTime();
 	}
-	
+
 	/**
 	 * Convert the supplied java Date into a SystemTime struct, and write it
-	 *  into the supplied byte array. 
+	 *  into the supplied byte array.
 	 */
 	public static void storeDate(Date date, byte[] dest) {
 		storeDate(date, dest, 0);
 	}
 	/**
 	 * Convert the supplied java Date into a SystemTime struct, and write it
-	 *  into the supplied byte array. 
+	 *  into the supplied byte array.
 	 */
 	public static void storeDate(Date date, byte[] dest, int offset) {
         Calendar cal = new GregorianCalendar();

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/datatypes/Chunk.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/datatypes/Chunk.java?rev=777204&r1=777203&r2=777204&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/datatypes/Chunk.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/datatypes/Chunk.java Thu May 21 18:12:22 2009
@@ -23,39 +23,39 @@
 	protected int chunkId;
 	protected int type;
 	protected String namePrefix = "__substg1.0_";
-	
+
 	/**
 	 * Gets the id of this chunk
 	 */
 	public int getChunkId() {
 		return this.chunkId;
 	}
-	
+
 	/**
 	 * Gets the numeric type of this chunk.
 	 */
 	public int getType() {
 		return this.type;
 	}
-	
+
 	/**
 	 * Creates a string to use to identify this chunk in the POI file system object.
 	 */
 	public String getEntryName() {
 		String type = Integer.toHexString(this.type);
 		while(type.length() < 4) type = "0" + type;
-		
+
 		String chunkId = Integer.toHexString(this.chunkId);
 		while(chunkId.length() < 4) chunkId = "0" + chunkId;
-		
+
 		return this.namePrefix + chunkId.toUpperCase() + type.toUpperCase();
 	}
-	
+
 	/**
 	 * Gets a reference to a ByteArrayOutputStream that contains the value of this chunk.
 	 */
 	public abstract ByteArrayOutputStream getValueByteArray();
-	
+
 	/**
 	 * Sets the value of this chunk using a OutputStream
 	 * @param value

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/datatypes/Chunks.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/datatypes/Chunks.java?rev=777204&r1=777203&r2=777204&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/datatypes/Chunks.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/datatypes/Chunks.java Thu May 21 18:12:22 2009
@@ -20,10 +20,10 @@
 
 /**
  * Collection of convenence chunks for standard parts of the MSG file.
- * 
+ *
  * @author Travis Ferguson
  */
-public class Chunks {
+public final class Chunks {
 	/* String parts of Outlook Messages that are currently known */
 
 	/** Type of message that the MSG represents (ie. IPM.Note) */
@@ -44,7 +44,7 @@
 	public StringChunk conversationTopic;
 	/** Type of server that the message originated from (SMTP, etc). */
 	public StringChunk sentByServerType;
-	
+
 	private Chunks(boolean newStringType) {
 		messageClass = new StringChunk(0x001A, newStringType);
 		textBodyChunk = new StringChunk(0x1000, newStringType);
@@ -56,7 +56,7 @@
 		conversationTopic = new StringChunk(0x0070, newStringType);
 		sentByServerType = new StringChunk(0x0075, newStringType);
 	}
-	
+
 	public static Chunks getInstance(boolean newStringType) {
 		return new Chunks(newStringType);
 	}

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/datatypes/Types.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/datatypes/Types.java?rev=777204&r1=777203&r2=777204&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/datatypes/Types.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/datatypes/Types.java Thu May 21 18:12:22 2009
@@ -17,18 +17,18 @@
 
 package org.apache.poi.hsmf.datatypes;
 
-public class Types {
+public final class Types {
 	public static int BINARY = 0x0102;
-	
+
 	/** A string, until Outlook 3.0 */
 	public static int OLD_STRING = 0x001E;
 	/** A string, from Outlook 3.0 onwards */
 	public static int NEW_STRING = 0x001F;
-	
+
 	public static int LONG = 0x0003;
 	public static int TIME = 0x0040;
 	public static int BOOLEAN = 0x000B;
-	
+
 	public static String asFileEnding(int type) {
 		String str = Integer.toHexString(type).toUpperCase();
 		while(str.length() < 4) {

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/exceptions/ChunkNotFoundException.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/exceptions/ChunkNotFoundException.java?rev=777204&r1=777203&r2=777204&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/exceptions/ChunkNotFoundException.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/exceptions/ChunkNotFoundException.java Thu May 21 18:12:22 2009
@@ -17,7 +17,7 @@
 
 package org.apache.poi.hsmf.exceptions;
 
-public class ChunkNotFoundException extends Exception {
+public final class ChunkNotFoundException extends Exception {
 	private static final long serialVersionUID = 1L;
 
 	public ChunkNotFoundException(String chunkName) {

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/exceptions/DirectoryChunkNotFoundException.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/exceptions/DirectoryChunkNotFoundException.java?rev=777204&r1=777203&r2=777204&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/exceptions/DirectoryChunkNotFoundException.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/exceptions/DirectoryChunkNotFoundException.java Thu May 21 18:12:22 2009
@@ -21,7 +21,7 @@
  * Exception for when a directory chunk is not found but is expected.
  * @author Travis Ferguson
  */
-public class DirectoryChunkNotFoundException extends Exception {
+public final class DirectoryChunkNotFoundException extends Exception {
 	private static final long serialVersionUID = 1L;
 
 	public DirectoryChunkNotFoundException(String directory) {

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hssf/usermodel/HSSFChart.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hssf/usermodel/HSSFChart.java?rev=777204&r1=777203&r2=777204&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hssf/usermodel/HSSFChart.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hssf/usermodel/HSSFChart.java Thu May 21 18:12:22 2009
@@ -45,13 +45,13 @@
  */
 public final class HSSFChart {
 	private ChartRecord chartRecord;
-	
+
 	private LegendRecord legendRecord;
 	private ChartTitleFormatRecord chartTitleFormat;
 	private SeriesTextRecord chartTitleText;
-	
+
 	private List series = new ArrayList();
-	
+
 	private HSSFChart(ChartRecord chartRecord) {
 		this.chartRecord = chartRecord;
 	}
@@ -129,22 +129,22 @@
 		sheet.insertChartRecords( records );
 		workbook.insertChartRecord();
 	}
-	
+
 	/**
 	 * Returns all the charts for the given sheet.
-	 * 
+	 *
 	 * NOTE: You won't be able to do very much with
 	 *  these charts yet, as this is very limited support
 	 */
 	public static HSSFChart[] getSheetCharts(HSSFSheet sheet) {
 		List charts = new ArrayList();
 		HSSFChart lastChart = null;
-		
+
 		// Find records of interest
 		List records = sheet.getSheet().getRecords();
 		for(Iterator it = records.iterator(); it.hasNext();) {
 			RecordBase r = (RecordBase)it.next();
-			
+
 			if(r instanceof ChartRecord) {
 				lastChart = new HSSFChart((ChartRecord)r);
 				charts.add(lastChart);
@@ -174,7 +174,7 @@
 				}
 			}
 		}
-		
+
 		return (HSSFChart[])
 			charts.toArray( new HSSFChart[charts.size()] );
 	}
@@ -196,7 +196,7 @@
 	public void setChartWidth(int width) { chartRecord.setWidth(width); }
 	/** Sets the height of the chart. {@link ChartRecord} */
 	public void setChartHeight(int height) { chartRecord.setHeight(height); }
-	
+
 	/**
 	 * Returns the series of the chart
 	 */
@@ -204,7 +204,7 @@
 		return (HSSFSeries[])
 			series.toArray(new HSSFSeries[series.size()]);
 	}
-	
+
 	/**
 	 * Returns the chart's title, if there is one,
 	 *  or null if not
@@ -215,9 +215,9 @@
 		}
 		return null;
 	}
-	
+
 	/**
-	 * Changes the chart's title, but only if there 
+	 * Changes the chart's title, but only if there
 	 *  was one already.
 	 * TODO - add in the records if not
 	 */
@@ -860,18 +860,18 @@
 		return r;
 	}
 
-	
+
 	/**
 	 * A series in a chart
 	 */
 	public class HSSFSeries {
 		private SeriesRecord series;
 		private SeriesTextRecord seriesTitleText;
-		
+
 		/* package */ HSSFSeries(SeriesRecord series) {
 			this.series = series;
 		}
-		
+
 		public short getNumValues() {
 			return series.getNumValues();
 		}
@@ -881,7 +881,7 @@
 		public short getValueType() {
 			return series.getValuesDataType();
 		}
-		
+
 		/**
 		 * Returns the series' title, if there is one,
 		 *  or null if not
@@ -892,9 +892,9 @@
 			}
 			return null;
 		}
-		
+
 		/**
-		 * Changes the series' title, but only if there 
+		 * Changes the series' title, but only if there
 		 *  was one already.
 		 * TODO - add in the records if not
 		 */

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/HWPFDocument.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/HWPFDocument.java?rev=777204&r1=777203&r2=777204&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/HWPFDocument.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/HWPFDocument.java Thu May 21 18:12:22 2009
@@ -15,7 +15,6 @@
    limitations under the License.
 ==================================================================== */
 
-
 package org.apache.poi.hwpf;
 
 import java.io.InputStream;
@@ -47,7 +46,7 @@
  *
  * @author Ryan Ackley
  */
-public class HWPFDocument extends POIDocument
+public final class HWPFDocument extends POIDocument
 //  implements Cloneable
 {
   /** The FIB */
@@ -93,13 +92,13 @@
 
   /** Holds the save history for this document. */
   protected SavedByTable _sbt;
-  
+
   /** Holds pictures table */
   protected PicturesTable _pictures;
-  
+
   /** Holds FSBA (shape) information */
   protected FSPATable _fspa;
-  
+
   /** Escher Drawing Group information */
   protected EscherRecordHolder _dgg;
 
@@ -145,7 +144,7 @@
     //do Ole stuff
     this( verifyAndBuildPOIFS(istream) );
   }
-  
+
   /**
    * This constructor loads a Word document from a POIFSFileSystem
    *
@@ -157,7 +156,7 @@
   {
 	this(pfilesystem.getRoot(), pfilesystem);
   }
-  
+
   /**
    * This constructor loads a Word document from a specific point
    *  in a POIFSFileSystem, probably not the default.
@@ -172,12 +171,12 @@
     // Sort out the hpsf properties
 	super(directory, pfilesystem);
     readProperties();
-    
+
     // read in the main stream.
     DocumentEntry documentProps = (DocumentEntry)
        directory.getEntry("WordDocument");
     _mainStream = new byte[documentProps.getSize()];
-    
+
     directory.createDocumentInputStream("WordDocument").read(_mainStream);
 
     // Create our FIB, and check for the doc being encrypted
@@ -225,26 +224,26 @@
     // Get the cp of the start of text in the main stream
     // The latest spec doc says this is always zero!
     int fcMin = 0;
-    //fcMin = _fib.getFcMin() 
+    //fcMin = _fib.getFcMin()
 
     // Start to load up our standard structures.
     _dop = new DocumentProperties(_tableStream, _fib.getFcDop());
     _cft = new ComplexFileTable(_mainStream, _tableStream, _fib.getFcClx(), fcMin);
     _tpt = _cft.getTextPieceTable();
-    
+
     // Word XP and later all put in a zero filled buffer in
     //  front of the text. This screws up the system for offsets,
     //  which assume we always start at zero. This is an adjustment.
     int cpMin = _tpt.getCpMin();
-    
+
     // Now load the rest of the properties, which need to be adjusted
     //  for where text really begin
     _cbt = new CHPBinTable(_mainStream, _tableStream, _fib.getFcPlcfbteChpx(), _fib.getLcbPlcfbteChpx(), cpMin, _tpt);
     _pbt = new PAPBinTable(_mainStream, _tableStream, _dataStream, _fib.getFcPlcfbtePapx(), _fib.getLcbPlcfbtePapx(), cpMin, _tpt);
-    
+
     // Read FSPA and Escher information
     _fspa = new FSPATable(_tableStream, _fib.getFcPlcspaMom(), _fib.getLcbPlcspaMom(), getTextTable().getTextPieces());
-    
+
     if (_fib.getFcDggInfo() != 0)
     {
         _dgg = new EscherRecordHolder(_tableStream, _fib.getFcDggInfo(), _fib.getLcbDggInfo());
@@ -252,7 +251,7 @@
     {
         _dgg = new EscherRecordHolder();
     }
-    
+
     // read in the pictures stream
     _pictures = new PicturesTable(this, _dataStream, _mainStream, _fspa, _dgg);
     // And the art shapes stream
@@ -303,7 +302,7 @@
   {
     return _dop;
   }
-  
+
   /**
    * Returns the range that covers all text in the
    *  file, including main text, footnotes, headers
@@ -325,35 +324,35 @@
 	  // First up, trigger a full-recalculate
 	  // Needed in case of deletes etc
 	  getOverallRange();
-	  
+
 	  // Now, return the real one
 	  return new Range(
-			  _cpSplit.getMainDocumentStart(), 
-			  _cpSplit.getMainDocumentEnd(), 
+			  _cpSplit.getMainDocumentStart(),
+			  _cpSplit.getMainDocumentEnd(),
 			  this
       );
   }
-  
+
   /**
    * Returns the range which covers all the Footnotes.
    */
   public Range getFootnoteRange() {
 	  return new Range(
-			  _cpSplit.getFootnoteStart(), 
-			  _cpSplit.getFootnoteEnd(), 
+			  _cpSplit.getFootnoteStart(),
+			  _cpSplit.getFootnoteEnd(),
 			  this
       );
   }
-  
+
   /**
    * Returns the range which covers all "Header Stories".
    * A header story contains a header, footer, end note
-   *  separators and footnote separators. 
+   *  separators and footnote separators.
    */
   public Range getHeaderStoryRange() {
 	  return new Range(
-			  _cpSplit.getHeaderStoryStart(), 
-			  _cpSplit.getHeaderStoryEnd(), 
+			  _cpSplit.getHeaderStoryStart(),
+			  _cpSplit.getHeaderStoryEnd(),
 			  this
       );
   }
@@ -390,14 +389,14 @@
   {
     return _sbt;
   }
-  
+
   /**
    * @return PicturesTable object, that is able to extract images from this document
    */
   public PicturesTable getPicturesTable() {
 	  return _pictures;
   }
-  
+
   /**
    * @return ShapesTable object, that is able to extract office are shapes from this document
    */
@@ -553,7 +552,7 @@
     pfs.createDocument(new ByteArrayInputStream(tableBuf), "1Table");
     pfs.createDocument(new ByteArrayInputStream(dataBuf), "Data");
     writeProperties(pfs);
-    
+
     pfs.writeFilesystem(out);
   }
 

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/QuickTest.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/QuickTest.java?rev=777204&r1=777203&r2=777204&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/QuickTest.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/QuickTest.java Thu May 21 18:12:22 2009
@@ -1,4 +1,3 @@
-
 /* ====================================================================
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
@@ -15,14 +14,14 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 ==================================================================== */
-        
+
 package org.apache.poi.hwpf;
 
 import java.io.*;
 
 import org.apache.poi.hwpf.usermodel.*;
 
-public class QuickTest
+public final class QuickTest
 {
   public QuickTest()
   {

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/dev/HWPFLister.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/dev/HWPFLister.java?rev=777204&r1=777203&r2=777204&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/dev/HWPFLister.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/dev/HWPFLister.java Thu May 21 18:12:22 2009
@@ -14,6 +14,7 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 ==================================================================== */
+
 package org.apache.poi.hwpf.dev;
 
 import java.io.FileInputStream;
@@ -26,25 +27,25 @@
  *  HWPF file. End users will probably never need to
  *  use this program.
  */
-public class HWPFLister {
+public final class HWPFLister {
 	private HWPFDocument doc;
 	public HWPFLister(HWPFDocument doc) {
 		this.doc = doc;
 	}
-	
+
 	public static void main(String[] args) throws Exception {
 		if(args.length == 0) {
 			System.err.println("Use:");
 			System.err.println("   HWPFLister <filename>");
 			System.exit(1);
 		}
-		
+
 		HWPFLister l = new HWPFLister(
 				new HWPFDocument(new FileInputStream(args[0]))
 		);
 		l.dumpFIB();
 	}
-	
+
 	public void dumpFIB() throws Exception {
 		FileInformationBlock fib = doc.getFileInformationBlock();
 		System.out.println(fib.toString());

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/extractor/WordExtractor.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/extractor/WordExtractor.java?rev=777204&r1=777203&r2=777204&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/extractor/WordExtractor.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/extractor/WordExtractor.java Thu May 21 18:12:22 2009
@@ -1,19 +1,20 @@
-/*
-* Licensed to the Apache Software Foundation (ASF) under one or more
-* contributor license agreements.  See the NOTICE file distributed with
-* this work for additional information regarding copyright ownership.
-* The ASF licenses this file to You under the Apache License, Version 2.0
-* (the "License"); you may not use this file except in compliance with
-* the License.  You may obtain a copy of the License at
-*
-*     http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
+/* ====================================================================
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+==================================================================== */
+
 package org.apache.poi.hwpf.extractor;
 
 import java.io.IOException;
@@ -33,16 +34,16 @@
 
 /**
  * Class to extract the text from a Word Document.
- * 
+ *
  * You should use either getParagraphText() or getText() unless
  *  you have a strong reason otherwise.
  *
  * @author Nick Burch (nick at torchbox dot com)
  */
-public class WordExtractor extends POIOLE2TextExtractor {
+public final class WordExtractor extends POIOLE2TextExtractor {
 	private POIFSFileSystem fs;
 	private HWPFDocument doc;
-	
+
 	/**
 	 * Create a new Word Extractor
 	 * @param is InputStream containing the word file
@@ -63,7 +64,7 @@
 		this(new HWPFDocument(dir, fs));
 		this.fs = fs;
 	}
-	
+
 	/**
 	 * Create a new Word Extractor
 	 * @param doc The HWPFDocument to extract from
@@ -89,14 +90,14 @@
 		WordExtractor extractor = new WordExtractor(fin);
 		System.out.println(extractor.getText());
 	}
-	
+
 	/**
 	 * Get the text from the word file, as an array with one String
 	 *  per paragraph
 	 */
 	public String[] getParagraphText() {
 		String[] ret;
-		
+
 		// Extract using the model code
 		try {
 	    	Range r = doc.getRange();
@@ -105,7 +106,7 @@
 			for(int i=0; i<ret.length; i++) {
 				Paragraph p = r.getParagraph(i);
 				ret[i] = p.text();
-				
+
 				// Fix the line ending
 				if(ret[i].endsWith("\r")) {
 					ret[i] = ret[i] + "\n";
@@ -117,10 +118,10 @@
 			ret = new String[1];
 			ret[0] = getTextFromPieces();
 		}
-		
+
 		return ret;
 	}
-	
+
 	/**
 	 * Add the header/footer text, if it's not empty
 	 */
@@ -146,7 +147,7 @@
 	 */
 	public String getHeaderText() {
 		HeaderStories hs = new HeaderStories(doc);
-		
+
 		StringBuffer ret = new StringBuffer();
 		if(hs.getFirstHeader() != null) {
 			appendHeaderFooter(hs.getFirstHeader(), ret);
@@ -157,7 +158,7 @@
 		if(hs.getOddHeader() != null) {
 			appendHeaderFooter(hs.getOddHeader(), ret);
 		}
-		
+
 		return ret.toString();
 	}
 	/**
@@ -165,7 +166,7 @@
 	 */
 	public String getFooterText() {
 		HeaderStories hs = new HeaderStories(doc);
-		
+
 		StringBuffer ret = new StringBuffer();
 		if(hs.getFirstFooter() != null) {
 			appendHeaderFooter(hs.getFirstFooter(), ret);
@@ -176,10 +177,10 @@
 		if(hs.getOddFooter() != null) {
 			appendHeaderFooter(hs.getOddFooter(), ret);
 		}
-		
+
 		return ret.toString();
 	}
-	
+
 	/**
 	 * Grab the text out of the text pieces. Might also include various
 	 *  bits of crud, but will work in cases where the text piece -> paragraph
@@ -187,7 +188,7 @@
 	 */
 	public String getTextFromPieces() {
     	StringBuffer textBuf = new StringBuffer();
-    	
+
     	Iterator textPieces = doc.getTextTable().getTextPieces().iterator();
     	while (textPieces.hasNext()) {
     		TextPiece piece = (TextPiece) textPieces.next();
@@ -203,39 +204,39 @@
     			throw new InternalError("Standard Encoding " + encoding + " not found, JVM broken");
     		}
     	}
-    	
+
     	String text = textBuf.toString();
-    	
+
     	// Fix line endings (Note - won't get all of them
     	text = text.replaceAll("\r\r\r", "\r\n\r\n\r\n");
     	text = text.replaceAll("\r\r", "\r\n\r\n");
-    	
+
     	if(text.endsWith("\r")) {
     		text += "\n";
     	}
-    	
+
     	return text;
 	}
-	
+
 	/**
 	 * Grab the text, based on the paragraphs. Shouldn't include any crud,
 	 *  but slightly slower than getTextFromPieces().
 	 */
 	public String getText() {
 		StringBuffer ret = new StringBuffer();
-		
+
 		ret.append(getHeaderText());
-		
+
 		String[] text = getParagraphText();
 		for(int i=0; i<text.length; i++) {
 			ret.append(text[i]);
 		}
-		
+
 		ret.append(getFooterText());
-		
+
 		return ret.toString();
 	}
-	
+
 	/**
 	 * Removes any fields (eg macros, page markers etc)
 	 *  from the string.

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/BytePropertyNode.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/BytePropertyNode.java?rev=777204&r1=777203&r2=777204&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/BytePropertyNode.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/BytePropertyNode.java Thu May 21 18:12:22 2009
@@ -14,6 +14,7 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 ==================================================================== */
+
 package org.apache.poi.hwpf.model;
 
 /**
@@ -25,7 +26,7 @@
  */
 public abstract class BytePropertyNode extends PropertyNode {
 	private boolean isUnicode;
-	
+
 	/**
 	 * @param fcStart The start of the text for this property, in _bytes_
 	 * @param fcEnd The end of the text for this property, in _bytes_
@@ -43,7 +44,7 @@
 			return val/2;
 		return val;
 	}
-	
+
 	public boolean isUnicode() {
 		return isUnicode;
 	}

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/CHPBinTable.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/CHPBinTable.java?rev=777204&r1=777203&r2=777204&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/CHPBinTable.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/CHPBinTable.java Thu May 21 18:12:22 2009
@@ -32,7 +32,7 @@
  *
  * @author Ryan Ackley
  */
-public class CHPBinTable
+public final class CHPBinTable
 {
   /** List of character properties.*/
   protected ArrayList _textRuns = new ArrayList();
@@ -120,13 +120,13 @@
   public void insert(int listIndex, int cpStart, SprmBuffer buf)
   {
 	boolean needsToBeUnicode = tpt.isUnicodeAtCharOffset(cpStart);
-	  
+
     CHPX insertChpx = new CHPX(0, 0, buf, needsToBeUnicode);
-    
+
     // Ensure character offsets are really characters
     insertChpx.setStart(cpStart);
     insertChpx.setEnd(cpStart);
-    
+
     if (listIndex == _textRuns.size())
     {
       _textRuns.add(insertChpx);
@@ -145,7 +145,7 @@
         // Again ensure contains character based offsets no matter what
         clone.setStart(cpStart);
         clone.setEnd(chpx.getEnd());
-        
+
         chpx.setEnd(cpStart);
 
         _textRuns.add(listIndex + 1, insertChpx);

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/CHPFormattedDiskPage.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/CHPFormattedDiskPage.java?rev=777204&r1=777203&r2=777204&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/CHPFormattedDiskPage.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/CHPFormattedDiskPage.java Thu May 21 18:12:22 2009
@@ -1,4 +1,3 @@
-
 /* ====================================================================
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
@@ -15,7 +14,7 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 ==================================================================== */
-        
+
 package org.apache.poi.hwpf.model;
 
 import java.util.List;
@@ -39,7 +38,7 @@
  *
  * @author Ryan Ackley
  */
-public class CHPFormattedDiskPage extends FormattedDiskPage
+public final class CHPFormattedDiskPage extends FormattedDiskPage
 {
     private static final int FC_SIZE = 4;
 

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/CHPX.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/CHPX.java?rev=777204&r1=777203&r2=777204&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/CHPX.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/CHPX.java Thu May 21 18:12:22 2009
@@ -1,4 +1,3 @@
-
 /* ====================================================================
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
@@ -15,8 +14,6 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 ==================================================================== */
-        
-
 
 package org.apache.poi.hwpf.model;
 
@@ -26,15 +23,15 @@
 
 /**
  * DANGER - works in bytes!
- * 
+ *
  * Make sure you call getStart() / getEnd() when you want characters
- *  (normal use), but getStartByte() / getEndByte() when you're 
+ *  (normal use), but getStartByte() / getEndByte() when you're
  *  reading in / writing out!
  *
  * @author Ryan Ackley
  */
 
-public class CHPX extends BytePropertyNode
+public final class CHPX extends BytePropertyNode
 {
 
   public CHPX(int fcStart, int fcEnd, byte[] grpprl, boolean isUnicode)

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/CPSplitCalculator.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/CPSplitCalculator.java?rev=777204&r1=777203&r2=777204&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/CPSplitCalculator.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/CPSplitCalculator.java Thu May 21 18:12:22 2009
@@ -14,6 +14,7 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 ==================================================================== */
+
 package org.apache.poi.hwpf.model;
 
 import org.apache.poi.hwpf.HWPFDocument;
@@ -23,12 +24,12 @@
  *  where different kinds of text can be found within the
  *  overall CP splurge.
  */
-public class CPSplitCalculator {
+public final class CPSplitCalculator {
 	private FileInformationBlock fib;
 	public CPSplitCalculator(FileInformationBlock fib) {
 		this.fib = fib;
 	}
-	
+
 	/**
 	 * Where the main document text starts. Always 0.
 	 */
@@ -36,13 +37,13 @@
 		return 0;
 	}
 	/**
-	 * Where the main document text ends. 
+	 * Where the main document text ends.
 	 * Given by FibRgLw97.ccpText
 	 */
 	public int getMainDocumentEnd() {
 		return fib.getCcpText();
 	}
-	
+
 	/**
 	 * Where the Footnotes text starts.
 	 * Follows straight on from the main text.
@@ -58,7 +59,7 @@
 		return getFootnoteStart() +
 			fib.getCcpFtn();
 	}
-	
+
 	/**
 	 * Where the "Header Story" text starts.
 	 * Follows straight on from the footnotes.
@@ -74,7 +75,7 @@
 		return getHeaderStoryStart() +
 			fib.getCcpHdd();
 	}
-	
+
 	/**
 	 * Where the Comment (Atn) text starts.
 	 * Follows straight on from the header stories.
@@ -90,7 +91,7 @@
 		return getCommentsStart() +
 			fib.getCcpCommentAtn();
 	}
-	
+
 	/**
 	 * Where the End Note text starts.
 	 * Follows straight on from the comments.
@@ -106,7 +107,7 @@
 		return getEndNoteStart() +
 			fib.getCcpEdn();
 	}
-	
+
 	/**
 	 * Where the Main Textbox text starts.
 	 * Follows straight on from the end note.
@@ -122,7 +123,7 @@
 		return getMainTextboxStart() +
 			fib.getCcpTxtBx();
 	}
-	
+
 	/**
 	 * Where the Header Textbox text starts.
 	 * Follows straight on from the main textbox.

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/CachedPropertyNode.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/CachedPropertyNode.java?rev=777204&r1=777203&r2=777204&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/CachedPropertyNode.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/CachedPropertyNode.java Thu May 21 18:12:22 2009
@@ -1,4 +1,3 @@
-
 /* ====================================================================
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
@@ -15,14 +14,14 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 ==================================================================== */
-        
+
 package org.apache.poi.hwpf.model;
 
 import org.apache.poi.hwpf.sprm.SprmBuffer;
 
 import java.lang.ref.SoftReference;
 
-public class CachedPropertyNode
+public final class CachedPropertyNode
   extends PropertyNode
 {
   protected SoftReference _propCache;

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/ComplexFileTable.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/ComplexFileTable.java?rev=777204&r1=777203&r2=777204&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/ComplexFileTable.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/ComplexFileTable.java Thu May 21 18:12:22 2009
@@ -1,4 +1,3 @@
-
 /* ====================================================================
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
@@ -15,8 +14,6 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 ==================================================================== */
-        
-
 
 package org.apache.poi.hwpf.model;
 
@@ -25,7 +22,7 @@
 import org.apache.poi.util.LittleEndian;
 import org.apache.poi.hwpf.model.io.*;
 
-public class ComplexFileTable
+public final class ComplexFileTable
 {
 
   private static final byte GRPPRL_TYPE = 1;

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/DocumentProperties.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/DocumentProperties.java?rev=777204&r1=777203&r2=777204&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/DocumentProperties.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/DocumentProperties.java Thu May 21 18:12:22 2009
@@ -1,4 +1,3 @@
-
 /* ====================================================================
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
@@ -15,8 +14,6 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 ==================================================================== */
-        
-
 
 package org.apache.poi.hwpf.model;
 
@@ -29,7 +26,7 @@
  * @author Ryan Ackley
  */
 
-public class DocumentProperties extends DOPAbstractType
+public final class DocumentProperties extends DOPAbstractType
 {
 
 

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/EscherRecordHolder.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/EscherRecordHolder.java?rev=777204&r1=777203&r2=777204&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/EscherRecordHolder.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/EscherRecordHolder.java Thu May 21 18:12:22 2009
@@ -27,21 +27,21 @@
 
 /**
  * Based on AbstractEscherRecordHolder from HSSF.
- * 
+ *
  * @author Squeeself
  */
 public final class EscherRecordHolder {
 	private final ArrayList<EscherRecord> escherRecords;
-	
+
 	public EscherRecordHolder() {
 		escherRecords = new ArrayList<EscherRecord>();
 	}
-	
+
 	public EscherRecordHolder(byte[] data, int offset, int size) {
 		this();
 		fillEscherRecords(data, offset, size);
 	}
-	
+
 	private void fillEscherRecords(byte[] data, int offset, int size)
 	{
 		EscherRecordFactory recordFactory = new DefaultEscherRecordFactory();
@@ -54,11 +54,11 @@
 			pos += bytesRead + 1; // There is an empty byte between each top-level record in a Word doc
 		}
 	}
-	
+
 	public List<EscherRecord> getEscherRecords() {
 		return escherRecords;
 	}
-	
+
 	public String toString() {
 		StringBuffer buffer = new StringBuffer();
 
@@ -72,7 +72,7 @@
 		}
 		return buffer.toString();
 	}
-	
+
 	/**
 	 * If we have a EscherContainerRecord as one of our
 	 *  children (and most top level escher holders do),
@@ -104,7 +104,7 @@
 				return r;
 			}
 		}
-		
+
 		// Then check our children in turn
 		for(Iterator<EscherRecord> it = records.iterator(); it.hasNext();) {
 			EscherRecord r = it.next();
@@ -115,7 +115,7 @@
 				}
 			}
 		}
-		
+
 		// Not found in this lot
 		return null;
 	}

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/FIBFieldHandler.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/FIBFieldHandler.java?rev=777204&r1=777203&r2=777204&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/FIBFieldHandler.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/FIBFieldHandler.java Thu May 21 18:12:22 2009
@@ -1,4 +1,3 @@
-
 /* ====================================================================
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
@@ -15,7 +14,7 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 ==================================================================== */
-        
+
 package org.apache.poi.hwpf.model;
 
 import java.util.HashSet;
@@ -29,7 +28,7 @@
 import org.apache.poi.util.POILogFactory;
 import org.apache.poi.util.POILogger;
 
-public class FIBFieldHandler
+public final class FIBFieldHandler
 {
   public static final int STSHFORIG = 0;
   public static final int STSHF = 1;

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/FIBLongHandler.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/FIBLongHandler.java?rev=777204&r1=777203&r2=777204&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/FIBLongHandler.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/FIBLongHandler.java Thu May 21 18:12:22 2009
@@ -1,4 +1,3 @@
-
 /* ====================================================================
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
@@ -15,7 +14,7 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 ==================================================================== */
-        
+
 package org.apache.poi.hwpf.model;
 
 import java.io.IOException;
@@ -26,7 +25,7 @@
  * Handles the fibRgLw / The FibRgLw97 part of
  *  the FIB (File Information Block)
  */
-public class FIBLongHandler {
+public final class FIBLongHandler {
   public static final int CBMAC = 0;
   public static final int PRODUCTCREATED = 1;
   public static final int PRODUCTREVISED = 2;

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/FIBShortHandler.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/FIBShortHandler.java?rev=777204&r1=777203&r2=777204&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/FIBShortHandler.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/FIBShortHandler.java Thu May 21 18:12:22 2009
@@ -1,4 +1,3 @@
-
 /* ====================================================================
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
@@ -15,7 +14,7 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 ==================================================================== */
-        
+
 package org.apache.poi.hwpf.model;
 
 import java.io.IOException;
@@ -23,10 +22,10 @@
 import org.apache.poi.util.LittleEndian;
 
 /**
- * Handles the fibRgW / FibRgW97 part of 
+ * Handles the fibRgW / FibRgW97 part of
  *  the FIB (File Information Block)
  */
-public class FIBShortHandler {
+public final class FIBShortHandler {
   public final static int MAGICCREATED = 0;
   public final static int MAGICREVISED = 1;
   public final static int MAGICCREATEDPRIVATE = 2;

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/FSPA.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/FSPA.java?rev=777204&r1=777203&r2=777204&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/FSPA.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/FSPA.java Thu May 21 18:12:22 2009
@@ -23,10 +23,10 @@
 
 /**
  * File Shape Address structure
- * 
+ *
  * @author Squeeself
  */
-public class FSPA 
+public final class FSPA
 {
     public static final int FSPA_SIZE = 26;
     private int spid; // Shape identifier. Used to get data position
@@ -44,11 +44,11 @@
         private static BitField fBelowText = BitFieldFactory.getInstance(0x4000); // if true, shape is below text, otherwise above
         private static BitField fAnchorLock = BitFieldFactory.getInstance(0x8000); // if true, anchor is locked
     private int cTxbx; // Count of textboxes in shape (undo doc only)
-    
+
     public FSPA()
     {
     }
-    
+
     public FSPA(byte[] bytes, int offset)
     {
         spid = LittleEndian.getInt(bytes, offset);
@@ -65,77 +65,77 @@
         offset += LittleEndian.SHORT_SIZE;
         cTxbx = LittleEndian.getInt(bytes, offset);
     }
-    
+
     public int getSpid()
     {
         return spid;
     }
-    
+
     public int getXaLeft()
     {
         return xaLeft;
     }
-    
+
     public int getYaTop()
     {
         return yaTop;
     }
-    
+
     public int getXaRight()
     {
         return xaRight;
     }
-    
+
     public int getYaBottom()
     {
         return yaBottom;
     }
-    
+
     public boolean isFHdr()
     {
         return fHdr.isSet(options);
     }
-    
+
     public short getBx()
     {
         return bx.getShortValue(options);
     }
-    
+
     public short getBy()
     {
         return by.getShortValue(options);
     }
-    
+
     public short getWr()
     {
         return wr.getShortValue(options);
     }
-    
+
     public short getWrk()
     {
         return wrk.getShortValue(options);
     }
-    
+
     public boolean isFRcaSimple()
     {
         return fRcaSimple.isSet(options);
     }
-    
+
     public boolean isFBelowText()
     {
         return fBelowText.isSet(options);
     }
-    
+
     public boolean isFAnchorLock()
     {
         return fAnchorLock.isSet(options);
     }
-    
+
     public int getCTxbx()
     {
         return cTxbx;
     }
-    
+
     public byte[] toByteArray()
     {
         int offset = 0;
@@ -158,7 +158,7 @@
 
         return buf;
     }
-    
+
     public String toString()
     {
         StringBuffer buf = new StringBuffer();

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/FSPATable.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/FSPATable.java?rev=777204&r1=777203&r2=777204&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/FSPATable.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/FSPATable.java Thu May 21 18:12:22 2009
@@ -25,33 +25,33 @@
 
 /**
  * This class holds all the FSPA (File Shape Address) structures.
- * 
+ *
  * @author Squeeself
  */
-public final class FSPATable 
+public final class FSPATable
 {
     private final List _shapes = new ArrayList();
     private final Map _shapeIndexesByPropertyStart = new HashMap();
     private final List _text;
-    
+
     public FSPATable(byte[] tableStream, int fcPlcspa, int lcbPlcspa, List tpt)
     {
         _text = tpt;
         // Will be 0 if no drawing objects in document
         if (fcPlcspa == 0)
             return;
-        
+
         PlexOfCps plex = new PlexOfCps(tableStream, fcPlcspa, lcbPlcspa, FSPA.FSPA_SIZE);
         for (int i=0; i < plex.length(); i++)
         {
             GenericPropertyNode property = plex.getProperty(i);
             FSPA fspa = new FSPA(property.getBytes(), 0);
-            
+
             _shapes.add(fspa);
             _shapeIndexesByPropertyStart.put(new Integer(property.getStart()), new Integer(i));
         }
     }
-    
+
     public FSPA getFspaFromCp(int cp)
     {
         Integer idx = (Integer)_shapeIndexesByPropertyStart.get(new Integer(cp));
@@ -60,14 +60,14 @@
         }
         return (FSPA)_shapes.get(idx.intValue());
     }
-    
+
     public FSPA[] getShapes()
     {
         FSPA[] result = new FSPA[_shapes.size()];
         _shapes.toArray(result);
         return result;
     }
-    
+
     public String toString()
     {
         StringBuffer buf = new StringBuffer();

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/Ffn.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/Ffn.java?rev=777204&r1=777203&r2=777204&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/Ffn.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/Ffn.java Thu May 21 18:12:22 2009
@@ -1,4 +1,3 @@
-
 /* ====================================================================
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
@@ -15,7 +14,6 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 ==================================================================== */
-        
 
 package org.apache.poi.hwpf.model;
 
@@ -31,7 +29,7 @@
  *
  * @author Praveen Mathew
  */
-public class Ffn
+public final class Ffn
 {
   private int _cbFfnM1;//total length of FFN - 1.
   private byte _info;

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/FieldDescriptor.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/FieldDescriptor.java?rev=777204&r1=777203&r2=777204&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/FieldDescriptor.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/FieldDescriptor.java Thu May 21 18:12:22 2009
@@ -1,4 +1,3 @@
-
 /* ====================================================================
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
@@ -15,13 +14,13 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 ==================================================================== */
-        
+
 package org.apache.poi.hwpf.model;
 
 import org.apache.poi.util.BitField;
 import org.apache.poi.util.BitFieldFactory;
 
-public class FieldDescriptor
+public final class FieldDescriptor
 {
   byte _fieldBoundaryType;
   byte _info;

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/FileInformationBlock.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/FileInformationBlock.java?rev=777204&r1=777203&r2=777204&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/FileInformationBlock.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/FileInformationBlock.java Thu May 21 18:12:22 2009
@@ -1,4 +1,3 @@
-
 /* ====================================================================
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
@@ -15,7 +14,6 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 ==================================================================== */
-        
 
 package org.apache.poi.hwpf.model;
 
@@ -31,7 +29,7 @@
  * The File Information Block (FIB). Holds pointers
  *  to various bits of the file, and lots of flags which
  *  specify properties of the document.
- * 
+ *
  * The parent class, {@link FIBAbstractType}, holds the
  *  first 32 bytes, which make up the FibBase.
  * The next part, the fibRgW / FibRgW97, is handled
@@ -40,10 +38,10 @@
  *  handled by the {@link FIBLongHandler}.
  * Finally, the rest of the fields are handled by
  *  the {@link FIBFieldHandler}.
- * 
+ *
  * @author  andy
  */
-public class FileInformationBlock extends FIBAbstractType
+public final class FileInformationBlock extends FIBAbstractType
   implements Cloneable
 {
 
@@ -321,8 +319,8 @@
     {
       _fieldHandler.setFieldSize(FIBFieldHandler.PLFLFO, modifiedHigh);
     }
-    
-    
+
+
     /**
      * How many bytes of the main stream contain real data.
      */
@@ -331,7 +329,7 @@
     }
     /**
      * Updates the count of the number of bytes in the
-     * main stream which contain real data 
+     * main stream which contain real data
      */
     public void setCbMac(int cbMac) {
        _longHandler.setLong(FIBLongHandler.CBMAC, cbMac);
@@ -431,7 +429,7 @@
        _longHandler.setLong(FIBLongHandler.CCPHDRTXBX, ccpTxtBx);
     }
 
-	
+
     public void clearOffsetsSizes()
     {
       _fieldHandler.clearFields();
@@ -446,22 +444,22 @@
     {
       return _fieldHandler.getFieldSize(FIBFieldHandler.PLCFFLDMOM);
     }
-    
+
     public int getFcPlcspaMom()
     {
         return _fieldHandler.getFieldOffset(FIBFieldHandler.PLCSPAMOM);
     }
-    
+
     public int getLcbPlcspaMom()
     {
         return _fieldHandler.getFieldSize(FIBFieldHandler.PLCSPAMOM);
     }
-    
+
     public int getFcDggInfo()
     {
         return _fieldHandler.getFieldOffset(FIBFieldHandler.DGGINFO);
     }
-    
+
     public int getLcbDggInfo()
     {
         return _fieldHandler.getFieldSize(FIBFieldHandler.DGGINFO);

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/FontTable.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/FontTable.java?rev=777204&r1=777203&r2=777204&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/FontTable.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/FontTable.java Thu May 21 18:12:22 2009
@@ -1,4 +1,3 @@
-
 /* ====================================================================
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
@@ -15,7 +14,6 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 ==================================================================== */
-        
 
 package org.apache.poi.hwpf.model;
 
@@ -32,7 +30,7 @@
  *
  * @author Praveen Mathew
  */
-public class FontTable
+public final class FontTable
 {
   private short _stringCount;// how many strings are included in the string table
   private short _extraDataSz;// size in bytes of the extra data

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/FormattedDiskPage.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/FormattedDiskPage.java?rev=777204&r1=777203&r2=777204&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/FormattedDiskPage.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/FormattedDiskPage.java Thu May 21 18:12:22 2009
@@ -1,4 +1,3 @@
-
 /* ====================================================================
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
@@ -15,7 +14,6 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 ==================================================================== */
-        
 
 package org.apache.poi.hwpf.model;
 

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/GenericPropertyNode.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/GenericPropertyNode.java?rev=777204&r1=777203&r2=777204&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/GenericPropertyNode.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/GenericPropertyNode.java Thu May 21 18:12:22 2009
@@ -1,4 +1,3 @@
-
 /* ====================================================================
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
@@ -15,10 +14,10 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 ==================================================================== */
-        
+
 package org.apache.poi.hwpf.model;
 
-public class GenericPropertyNode
+public final class GenericPropertyNode
   extends PropertyNode
 {
   public GenericPropertyNode(int start, int end, byte[] buf)

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/HDFType.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/HDFType.java?rev=777204&r1=777203&r2=777204&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/HDFType.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/HDFType.java Thu May 21 18:12:22 2009
@@ -1,4 +1,3 @@
-
 /* ====================================================================
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
@@ -15,12 +14,6 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 ==================================================================== */
-        
-/*
- * HDFType.java
- *
- * Created on February 24, 2002, 2:37 PM
- */
 
 package org.apache.poi.hwpf.model;
 

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/ListData.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/ListData.java?rev=777204&r1=777203&r2=777204&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/ListData.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/ListData.java Thu May 21 18:12:22 2009
@@ -1,4 +1,3 @@
-
 /* ====================================================================
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
@@ -15,7 +14,6 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 ==================================================================== */
-        
 
 package org.apache.poi.hwpf.model;
 
@@ -25,7 +23,7 @@
 
 import java.util.Arrays;
 
-public class ListData
+public final class ListData
 {
   private int _lsid;
   private int _tplc;

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/ListFormatOverride.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/ListFormatOverride.java?rev=777204&r1=777203&r2=777204&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/ListFormatOverride.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/ListFormatOverride.java Thu May 21 18:12:22 2009
@@ -1,4 +1,3 @@
-
 /* ====================================================================
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
@@ -15,7 +14,6 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 ==================================================================== */
-        
 
 package org.apache.poi.hwpf.model;
 
@@ -23,7 +21,7 @@
 
 import java.util.Arrays;
 
-public class ListFormatOverride
+public final class ListFormatOverride
 {
   int _lsid;
   int _reserved1;

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/ListFormatOverrideLevel.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/ListFormatOverrideLevel.java?rev=777204&r1=777203&r2=777204&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/ListFormatOverrideLevel.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/ListFormatOverrideLevel.java Thu May 21 18:12:22 2009
@@ -1,4 +1,3 @@
-
 /* ====================================================================
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
@@ -15,7 +14,6 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 ==================================================================== */
-        
 
 package org.apache.poi.hwpf.model;
 
@@ -25,7 +23,7 @@
 
 import java.util.Arrays;
 
-public class ListFormatOverrideLevel
+public final class ListFormatOverrideLevel
 {
   private static final int BASE_SIZE = 8;
 

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/ListLevel.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/ListLevel.java?rev=777204&r1=777203&r2=777204&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/ListLevel.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/ListLevel.java Thu May 21 18:12:22 2009
@@ -23,7 +23,7 @@
 import org.apache.poi.util.LittleEndian;
 
 /**
- * 
+ *
  */
 public final class ListLevel
 {
@@ -90,7 +90,7 @@
     _rgbxchNums = new byte[RGBXCH_NUMS_SIZE];
     System.arraycopy(buf, offset, _rgbxchNums, 0, RGBXCH_NUMS_SIZE);
     offset += RGBXCH_NUMS_SIZE;
-  
+
    _ixchFollow = buf[offset++];
     _dxaSpace = LittleEndian.getInt(buf, offset);
     offset += LittleEndian.INT_SIZE;
@@ -108,7 +108,7 @@
     System.arraycopy(buf, offset, _grpprlChpx, 0, _cbGrpprlChpx);
     offset += _cbGrpprlChpx;
 
-    int numberTextLength = LittleEndian.getShort(buf, offset); 
+    int numberTextLength = LittleEndian.getShort(buf, offset);
     /* sometimes numberTextLength<0 */
     /* by derjohng */
     if (numberTextLength>0)
@@ -241,7 +241,7 @@
         6 // int byte byte
         + RGBXCH_NUMS_SIZE
         + 13 // byte int int byte byte short
-        + _cbGrpprlChpx 
+        + _cbGrpprlChpx
         + _cbGrpprlPapx
         + 2; // numberText length
     if (_numberText != null) {

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/ListTables.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/ListTables.java?rev=777204&r1=777203&r2=777204&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/ListTables.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/ListTables.java Thu May 21 18:12:22 2009
@@ -15,7 +15,6 @@
    limitations under the License.
 ==================================================================== */
 
-
 package org.apache.poi.hwpf.model;
 
 import org.apache.poi.util.LittleEndian;
@@ -35,7 +34,7 @@
 /**
  * @author Ryan Ackley
  */
-public class ListTables
+public final class ListTables
 {
   private static final int LIST_DATA_SIZE = 28;
   private static final int LIST_FORMAT_OVERRIDE_SIZE = 16;
@@ -196,7 +195,7 @@
     	ListLevel lvl = lst.getLevels()[level];
     	return lvl;
     } else {
-    	log.log(POILogger.WARN, "Requested level " + level + " which was greater than the maximum defined (" + lst.numLevels() + ")"); 
+    	log.log(POILogger.WARN, "Requested level " + level + " which was greater than the maximum defined (" + lst.numLevels() + ")");
     	return null;
     }
   }

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/PAPBinTable.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/PAPBinTable.java?rev=777204&r1=777203&r2=777204&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/PAPBinTable.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/PAPBinTable.java Thu May 21 18:12:22 2009
@@ -34,7 +34,7 @@
  *
  * @author Ryan Ackley
  */
-public class PAPBinTable
+public final class PAPBinTable
 {
   protected ArrayList _paragraphs = new ArrayList();
   byte[] _dataStream;
@@ -77,13 +77,13 @@
   public void insert(int listIndex, int cpStart, SprmBuffer buf)
   {
     boolean needsToBeUnicode = tpt.isUnicodeAtCharOffset(cpStart);
-    
+
     PAPX forInsert = new PAPX(0, 0, buf, _dataStream, needsToBeUnicode);
-    
+
     // Ensure character offsets are really characters
     forInsert.setStart(cpStart);
     forInsert.setEnd(cpStart);
-    
+
     if (listIndex == _paragraphs.size())
     {
        _paragraphs.add(forInsert);
@@ -102,7 +102,7 @@
         {
           exc.printStackTrace();
         }
-        
+
     	// Copy the properties of the one before to afterwards
     	// Will go:
     	//  Original, until insert at point
@@ -112,7 +112,7 @@
         // Again ensure contains character based offsets no matter what
         clone.setStart(cpStart);
         clone.setEnd(currentPap.getEnd());
-        
+
         currentPap.setEnd(cpStart);
 
         _paragraphs.add(listIndex + 1, forInsert);

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/PAPFormattedDiskPage.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/PAPFormattedDiskPage.java?rev=777204&r1=777203&r2=777204&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/PAPFormattedDiskPage.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/PAPFormattedDiskPage.java Thu May 21 18:12:22 2009
@@ -1,4 +1,3 @@
-
 /* ====================================================================
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
@@ -15,7 +14,7 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 ==================================================================== */
-        
+
 package org.apache.poi.hwpf.model;
 
 import org.apache.poi.poifs.common.POIFSConstants;
@@ -41,7 +40,7 @@
  *
  * @author Ryan Ackley
  */
-public class PAPFormattedDiskPage extends FormattedDiskPage
+public final class PAPFormattedDiskPage extends FormattedDiskPage
 {
 
     private static final int BX_SIZE = 13;
@@ -69,7 +68,7 @@
          int endAt = getEnd(x) - fcMin;
     	 boolean isUnicode = tpt.isUnicodeAtByteOffset(startAt);
          //System.err.println(startAt + " -> " + endAt + " = " + isUnicode);
-    	 
+
          _papxList.add(new PAPX(startAt, endAt, getGrpprl(x), getParagraphHeight(x), dataStream, isUnicode));
       }
       _fkp = null;

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/PAPX.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/PAPX.java?rev=777204&r1=777203&r2=777204&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/PAPX.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/PAPX.java Thu May 21 18:12:22 2009
@@ -1,4 +1,3 @@
-
 /* ====================================================================
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
@@ -15,8 +14,6 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 ==================================================================== */
-        
-
 
 package org.apache.poi.hwpf.model;
 
@@ -30,15 +27,15 @@
 
 /**
  * DANGER - works in bytes!
- * 
+ *
  * Make sure you call getStart() / getEnd() when you want characters
- *  (normal use), but getStartByte() / getEndByte() when you're 
+ *  (normal use), but getStartByte() / getEndByte() when you're
  *  reading in / writing out!
  *
  * @author Ryan Ackley
  */
 
-public class PAPX extends BytePropertyNode {
+public final class PAPX extends BytePropertyNode {
 
   private ParagraphHeight _phe;
   private int _hugeGrpprlOffset = -1;

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/ParagraphHeight.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/ParagraphHeight.java?rev=777204&r1=777203&r2=777204&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/ParagraphHeight.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/ParagraphHeight.java Thu May 21 18:12:22 2009
@@ -1,4 +1,3 @@
-
 /* ====================================================================
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
@@ -15,8 +14,6 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 ==================================================================== */
-        
-
 
 package org.apache.poi.hwpf.model;
 
@@ -27,7 +24,7 @@
 import org.apache.poi.util.BitFieldFactory;
 import org.apache.poi.util.LittleEndian;
 
-public class ParagraphHeight
+public final class ParagraphHeight
 {
   private short infoField;
     private BitField fSpare = BitFieldFactory.getInstance(0x0001);

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/PicturesTable.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/PicturesTable.java?rev=777204&r1=777203&r2=777204&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/PicturesTable.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/PicturesTable.java Thu May 21 18:12:22 2009
@@ -15,7 +15,6 @@
    limitations under the License.
 ==================================================================== */
 
-
 package org.apache.poi.hwpf.model;
 
 import org.apache.poi.util.LittleEndian;
@@ -50,7 +49,7 @@
  *
  * @author Dmitry Romanov
  */
-public class PicturesTable
+public final class PicturesTable
 {
   static final int TYPE_IMAGE = 0x08;
   static final int TYPE_IMAGE_WORD2000 = 0x00;
@@ -72,7 +71,7 @@
 
   /**
    *
-   * @param _document 
+   * @param _document
    * @param _dataStream
    */
   public PicturesTable(HWPFDocument _document, byte[] _dataStream, byte[] _mainStream, FSPATable fspa, EscherRecordHolder dgg)
@@ -94,7 +93,7 @@
     }
     return false;
   }
-  
+
   public boolean hasEscherPicture(CharacterRun run) {
     if (run.isSpecialCharacter() && !run.isObj() && !run.isOle2() && !run.isData() && run.text().startsWith("\u0008")) {
       return true;
@@ -132,7 +131,7 @@
    * to have that byte array in memory but only write picture's contents to stream, pass false and then use Picture.writeImageContent
    * @see Picture#writeImageContent(java.io.OutputStream)
    * @return a Picture object if picture exists for specified CharacterRun, null otherwise. PicturesTable.hasPicture is used to determine this.
-   * @see #hasPicture(org.apache.poi.hwpf.usermodel.CharacterRun) 
+   * @see #hasPicture(org.apache.poi.hwpf.usermodel.CharacterRun)
    */
   public Picture extractPicture(CharacterRun run, boolean fillBytes) {
     if (hasPicture(run)) {
@@ -140,7 +139,7 @@
     }
     return null;
   }
-  
+
   /**
      * Performs a recursive search for pictures in the given list of escher records.
      *
@@ -184,12 +183,12 @@
   /**
    * Not all documents have all the images concatenated in the data stream
    * although MS claims so. The best approach is to scan all character runs.
-   *  
+   *
    * @return a list of Picture objects found in current document
    */
   public List getAllPictures() {
     ArrayList pictures = new ArrayList();
-	
+
     Range range = _document.getRange();
     for (int i = 0; i < range.numCharacterRuns(); i++) {
     	CharacterRun run = range.getCharacterRun(i);
@@ -199,7 +198,7 @@
     		pictures.add(picture);
     	}
 	}
-    
+
     searchForPictures(_dgg.getEscherRecords(), pictures);
 
     return pictures;

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/PieceDescriptor.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/PieceDescriptor.java?rev=777204&r1=777203&r2=777204&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/PieceDescriptor.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/PieceDescriptor.java Thu May 21 18:12:22 2009
@@ -1,4 +1,3 @@
-
 /* ====================================================================
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
@@ -15,8 +14,6 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 ==================================================================== */
-        
-
 
 package org.apache.poi.hwpf.model;
 
@@ -24,7 +21,7 @@
 import org.apache.poi.util.BitFieldFactory;
 import org.apache.poi.util.LittleEndian;
 
-public class PieceDescriptor
+public final class PieceDescriptor
 {
 
   short descriptor;

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/PlexOfCps.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/PlexOfCps.java?rev=777204&r1=777203&r2=777204&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/PlexOfCps.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/PlexOfCps.java Thu May 21 18:12:22 2009
@@ -1,4 +1,3 @@
-
 /* ====================================================================
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
@@ -15,7 +14,7 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 ==================================================================== */
-        
+
 package org.apache.poi.hwpf.model;
 
 import java.util.ArrayList;
@@ -31,7 +30,7 @@
  *
  * @author Ryan Ackley
  */
-public class PlexOfCps
+public final class PlexOfCps
 {
   private int _count;
   private int _offset;
@@ -56,7 +55,7 @@
   {
 	// Figure out the number we hold
     _count = (size - 4)/(4 + sizeOfStruct);
-    
+
     _sizeOfStruct = sizeOfStruct;
     _props = new ArrayList(_count);
 

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/PropertyNode.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/PropertyNode.java?rev=777204&r1=777203&r2=777204&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/PropertyNode.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/PropertyNode.java Thu May 21 18:12:22 2009
@@ -1,4 +1,3 @@
-
 /* ====================================================================
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
@@ -15,7 +14,7 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 ==================================================================== */
-        
+
 package org.apache.poi.hwpf.model;
 
 import java.util.Arrays;
@@ -48,7 +47,7 @@
       _cpStart = fcStart;
       _cpEnd = fcEnd;
       _buf = buf;
-      
+
       if(_cpStart < 0) {
     	  System.err.println("A property claimed to start before zero, at " + _cpStart + "! Resetting it to zero, and hoping for the best");
     	  _cpStart = 0;
@@ -92,7 +91,7 @@
 
     if (_cpEnd > start) {
         // The start of the change is before we end
-    	
+
         if (_cpStart < end) {
             // The delete was somewhere in the middle of us
             _cpEnd = end >= _cpEnd ? start : _cpEnd - length;

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/SEPX.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/SEPX.java?rev=777204&r1=777203&r2=777204&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/SEPX.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/SEPX.java Thu May 21 18:12:22 2009
@@ -1,4 +1,3 @@
-
 /* ====================================================================
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
@@ -15,8 +14,6 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 ==================================================================== */
-        
-
 
 package org.apache.poi.hwpf.model;
 
@@ -26,7 +23,7 @@
 
 /**
  */
-public class SEPX extends BytePropertyNode
+public final class SEPX extends BytePropertyNode
 {
 
   SectionDescriptor _sed;

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/SavedByEntry.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/SavedByEntry.java?rev=777204&r1=777203&r2=777204&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/SavedByEntry.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/SavedByEntry.java Thu May 21 18:12:22 2009
@@ -15,16 +15,15 @@
    limitations under the License.
 ==================================================================== */
 
-
 package org.apache.poi.hwpf.model;
 
 
 /**
  * A single entry in the {@link SavedByTable}.
- * 
+ *
  * @author Daniel Noll
  */
-public class SavedByEntry
+public final class SavedByEntry
 {
   private String userName;
   private String saveLocation;

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/SavedByTable.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/SavedByTable.java?rev=777204&r1=777203&r2=777204&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/SavedByTable.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/SavedByTable.java Thu May 21 18:12:22 2009
@@ -15,7 +15,6 @@
    limitations under the License.
 ==================================================================== */
 
-
 package org.apache.poi.hwpf.model;
 
 import java.io.IOException;
@@ -31,10 +30,10 @@
 /**
  * String table containing the history of the last few revisions ("saves") of the document.
  * Read-only for the time being.
- * 
+ *
  * @author Daniel Noll
  */
-public class SavedByTable
+public final class SavedByTable
 {
   /**
    * A value that I don't know what it does, but is maintained for accuracy.

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/SectionDescriptor.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/SectionDescriptor.java?rev=777204&r1=777203&r2=777204&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/SectionDescriptor.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/SectionDescriptor.java Thu May 21 18:12:22 2009
@@ -1,4 +1,3 @@
-
 /* ====================================================================
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
@@ -15,14 +14,12 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 ==================================================================== */
-        
-
 
 package org.apache.poi.hwpf.model;
 
 import org.apache.poi.util.LittleEndian;
 
-public class SectionDescriptor
+public final class SectionDescriptor
 {
 
   private short fn;



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org