Summary: | StylesTable doesn't include table styles | ||
---|---|---|---|
Product: | POI | Reporter: | Greg Woolsey <gwoolsey> |
Component: | XSSF | Assignee: | POI Developers List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | enhancement | ||
Priority: | P2 | ||
Version: | 3.17-dev | ||
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | All |
Description
Greg Woolsey
2017-05-10 22:24:14 UTC
My plan here is to implement built-in table/pivot styles loosely following the pattern used for PresetGeometries: * include the XML as a resource in the build/source control * parse it and initialize definition objects lazily in a static/singleton I'm adding some interfaces to the ss package, and implementing classes to simplify access to the underlying structures, which are a bit convoluted (of course), and share some similarities to things like conditional formatting rule style definitions - both use <dxf> objects in the same <dxfs> collection to define style info. My client app will want to generate style info for both and possibly combine them, i.e. when a cell in a table is also conditionally formatted, so a common API for similar/same structures will be helpful. Huh. Unit test was failing, it turns out the canonical presetTableStyles.xml from ECMA has a typo - a trailing space in a name attribute, making string comparisons fail. Correcting the value in the copy that will end up in POI. Wow. So the standards document uses 1 based indexing for dxfId in the <tableStyleElement> element, but Excel uses 0 based indexing. Built-in style parsing needs to be different than custom/user style parsing. |