Return-Path: Delivered-To: apmail-poi-commits-archive@locus.apache.org Received: (qmail 68462 invoked from network); 8 Jul 2008 18:57:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Jul 2008 18:57:12 -0000 Received: (qmail 74142 invoked by uid 500); 8 Jul 2008 18:57:13 -0000 Delivered-To: apmail-poi-commits-archive@poi.apache.org Received: (qmail 74100 invoked by uid 500); 8 Jul 2008 18:57:13 -0000 Mailing-List: contact commits-help@poi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@poi.apache.org Delivered-To: mailing list commits@poi.apache.org Received: (qmail 74090 invoked by uid 99); 8 Jul 2008 18:57:13 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Jul 2008 11:57:13 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Jul 2008 18:56:29 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id C41BC23889C4; Tue, 8 Jul 2008 11:56:21 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r674911 - /poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java Date: Tue, 08 Jul 2008 18:56:21 -0000 To: commits@poi.apache.org From: josh@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080708185621.C41BC23889C4@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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