From e88d77492cd0f4c0a6f8c06eec38252222df8b1c Mon Sep 17 00:00:00 2001 From: Glen Stampoultzis Date: Thu, 5 May 2005 13:07:58 +0000 Subject: [PATCH] Indent git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353672 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/poi/hssf/model/Sheet.java | 28 +++++++++---------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/src/java/org/apache/poi/hssf/model/Sheet.java b/src/java/org/apache/poi/hssf/model/Sheet.java index 6d32288e3..90bb59425 100644 --- a/src/java/org/apache/poi/hssf/model/Sheet.java +++ b/src/java/org/apache/poi/hssf/model/Sheet.java @@ -748,7 +748,6 @@ public class Sheet implements Model { Record record = (( Record ) records.get(k)); - int startPos = pos; //Once the rows have been found in the list of records, start //writing out the blocked row information. This includes the DBCell references if (record instanceof RowRecordsAggregate) { @@ -762,7 +761,7 @@ public class Sheet implements Model if (record.getSid() == BOFRecord.sid) { //Can there be more than one BOF for a sheet? If not then we can //remove this guard. So be safe it is left here. - if ((rows != null) && (!haveSerializedIndex)) { + if (rows != null && !haveSerializedIndex) { haveSerializedIndex = true; pos += serializeIndexRecord(k, pos, data); } @@ -2049,20 +2048,19 @@ public class Sheet implements Model } //Add space for the IndexRecord if (rows != null) { - final int blocks = rows.getRowBlockCount(); - retval += IndexRecord.getRecordSizeForBlockCount(blocks); + final int blocks = rows.getRowBlockCount(); + retval += IndexRecord.getRecordSizeForBlockCount(blocks); - //Add space for the DBCell records - //Once DBCell per block. - //8 bytes per DBCell (non variable section) - //2 bytes per row reference - int startRetVal = retval; - retval += (8 * blocks); - for (Iterator itr = rows.getIterator(); itr.hasNext();) { - RowRecord row = (RowRecord)itr.next(); - if (cells.rowHasCells(row.getRowNumber())) - retval += 2; - } + //Add space for the DBCell records + //Once DBCell per block. + //8 bytes per DBCell (non variable section) + //2 bytes per row reference + retval += (8 * blocks); + for (Iterator itr = rows.getIterator(); itr.hasNext();) { + RowRecord row = (RowRecord)itr.next(); + if (cells != null && cells.rowHasCells(row.getRowNumber())) + retval += 2; + } } return retval; }