Summary: | cell format evaluation doesn't handle range conditions | ||
---|---|---|---|
Product: | POI | Reporter: | Greg Woolsey <gwoolsey> |
Component: | SS Common | Assignee: | POI Developers List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P2 | ||
Version: | 3.17-dev | ||
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | All |
Description
Greg Woolsey
2017-04-19 16:53:43 UTC
Turns out the test that failed when I sent all segmented formats to CellFormat was checking an invalid expected result. The value it has, which is currently returned by POI, doesn't match the value produced by Excel for the same format string. Excel produces the value returned by CellFormat. So I will change the test to expect the correct value ("correct" defined as the value shown by Excel), and the logic in DataFormatter to send all multi-part formats to CellFormat. It already has a cache of format strings, so parsing will only happen once per format string per ClassLoader hierarchy. Fixed in r1791964. Kept existing test behavior, as changing that broke other tests too. Implemented specific logic to send formats with multiple conditional segments to CellFormat in addition to the previous logic to send anything with 3 or more segments there. Added some tests for this. |