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/08/18 07:29:55 UTC

svn commit: r805284 [6/8] - in /poi/trunk/src: examples/src/org/apache/poi/hssf/usermodel/examples/ java/org/apache/poi/hpsf/ java/org/apache/poi/hssf/eventmodel/ java/org/apache/poi/hssf/model/ java/org/apache/poi/hssf/record/ java/org/apache/poi/hssf...

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hdgf/HDGFLZW.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hdgf/HDGFLZW.java?rev=805284&r1=805283&r2=805284&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hdgf/HDGFLZW.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hdgf/HDGFLZW.java Tue Aug 18 05:29:53 2009
@@ -24,8 +24,8 @@
 /**
  * A decoder for the crazy LZW implementation used
  *  in Visio.
- * According to VSDump, "it's a slightly perverted version of LZW 
- *  compression, with inverted meaning of flag byte and 0xFEE as an 
+ * According to VSDump, "it's a slightly perverted version of LZW
+ *  compression, with inverted meaning of flag byte and 0xFEE as an
  *  'initial shift'". It uses 12 bit codes
  * (http://www.gnome.ru/projects/vsdump_en.html)
  *
@@ -36,7 +36,7 @@
 public class HDGFLZW {
 
 /**
- * Given an integer, turn it into a java byte, handling 
+ * Given an integer, turn it into a java byte, handling
  *  the wrapping.
  * This is a convenience method
  */
@@ -45,13 +45,15 @@
 	return (byte)(b - 256);
 }
 /**
- * Given a java byte, turn it into an integer between 0 
+ * Given a java byte, turn it into an integer between 0
  *  and 255 (i.e. handle the unwrapping).
  * This is a convenience method
  */
 public static int fromByte(byte b) {
-	if(b >= 0) return (int)b;
-	return (int)(b + 256);
+	if(b >= 0) {
+		return b;
+	}
+	return b + 256;
 }
 
 /**
@@ -113,7 +115,7 @@
 	// It needs to be unsigned, so that bit stuff works
 	int dataI;
 	// The compressed code sequence is held over 2 bytes
-	int dataIPt1, dataIPt2; 
+	int dataIPt1, dataIPt2;
 	// How long a code sequence is, and where in the
 	//  dictionary to start at
 	int len, pntr;
@@ -138,7 +140,7 @@
 				dataIPt1 = src.read();
 				dataIPt2 = src.read();
 				if(dataIPt1 == -1 || dataIPt2 == -1) break;
-				
+
 				// Build up how long the code sequence is, and
 				//  what position of the code to start at
 				// (The position is the first 12 bits, the
@@ -153,14 +155,14 @@
 				} else {
 					pntr = pntr + 18;
 				}
-				
+
 				// Loop over the codes, outputting what they correspond to
 				for(int i=0; i<len; i++) {
 					buffer [(pos + i) & 4095] = buffer [(pntr + i) & 4095];
 					dataB = buffer[(pntr + i) & 4095];
 					res.write(new byte[] {dataB});
 				}
-				
+
 				// Record how far along the stream we have moved
 				pos = pos + len;
 			}
@@ -183,14 +185,14 @@
  * Need our own class to handle keeping track of the
  *  code buffer, pending bytes to write out etc.
  */
-private class Compressor {
+private static final class Compressor {
 	// We use 12 bit codes:
 	// * 0-255 are real bytes
 	// * 256-4095 are the substring codes
 	// Java handily initialises our buffer / dictionary
 	//  to all zeros
 	byte[] dict = new byte[4096];
-	
+
 	// The next block of data to be written out, minus
 	//  its mask byte
 	byte[] buffer = new byte[16];
@@ -198,21 +200,24 @@
 	// (Un-compressed codes are 1 byte each, compressed codes
 	//   are two)
 	int bufferLen = 0;
-	
+
 	// The raw length of a code is limited to 4 bits
 	byte[] rawCode = new byte[16];
 	// And how much we're using
 	int rawCodeLen = 0;
-	
+
 	// How far through the input and output streams we are
 	int posInp = 0;
 	int posOut = 0;
-	
+
 	// What the next mask byte to output will be
 	int nextMask = 0;
 	// And how many bits we've already set
 	int maskBitsSet = 0;
-	
+
+	public Compressor() {
+		//
+	}
 /**
  * Returns the last place that the bytes from rawCode are found
  *  at in the buffer, or -1 if they can't be found
@@ -230,7 +235,7 @@
 				matches = false;
 			}
 		}
-		
+
 		// Was this position a match?
 		if(matches) {
 			return i;
@@ -255,7 +260,7 @@
 		}
 		return;
 	}
-	
+
 	// Increment the mask bit count, we've done another code
 	maskBitsSet++;
 	// Add the length+code to the buffer
@@ -263,7 +268,7 @@
 	//  length is the last 4 bits)
 	// TODO
 	posOut += 2;
-	
+
 	// If we're now at 8 codes, output
 	if(maskBitsSet == 8) {
 		output8Codes(res);
@@ -273,15 +278,15 @@
  * Output the un-compressed byte
  */
 private void outputUncompressed(byte b, OutputStream res) throws IOException {
-	// Set the mask bit for us 
+	// Set the mask bit for us
 	nextMask += (1<<maskBitsSet);
-	
+
 	// And add us to the buffer + dictionary
 	buffer[bufferLen] = fromInt(b);
 	bufferLen++;
 	dict[(posOut&4095)] = fromInt(b);
 	posOut++;
-	
+
 	// If we're now at 8 codes, output
 	if(maskBitsSet == 8) {
 		output8Codes(res);
@@ -296,20 +301,20 @@
 	// Output the mask and the data
 	res.write(new byte[] { fromInt(nextMask) } );
 	res.write(buffer, 0, bufferLen);
-	
+
 	// Reset things
 	nextMask = 0;
 	maskBitsSet = 0;
 	bufferLen = 0;
 }
-	
+
 /**
  * Does the compression
  */
 private void compress(InputStream src, OutputStream res) throws IOException {
 	// Have we hit the end of the file yet?
 	boolean going = true;
-	
+
 	// This is a byte as looked up in the dictionary
 	// It needs to be signed, as it'll get passed on to
 	//  the output stream
@@ -317,27 +322,27 @@
 	// This is an unsigned byte read from the stream
 	// It needs to be unsigned, so that bit stuff works
 	int dataI;
-	
+
 	while( going ) {
 		dataI = src.read();
 		posInp++;
 		if(dataI == -1) { going = false; }
 		dataB = fromInt(dataI);
-		
+
 		// If we've run out of data, output anything that's
 		//  pending then finish
 		if(!going && rawCodeLen > 0) {
 			outputCompressed(res);
 			break;
 		}
-	
+
 		// Try adding this new byte onto rawCode, and
 		//  see if all of that is still found in the
 		//  buffer dictionary or not
 		rawCode[rawCodeLen] = dataB;
 		rawCodeLen++;
 		int rawAt = findRawCodeInBuffer();
-		
+
 		// If we found it and are now at 16 bytes,
 		//  we need to output our pending code block
 		if(rawCodeLen == 16 && rawAt > -1) {
@@ -345,24 +350,24 @@
 			rawCodeLen = 0;
 			continue;
 		}
-		
+
 		// If we did find all of rawCode with our new
 		//  byte added on, we can wait to see what happens
 		//  with the next byte
 		if(rawAt > -1) {
 			continue;
 		}
-		
+
 		// If we get here, then the rawCode + this byte weren't
 		// found in the dictionary
-		
+
 		// If there was something in rawCode before, then that was
 		// found in the dictionary, so output that compressed
 		rawCodeLen--;
 		if(rawCodeLen > 0) {
 			// Output the old rawCode
 			outputCompressed(res);
-			
+
 			// Can this byte start a new rawCode, or does
 			//  it need outputting itself?
 			rawCode[0] = dataB;
@@ -385,4 +390,4 @@
 }
 }
 
-}
\ No newline at end of file
+}

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hdgf/chunks/ChunkHeader.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hdgf/chunks/ChunkHeader.java?rev=805284&r1=805283&r2=805284&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hdgf/chunks/ChunkHeader.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hdgf/chunks/ChunkHeader.java Tue Aug 18 05:29:53 2009
@@ -51,11 +51,11 @@
 		} else if(documentVersion == 5 || documentVersion == 4) {
 			ChunkHeaderV4V5 ch = new ChunkHeaderV4V5();
 
-			ch.type = (int)LittleEndian.getShort(data, offset + 0);
-			ch.id   = (int)LittleEndian.getShort(data, offset + 2);
+			ch.type = LittleEndian.getShort(data, offset + 0);
+			ch.id   = LittleEndian.getShort(data, offset + 2);
 			ch.unknown2 = (short)LittleEndian.getUnsignedByte(data, offset + 4);
 			ch.unknown3 = (short)LittleEndian.getUnsignedByte(data, offset + 5);
-			ch.unknown1 = (short)LittleEndian.getShort(data, offset + 6);
+			ch.unknown1 = LittleEndian.getShort(data, offset + 6);
 			ch.length   = (int)LittleEndian.getUInt(data, offset + 8);
 
 			return ch;

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hslf/HSLFSlideShow.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/HSLFSlideShow.java?rev=805284&r1=805283&r2=805284&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hslf/HSLFSlideShow.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hslf/HSLFSlideShow.java Tue Aug 18 05:29:53 2009
@@ -257,7 +257,7 @@
         Record[] rec = new Record[lst.size()];
         for (int i = 0; i < a.length; i++) {
             Integer offset = (Integer)a[i];
-            rec[i] = (Record)Record.buildRecordAtOffset(docstream, offset.intValue());
+            rec[i] = Record.buildRecordAtOffset(docstream, offset.intValue());
             if(rec[i] instanceof PersistRecord) {
                 PersistRecord psr = (PersistRecord)rec[i];
                 Integer id = (Integer)offset2id.get(offset);

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hslf/dev/SlideShowDumper.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/dev/SlideShowDumper.java?rev=805284&r1=805283&r2=805284&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hslf/dev/SlideShowDumper.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hslf/dev/SlideShowDumper.java Tue Aug 18 05:29:53 2009
@@ -41,9 +41,7 @@
  *
  * @author Nick Burch
  */
-
-public final class SlideShowDumper
-{
+public final class SlideShowDumper {
   private InputStream istream;
   private POIFSFileSystem filesystem;
 
@@ -196,7 +194,7 @@
 }
 
 public String makeHex(short s) {
-	String hex = Integer.toHexString((int)s).toUpperCase();
+	String hex = Integer.toHexString(s).toUpperCase();
 	if(hex.length() == 1) { return "0" + hex; }
 	return hex;
 }
@@ -232,7 +230,7 @@
 			System.out.println(ind + "That's a " + recordName);
 
 			// Now check if it's a container or not
-			int container = (int)opt & 0x0f;
+			int container = opt & 0x0f;
 
 			// BinaryTagData seems to contain records, but it
 			//  isn't tagged as doing so. Try stepping in anyway

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hslf/extractor/QuickButCruddyTextExtractor.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/extractor/QuickButCruddyTextExtractor.java?rev=805284&r1=805283&r2=805284&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hslf/extractor/QuickButCruddyTextExtractor.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hslf/extractor/QuickButCruddyTextExtractor.java Tue Aug 18 05:29:53 2009
@@ -53,9 +53,7 @@
  *
  * @author Nick Burch
  */
-
-public final class QuickButCruddyTextExtractor
-{
+public final class QuickButCruddyTextExtractor {
 	private POIFSFileSystem fs;
 	private InputStream is;
 	private byte[] pptContents;
@@ -169,7 +167,7 @@
 
 		// If it's a container, step into it and return
 		// (If it's a container, option byte 1 BINARY_AND 0x0f will be 0x0f)
-		int container = (int)opt & 0x0f;
+		int container = opt & 0x0f;
 		if(container == 0x0f) {
 			return (startPos+8);
 		}

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/Freeform.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/Freeform.java?rev=805284&r1=805283&r2=805284&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/Freeform.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/Freeform.java Tue Aug 18 05:29:53 2009
@@ -17,13 +17,22 @@
 
 package org.apache.poi.hslf.model;
 
-import org.apache.poi.ddf.*;
-import org.apache.poi.util.LittleEndian;
-import org.apache.poi.util.POILogger;
-
-import java.awt.geom.*;
+import java.awt.geom.AffineTransform;
+import java.awt.geom.GeneralPath;
+import java.awt.geom.PathIterator;
+import java.awt.geom.Point2D;
+import java.awt.geom.Rectangle2D;
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.List;
+
+import org.apache.poi.ddf.EscherArrayProperty;
+import org.apache.poi.ddf.EscherContainerRecord;
+import org.apache.poi.ddf.EscherOptRecord;
+import org.apache.poi.ddf.EscherProperties;
+import org.apache.poi.ddf.EscherSimpleProperty;
+import org.apache.poi.util.LittleEndian;
+import org.apache.poi.util.POILogger;
 
 /**
  * A "Freeform" shape.
@@ -85,8 +94,8 @@
         Rectangle2D bounds = path.getBounds2D();
         PathIterator it = path.getPathIterator(new AffineTransform());
 
-        ArrayList segInfo = new ArrayList();
-        ArrayList pntInfo = new ArrayList();
+        List<byte[]> segInfo = new ArrayList<byte[]>();
+        List<Point2D.Double> pntInfo = new ArrayList<Point2D.Double>();
         boolean isClosed = false;
         while (!it.isDone()) {
             double[] vals = new double[6];
@@ -135,7 +144,7 @@
         verticesProp.setNumberOfElementsInMemory(pntInfo.size());
         verticesProp.setSizeOfElements(0xFFF0);
         for (int i = 0; i < pntInfo.size(); i++) {
-            Point2D.Double pnt = (Point2D.Double)pntInfo.get(i);
+            Point2D.Double pnt = pntInfo.get(i);
             byte[] data = new byte[4];
             LittleEndian.putShort(data, 0, (short)((pnt.getX() - bounds.getX())*MASTER_DPI/POINT_DPI));
             LittleEndian.putShort(data, 2, (short)((pnt.getY() - bounds.getY())*MASTER_DPI/POINT_DPI));
@@ -148,7 +157,7 @@
         segmentsProp.setNumberOfElementsInMemory(segInfo.size());
         segmentsProp.setSizeOfElements(0x2);
         for (int i = 0; i < segInfo.size(); i++) {
-            byte[] seg = (byte[])segInfo.get(i);
+            byte[] seg = segInfo.get(i);
             segmentsProp.setElement(i, seg);
         }
         opt.addEscherProperty(segmentsProp);
@@ -171,10 +180,10 @@
         opt.addEscherProperty(new EscherSimpleProperty(EscherProperties.GEOMETRY__SHAPEPATH, 0x4));
 
         EscherArrayProperty verticesProp = (EscherArrayProperty)getEscherProperty(opt, (short)(EscherProperties.GEOMETRY__VERTICES + 0x4000));
-        if(verticesProp == null) verticesProp = (EscherArrayProperty)getEscherProperty(opt, (short)(EscherProperties.GEOMETRY__VERTICES));
+        if(verticesProp == null) verticesProp = (EscherArrayProperty)getEscherProperty(opt, EscherProperties.GEOMETRY__VERTICES);
 
         EscherArrayProperty segmentsProp = (EscherArrayProperty)getEscherProperty(opt, (short)(EscherProperties.GEOMETRY__SEGMENTINFO + 0x4000));
-        if(segmentsProp == null) segmentsProp = (EscherArrayProperty)getEscherProperty(opt, (short)(EscherProperties.GEOMETRY__SEGMENTINFO));
+        if(segmentsProp == null) segmentsProp = (EscherArrayProperty)getEscherProperty(opt, EscherProperties.GEOMETRY__SEGMENTINFO);
 
         //sanity check
         if(verticesProp == null) {

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/CString.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/CString.java?rev=805284&r1=805283&r2=805284&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/CString.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/CString.java Tue Aug 18 05:29:53 2009
@@ -58,7 +58,7 @@
 	 * The meaning of the count is specific to the type of the parent record
 	 */
 	public int getOptions() {
-		return (int)LittleEndian.getShort(_header);
+		return LittleEndian.getShort(_header);
 	}
 
 	/**

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/ColorSchemeAtom.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/ColorSchemeAtom.java?rev=805284&r1=805283&r2=805284&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/ColorSchemeAtom.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/ColorSchemeAtom.java Tue Aug 18 05:29:53 2009
@@ -30,9 +30,7 @@
  *
  * @author Nick Burch
  */
-
-public final class ColorSchemeAtom extends RecordAtom
-{
+public final class ColorSchemeAtom extends RecordAtom {
 	private byte[] _header;
 	private static long _type = 2032l;
 
@@ -108,14 +106,14 @@
 		System.arraycopy(source,start,_header,0,8);
 
 		// Grab the rgb values
-		backgroundColourRGB = (int)LittleEndian.getInt(source,start+8+0);
-		textAndLinesColourRGB = (int)LittleEndian.getInt(source,start+8+4);
-		shadowsColourRGB = (int)LittleEndian.getInt(source,start+8+8);
-		titleTextColourRGB = (int)LittleEndian.getInt(source,start+8+12);
-		fillsColourRGB = (int)LittleEndian.getInt(source,start+8+16);
-		accentColourRGB = (int)LittleEndian.getInt(source,start+8+20);
-		accentAndHyperlinkColourRGB = (int)LittleEndian.getInt(source,start+8+24);
-		accentAndFollowingHyperlinkColourRGB = (int)LittleEndian.getInt(source,start+8+28);
+		backgroundColourRGB = LittleEndian.getInt(source,start+8+0);
+		textAndLinesColourRGB = LittleEndian.getInt(source,start+8+4);
+		shadowsColourRGB = LittleEndian.getInt(source,start+8+8);
+		titleTextColourRGB = LittleEndian.getInt(source,start+8+12);
+		fillsColourRGB = LittleEndian.getInt(source,start+8+16);
+		accentColourRGB = LittleEndian.getInt(source,start+8+20);
+		accentAndHyperlinkColourRGB = LittleEndian.getInt(source,start+8+24);
+		accentAndFollowingHyperlinkColourRGB = LittleEndian.getInt(source,start+8+28);
 	}
 
 	/**
@@ -181,7 +179,7 @@
 		byte[] with_zero = new byte[4];
 		System.arraycopy(rgb,0,with_zero,0,3);
 		with_zero[3] = 0;
-		int ret = (int)LittleEndian.getInt(with_zero,0);
+		int ret = LittleEndian.getInt(with_zero,0);
 		return ret;
 	}
 
@@ -205,16 +203,15 @@
 		writeLittleEndian(accentAndFollowingHyperlinkColourRGB,out);
 	}
 
-    /**
-     * Returns color by its index
-     *
-     * @param idx 0-based color index
-     * @return color by its index
-     */
-    public int getColor(int idx){
-        int[] clr = {backgroundColourRGB, textAndLinesColourRGB, shadowsColourRGB, titleTextColourRGB,
-            fillsColourRGB, accentColourRGB, accentAndHyperlinkColourRGB, accentAndFollowingHyperlinkColourRGB};
-        return clr[idx];
-    }
-
+	/**
+	 * Returns color by its index
+	 *
+	 * @param idx 0-based color index
+	 * @return color by its index
+	 */
+	public int getColor(int idx){
+		int[] clr = {backgroundColourRGB, textAndLinesColourRGB, shadowsColourRGB, titleTextColourRGB,
+				fillsColourRGB, accentColourRGB, accentAndHyperlinkColourRGB, accentAndFollowingHyperlinkColourRGB};
+		return clr[idx];
+	}
 }

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/DocumentAtom.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/DocumentAtom.java?rev=805284&r1=805283&r2=805284&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/DocumentAtom.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/DocumentAtom.java Tue Aug 18 05:29:53 2009
@@ -80,16 +80,23 @@
 
 	/** Was the document saved with True Type fonts embeded? */
 	public boolean getSaveWithFonts() {
-		if(saveWithFonts == 0) { return false; } else { return true; } }
+		return saveWithFonts != 0;
+	}
+
 	/** Have the placeholders on the title slide been omitted? */
 	public boolean getOmitTitlePlace() {
-		if(omitTitlePlace == 0) { return false; } else { return true; } }
+		return omitTitlePlace != 0;
+	}
+
 	/** Is this a Bi-Directional PPT Doc? */
 	public boolean getRightToLeft() {
-		if(rightToLeft == 0) { return false; } else { return true; } }
+		return rightToLeft != 0;
+	}
+
 	/** Are comment shapes visible? */
 	public boolean getShowComments() {
-		if(showComments == 0) { return false; } else { return true; } }
+		return showComments != 0;
+	}
 
 
 	/* *************** record code follows ********************** */
@@ -118,10 +125,10 @@
 		handoutMasterPersist = LittleEndian.getInt(source,start+28+8);
 
 		// Get the ID of the first slide
-		firstSlideNum = (int)LittleEndian.getShort(source,start+32+8);
+		firstSlideNum = LittleEndian.getShort(source,start+32+8);
 
 		// Get the slide size type
-		slideSizeType = (int)LittleEndian.getShort(source,start+34+8);
+		slideSizeType = LittleEndian.getShort(source,start+34+8);
 
 		// Get the booleans as bytes
 		saveWithFonts = source[start+36+8];

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/EscherTextboxWrapper.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/EscherTextboxWrapper.java?rev=805284&r1=805283&r2=805284&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/EscherTextboxWrapper.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/EscherTextboxWrapper.java Tue Aug 18 05:29:53 2009
@@ -32,12 +32,10 @@
  *
  * @author Nick Burch
  */
-
-public final class EscherTextboxWrapper extends RecordContainer
-{
+public final class EscherTextboxWrapper extends RecordContainer {
 	private EscherTextboxRecord _escherRecord;
 	private long _type;
-    private int shapeId;
+	private int shapeId;
 
 	/**
 	 * Returns the underlying DDF Escher Record
@@ -49,7 +47,7 @@
 	 */
 	public EscherTextboxWrapper(EscherTextboxRecord textbox) {
 		_escherRecord = textbox;
-		_type = (long)_escherRecord.getRecordId();
+		_type = _escherRecord.getRecordId();
 
 		// Find the child records in the escher data
 		byte[] data = _escherRecord.getData();
@@ -93,17 +91,17 @@
 		_escherRecord.setData(data);
 	}
 
-    /**
-     * @return  Shape ID
-     */
-    public int getShapeId(){
-        return shapeId;
-    }
-
-    /**
-     *  @param id Shape ID
-     */
-    public void setShapeId(int id){
-        shapeId = id;
-    }
+	/**
+	 * @return  Shape ID
+	 */
+	public int getShapeId(){
+		return shapeId;
+	}
+
+	/**
+	 *  @param id Shape ID
+	 */
+	public void setShapeId(int id){
+		shapeId = id;
+	}
 }

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/NotesAtom.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/NotesAtom.java?rev=805284&r1=805283&r2=805284&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/NotesAtom.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/NotesAtom.java Tue Aug 18 05:29:53 2009
@@ -65,7 +65,7 @@
 		System.arraycopy(source,start,_header,0,8);
 
 		// Get the slide ID
-		slideID = (int)LittleEndian.getInt(source,start+8);
+		slideID = LittleEndian.getInt(source,start+8);
 
 		// Grok the flags, stored as bits
 		int flags = LittleEndian.getUShort(source,start+12);

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/SlideAtom.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/SlideAtom.java?rev=805284&r1=805283&r2=805284&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/SlideAtom.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/SlideAtom.java Tue Aug 18 05:29:53 2009
@@ -86,8 +86,8 @@
 		layoutAtom = new SSlideLayoutAtom(SSlideLayoutAtomData);
 
 		// Get the IDs of the master and notes
-		masterID = (int)LittleEndian.getInt(source,start+12+8);
-		notesID = (int)LittleEndian.getInt(source,start+16+8);
+		masterID = LittleEndian.getInt(source,start+12+8);
+		notesID = LittleEndian.getInt(source,start+16+8);
 
 		// Grok the flags, stored as bits
 		int flags = LittleEndian.getUShort(source,start+20+8);
@@ -214,7 +214,7 @@
 			}
 
 			// Grab out our data
-			geometry = (int)LittleEndian.getInt(data,0);
+			geometry = LittleEndian.getInt(data,0);
 			placeholderIDs = new byte[8];
 			System.arraycopy(data,4,placeholderIDs,0,8);
 		}

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/SlidePersistAtom.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/SlidePersistAtom.java?rev=805284&r1=805283&r2=805284&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/SlidePersistAtom.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/SlidePersistAtom.java Tue Aug 18 05:29:53 2009
@@ -27,9 +27,7 @@
  *
  * @author Nick Burch
  */
-
-public final class SlidePersistAtom extends RecordAtom
-{
+public final class SlidePersistAtom extends RecordAtom {
 	private byte[] _header;
 	private static long _type = 1011l;
 
@@ -76,10 +74,10 @@
 		System.arraycopy(source,start,_header,0,8);
 
 		// Grab the reference ID
-		refID = (int)LittleEndian.getInt(source,start+8);
+		refID = LittleEndian.getInt(source,start+8);
 
 		// Next up is a set of flags, but only bit 3 is used!
-		int flags = (int)LittleEndian.getInt(source,start+12);
+		int flags = LittleEndian.getInt(source,start+12);
 		if(flags == 4) {
 			hasShapesOtherThanPlaceholders = true;
 		} else {
@@ -87,10 +85,10 @@
 		}
 
 		// Now the number of Placeholder Texts
-		numPlaceholderTexts = (int)LittleEndian.getInt(source,start+16);
+		numPlaceholderTexts = LittleEndian.getInt(source,start+16);
 
 		// Last useful one is the unique slide identifier
-		slideIdentifier = (int)LittleEndian.getInt(source,start+20);
+		slideIdentifier = LittleEndian.getInt(source,start+20);
 
 		// Finally you have typically 4 or 8 bytes of reserved fields,
 		//  all zero running from 24 bytes in to the end

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/TextHeaderAtom.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/TextHeaderAtom.java?rev=805284&r1=805283&r2=805284&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/TextHeaderAtom.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/TextHeaderAtom.java Tue Aug 18 05:29:53 2009
@@ -72,7 +72,7 @@
 		System.arraycopy(source,start,_header,0,8);
 
 		// Grab the type
-		textType = (int)LittleEndian.getInt(source,start+8);
+		textType = LittleEndian.getInt(source,start+8);
 	}
 
 	/**

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/UserEditAtom.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/UserEditAtom.java?rev=805284&r1=805283&r2=805284&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/UserEditAtom.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/UserEditAtom.java Tue Aug 18 05:29:53 2009
@@ -82,30 +82,30 @@
 		System.arraycopy(source,start,_header,0,8);
 
 		// Get the last viewed slide ID
-		lastViewedSlideID = (int)LittleEndian.getInt(source,start+0+8);
+		lastViewedSlideID = LittleEndian.getInt(source,start+0+8);
 
 		// Get the PPT version
-		pptVersion = (int)LittleEndian.getInt(source,start+4+8);
+		pptVersion = LittleEndian.getInt(source,start+4+8);
 
 		// Get the offset to the previous incremental save's UserEditAtom
 		// This will be the byte offset on disk where the previous one
 		//  starts, or 0 if this is the first one
-		lastUserEditAtomOffset = (int)LittleEndian.getInt(source,start+8+8);
+		lastUserEditAtomOffset = LittleEndian.getInt(source,start+8+8);
 
 		// Get the offset to the persist pointers
 		// This will be the byte offset on disk where the preceding
 		//  PersistPtrFullBlock or PersistPtrIncrementalBlock starts
-		persistPointersOffset = (int)LittleEndian.getInt(source,start+12+8);
+		persistPointersOffset = LittleEndian.getInt(source,start+12+8);
 
 		// Get the persist reference for the document persist object
 		// Normally seems to be 1
-		docPersistRef = (int)LittleEndian.getInt(source,start+16+8);
+		docPersistRef = LittleEndian.getInt(source,start+16+8);
 
 		// Maximum number of persist objects written
-		maxPersistWritten = (int)LittleEndian.getInt(source,start+20+8);
+		maxPersistWritten = LittleEndian.getInt(source,start+20+8);
 
 		// Last view type
-		lastViewType = (short)LittleEndian.getShort(source,start+24+8);
+		lastViewType = LittleEndian.getShort(source,start+24+8);
 
 		// There might be a few more bytes, which are a reserved field
 		reserved = new byte[len-26-8];

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/parsers/POIFSChunkParser.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/parsers/POIFSChunkParser.java?rev=805284&r1=805283&r2=805284&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/parsers/POIFSChunkParser.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/parsers/POIFSChunkParser.java Tue Aug 18 05:29:53 2009
@@ -42,17 +42,13 @@
 import org.apache.poi.poifs.storage.BlockWritable;
 
 /**
- * Provides a HashMap with the ability to parse a PIOFS object and provide 
+ * Provides a HashMap with the ability to parse a PIOFS object and provide
  * an 'easy to access' hashmap structure for the document chunks inside it.
- * 
+ *
  * @author Travis Ferguson
  */
-public class POIFSChunkParser {
-	/**
-	 * Constructor 
-	 * @param fs
-	 * @throws IOException 
-	 */
+public final class POIFSChunkParser {
+
 	public POIFSChunkParser(POIFSFileSystem fs) throws IOException {
 		this.setFileSystem(fs);
 	}
@@ -61,7 +57,6 @@
 	/**
 	 * Set the POIFileSystem object that this object is using.
 	 * @param fs
-	 * @throws IOException 
 	 */
 	public void setFileSystem(POIFSFileSystem fs) throws IOException {
 		this.fs = fs;
@@ -77,33 +72,32 @@
 
 	/**
 	 * Reparse the FileSystem object, resetting all the chunks stored in this object
-	 * @throws IOException 
 	 *
 	 */
 	public void reparseFileSystem() throws IOException {
 		// first clear this object of all chunks
 		DirectoryEntry root = this.fs.getRoot();
 		Iterator iter = root.getEntries();
-		
+
 		this.directoryMap = this.processPOIIterator(iter);
 	}
-	
+
 	/**
-	 * Returns a list of the standard chunk types, as 
+	 * Returns a list of the standard chunk types, as
 	 *  appropriate for the chunks we find in the file.
 	 */
 	public Chunks identifyChunks() {
 		return Chunks.getInstance(this.isNewChunkVersion(this.directoryMap));
 	}
-	
+
 	/**
-	 * Returns a list of the standard chunk types, as 
+	 * Returns a list of the standard chunk types, as
 	 *  appropriate for the chunks we find in the file attachment.
 	 */
 	private AttachmentChunks identifyAttachmentChunks(Map attachmentMap) {
 		return AttachmentChunks.getInstance(this.isNewChunkVersion(attachmentMap));
 	}
-	
+
 	/**
 	 * Return chunk version of the map in parameter
 	 */
@@ -113,10 +107,10 @@
 		boolean hasNewStrings = false;
 		String oldStringEnd = Types.asFileEnding(Types.OLD_STRING);
 		String newStringEnd = Types.asFileEnding(Types.NEW_STRING);
-		
+
 		for(Iterator i = map.keySet().iterator(); i.hasNext();) {
 			String entry = (String)i.next();
-			
+
 			if(entry.endsWith( oldStringEnd )) {
 				hasOldStrings = true;
 			}
@@ -124,7 +118,7 @@
 				hasNewStrings = true;
 			}
 		}
-		
+
 		if(hasOldStrings && hasNewStrings) {
 			throw new IllegalStateException("Your file contains string chunks of both the old and new types. Giving up");
 		} else if(hasNewStrings) {
@@ -132,18 +126,18 @@
 		}
 		return false;
 	}
-	
+
 	/**
 	 * Pull the chunk data that's stored in this object's hashmap out and return it as a HashMap.
 	 * @param entryName
 	 */
 	public Object getChunk(HashMap dirMap, String entryName) {
-		if(dirMap == null) return null;
-		else {
-			return dirMap.get(entryName);
+		if(dirMap == null) {
+			return null;
 		}
+		return dirMap.get(entryName);
 	}
-	
+
 	/**
 	 * Pull a directory/hashmap out of this hashmap and return it
 	 * @param directoryName
@@ -155,14 +149,14 @@
 		DirectoryChunkNotFoundException excep = new DirectoryChunkNotFoundException(directoryName);
 		Object obj = getChunk(this.directoryMap, directoryName);
 		if(obj == null || !(obj instanceof HashMap)) throw excep;
-		
+
 		return (HashMap)obj;
 	}
-	
+
 	/**
 	 * Pulls a ByteArrayOutputStream from this objects HashMap, this can be used to read a byte array of the contents of the given chunk.
 	 * @param dirNode
-     * @param chunk
+	 * @param chunk
 	 * @throws ChunkNotFoundException
 	 */
 	public Chunk getDocumentNode(HashMap dirNode, Chunk chunk) throws ChunkNotFoundException {
@@ -170,12 +164,12 @@
 		ChunkNotFoundException excep = new ChunkNotFoundException(entryName);
 		Object obj = getChunk(dirNode, entryName);
 		if(obj == null || !(obj instanceof ByteArrayOutputStream)) throw excep;
-		
+
 		chunk.setValue((ByteArrayOutputStream)obj);
-		
+
 		return chunk;
 	}
-	
+
 	/**
 	 * Pulls a Chunk out of this objects root Node tree.
 	 * @param chunk
@@ -184,9 +178,9 @@
 	public Chunk getDocumentNode(Chunk chunk) throws ChunkNotFoundException {
 		return getDocumentNode(this.directoryMap, chunk);
 	}
-	
+
 	/**
-	 * 
+	 *
 	 * @return a map containing attachment name (String) and data (ByteArrayInputStream)
 	 */
 	public Map getAttachmentList() {
@@ -194,12 +188,12 @@
 		List attachmentList = new ArrayList();
 		for(Iterator i = directoryMap.keySet().iterator(); i.hasNext();) {
 			String entry = (String)i.next();
-			
+
 			if(entry.startsWith(AttachmentChunks.namePrefix)) {
 				String attachmentIdString = entry.replace(AttachmentChunks.namePrefix, "");
 				try {
 					int attachmentId = Integer.parseInt(attachmentIdString);
-					attachmentList.add((HashMap)directoryMap.get(entry));
+					attachmentList.add(directoryMap.get(entry));
 				} catch (NumberFormatException nfe) {
 					System.err.println("Invalid attachment id");
 				}
@@ -218,7 +212,7 @@
 		}
 		return attachments;
 	}
-	
+
 	/**
 	 * Processes an iterator returned by a POIFS call to getRoot().getEntries()
 	 * @param iter
@@ -226,85 +220,85 @@
 	 * @throws IOException
 	 */
 	private HashMap processPOIIterator(Iterator iter) throws IOException {
-        HashMap currentNode = new HashMap();
-        
-        while(iter.hasNext()) {
-            Object obj = iter.next();
-            if(obj instanceof DocumentNode) {
-                this.processDocumentNode((DocumentNode)obj, currentNode);
-            } else if(obj instanceof DirectoryNode) {
-                String blockName = ((DirectoryNode)obj).getName();
-                Iterator viewIt = null;
-                if( ((DirectoryNode)obj).preferArray()) {
-                    Object[] arr = ((DirectoryNode)obj).getViewableArray();
-                    ArrayList viewList = new ArrayList(arr.length);
-
-                    for(int i = 0; i < arr.length; i++) {
-                        viewList.add(arr[i]);
-                    }
-                    viewIt = viewList.iterator();
-                } else {
-                        viewIt = ((DirectoryNode)obj).getViewableIterator();
-                }
-                //store the next node on the hashmap
-                currentNode.put(blockName, processPOIIterator(viewIt));
-            } else if(obj instanceof DirectoryProperty) {
-            	//don't do anything with the directory property chunk...
-            } else {
-                    System.err.println("Unknown node: " + obj.toString());
-            }
-        }
-        return currentNode;
-	}	
-
-	/**
-     * Processes a document node and adds it to the current directory HashMap
-     * @param obj 
-     * @throws java.io.IOException 
-     */
-    private void processDocumentNode(DocumentNode obj, HashMap currentObj) throws IOException {
-        String blockName = ((DocumentNode)obj).getName();
-        
-        Iterator viewIt = null;
-        if( ((DocumentNode)obj).preferArray()) {
-            Object[] arr = ((DocumentNode)obj).getViewableArray();
-            ArrayList viewList = new ArrayList(arr.length);
-
-            for(int i = 0; i < arr.length; i++) {
-                    viewList.add(arr[i]);
-            }
-            viewIt = viewList.iterator();
-        } else {
-                viewIt = ((DocumentNode)obj).getViewableIterator();
-        }
-
-        while(viewIt.hasNext()) {
-            Object view = viewIt.next();
-
-            if(view instanceof DocumentProperty) {
-                    //we don't care about the properties
-            } else if(view instanceof POIFSDocument) {
-                    //check if our node has blocks or if it can just be read raw.
-                    int blockCount = ((POIFSDocument)view).countBlocks();
-                    //System.out.println("Block Name: " + blockName);
-                    if(blockCount <= 0) {
-                    	ByteArrayOutputStream out = new ByteArrayOutputStream();
-                        
-                        BlockWritable[] bws = ((POIFSDocument)view).getSmallBlocks();
-                        for(int i = 0; i < bws.length; i++) {
-                                bws[i].writeBlocks(out);
-                        }
-                        currentObj.put(blockName, out);		
-                    } else {
-                        ByteArrayOutputStream out = new ByteArrayOutputStream();
-                        ((POIFSDocument)view).writeBlocks(out);                    
-                        currentObj.put(blockName, out);
-                    }
-            } else {
-                System.err.println("Unknown View Type: " + view.toString());
-            }
-        }
-    }
+		HashMap currentNode = new HashMap();
+
+		while(iter.hasNext()) {
+			Object obj = iter.next();
+			if(obj instanceof DocumentNode) {
+				this.processDocumentNode((DocumentNode)obj, currentNode);
+			} else if(obj instanceof DirectoryNode) {
+				String blockName = ((DirectoryNode)obj).getName();
+				Iterator viewIt = null;
+				if( ((DirectoryNode)obj).preferArray()) {
+					Object[] arr = ((DirectoryNode)obj).getViewableArray();
+					ArrayList viewList = new ArrayList(arr.length);
+
+					for(int i = 0; i < arr.length; i++) {
+						viewList.add(arr[i]);
+					}
+					viewIt = viewList.iterator();
+				} else {
+						viewIt = ((DirectoryNode)obj).getViewableIterator();
+				}
+				//store the next node on the hashmap
+				currentNode.put(blockName, processPOIIterator(viewIt));
+			} else if(obj instanceof DirectoryProperty) {
+				//don't do anything with the directory property chunk...
+			} else {
+					System.err.println("Unknown node: " + obj.toString());
+			}
+		}
+		return currentNode;
+	}
+
+	/**
+	 * Processes a document node and adds it to the current directory HashMap
+	 * @param obj
+	 * @throws java.io.IOException
+	 */
+	private void processDocumentNode(DocumentNode obj, HashMap currentObj) throws IOException {
+		String blockName = obj.getName();
+
+		Iterator viewIt = null;
+		if( obj.preferArray()) {
+			Object[] arr = obj.getViewableArray();
+			ArrayList viewList = new ArrayList(arr.length);
+
+			for(int i = 0; i < arr.length; i++) {
+					viewList.add(arr[i]);
+			}
+			viewIt = viewList.iterator();
+		} else {
+				viewIt = obj.getViewableIterator();
+		}
+
+		while(viewIt.hasNext()) {
+			Object view = viewIt.next();
+
+			if(view instanceof DocumentProperty) {
+					//we don't care about the properties
+			} else if(view instanceof POIFSDocument) {
+					//check if our node has blocks or if it can just be read raw.
+					int blockCount = ((POIFSDocument)view).countBlocks();
+					//System.out.println("Block Name: " + blockName);
+					if(blockCount <= 0) {
+						ByteArrayOutputStream out = new ByteArrayOutputStream();
+
+						BlockWritable[] bws = ((POIFSDocument)view).getSmallBlocks();
+						for(int i = 0; i < bws.length; i++) {
+								bws[i].writeBlocks(out);
+						}
+						currentObj.put(blockName, out);
+					} else {
+						ByteArrayOutputStream out = new ByteArrayOutputStream();
+						((POIFSDocument)view).writeBlocks(out);
+						currentObj.put(blockName, out);
+					}
+			} else {
+				System.err.println("Unknown View Type: " + view.toString());
+			}
+		}
+	}
 
 	/* private instance variables */
 	private static final long serialVersionUID = 1L;

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=805284&r1=805283&r2=805284&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 Tue Aug 18 05:29:53 2009
@@ -133,7 +133,7 @@
 
   int resetListID()
   {
-    _lsid = (int)(Math.random() * (double)System.currentTimeMillis());
+    _lsid = (int)(Math.random() * System.currentTimeMillis());
     return _lsid;
   }
 

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/StyleSheet.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/StyleSheet.java?rev=805284&r1=805283&r2=805284&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/StyleSheet.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/StyleSheet.java Tue Aug 18 05:29:53 2009
@@ -225,21 +225,19 @@
           {
 
               parentPAP = _styleDescriptions[baseIndex].getPAP();
-              if(parentPAP == null)
-              {
-            	  if(baseIndex == istd) {
-            		  // Oh dear, style claims that it is its own parent
-            		  throw new IllegalStateException("Pap style " + istd + " claimed to have itself as its parent, which isn't allowed");
-            	  } else {
-            		  // Create the parent style
-                      createPap(baseIndex);
-                      parentPAP = _styleDescriptions[baseIndex].getPAP();
-            	  }
+              if(parentPAP == null) {
+                  if(baseIndex == istd) {
+                      // Oh dear, style claims that it is its own parent
+                      throw new IllegalStateException("Pap style " + istd + " claimed to have itself as its parent, which isn't allowed");
+                  }
+                  // Create the parent style
+                  createPap(baseIndex);
+                  parentPAP = _styleDescriptions[baseIndex].getPAP();
               }
 
           }
 
-          pap = (ParagraphProperties)ParagraphSprmUncompressor.uncompressPAP(parentPAP, papx, 2);
+          pap = ParagraphSprmUncompressor.uncompressPAP(parentPAP, papx, 2);
           sd.setPAP(pap);
       }
   }
@@ -274,7 +272,7 @@
 
           }
 
-          chp = (CharacterProperties)CharacterSprmUncompressor.uncompressCHP(parentCHP, chpx, 0);
+          chp = CharacterSprmUncompressor.uncompressCHP(parentCHP, chpx, 0);
           sd.setCHP(chp);
       }
   }

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/types/CHPAbstractType.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/types/CHPAbstractType.java?rev=805284&r1=805283&r2=805284&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/types/CHPAbstractType.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/types/CHPAbstractType.java Tue Aug 18 05:29:53 2009
@@ -818,9 +818,7 @@
      */
     public void setFBold(boolean value)
     {
-        field_2_format_flags = (int)fBold.setBoolean(field_2_format_flags, value);
-
-
+        field_2_format_flags = fBold.setBoolean(field_2_format_flags, value);
     }
 
     /**
@@ -830,7 +828,6 @@
     public boolean isFBold()
     {
         return fBold.isSet(field_2_format_flags);
-
     }
 
     /**
@@ -839,9 +836,7 @@
      */
     public void setFItalic(boolean value)
     {
-        field_2_format_flags = (int)fItalic.setBoolean(field_2_format_flags, value);
-
-
+        field_2_format_flags = fItalic.setBoolean(field_2_format_flags, value);
     }
 
     /**
@@ -851,7 +846,6 @@
     public boolean isFItalic()
     {
         return fItalic.isSet(field_2_format_flags);
-
     }
 
     /**
@@ -860,9 +854,7 @@
      */
     public void setFRMarkDel(boolean value)
     {
-        field_2_format_flags = (int)fRMarkDel.setBoolean(field_2_format_flags, value);
-
-
+        field_2_format_flags = fRMarkDel.setBoolean(field_2_format_flags, value);
     }
 
     /**
@@ -872,7 +864,6 @@
     public boolean isFRMarkDel()
     {
         return fRMarkDel.isSet(field_2_format_flags);
-
     }
 
     /**
@@ -881,9 +872,7 @@
      */
     public void setFOutline(boolean value)
     {
-        field_2_format_flags = (int)fOutline.setBoolean(field_2_format_flags, value);
-
-
+        field_2_format_flags = fOutline.setBoolean(field_2_format_flags, value);
     }
 
     /**
@@ -893,7 +882,6 @@
     public boolean isFOutline()
     {
         return fOutline.isSet(field_2_format_flags);
-
     }
 
     /**
@@ -902,9 +890,7 @@
      */
     public void setFFldVanish(boolean value)
     {
-        field_2_format_flags = (int)fFldVanish.setBoolean(field_2_format_flags, value);
-
-
+        field_2_format_flags = fFldVanish.setBoolean(field_2_format_flags, value);
     }
 
     /**
@@ -914,7 +900,6 @@
     public boolean isFFldVanish()
     {
         return fFldVanish.isSet(field_2_format_flags);
-
     }
 
     /**
@@ -923,9 +908,7 @@
      */
     public void setFSmallCaps(boolean value)
     {
-        field_2_format_flags = (int)fSmallCaps.setBoolean(field_2_format_flags, value);
-
-
+        field_2_format_flags = fSmallCaps.setBoolean(field_2_format_flags, value);
     }
 
     /**
@@ -935,7 +918,6 @@
     public boolean isFSmallCaps()
     {
         return fSmallCaps.isSet(field_2_format_flags);
-
     }
 
     /**
@@ -944,9 +926,7 @@
      */
     public void setFCaps(boolean value)
     {
-        field_2_format_flags = (int)fCaps.setBoolean(field_2_format_flags, value);
-
-
+        field_2_format_flags = fCaps.setBoolean(field_2_format_flags, value);
     }
 
     /**
@@ -956,7 +936,6 @@
     public boolean isFCaps()
     {
         return fCaps.isSet(field_2_format_flags);
-
     }
 
     /**
@@ -965,9 +944,7 @@
      */
     public void setFVanish(boolean value)
     {
-        field_2_format_flags = (int)fVanish.setBoolean(field_2_format_flags, value);
-
-
+        field_2_format_flags = fVanish.setBoolean(field_2_format_flags, value);
     }
 
     /**
@@ -977,7 +954,6 @@
     public boolean isFVanish()
     {
         return fVanish.isSet(field_2_format_flags);
-
     }
 
     /**
@@ -986,9 +962,7 @@
      */
     public void setFRMark(boolean value)
     {
-        field_2_format_flags = (int)fRMark.setBoolean(field_2_format_flags, value);
-
-
+        field_2_format_flags = fRMark.setBoolean(field_2_format_flags, value);
     }
 
     /**
@@ -998,7 +972,6 @@
     public boolean isFRMark()
     {
         return fRMark.isSet(field_2_format_flags);
-
     }
 
     /**
@@ -1007,9 +980,7 @@
      */
     public void setFSpec(boolean value)
     {
-        field_2_format_flags = (int)fSpec.setBoolean(field_2_format_flags, value);
-
-
+        field_2_format_flags = fSpec.setBoolean(field_2_format_flags, value);
     }
 
     /**
@@ -1019,7 +990,6 @@
     public boolean isFSpec()
     {
         return fSpec.isSet(field_2_format_flags);
-
     }
 
     /**
@@ -1028,9 +998,7 @@
      */
     public void setFStrike(boolean value)
     {
-        field_2_format_flags = (int)fStrike.setBoolean(field_2_format_flags, value);
-
-
+        field_2_format_flags = fStrike.setBoolean(field_2_format_flags, value);
     }
 
     /**
@@ -1040,7 +1008,6 @@
     public boolean isFStrike()
     {
         return fStrike.isSet(field_2_format_flags);
-
     }
 
     /**
@@ -1049,9 +1016,7 @@
      */
     public void setFObj(boolean value)
     {
-        field_2_format_flags = (int)fObj.setBoolean(field_2_format_flags, value);
-
-
+        field_2_format_flags = fObj.setBoolean(field_2_format_flags, value);
     }
 
     /**
@@ -1061,7 +1026,6 @@
     public boolean isFObj()
     {
         return fObj.isSet(field_2_format_flags);
-
     }
 
     /**
@@ -1070,9 +1034,7 @@
      */
     public void setFShadow(boolean value)
     {
-        field_2_format_flags = (int)fShadow.setBoolean(field_2_format_flags, value);
-
-
+        field_2_format_flags = fShadow.setBoolean(field_2_format_flags, value);
     }
 
     /**
@@ -1082,7 +1044,6 @@
     public boolean isFShadow()
     {
         return fShadow.isSet(field_2_format_flags);
-
     }
 
     /**
@@ -1091,9 +1052,7 @@
      */
     public void setFLowerCase(boolean value)
     {
-        field_2_format_flags = (int)fLowerCase.setBoolean(field_2_format_flags, value);
-
-
+        field_2_format_flags = fLowerCase.setBoolean(field_2_format_flags, value);
     }
 
     /**
@@ -1103,7 +1062,6 @@
     public boolean isFLowerCase()
     {
         return fLowerCase.isSet(field_2_format_flags);
-
     }
 
     /**
@@ -1112,9 +1070,7 @@
      */
     public void setFData(boolean value)
     {
-        field_2_format_flags = (int)fData.setBoolean(field_2_format_flags, value);
-
-
+        field_2_format_flags = fData.setBoolean(field_2_format_flags, value);
     }
 
     /**
@@ -1124,7 +1080,6 @@
     public boolean isFData()
     {
         return fData.isSet(field_2_format_flags);
-
     }
 
     /**
@@ -1133,9 +1088,7 @@
      */
     public void setFOle2(boolean value)
     {
-        field_2_format_flags = (int)fOle2.setBoolean(field_2_format_flags, value);
-
-
+        field_2_format_flags = fOle2.setBoolean(field_2_format_flags, value);
     }
 
     /**
@@ -1145,7 +1098,6 @@
     public boolean isFOle2()
     {
         return fOle2.isSet(field_2_format_flags);
-
     }
 
     /**
@@ -1154,9 +1106,7 @@
      */
     public void setFEmboss(boolean value)
     {
-        field_3_format_flags1 = (int)fEmboss.setBoolean(field_3_format_flags1, value);
-
-
+        field_3_format_flags1 = fEmboss.setBoolean(field_3_format_flags1, value);
     }
 
     /**
@@ -1166,7 +1116,6 @@
     public boolean isFEmboss()
     {
         return fEmboss.isSet(field_3_format_flags1);
-
     }
 
     /**
@@ -1175,9 +1124,7 @@
      */
     public void setFImprint(boolean value)
     {
-        field_3_format_flags1 = (int)fImprint.setBoolean(field_3_format_flags1, value);
-
-
+        field_3_format_flags1 = fImprint.setBoolean(field_3_format_flags1, value);
     }
 
     /**
@@ -1187,7 +1134,6 @@
     public boolean isFImprint()
     {
         return fImprint.isSet(field_3_format_flags1);
-
     }
 
     /**
@@ -1196,9 +1142,7 @@
      */
     public void setFDStrike(boolean value)
     {
-        field_3_format_flags1 = (int)fDStrike.setBoolean(field_3_format_flags1, value);
-
-
+        field_3_format_flags1 = fDStrike.setBoolean(field_3_format_flags1, value);
     }
 
     /**
@@ -1208,7 +1152,6 @@
     public boolean isFDStrike()
     {
         return fDStrike.isSet(field_3_format_flags1);
-
     }
 
     /**
@@ -1217,9 +1160,7 @@
      */
     public void setFUsePgsuSettings(boolean value)
     {
-        field_3_format_flags1 = (int)fUsePgsuSettings.setBoolean(field_3_format_flags1, value);
-
-
+        field_3_format_flags1 = fUsePgsuSettings.setBoolean(field_3_format_flags1, value);
     }
 
     /**
@@ -1229,7 +1170,6 @@
     public boolean isFUsePgsuSettings()
     {
         return fUsePgsuSettings.isSet(field_3_format_flags1);
-
     }
 
     /**
@@ -1239,8 +1179,6 @@
     public void setIcoHighlight(byte value)
     {
         field_33_Highlight = (short)icoHighlight.setValue(field_33_Highlight, value);
-
-
     }
 
     /**
@@ -1250,7 +1188,6 @@
     public byte getIcoHighlight()
     {
         return ( byte )icoHighlight.getValue(field_33_Highlight);
-
     }
 
     /**
@@ -1260,8 +1197,6 @@
     public void setFHighlight(boolean value)
     {
         field_33_Highlight = (short)fHighlight.setBoolean(field_33_Highlight, value);
-
-
     }
 
     /**
@@ -1271,7 +1206,6 @@
     public boolean isFHighlight()
     {
         return fHighlight.isSet(field_33_Highlight);
-
     }
 
     /**
@@ -1281,8 +1215,6 @@
     public void setKcd(byte value)
     {
         field_33_Highlight = (short)kcd.setValue(field_33_Highlight, value);
-
-
     }
 
     /**
@@ -1292,7 +1224,6 @@
     public byte getKcd()
     {
         return ( byte )kcd.getValue(field_33_Highlight);
-
     }
 
     /**
@@ -1302,8 +1233,6 @@
     public void setFNavHighlight(boolean value)
     {
         field_33_Highlight = (short)fNavHighlight.setBoolean(field_33_Highlight, value);
-
-
     }
 
     /**
@@ -1313,7 +1242,6 @@
     public boolean isFNavHighlight()
     {
         return fNavHighlight.isSet(field_33_Highlight);
-
     }
 
     /**
@@ -1323,8 +1251,6 @@
     public void setFChsDiff(boolean value)
     {
         field_33_Highlight = (short)fChsDiff.setBoolean(field_33_Highlight, value);
-
-
     }
 
     /**
@@ -1334,7 +1260,6 @@
     public boolean isFChsDiff()
     {
         return fChsDiff.isSet(field_33_Highlight);
-
     }
 
     /**
@@ -1344,8 +1269,6 @@
     public void setFMacChs(boolean value)
     {
         field_33_Highlight = (short)fMacChs.setBoolean(field_33_Highlight, value);
-
-
     }
 
     /**
@@ -1355,7 +1278,6 @@
     public boolean isFMacChs()
     {
         return fMacChs.isSet(field_33_Highlight);
-
     }
 
     /**
@@ -1365,8 +1287,6 @@
     public void setFFtcAsciSym(boolean value)
     {
         field_33_Highlight = (short)fFtcAsciSym.setBoolean(field_33_Highlight, value);
-
-
     }
 
     /**
@@ -1376,12 +1296,5 @@
     public boolean isFFtcAsciSym()
     {
         return fFtcAsciSym.isSet(field_33_Highlight);
-
     }
-
-
-}  // END OF CLASS
-
-
-
-
+}



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