poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Avik Sengupta <avik.sengu...@itellix.com>
Subject Re: [PATCH] wrong lastrow entry in HSSF sheet
Date Tue, 27 Jan 2004 14:58:14 GMT
Thanks a lot. Would you mind adding this to bugzilla?
http://nagoya.apache.org/bugzilla/

Would be a great help, it risks getting lost in the pile among the
hundreds of mails we recieve everyday, unless someone patches it
immediately, which is unlikely.  

Thanks again for your help. 

Regards
-
Avik


On Tue, 2004-01-27 at 17:27, Andrea Nenni wrote:
> 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: poi-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: poi-dev-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-dev-help@jakarta.apache.org


Mime
View raw message