Bug 26465 - [PATCH] wrong lastrow entry
Summary: [PATCH] wrong lastrow entry
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 2.0-dev
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-27 15:26 UTC by Andrea Nenni
Modified: 2004-11-16 19:05 UTC (History)
0 users



Attachments
This patch contains the "one character" patch as described in bug 26465 (434 bytes, patch)
2004-01-27 15:30 UTC, Andrea Nenni
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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