poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r674911 - /poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java
Date Tue, 08 Jul 2008 18:56:21 GMT
Author: josh
Date: Tue Jul  8 11:56:21 2008
New Revision: 674911

URL: http://svn.apache.org/viewvc?rev=674911&view=rev
Log:
Fix bug #45338 - JDK 1.4/1.5 issue from r673997

Modified:
    poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java

Modified: poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java?rev=674911&r1=674910&r2=674911&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java Tue Jul  8 11:56:21
2008
@@ -360,28 +360,28 @@
              log.log(POILogger.DEBUG, "convertLabelRecords exit");
      }
 
-	/**
-	 * Retrieves the current policy on what to do when
-	 *  getting missing or blank cells from a row.
-	 * The default is to return blank and null cells.
-	 *  {@link MissingCellPolicy}
-	 */
-	public MissingCellPolicy getMissingCellPolicy() {
-		return missingCellPolicy;
-	}
-
-	/**
-	 * Sets the policy on what to do when
-	 *  getting missing or blank cells from a row.
-	 * This will then apply to all calls to 
-	 *  {@link HSSFRow.getCell()}. See
-	 *  {@link MissingCellPolicy}
-	 */
-	public void setMissingCellPolicy(MissingCellPolicy missingCellPolicy) {
-		this.missingCellPolicy = missingCellPolicy;
-	}
+    /**
+     * Retrieves the current policy on what to do when
+     *  getting missing or blank cells from a row.
+     * The default is to return blank and null cells.
+     *  {@link MissingCellPolicy}
+     */
+    public MissingCellPolicy getMissingCellPolicy() {
+        return missingCellPolicy;
+    }
 
-	/**
+    /**
+     * Sets the policy on what to do when
+     *  getting missing or blank cells from a row.
+     * This will then apply to all calls to 
+     *  {@link HSSFRow.getCell()}. See
+     *  {@link MissingCellPolicy}
+     */
+    public void setMissingCellPolicy(MissingCellPolicy missingCellPolicy) {
+        this.missingCellPolicy = missingCellPolicy;
+    }
+
+    /**
      * sets the order of appearance for a given sheet.
      *
      * @param sheetname the name of the sheet to reorder
@@ -1020,11 +1020,11 @@
                              String name, boolean italic, boolean strikeout,
                              short typeOffset, byte underline)
     {
-    	for (short i=0; i<=getNumberOfFonts(); i++) {
-    		// Remember - there is no 4!
-    		if(i == 4) continue;
-    		
-    		HSSFFont hssfFont = getFontAt(i);
+        for (short i=0; i<=getNumberOfFonts(); i++) {
+            // Remember - there is no 4!
+            if(i == 4) continue;
+            
+            HSSFFont hssfFont = getFontAt(i);
             if (hssfFont.getBoldweight() == boldWeight
                     && hssfFont.getColor() == color
                     && hssfFont.getFontHeight() == fontHeight
@@ -1056,19 +1056,17 @@
      * @param idx  index number
      * @return HSSFFont at the index
      */
+    public HSSFFont getFontAt(short idx) {
+        if(fonts == null) fonts = new Hashtable();
+
+        // So we don't confuse users, give them back
+        //  the same object every time, but create
+        //  them lazily
+        Short sIdx = new Short(idx);
+        if(fonts.containsKey(sIdx)) {
+            return (HSSFFont)fonts.get(sIdx);
+        }
 
-    public HSSFFont getFontAt(short idx)
-    {
-    	if(fonts == null) fonts = new Hashtable();
-    	
-    	// So we don't confuse users, give them back
-    	//  the same object every time, but create
-    	//  them lazily
-    	Short sIdx = Short.valueOf(idx);
-    	if(fonts.containsKey(sIdx)) {
-    		return (HSSFFont)fonts.get(sIdx);
-    	}
-    	
         FontRecord font = workbook.getFontRecordAt(idx);
         HSSFFont retval = new HSSFFont(idx, font);
         fonts.put(sIdx, retval);



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


Mime
View raw message