Bug 26465

Summary: [PATCH] wrong lastrow entry
Product: POI Reporter: Andrea Nenni <Andrea.Nenni>
Component: HSSFAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P3    
Version: 2.0-dev   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Attachments: This patch contains the "one character" patch as described in bug 26465

Description Andrea Nenni 2004-01-27 15:26:19 UTC
HSSF sheets with even row numbers are read incorrectly by MS Project.

Cause: Wrong lastrow entry in DimensionsRecord as written by
method org.apache.poi.hssf.model.Sheet.addRow(RowRecord):

 if (row.getRowNumber() > d.getLastRow())
 {
    d.setLastRow(row.getRowNumber() + 1);
 }

Because of the ">" comparism, the lastrow entry will only be
set on every second call to the method. Bugfix: Use ">=" for
the comparism.
Comment 1 Andrea Nenni 2004-01-27 15:30:47 UTC
Created attachment 10100 [details]
This patch contains the "one character" patch as described in bug 26465
Comment 2 Glen Stampoultzis 2004-08-04 00:18:09 UTC
Fixed in 2.0 branch