diff options
author | Glen Stampoultzis <glens@apache.org> | 2005-05-05 13:07:58 +0000 |
---|---|---|
committer | Glen Stampoultzis <glens@apache.org> | 2005-05-05 13:07:58 +0000 |
commit | a62c300f23f4911adb6b191483b0bbacfb7432c2 (patch) | |
tree | 917ab2e22948c662d7f95e6ee07efeb01a0ecfbd /src | |
parent | 1c73dfaac895f9eee4345907196f02214dde5415 (diff) | |
download | poi-a62c300f23f4911adb6b191483b0bbacfb7432c2.tar.gz poi-a62c300f23f4911adb6b191483b0bbacfb7432c2.zip |
Indent
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353672 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r-- | src/java/org/apache/poi/hssf/model/Sheet.java | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/src/java/org/apache/poi/hssf/model/Sheet.java b/src/java/org/apache/poi/hssf/model/Sheet.java index 6d32288e31..90bb594258 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); - - //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; - } + 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 + 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; } |