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
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
------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, &
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com
_______________________________________________
displaytag-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/displaytag-devel