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 2017/05/02 00:48:46 UTC

[Bug 61060] New: DataFormatter should honor conditional formatting rule formats

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

            Bug ID: 61060
           Summary: DataFormatter should honor conditional formatting rule
                    formats
           Product: POI
           Version: 3.17-dev
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: SS Common
          Assignee: dev@poi.apache.org
          Reporter: gwoolsey@apache.org
  Target Milestone: ---

Now that POI 3.16 supports evaluation of conditional formatting rules,
DataFormatter should be extended to support formatting a cell based not only on
it's style format, but the style format of the conditional formatting rule that
applies, if there is one.

That is, prefer a conditional format rule cell format string over a cell style
format string.

I think for compatibility and transparency this should be a distinct set of API
calls, new methods on DataFormatter that take a ConditionalFormattingEvaluator
and FormulaEvaluator, in addition to the current methods that take a
FormulaEvaluator.

JavaDoc will note the two should be based on the same evaluation context for
consistency and cache performance.

DataFormatter will need some refactoring to abstract out retrieving the
applicable format objects, to centralize logic about which one applies in what
cases.

-- 
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 61060] DataFormatter should honor conditional formatting rule formats

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

--- Comment #1 from Greg Woolsey <gw...@apache.org> ---
Worth noting this is easy to find for XSSFConditionalFormattingRule, via the
DXF entry's NumFmt element, however I do not see any way to find the number
format pattern for HSSF conditional rules, even though when I save a file as
XLS in Excel, and open it, the rule number formats are still there.

For now, HSSF rules will return null for the number format, the same as XSSF
will when the dxf element doesn't have a NumFmt element set.  For these, the
cell style number format (and possibly a system/document default) will be used
as it is currently.

If anyone needs this for HSSF, they will have to dig into the binary format to
figure out where to find it.  The SS interface will have a placeholder
implementation for it.

-- 
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 61060] DataFormatter should honor conditional formatting rule formats

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

Greg Woolsey <gw...@apache.org> changed:

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

--- Comment #2 from Greg Woolsey <gw...@apache.org> ---
Implemented in r1794084

-- 
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