https://issues.apache.org/bugzilla/show_bug.cgi?id=45805
Josh Micich <[EMAIL PROTECTED]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #1 from Josh Micich <[EMAIL PROTECTED]> 2008-09-16 15:08:02 PST ---
Pretty easy to reproduce this bug:
sheet.setColumnWidth((short)0, (short)40000);
assertEquals((short)40000, sheet.getColumnWidth((short)0));
Excel column widths are 16 bit unsigned values, but POI was using java shorts
for that purpose. To fix this bug (svn r696075 / r696084), several methods
with this problem have been deprecated and replaced with versions that use
ints.
There is a work-around to java's lack of 16-bit unsigned shorts. Simply
convert (signed) shorts to ints by ANDing with 2^^16-1. For example:
int width = sheet.getColumnWidth((short)0) & 0xFFFF;
However, once you have this bug-fix, the same code can be written:
int width = sheet.getColumnWidth(0);
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]