[ http://jira.codehaus.org/browse/DISPL-616?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=179851#action_179851 ]
LusuM commented on DISPL-616: ----------------------------- As a proof of concept, I give you the link to an official displaytag live example which crash when asked to do an Excel export : http://displaytag.homeip.net/displaytag-examples-1.2/example-new-export.jsp root cause Exception: [.DefaultHssfExportView] !DefaultHssfExportView.errorexporting! Cause: The 'to' row (0) must not be less than the 'from' row (24) > Signature of class CellRangeAdress constructor method changed from old poi > leads to erronous call in displaytag-poi > ------------------------------------------------------------------------------------------------------------------- > > Key: DISPL-616 > URL: http://jira.codehaus.org/browse/DISPL-616 > Project: DisplayTag > Issue Type: Bug > Components: Export > Affects Versions: 1.2 > Reporter: LusuM > Priority: Minor > Original Estimate: 1 minute > Remaining Estimate: 1 minute > > With the old version of Apache POI we used the Region class to define merged > region whose constructor method was > new Region(firstRow, firstCol, lastRow, lastCol); > In the new version the class to use is CellRangeAddress wich use the > constructor method > new CellRangeAddress(firstRow, lastRow, firstCol, lastCol); > Notice the signature changed from old way to new one. The fact is in > displaytag-poi-2.2 I found the erronous old signature used to build the new > class. > This would lead to a crash in the xls export of a table caption. > This is the fix for this bug : > /** > * Obtain the region over which to merge a cell. > * @param first Column number of first cell from which to merge. > * @param last Column number of last cell over which to merge. > * @return The region over which to merge a cell. > */ > private CellRangeAddress getMergeCellsRegion(int first, int last) > { > - return new CellRangeAddress(this.currentRow.getRowNum(), first, > this.currentRow.getRowNum(), last); > + return new CellRangeAddress(this.currentRow.getRowNum(), > this.currentRow.getRowNum(), first, last); > } > Best Regards. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ displaytag-devel mailing list displaytag-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/displaytag-devel