Hi POI developers,

I'd like to submit a patch. I've attached the "diff -u" for

org/apache/poi/hssf/model/Sheet.java

to this e-mail. I diffed against the latest release poi-2.0-final-200401262,
not against cvs HEAD. I hope that this is no problem, since it's just a very
small (one character) patch.

I had the problem that the lastrow entry in the DimensionsRecord didn't seem

to be set correctly for sheets with even row numbers. (These sheets could
not 
be read correctly by MS Project.)

This is caused by the method Sheet.addRow(RowRecord) which increments the 
lastrow entry only on every second call:

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

As the lastRow in the DimensionsRecord "d" is counted starting from 1
and the rowNumber in the RowRecord "row" is counted starting from 0, 
the correct if-condition must be ">=", not ">".  

I hope my patch is useful and hasn't got any ugly side effects.

Thanks for working so hard on POI.

Greetings,
Andrea Nenni

 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to