Return-Path: Delivered-To: apmail-poi-commits-archive@minotaur.apache.org Received: (qmail 29378 invoked from network); 12 Jun 2009 19:42:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 12 Jun 2009 19:42:39 -0000 Received: (qmail 67891 invoked by uid 500); 12 Jun 2009 19:42:51 -0000 Delivered-To: apmail-poi-commits-archive@poi.apache.org Received: (qmail 67855 invoked by uid 500); 12 Jun 2009 19:42:51 -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 67846 invoked by uid 99); 12 Jun 2009 19:42:51 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Jun 2009 19:42:51 +0000 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; Fri, 12 Jun 2009 19:42:48 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id BBA422388898; Fri, 12 Jun 2009 19:42:28 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r784247 - /poi/trunk/src/java/org/apache/poi/hssf/record/RecordFactory.java Date: Fri, 12 Jun 2009 19:42:28 -0000 To: commits@poi.apache.org From: josh@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090612194228.BBA422388898@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: josh Date: Fri Jun 12 19:42:28 2009 New Revision: 784247 URL: http://svn.apache.org/viewvc?rev=784247&view=rev Log: Removed trailing whitespace in RecordFactory Modified: poi/trunk/src/java/org/apache/poi/hssf/record/RecordFactory.java Modified: poi/trunk/src/java/org/apache/poi/hssf/record/RecordFactory.java URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/RecordFactory.java?rev=784247&r1=784246&r2=784247&view=diff ============================================================================== --- poi/trunk/src/java/org/apache/poi/hssf/record/RecordFactory.java (original) +++ poi/trunk/src/java/org/apache/poi/hssf/record/RecordFactory.java Fri Jun 12 19:42:28 2009 @@ -45,7 +45,7 @@ */ public final class RecordFactory { private static final int NUM_RECORDS = 512; - + private interface I_RecordCreator { Record create(RecordInputStream in); @@ -194,7 +194,7 @@ WriteAccessRecord.class, WriteProtectRecord.class, WSBoolRecord.class, - + // chart records BeginRecord.class, ChartFRTInfoRecord.class, @@ -206,29 +206,29 @@ EndRecord.class, LinkedDataRecord.class, SeriesToChartGroupRecord.class, - + // pivot table records DataItemRecord.class, ExtendedPivotTableViewFieldsRecord.class, PageItemRecord.class, StreamIDRecord.class, - ViewDefinitionRecord.class, + ViewDefinitionRecord.class, ViewFieldsRecord.class, ViewSourceRecord.class, }; - + /** * cache of the recordsToMap(); */ private static final Map _recordCreatorsById = recordsToMap(recordClasses); private static short[] _allKnownRecordSIDs; - + /** * Debug / diagnosis method
* Gets the POI implementation class for a given sid. Only a subset of the any BIFF - * records are actually interpreted by POI. A few others are known but not interpreted - * (see {@link UnknownRecord#getBiffName(int)}). + * records are actually interpreted by POI. A few others are known but not interpreted + * (see {@link UnknownRecord#getBiffName(int)}). * @return the POI implementation class for the specified record sid. * null if the specified record is not interpreted by POI. */ @@ -244,7 +244,7 @@ * are returned digested into the non-mul form. */ public static Record [] createRecord(RecordInputStream in) { - + Record record = createSingleRecord(in); if (record instanceof DBCellRecord) { // Not needed by POI. Regenerated from scratch by POI when spreadsheet is written @@ -258,14 +258,14 @@ } return new Record[] { record, }; } - + static Record createSingleRecord(RecordInputStream in) { I_RecordCreator constructor = _recordCreatorsById.get(new Integer(in.getSid())); if (constructor == null) { return new UnknownRecord(in); } - + return constructor.create(in); } @@ -342,7 +342,7 @@ if(!uniqueRecClasses.add(recClass)) { throw new RuntimeException("duplicate record class (" + recClass.getName() + ")"); } - + short sid; Constructor constructor; try { @@ -360,6 +360,7 @@ } result.put(key, new ReflectionRecordCreator(constructor)); } +// result.put(new Integer(0x0406), result.get(new Integer(0x06))); return result; } @@ -386,17 +387,17 @@ * reliably use zeros for padding and if this were always the case, this code could just * skip all the (zero sized) records with sid==0. However, bug 46987 shows a file with * non-zero padding that is read OK by Excel (Excel also fixes the padding). - * + * * So to properly detect the workbook end of stream, this code has to identify the last - * EOF record. This is not so easy because the worbook bof+eof pair do not bracket the - * whole stream. The worksheets follow the workbook, but it is not easy to tell how many - * sheet sub-streams should be present. Hence we are looking for an EOF record that is not + * EOF record. This is not so easy because the worbook bof+eof pair do not bracket the + * whole stream. The worksheets follow the workbook, but it is not easy to tell how many + * sheet sub-streams should be present. Hence we are looking for an EOF record that is not * immediately followed by a BOF record. One extra complication is that bof+eof sub- * streams can be nested within worksheet streams and it's not clear in these cases what - * record might follow any EOF record. So we also need to keep track of the bof/eof + * record might follow any EOF record. So we also need to keep track of the bof/eof * nesting level. */ - + int bofDepth=0; boolean lastRecordWasEOFLevelZero = false; while (recStream.hasNextRecord()) { @@ -420,7 +421,7 @@ } continue; } - + if (record instanceof DBCellRecord) { // Not needed by POI. Regenerated from scratch by POI when spreadsheet is written continue; @@ -441,7 +442,7 @@ lastDGRecord.join((AbstractEscherHolderRecord) record); } else if (record.getSid() == ContinueRecord.sid) { ContinueRecord contRec = (ContinueRecord)record; - + if (lastRecord instanceof ObjRecord || lastRecord instanceof TextObjectRecord) { // Drawing records have a very strange continue behaviour. //There can actually be OBJ records mixed between the continues. --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org For additional commands, e-mail: commits-help@poi.apache.org