You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2019/10/14 08:03:41 UTC

[Bug 63842] New: FractionFormat casts whole part of the value into 'int'

https://bz.apache.org/bugzilla/show_bug.cgi?id=63842

            Bug ID: 63842
           Summary: FractionFormat casts whole part of the value into
                    'int'
           Product: POI
           Version: 4.1.0-FINAL
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSSF
          Assignee: dev@poi.apache.org
          Reporter: maksut.cagil.4.poi@gmail.com
  Target Milestone: ---

Created attachment 36825
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=36825&action=edit
A possible quick fix for the issue

If the whole part of the value is too big or too small to fit in an 'int' then
FractionFormat loses data because of 'int' casting.

To reproduce;
- Set a cell value to a big number like '10100136259702'. And use a fraction
format for the cell.
- Format the cell value with DataFormatter (which uses FractionFormat).

Expected: value as it's displayed in excel.
Actual: '2147483647' (INT_MAX).

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 63842] FractionFormat casts whole part of the value into 'int'

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63842

--- Comment #2 from PJ Fanning <fa...@yahoo.com> ---
At this stage, it looks like 4.1.1 will be released without this fix. It should
appear in 4.1.2.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 63842] FractionFormat casts whole part of the value into 'int'

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63842

PJ Fanning <fa...@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED
                 OS|                            |All

--- Comment #1 from PJ Fanning <fa...@yahoo.com> ---
patch applied with r1868425 - may need to revisit after the upcoming v4.1.1
release

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org