poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r805284 [3/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...
Date Tue, 18 Aug 2009 05:29:55 GMT
Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/extractor/XSSFExcelExtractor.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/extractor/XSSFExcelExtractor.java?rev=805284&r1=805283&r2=805284&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/extractor/XSSFExcelExtractor.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/extractor/XSSFExcelExtractor.java Tue Aug 18 05:29:53 2009
@@ -41,7 +41,7 @@
 	private boolean formulasNotResults = false;
 	private boolean includeCellComments = false;
 	private boolean includeHeadersFooters = true;
-	
+
 	public XSSFExcelExtractor(String path) throws XmlException, OpenXML4JException, IOException {
 		this(new XSSFWorkbook(path));
 	}
@@ -52,14 +52,14 @@
 		super(workbook);
 		this.workbook = workbook;
 	}
-	
+
 	public static void main(String[] args) throws Exception {
 		if(args.length < 1) {
 			System.err.println("Use:");
 			System.err.println("  HXFExcelExtractor <filename.xlsx>");
 			System.exit(1);
 		}
-		POIXMLTextExtractor extractor = 
+		POIXMLTextExtractor extractor =
 			new XSSFExcelExtractor(args[0]);
 		System.out.println(extractor.getText());
 	}
@@ -89,19 +89,19 @@
     public void setIncludeHeadersFooters(boolean includeHeadersFooters) {
         this.includeHeadersFooters = includeHeadersFooters;
     }
-	
+
 	/**
 	 * Retreives the text contents of the file
 	 */
 	public String getText() {
 		StringBuffer text = new StringBuffer();
-		
+
 		for(int i=0; i<workbook.getNumberOfSheets(); i++) {
-			XSSFSheet sheet = (XSSFSheet)workbook.getSheetAt(i);
+			XSSFSheet sheet = workbook.getSheetAt(i);
 			if(includeSheetNames) {
 				text.append(workbook.getSheetName(i) + "\n");
 			}
-			
+
 			// Header(s), if present
 			if(includeHeadersFooters) {
 				text.append(
@@ -120,7 +120,7 @@
 				Row row = (Row)rawR;
 				for(Iterator<Cell> ri = row.cellIterator(); ri.hasNext();) {
 					Cell cell = ri.next();
-					
+
 					// Is it a formula one?
 					if(cell.getCellType() == Cell.CELL_TYPE_FORMULA && formulasNotResults) {
 						text.append(cell.getCellFormula());
@@ -130,7 +130,7 @@
 						XSSFCell xc = (XSSFCell)cell;
 						text.append(xc.getRawValue());
 					}
-					
+
 					// Output the comment, if requested and exists
 				    Comment comment = cell.getCellComment();
 					if(includeCellComments && comment != null) {
@@ -139,13 +139,13 @@
 					    String commentText = comment.getString().getString().replace('\n', ' ');
 					    text.append(" Comment by "+comment.getAuthor()+": "+commentText);
 					}
-					
+
 					if(ri.hasNext())
 						text.append("\t");
 				}
 				text.append("\n");
 			}
-			
+
 			// Finally footer(s), if present
 			if(includeHeadersFooters) {
 				text.append(
@@ -159,10 +159,10 @@
 				);
 			}
 		}
-		
+
 		return text.toString();
 	}
-	
+
 	private String extractHeaderFooter(HeaderFooter hf) {
 		return ExcelExtractor._extractHeaderFooter(hf);
 	}

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCell.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCell.java?rev=805284&r1=805283&r2=805284&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCell.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCell.java Tue Aug 18 05:29:53 2009
@@ -585,9 +585,11 @@
      */
     public byte getErrorCellValue() {
         String code = getErrorCellString();
-        if(code == null) return 0;
+        if (code == null) {
+            return 0;
+        }
 
-        return (byte)FormulaError.forString(code).getCode();
+        return FormulaError.forString(code).getCode();
     }
 
     /**
@@ -778,7 +780,7 @@
         SpreadsheetVersion v = SpreadsheetVersion.EXCEL2007;
         int maxcol = SpreadsheetVersion.EXCEL2007.getLastColumnIndex();
         if (cellIndex < 0 || cellIndex > maxcol) {
-            throw new IllegalArgumentException("Invalid column index (" + cellIndex 
+            throw new IllegalArgumentException("Invalid column index (" + cellIndex
                     + ").  Allowable column range for " + v.name() + " is (0.."
                     + maxcol + ") or ('A'..'" + v.getLastColumnName() + "')");
         }
@@ -848,7 +850,7 @@
      */
     private boolean convertCellValueToBoolean() {
         int cellType = getCellType();
-        
+
         if (cellType == CELL_TYPE_FORMULA) {
             cellType = getBaseCellType(false);
         }

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCellStyle.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCellStyle.java?rev=805284&r1=805283&r2=805284&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCellStyle.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCellStyle.java Tue Aug 18 05:29:53 2009
@@ -145,9 +145,8 @@
         CTCellAlignment align = cellXf.getAlignment();
         if(align != null && align.isSetHorizontal()) {
             return HorizontalAlignment.values()[align.getHorizontal().intValue()-1];
-        } else {
-            return HorizontalAlignment.GENERAL;
         }
+        return HorizontalAlignment.GENERAL;
     }
 
     /**
@@ -865,7 +864,7 @@
      */
     public void setDataFormat(short fmt) {
         cellXf.setApplyNumberFormat(true);
-        cellXf.setNumFmtId((long)fmt);
+        cellXf.setNumFmtId(fmt);
     }
 
     /**

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPrintSetup.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPrintSetup.java?rev=805284&r1=805283&r2=805284&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPrintSetup.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPrintSetup.java Tue Aug 18 05:29:53 2009
@@ -285,7 +285,7 @@
      * @see PaperSize
      */
     public PaperSize getPaperSizeEnum() {
-        return PaperSize.values()[((int) getPaperSize() - 1)];
+        return PaperSize.values()[getPaperSize() - 1];
     }
 
     /**

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java?rev=805284&r1=805283&r2=805284&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java Tue Aug 18 05:29:53 2009
@@ -255,7 +255,7 @@
 
     /**
      * Returns the name of this sheet
-     * 
+     *
      * @return the name of this sheet
      */
     public String getSheetName() {
@@ -358,7 +358,7 @@
     public void createFreezePane(int colSplit, int rowSplit) {
         createFreezePane( colSplit, rowSplit, colSplit, rowSplit );
     }
-    
+
     /**
      * Creates a split (freezepane). Any existing freezepane or split pane is overwritten.
      * @param colSplit	  Horizonatal position of split.
@@ -533,7 +533,7 @@
                worksheet.getSheetFormatPr() :
                worksheet.addNewSheetFormatPr();
     }
-    
+
     /**
      * Returns the CellStyle that applies to the given
      *  (0 based) column, or null if no style has been
@@ -571,7 +571,7 @@
     /**
      * Gets the flag indicating whether the window should show 0 (zero) in cells containing zero value.
      * When false, cells with zero value appear blank instead of showing the number zero.
-     * 
+     *
      * @return whether all zero values on the worksheet are displayed
      */
     public boolean isDisplayZeros(){
@@ -1333,7 +1333,7 @@
     			.getOutlineLevel(), true);
 
     	// write collapse field
-    	setColumn((int) (lastColMax + 1), null, 0, null, null, Boolean.TRUE);
+    	setColumn(lastColMax + 1, null, 0, null, null, Boolean.TRUE);
 
     }
 
@@ -1433,7 +1433,7 @@
     /**
      * Sets all adjacent columns of the same outline level to the specified
      * hidden status.
-     * 
+     *
      * @param pIdx
      *                the col info index of the start of the outline group
      * @return the column index of the last column in the outline group
@@ -1626,7 +1626,7 @@
     /**
      * 'Collapsed' state is stored in a single column col info record
      * immediately after the outline group
-     * 
+     *
      * @param idx
      * @return a boolean represented if the column is collapsed
      */
@@ -1764,7 +1764,7 @@
      * outline level collapsed, thus hiding all the child rows. Note that in
      * this case, if the lowest level were expanded, the middle level would
      * remain collapsed.
-     * 
+     *
      * @param rowIndex -
      *                the row involved, 0 based
      * @param collapse -
@@ -1895,8 +1895,7 @@
     		endLevel = 0;
     		endHidden = false;
     	} else {
-    		endLevel = (int) (getRow(endOfOutlineGroupIdx).getCTRow()
-    				.getOutlineLevel());
+    		endLevel = getRow(endOfOutlineGroupIdx).getCTRow().getOutlineLevel();
     		endHidden = getRow(endOfOutlineGroupIdx).getCTRow().getHidden();
     	}
 
@@ -1931,7 +1930,7 @@
     	else
     		return getRow(collapseRow).getCTRow().getCollapsed();
     }
-    
+
     /**
      * Sets the zoom magnication for the sheet.  The zoom is expressed as a
      * fraction.  For example to express a zoom of 75% use 3 for the numerator

Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/model/TestCommentsTable.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/model/TestCommentsTable.java?rev=805284&r1=805283&r2=805284&view=diff
==============================================================================
--- poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/model/TestCommentsTable.java (original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/model/TestCommentsTable.java Tue Aug 18 05:29:53 2009
@@ -35,22 +35,23 @@
 import org.apache.poi.openxml4j.opc.OPCPackage;
 import org.openxmlformats.schemas.spreadsheetml.x2006.main.*;
 
+import junit.framework.AssertionFailedError;
 import junit.framework.TestCase;
 
 
 public class TestCommentsTable extends TestCase {
-	
+
 	private static final String TEST_A2_TEXT = "test A2 text";
 	private static final String TEST_A1_TEXT = "test A1 text";
 	private static final String TEST_AUTHOR = "test author";
 
 	public void testfindAuthor() throws Exception {
-        CommentsDocument doc = CommentsDocument.Factory.newInstance();
+		CommentsDocument doc = CommentsDocument.Factory.newInstance();
 		doc.setComments(CTComments.Factory.newInstance());
-        ByteArrayOutputStream out = new ByteArrayOutputStream();
-        doc.save(out, POIXMLDocumentPart.DEFAULT_XML_OPTIONS);
-        CommentsTable sheetComments = new CommentsTable();
-        sheetComments.readFrom(new ByteArrayInputStream(out.toByteArray()));
+		ByteArrayOutputStream out = new ByteArrayOutputStream();
+		doc.save(out, POIXMLDocumentPart.DEFAULT_XML_OPTIONS);
+		CommentsTable sheetComments = new CommentsTable();
+		sheetComments.readFrom(new ByteArrayInputStream(out.toByteArray()));
 
 		assertEquals(0, sheetComments.findAuthor(TEST_AUTHOR));
 		assertEquals(1, sheetComments.findAuthor("another author"));
@@ -58,19 +59,19 @@
 		assertEquals(2, sheetComments.findAuthor("YAA"));
 		assertEquals(1, sheetComments.findAuthor("another author"));
 	}
-	
+
 	public void testGetCellComment() throws Exception {
-        CommentsDocument doc = CommentsDocument.Factory.newInstance();
+		CommentsDocument doc = CommentsDocument.Factory.newInstance();
 		doc.setComments(CTComments.Factory.newInstance());
-        ByteArrayOutputStream out = new ByteArrayOutputStream();
-        doc.save(out, POIXMLDocumentPart.DEFAULT_XML_OPTIONS);
-        CommentsTable sheetComments = new CommentsTable();
-        sheetComments.readFrom(new ByteArrayInputStream(out.toByteArray()));
+		ByteArrayOutputStream out = new ByteArrayOutputStream();
+		doc.save(out, POIXMLDocumentPart.DEFAULT_XML_OPTIONS);
+		CommentsTable sheetComments = new CommentsTable();
+		sheetComments.readFrom(new ByteArrayInputStream(out.toByteArray()));
 
 
 		CTComments comments = sheetComments.getCTComments();
 		CTCommentList commentList = comments.addNewCommentList();
-		
+
 		// Create 2 comments for A1 and A" cells
 		CTComment comment0 = commentList.insertNewComment(0);
 		comment0.setRef("A1");
@@ -82,7 +83,7 @@
 		CTRst ctrst1 = CTRst.Factory.newInstance();
 		ctrst1.setT(TEST_A2_TEXT);
 		comment1.setText(ctrst1);
-		
+
 		// test finding the right comment for a cell
 		assertEquals(TEST_A1_TEXT, sheetComments.findCellComment("A1").getString().getString());
 		assertEquals(TEST_A1_TEXT, sheetComments.findCellComment(0, 0).getString().getString());
@@ -91,77 +92,81 @@
 		assertNull(sheetComments.findCellComment("A3"));
 		assertNull(sheetComments.findCellComment(2, 0));
 	}
-	
+
 	public void testAddCellComment() throws Exception {
-        CommentsDocument doc = CommentsDocument.Factory.newInstance();
+		CommentsDocument doc = CommentsDocument.Factory.newInstance();
 		doc.setComments(CTComments.Factory.newInstance());
-        ByteArrayOutputStream out = new ByteArrayOutputStream();
-        doc.save(out, POIXMLDocumentPart.DEFAULT_XML_OPTIONS);
-        CommentsTable sheetComments = new CommentsTable();
-        sheetComments.readFrom(new ByteArrayInputStream(out.toByteArray()));
+		ByteArrayOutputStream out = new ByteArrayOutputStream();
+		doc.save(out, POIXMLDocumentPart.DEFAULT_XML_OPTIONS);
+		CommentsTable sheetComments = new CommentsTable();
+		sheetComments.readFrom(new ByteArrayInputStream(out.toByteArray()));
 
 		CTCommentList commentList = sheetComments.getCTComments().addNewCommentList();
 		assertEquals(0, commentList.sizeOfCommentArray());
-		
+
 		XSSFComment comment = sheetComments.addComment();
 		comment.setAuthor("test A1 author");
 		comment.setRow(0);
 		comment.setColumn((short)0);
-		
+
 		assertEquals(1, commentList.sizeOfCommentArray());
 		assertEquals("test A1 author", sheetComments.getAuthor(commentList.getCommentArray(0).getAuthorId()));
 		assertEquals("test A1 author", comment.getAuthor());
-		
+
 		// Change the author, check it updates
 		comment.setAuthor("Another Author");
 		assertEquals(1, commentList.sizeOfCommentArray());
 		assertEquals("Another Author", comment.getAuthor());
 	}
-	
+
 	public void testDontLoostNewLines() throws Exception {
 		File xml = new File(
 				System.getProperty("HSSF.testdata.path") +
 				File.separator + "WithVariousData.xlsx"
 		);
 		assertTrue(xml.exists());
-    	
+
 		OPCPackage pkg = OPCPackage.open(xml.toString());
 		XSSFWorkbook wb = new XSSFWorkbook(pkg);
-        List<POIXMLDocumentPart> rels = wb.getSheetAt(0).getRelations();
-        CommentsTable ct = null;
-        for(POIXMLDocumentPart p : rels) {
-            if(p instanceof CommentsTable){
-                ct = (CommentsTable)p;
-                break;
-            }
-        }
-        assertNotNull(ct);
+		List<POIXMLDocumentPart> rels = wb.getSheetAt(0).getRelations();
+		CommentsTable ct = null;
+		for(POIXMLDocumentPart p : rels) {
+			if(p instanceof CommentsTable){
+				ct = (CommentsTable)p;
+				break;
+			}
+		}
+		if (ct == null) {
+			throw new AssertionFailedError("didn't find comments table");
+		}
 		assertEquals(2, ct.getNumberOfComments());
 		assertEquals(1, ct.getNumberOfAuthors());
 
 		XSSFComment comment = ct.findCellComment("C5");
-		
+
 		assertEquals("Nick Burch", comment.getAuthor());
 		assertEquals("Nick Burch:\nThis is a comment", comment.getString().getString());
 
-        wb = XSSFTestDataSamples.writeOutAndReadBack(wb);
-        rels = wb.getSheetAt(0).getRelations();
-        ct = null;
-        for(POIXMLDocumentPart p : rels) {
-            if(p instanceof CommentsTable){
-                ct = (CommentsTable)p;
-                break;
-            }
-        }
-        assertNotNull(ct);
+		wb = XSSFTestDataSamples.writeOutAndReadBack(wb);
+		rels = wb.getSheetAt(0).getRelations();
+		ct = null;
+		for(POIXMLDocumentPart p : rels) {
+			if(p instanceof CommentsTable){
+				ct = (CommentsTable)p;
+				break;
+			}
+		}
+		if (ct == null) {
+			throw new AssertionFailedError("didn't find comments table");
+		}
 
 		assertEquals(2, ct.getNumberOfComments());
 		assertEquals(1, ct.getNumberOfAuthors());
-		
+
 		comment = ct.findCellComment("C5");
-		
+
 		assertEquals("Nick Burch", comment.getAuthor());
-		
+
 		assertEquals("Nick Burch:\nThis is a comment", comment.getString().getString());
 	}
 
@@ -171,127 +176,127 @@
 				File.separator + "WithVariousData.xlsx"
 		);
 		assertTrue(xml.exists());
-    	
+
 		XSSFWorkbook workbook = new XSSFWorkbook(xml.toString());
 		Sheet sheet1 = workbook.getSheetAt(0);
 		Sheet sheet2 = workbook.getSheetAt(1);
-		
+
 		assertTrue( ((XSSFSheet)sheet1).hasComments() );
 		assertFalse( ((XSSFSheet)sheet2).hasComments() );
-		
+
 		// Comments should be in C5 and C7
 		Row r5 = sheet1.getRow(4);
 		Row r7 = sheet1.getRow(6);
 		assertNotNull( r5.getCell(2).getCellComment() );
 		assertNotNull( r7.getCell(2).getCellComment() );
-		
+
 		// Check they have what we expect
 		// TODO: Rich text formatting
 		Comment cc5 = r5.getCell(2).getCellComment();
 		Comment cc7 = r7.getCell(2).getCellComment();
-		
+
 		assertEquals("Nick Burch", cc5.getAuthor());
 		assertEquals("Nick Burch:\nThis is a comment", cc5.getString().getString());
 		assertEquals(4, cc5.getRow());
 		assertEquals(2, cc5.getColumn());
-		
+
 		assertEquals("Nick Burch", cc7.getAuthor());
 		assertEquals("Nick Burch:\nComment #1\n", cc7.getString().getString());
 		assertEquals(6, cc7.getRow());
 		assertEquals(2, cc7.getColumn());
 	}
-	
+
 	public void testWriteRead() throws Exception {
 		File xml = new File(
 				System.getProperty("HSSF.testdata.path") +
 				File.separator + "WithVariousData.xlsx"
 		);
 		assertTrue(xml.exists());
-    	
+
 		XSSFWorkbook workbook = new XSSFWorkbook(xml.toString());
-		Sheet sheet1 = workbook.getSheetAt(0);
-		XSSFSheet sheet2 = (XSSFSheet)workbook.getSheetAt(1);
-		
-		assertTrue( ((XSSFSheet)sheet1).hasComments() );
-		assertFalse( ((XSSFSheet)sheet2).hasComments() );
-		
+		XSSFSheet sheet1 = workbook.getSheetAt(0);
+		XSSFSheet sheet2 = workbook.getSheetAt(1);
+
+		assertTrue( sheet1.hasComments() );
+		assertFalse( sheet2.hasComments() );
+
 		// Change on comment on sheet 1, and add another into
 		//  sheet 2
 		Row r5 = sheet1.getRow(4);
 		Comment cc5 = r5.getCell(2).getCellComment();
 		cc5.setAuthor("Apache POI");
 		cc5.setString(new XSSFRichTextString("Hello!"));
-		
+
 		Row r2s2 = sheet2.createRow(2);
 		Cell c1r2s2 = r2s2.createCell(1);
 		assertNull(c1r2s2.getCellComment());
-		
+
 		Comment cc2 = sheet2.createComment();
 		cc2.setAuthor("Also POI");
 		cc2.setString(new XSSFRichTextString("A new comment"));
 		c1r2s2.setCellComment(cc2);
-		
-		
+
+
 		// Save, and re-load the file
-        workbook = XSSFTestDataSamples.writeOutAndReadBack(workbook);
+		workbook = XSSFTestDataSamples.writeOutAndReadBack(workbook);
 
 		// Check we still have comments where we should do
 		sheet1 = workbook.getSheetAt(0);
-		sheet2 = (XSSFSheet)workbook.getSheetAt(1);
+		sheet2 = workbook.getSheetAt(1);
 		assertNotNull(sheet1.getRow(4).getCell(2).getCellComment());
 		assertNotNull(sheet1.getRow(6).getCell(2).getCellComment());
 		assertNotNull(sheet2.getRow(2).getCell(1).getCellComment());
-		
+
 		// And check they still have the contents they should do
-		assertEquals("Apache POI", 
+		assertEquals("Apache POI",
 				sheet1.getRow(4).getCell(2).getCellComment().getAuthor());
-		assertEquals("Nick Burch", 
+		assertEquals("Nick Burch",
 				sheet1.getRow(6).getCell(2).getCellComment().getAuthor());
-		assertEquals("Also POI", 
+		assertEquals("Also POI",
 				sheet2.getRow(2).getCell(1).getCellComment().getAuthor());
-		
+
 		assertEquals("Nick Burch:\nThis is a comment",
 				sheet1.getRow(4).getCell(2).getCellComment().getString().getString());
 	}
-	
+
 	public void testReadWriteMultipleAuthors() throws Exception {
 		File xml = new File(
 				System.getProperty("HSSF.testdata.path") +
 				File.separator + "WithMoreVariousData.xlsx"
 		);
 		assertTrue(xml.exists());
-    	
+
 		XSSFWorkbook workbook = new XSSFWorkbook(xml.toString());
-		Sheet sheet1 = workbook.getSheetAt(0);
-		XSSFSheet sheet2 = (XSSFSheet)workbook.getSheetAt(1);
-		
-		assertTrue( ((XSSFSheet)sheet1).hasComments() );
-		assertFalse( ((XSSFSheet)sheet2).hasComments() );
-		
-		assertEquals("Nick Burch", 
+		XSSFSheet sheet1 = workbook.getSheetAt(0);
+		XSSFSheet sheet2 = workbook.getSheetAt(1);
+
+		assertTrue( sheet1.hasComments() );
+		assertFalse( sheet2.hasComments() );
+
+		assertEquals("Nick Burch",
 				sheet1.getRow(4).getCell(2).getCellComment().getAuthor());
-		assertEquals("Nick Burch", 
+		assertEquals("Nick Burch",
 				sheet1.getRow(6).getCell(2).getCellComment().getAuthor());
-		assertEquals("Torchbox", 
+		assertEquals("Torchbox",
 				sheet1.getRow(12).getCell(2).getCellComment().getAuthor());
-		
+
 		// Save, and re-load the file
-        workbook = XSSFTestDataSamples.writeOutAndReadBack(workbook);
+		workbook = XSSFTestDataSamples.writeOutAndReadBack(workbook);
 
 		// Check we still have comments where we should do
 		sheet1 = workbook.getSheetAt(0);
 		assertNotNull(sheet1.getRow(4).getCell(2).getCellComment());
 		assertNotNull(sheet1.getRow(6).getCell(2).getCellComment());
 		assertNotNull(sheet1.getRow(12).getCell(2).getCellComment());
-		
+
 		// And check they still have the contents they should do
-		assertEquals("Nick Burch", 
+		assertEquals("Nick Burch",
 				sheet1.getRow(4).getCell(2).getCellComment().getAuthor());
-		assertEquals("Nick Burch", 
+		assertEquals("Nick Burch",
 				sheet1.getRow(6).getCell(2).getCellComment().getAuthor());
-		assertEquals("Torchbox", 
+		assertEquals("Torchbox",
 				sheet1.getRow(12).getCell(2).getCellComment().getAuthor());
-		
+
 		// Todo - check text too, once bug fixed
 	}
 }

Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFHyperlink.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFHyperlink.java?rev=805284&r1=805283&r2=805284&view=diff
==============================================================================
--- poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFHyperlink.java (original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFHyperlink.java Tue Aug 18 05:29:53 2009
@@ -24,10 +24,10 @@
 import org.apache.poi.xssf.XSSFITestDataProvider;
 
 public final class TestXSSFHyperlink extends BaseTestHyperlink {
-    @Override
-    protected XSSFITestDataProvider getTestDataProvider() {
-        return XSSFITestDataProvider.getInstance();
-    }
+	@Override
+	protected XSSFITestDataProvider getTestDataProvider() {
+		return XSSFITestDataProvider.getInstance();
+	}
 
 	@Override
 	protected void setUp() {
@@ -48,7 +48,7 @@
 		XSSFWorkbook workbook = new XSSFWorkbook(xml.toString());
 		assertEquals(3, workbook.getNumberOfSheets());
 
-		XSSFSheet sheet = (XSSFSheet)workbook.getSheetAt(0);
+		XSSFSheet sheet = workbook.getSheetAt(0);
 
 		// Check the hyperlinks
 		assertEquals(4, sheet.getNumHyperlinks());
@@ -65,7 +65,7 @@
 		XSSFWorkbook workbook = new XSSFWorkbook(xml.toString());
 		CreationHelper createHelper = workbook.getCreationHelper();
 		assertEquals(3, workbook.getNumberOfSheets());
-		XSSFSheet sheet = (XSSFSheet)workbook.getSheetAt(0);
+		XSSFSheet sheet = workbook.getSheetAt(0);
 
 		// Check hyperlinks
 		assertEquals(4, sheet.getNumHyperlinks());
@@ -81,7 +81,7 @@
 		assertNotNull(wb2.getSheetAt(1));
 		assertNotNull(wb2.getSheetAt(2));
 
-		sheet = (XSSFSheet)wb2.getSheetAt(0);
+		sheet = wb2.getSheetAt(0);
 
 
 		// Check hyperlinks again

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hdf/extractor/StyleSheet.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hdf/extractor/StyleSheet.java?rev=805284&r1=805283&r2=805284&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hdf/extractor/StyleSheet.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hdf/extractor/StyleSheet.java Tue Aug 18 05:29:53 2009
@@ -167,8 +167,8 @@
                break;
           case 0x9:
                newCHP._fSpec = true;
-               newCHP._ftcSym = (short)Utils.convertBytesToShort(varParam, 0);
-               newCHP._xchSym = (short)Utils.convertBytesToShort(varParam, 2);
+               newCHP._ftcSym = Utils.convertBytesToShort(varParam, 0);
+               newCHP._xchSym = Utils.convertBytesToShort(varParam, 2);
                break;
           case 0xa:
                newCHP._fOle2 = getFlag(param);
@@ -453,8 +453,8 @@
                doCHPOperation(oldCHP, newCHP, 0x47, param, varParam, grpprl, offset, styleSheet);
                break;
           case 0x4d:
-               float percentage = (float)param/100.0f;
-               int add = (int)((float)percentage * (float)newCHP._hps);
+               float percentage = param/100.0f;
+               int add = (int)(percentage * newCHP._hps);
                newCHP._hps += add;
                break;
           case 0x4e:
@@ -485,7 +485,7 @@
                break;
           case 0x57:
                newCHP._fPropMark = getFlag(varParam[0]);
-               newCHP._ibstPropRMark = (short)Utils.convertBytesToShort(varParam, 1);
+               newCHP._ibstPropRMark = Utils.convertBytesToShort(varParam, 1);
                newCHP._dttmPropRMark = Utils.convertBytesToInt(varParam, 3);
                break;
           case 0x58:
@@ -512,7 +512,7 @@
                break;
           case 0x62:
                newCHP._fDispFldRMark = getFlag(varParam[0]);
-               newCHP._ibstDispFldRMark = (short)Utils.convertBytesToShort(varParam, 1);
+               newCHP._ibstDispFldRMark = Utils.convertBytesToShort(varParam, 1);
                newCHP._dttmDispFldRMark = Utils.convertBytesToInt(varParam, 3);
                System.arraycopy(varParam, 7, newCHP._xstDispFldRMark, 0, 32);
                break;
@@ -524,8 +524,8 @@
                newCHP._dttmRMarkDel[1] = Utils.convertBytesToShort(grpprl, offset - 2);
                break;
           case 0x65:
-               newCHP._brc[0] = (short)Utils.convertBytesToShort(grpprl, offset - 4);
-               newCHP._brc[1] = (short)Utils.convertBytesToShort(grpprl, offset - 2);
+               newCHP._brc[0] = Utils.convertBytesToShort(grpprl, offset - 4);
+               newCHP._brc[1] = Utils.convertBytesToShort(grpprl, offset - 2);
                break;
           case 0x66:
                newCHP._shd = (short)param;
@@ -834,28 +834,28 @@
                newPAP._wr = (byte)param;
                break;
           case 0x24:
-               newPAP._brcTop[0] = (short)Utils.convertBytesToShort(grpprl, offset - 4);
-               newPAP._brcTop[1] = (short)Utils.convertBytesToShort(grpprl, offset - 2);
+               newPAP._brcTop[0] = Utils.convertBytesToShort(grpprl, offset - 4);
+               newPAP._brcTop[1] = Utils.convertBytesToShort(grpprl, offset - 2);
                break;
           case 0x25:
-               newPAP._brcLeft[0] = (short)Utils.convertBytesToShort(grpprl, offset - 4);
-               newPAP._brcLeft[1] = (short)Utils.convertBytesToShort(grpprl, offset - 2);
+               newPAP._brcLeft[0] = Utils.convertBytesToShort(grpprl, offset - 4);
+               newPAP._brcLeft[1] = Utils.convertBytesToShort(grpprl, offset - 2);
                break;
           case 0x26:
-               newPAP._brcBottom[0] = (short)Utils.convertBytesToShort(grpprl, offset - 4);
-               newPAP._brcBottom[1] = (short)Utils.convertBytesToShort(grpprl, offset - 2);
+               newPAP._brcBottom[0] = Utils.convertBytesToShort(grpprl, offset - 4);
+               newPAP._brcBottom[1] = Utils.convertBytesToShort(grpprl, offset - 2);
                break;
           case 0x27:
-               newPAP._brcRight[0] = (short)Utils.convertBytesToShort(grpprl, offset - 4);
-               newPAP._brcRight[1] = (short)Utils.convertBytesToShort(grpprl, offset - 2);
+               newPAP._brcRight[0] = Utils.convertBytesToShort(grpprl, offset - 4);
+               newPAP._brcRight[1] = Utils.convertBytesToShort(grpprl, offset - 2);
                break;
           case 0x28:
-               newPAP._brcBetween[0] = (short)Utils.convertBytesToShort(grpprl, offset - 4);
-               newPAP._brcBetween[1] = (short)Utils.convertBytesToShort(grpprl, offset - 2);
+               newPAP._brcBetween[0] = Utils.convertBytesToShort(grpprl, offset - 4);
+               newPAP._brcBetween[1] = Utils.convertBytesToShort(grpprl, offset - 2);
                break;
           case 0x29:
-               newPAP._brcBar[0] = (short)Utils.convertBytesToShort(grpprl, offset - 4);
-               newPAP._brcBar[1] = (short)Utils.convertBytesToShort(grpprl, offset - 2);
+               newPAP._brcBar[0] = Utils.convertBytesToShort(grpprl, offset - 4);
+               newPAP._brcBar[1] = Utils.convertBytesToShort(grpprl, offset - 2);
                break;
           case 0x2a:
                newPAP._fNoAutoHyph = (byte)param;

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hdf/extractor/WordDocument.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hdf/extractor/WordDocument.java?rev=805284&r1=805283&r2=805284&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hdf/extractor/WordDocument.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hdf/extractor/WordDocument.java Tue Aug 18 05:29:53 2009
@@ -35,10 +35,10 @@
  *
  * @author Ryan Ackley
  */
-
-public final class WordDocument
-{
-  /** byte buffer containing the main Document stream*/
+public final class WordDocument {
+	// TODO - name this constant properly
+	private static final float K_1440_0F = 1440.0f;
+/** byte buffer containing the main Document stream*/
   byte[] _header;
   /** contains all style information for this document see Word 97 Doc spec*/
   StyleSheet _styleSheet;
@@ -1160,19 +1160,19 @@
     }
     if(pap._dxaLeft > 0)
     {
-      buf.append("start-indent=\"" + ((float)pap._dxaLeft)/1440.0f + "in\"\r\n");
+      buf.append("start-indent=\"" + pap._dxaLeft/K_1440_0F + "in\"\r\n");
     }
     if(pap._dxaRight > 0)
     {
-      buf.append("end-indent=\"" + ((float)pap._dxaRight)/1440.0f + "in\"\r\n");
+      buf.append("end-indent=\"" + pap._dxaRight/K_1440_0F + "in\"\r\n");
     }
     if(pap._dxaLeft1 != 0)
     {
-      buf.append("text-indent=\"" + ((float)pap._dxaLeft1)/1440.0f + "in\"\r\n");
+      buf.append("text-indent=\"" + pap._dxaLeft1/K_1440_0F + "in\"\r\n");
     }
     if(pap._lspd[1] == 0)
     {
-      //buf.append("line-height=\"" + ((float)pap._lspd[0])/1440.0f + "in\"\r\n");
+      //buf.append("line-height=\"" + pap._lspd[0]/K_1440_0F + "in\"\r\n");
     }
     addBorder(buf, pap._brcTop, "top");
     addBorder(buf, pap._brcBottom, "bottom");
@@ -1190,7 +1190,7 @@
     buf.append("font-size=\"" + (chp._hps / 2) + "pt\" ");
     buf.append("color=\"" + getColor(chp._ico) + "\" ");
     //not supported by fop
-    //buf.append("letter-spacing=\"" + ((double)chp._dxaSpace)/1440.0f + "in\" ");
+    //buf.append("letter-spacing=\"" + ((double)chp._dxaSpace)/K_1440_0F + "in\" ");
 
     addBorder(buf, chp._brc, "top");
     addBorder(buf, chp._brc, "bottom");
@@ -1236,11 +1236,11 @@
     }
     if(chp._paddingStart != 0)
     {
-      buf.append("padding-start=\"" + (float)chp._paddingStart/1440.0f + "in\" ");
+      buf.append("padding-start=\"" + chp._paddingStart/K_1440_0F + "in\" ");
     }
     if(chp._paddingEnd != 0)
     {
-      buf.append("padding-end=\"" + (float)chp._paddingEnd/1440.0f + "in\" ");
+      buf.append("padding-end=\"" + chp._paddingEnd/K_1440_0F + "in\" ");
     }
     buf.append(">");
   }
@@ -1416,12 +1416,12 @@
   private String createPageMaster(SEP sep, String type, int section,
                                   String regionBefore, String regionAfter)
   {
-    float height = ((float)sep._yaPage)/1440.0f;
-    float width = ((float)sep._xaPage)/1440.0f;
-    float leftMargin = ((float)sep._dxaLeft)/1440.0f;
-    float rightMargin = ((float)sep._dxaRight)/1440.0f;
-    float topMargin = ((float)sep._dyaTop)/1440.0f;
-    float bottomMargin = ((float)sep._dyaBottom)/1440.0f;
+    float height = sep._yaPage/K_1440_0F;
+    float width = sep._xaPage/K_1440_0F;
+    float leftMargin = sep._dxaLeft/K_1440_0F;
+    float rightMargin = sep._dxaRight/K_1440_0F;
+    float topMargin = sep._dyaTop/K_1440_0F;
+    float bottomMargin = sep._dyaBottom/K_1440_0F;
 
     //add these to the header
     String thisPage = type + "-page" + section;
@@ -1452,7 +1452,7 @@
       _headerBuffer.append("column-count=\"" + (sep._ccolM1 + 1) + "\" ");
       if(sep._fEvenlySpaced)
       {
-        _headerBuffer.append("column-gap=\"" + ((float)(sep._dxaColumns))/1440.0f + "in\"");
+        _headerBuffer.append("column-gap=\"" + sep._dxaColumns/K_1440_0F + "in\"");
       }
       else
       {
@@ -1478,7 +1478,7 @@
     if((brc[0] & 0xff00) != 0 && brc[0] != -1)
     {
       int type = (brc[0] & 0xff00) >> 8;
-      float width = ((float)(brc[0] & 0x00ff))/8.0f;
+      float width = (brc[0] & 0x00ff)/8.0f;
       String style = getBorderStyle(brc[0]);
       String color = getColor(brc[1] & 0x00ff);
       String thickness = getBorderThickness(brc[0]);
@@ -1764,7 +1764,7 @@
         rowBuffer.append("<fo:table-row ");
         if(tap._dyaRowHeight > 0)
         {
-          rowBuffer.append("height=\"" + ((float)tap._dyaRowHeight)/1440.0f + "in\" ");
+          rowBuffer.append("height=\"" + tap._dyaRowHeight/K_1440_0F + "in\" ");
         }
         if(tap._fCantSplit)
         {
@@ -1777,9 +1777,9 @@
           TC tc = tap._rgtc[y];
           overrideCellBorder(x, y, size, tap._itcMac, tc, tap);
           rowBuffer.append("<fo:table-cell ");
-          rowBuffer.append("width=\"" + ((float)(tap._rgdxaCenter[y+1] - tap._rgdxaCenter[y]))/1440.0f + "in\" ");
-          rowBuffer.append("padding-start=\"" + ((float)tap._dxaGapHalf)/1440.0f + "in\" ");
-          rowBuffer.append("padding-end=\"" + ((float)tap._dxaGapHalf)/1440.0f + "in\" ");
+          rowBuffer.append("width=\"" + (tap._rgdxaCenter[y+1] - tap._rgdxaCenter[y])/K_1440_0F + "in\" ");
+          rowBuffer.append("padding-start=\"" + tap._dxaGapHalf/K_1440_0F + "in\" ");
+          rowBuffer.append("padding-end=\"" + tap._dxaGapHalf/K_1440_0F + "in\" ");
           addBorder(rowBuffer, tc._brcTop, "top");
           addBorder(rowBuffer, tc._brcLeft, "left");
           addBorder(rowBuffer, tc._brcBottom, "bottom");

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hdf/model/hdftypes/StyleSheet.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hdf/model/hdftypes/StyleSheet.java?rev=805284&r1=805283&r2=805284&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hdf/model/hdftypes/StyleSheet.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hdf/model/hdftypes/StyleSheet.java Tue Aug 18 05:29:53 2009
@@ -224,8 +224,8 @@
                break;
           case 0x9:
                newCHP.setFSpec(true);
-               newCHP.setFtcSym((short)LittleEndian.getShort(varParam, 0));
-               newCHP.setXchSym((short)LittleEndian.getShort(varParam, 2));
+               newCHP.setFtcSym(LittleEndian.getShort(varParam, 0));
+               newCHP.setXchSym(LittleEndian.getShort(varParam, 2));
                break;
           case 0xa:
                newCHP.setFOle2(getFlag(param));
@@ -517,8 +517,8 @@
                doCHPOperation(oldCHP, newCHP, 0x47, param, varParam, grpprl, offset, styleSheet);
                break;
           case 0x4d:
-               float percentage = (float)param/100.0f;
-               int add = (int)((float)percentage * (float)newCHP.getHps());
+               float percentage = param/100.0f;
+               int add = (int)(percentage * newCHP.getHps());
                newCHP.setHps(newCHP.getHps() + add);
                break;
           case 0x4e:
@@ -549,7 +549,7 @@
                break;
           case 0x57:
                newCHP.setFPropMark(varParam[0]);
-               newCHP.setIbstPropRMark((short)LittleEndian.getShort(varParam, 1));
+               newCHP.setIbstPropRMark(LittleEndian.getShort(varParam, 1));
                newCHP.setDttmPropRMark(LittleEndian.getInt(varParam, 3));
                break;
           case 0x58:
@@ -577,7 +577,7 @@
           case 0x62:
                byte[] xstDispFldRMark = new byte[32];
                newCHP.setFDispFldRMark(varParam[0]);
-               newCHP.setIbstDispFldRMark((short)LittleEndian.getShort(varParam, 1));
+               newCHP.setIbstDispFldRMark(LittleEndian.getShort(varParam, 1));
                newCHP.setDttmDispFldRMark(LittleEndian.getInt(varParam, 3));
                System.arraycopy(varParam, 7, xstDispFldRMark, 0, 32);
                newCHP.setXstDispFldRMark(xstDispFldRMark);
@@ -593,8 +593,8 @@
                break;
           case 0x65:
                short[] brc = new short[2];
-               brc[0] = (short)LittleEndian.getShort(grpprl, offset - 4);
-               brc[1] = (short)LittleEndian.getShort(grpprl, offset - 2);
+               brc[0] = LittleEndian.getShort(grpprl, offset - 4);
+               brc[1] = LittleEndian.getShort(grpprl, offset - 2);
                newCHP.setBrc(brc);
                break;
           case 0x66:
@@ -947,33 +947,33 @@
                break;
           case 0x24:
                short[] brcTop = newPAP.getBrcTop();
-               brcTop[0] = (short)LittleEndian.getShort(grpprl, offset - 4);
-               brcTop[1] = (short)LittleEndian.getShort(grpprl, offset - 2);
+               brcTop[0] = LittleEndian.getShort(grpprl, offset - 4);
+               brcTop[1] = LittleEndian.getShort(grpprl, offset - 2);
                break;
           case 0x25:
                short[] brcLeft = newPAP.getBrcLeft();
-               brcLeft[0] = (short)LittleEndian.getShort(grpprl, offset - 4);
-               brcLeft[1] = (short)LittleEndian.getShort(grpprl, offset - 2);
+               brcLeft[0] = LittleEndian.getShort(grpprl, offset - 4);
+               brcLeft[1] = LittleEndian.getShort(grpprl, offset - 2);
                break;
           case 0x26:
                short[] brcBottom = newPAP.getBrcBottom();
-               brcBottom[0] = (short)LittleEndian.getShort(grpprl, offset - 4);
-               brcBottom[1] = (short)LittleEndian.getShort(grpprl, offset - 2);
+               brcBottom[0] = LittleEndian.getShort(grpprl, offset - 4);
+               brcBottom[1] = LittleEndian.getShort(grpprl, offset - 2);
                break;
           case 0x27:
                short[] brcRight = newPAP.getBrcRight();
-               brcRight[0] = (short)LittleEndian.getShort(grpprl, offset - 4);
-               brcRight[1] = (short)LittleEndian.getShort(grpprl, offset - 2);
+               brcRight[0] = LittleEndian.getShort(grpprl, offset - 4);
+               brcRight[1] = LittleEndian.getShort(grpprl, offset - 2);
                break;
           case 0x28:
                short[] brcBetween = newPAP.getBrcBetween();
-               brcBetween[0] = (short)LittleEndian.getShort(grpprl, offset - 4);
-               brcBetween[1] = (short)LittleEndian.getShort(grpprl, offset - 2);
+               brcBetween[0] = LittleEndian.getShort(grpprl, offset - 4);
+               brcBetween[1] = LittleEndian.getShort(grpprl, offset - 2);
                break;
           case 0x29:
                short[] brcBar = newPAP.getBrcBar();
-               brcBar[0] = (short)LittleEndian.getShort(grpprl, offset - 4);
-               brcBar[1] = (short)LittleEndian.getShort(grpprl, offset - 2);
+               brcBar[0] = LittleEndian.getShort(grpprl, offset - 4);
+               brcBar[1] = LittleEndian.getShort(grpprl, offset - 2);
                break;
           case 0x2a:
                newPAP.setFNoAutoHyph((byte)param);

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hdf/model/hdftypes/definitions/CHPAbstractType.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hdf/model/hdftypes/definitions/CHPAbstractType.java?rev=805284&r1=805283&r2=805284&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hdf/model/hdftypes/definitions/CHPAbstractType.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hdf/model/hdftypes/definitions/CHPAbstractType.java Tue Aug 18 05:29:53 2009
@@ -814,9 +814,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);
     }
 
     /**
@@ -826,7 +824,6 @@
     public boolean isFBold()
     {
         return fBold.isSet(field_2_format_flags);
-
     }
 
     /**
@@ -835,9 +832,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);
     }
 
     /**
@@ -847,7 +842,6 @@
     public boolean isFItalic()
     {
         return fItalic.isSet(field_2_format_flags);
-
     }
 
     /**
@@ -856,9 +850,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);
     }
 
     /**
@@ -868,7 +860,6 @@
     public boolean isFRMarkDel()
     {
         return fRMarkDel.isSet(field_2_format_flags);
-
     }
 
     /**
@@ -877,9 +868,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);
     }
 
     /**
@@ -889,7 +878,6 @@
     public boolean isFOutline()
     {
         return fOutline.isSet(field_2_format_flags);
-
     }
 
     /**
@@ -898,9 +886,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);
     }
 
     /**
@@ -910,7 +896,6 @@
     public boolean isFFldVanish()
     {
         return fFldVanish.isSet(field_2_format_flags);
-
     }
 
     /**
@@ -919,9 +904,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);
     }
 
     /**
@@ -931,7 +914,6 @@
     public boolean isFSmallCaps()
     {
         return fSmallCaps.isSet(field_2_format_flags);
-
     }
 
     /**
@@ -940,9 +922,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);
     }
 
     /**
@@ -952,7 +932,6 @@
     public boolean isFCaps()
     {
         return fCaps.isSet(field_2_format_flags);
-
     }
 
     /**
@@ -961,9 +940,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);
     }
 
     /**
@@ -973,7 +950,6 @@
     public boolean isFVanish()
     {
         return fVanish.isSet(field_2_format_flags);
-
     }
 
     /**
@@ -982,9 +958,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);
     }
 
     /**
@@ -994,7 +968,6 @@
     public boolean isFRMark()
     {
         return fRMark.isSet(field_2_format_flags);
-
     }
 
     /**
@@ -1003,9 +976,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);
     }
 
     /**
@@ -1015,7 +986,6 @@
     public boolean isFSpec()
     {
         return fSpec.isSet(field_2_format_flags);
-
     }
 
     /**
@@ -1024,9 +994,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);
     }
 
     /**
@@ -1036,7 +1004,6 @@
     public boolean isFStrike()
     {
         return fStrike.isSet(field_2_format_flags);
-
     }
 
     /**
@@ -1045,9 +1012,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);
     }
 
     /**
@@ -1057,7 +1022,6 @@
     public boolean isFObj()
     {
         return fObj.isSet(field_2_format_flags);
-
     }
 
     /**
@@ -1066,9 +1030,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);
     }
 
     /**
@@ -1078,7 +1040,6 @@
     public boolean isFShadow()
     {
         return fShadow.isSet(field_2_format_flags);
-
     }
 
     /**
@@ -1087,9 +1048,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);
     }
 
     /**
@@ -1099,7 +1058,6 @@
     public boolean isFLowerCase()
     {
         return fLowerCase.isSet(field_2_format_flags);
-
     }
 
     /**
@@ -1108,9 +1066,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);
     }
 
     /**
@@ -1120,7 +1076,6 @@
     public boolean isFData()
     {
         return fData.isSet(field_2_format_flags);
-
     }
 
     /**
@@ -1129,9 +1084,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);
     }
 
     /**
@@ -1141,7 +1094,6 @@
     public boolean isFOle2()
     {
         return fOle2.isSet(field_2_format_flags);
-
     }
 
     /**
@@ -1150,9 +1102,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);
     }
 
     /**
@@ -1162,7 +1112,6 @@
     public boolean isFEmboss()
     {
         return fEmboss.isSet(field_3_format_flags1);
-
     }
 
     /**
@@ -1171,9 +1120,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);
     }
 
     /**
@@ -1183,7 +1130,6 @@
     public boolean isFImprint()
     {
         return fImprint.isSet(field_3_format_flags1);
-
     }
 
     /**
@@ -1192,9 +1138,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);
     }
 
     /**
@@ -1204,7 +1148,6 @@
     public boolean isFDStrike()
     {
         return fDStrike.isSet(field_3_format_flags1);
-
     }
 
     /**
@@ -1213,9 +1156,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);
     }
 
     /**
@@ -1225,7 +1166,6 @@
     public boolean isFUsePgsuSettings()
     {
         return fUsePgsuSettings.isSet(field_3_format_flags1);
-
     }
 
     /**
@@ -1235,8 +1175,6 @@
     public void setIcoHighlight(byte value)
     {
         field_33_Highlight = (short)icoHighlight.setValue(field_33_Highlight, value);
-
-
     }
 
     /**
@@ -1246,7 +1184,6 @@
     public byte getIcoHighlight()
     {
         return ( byte )icoHighlight.getValue(field_33_Highlight);
-
     }
 
     /**
@@ -1256,8 +1193,6 @@
     public void setFHighlight(boolean value)
     {
         field_33_Highlight = (short)fHighlight.setBoolean(field_33_Highlight, value);
-
-
     }
 
     /**
@@ -1267,7 +1202,6 @@
     public boolean isFHighlight()
     {
         return fHighlight.isSet(field_33_Highlight);
-
     }
 
     /**
@@ -1277,8 +1211,6 @@
     public void setKcd(byte value)
     {
         field_33_Highlight = (short)kcd.setValue(field_33_Highlight, value);
-
-
     }
 
     /**
@@ -1288,7 +1220,6 @@
     public byte getKcd()
     {
         return ( byte )kcd.getValue(field_33_Highlight);
-
     }
 
     /**
@@ -1298,8 +1229,6 @@
     public void setFNavHighlight(boolean value)
     {
         field_33_Highlight = (short)fNavHighlight.setBoolean(field_33_Highlight, value);
-
-
     }
 
     /**
@@ -1309,7 +1238,6 @@
     public boolean isFNavHighlight()
     {
         return fNavHighlight.isSet(field_33_Highlight);
-
     }
 
     /**
@@ -1319,8 +1247,6 @@
     public void setFChsDiff(boolean value)
     {
         field_33_Highlight = (short)fChsDiff.setBoolean(field_33_Highlight, value);
-
-
     }
 
     /**
@@ -1330,7 +1256,6 @@
     public boolean isFChsDiff()
     {
         return fChsDiff.isSet(field_33_Highlight);
-
     }
 
     /**
@@ -1340,8 +1265,6 @@
     public void setFMacChs(boolean value)
     {
         field_33_Highlight = (short)fMacChs.setBoolean(field_33_Highlight, value);
-
-
     }
 
     /**
@@ -1351,7 +1274,6 @@
     public boolean isFMacChs()
     {
         return fMacChs.isSet(field_33_Highlight);
-
     }
 
     /**
@@ -1361,8 +1283,6 @@
     public void setFFtcAsciSym(boolean value)
     {
         field_33_Highlight = (short)fFtcAsciSym.setBoolean(field_33_Highlight, value);
-
-
     }
 
     /**
@@ -1372,12 +1292,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


Mime
View raw message