Argh, fat fingered it before I could type my comment. This is initial read-only API support for Table Styles, including the specification defined built-in table and pivot table styles, issue #61085.
This includes some new SS interfaces, including one to start to bridge common functionality between conditional formatting rules and table style definitions that both rely on the same underlying CTDfx element. There is a performance/memory hit the first time the built-in table style Enum is accessed, as it loads the spec style definitions. My implementation is really ugly imho, but it works. I couldn't figure out a way to get XMLBeans factories on the CT classes to initialize the full objects from an XML fragment, only top-level documents, so I fake up a styles.xml for each built-in style found, and parse those. Takes about 2.5 seconds on my system, which is why I made it lazy. It can be initialized explicitly through a static method, if an app desires to take the hit up front rather than on first access. More will be coming to help determine which table style elements apply to a given table cell, since it is 1-N, with a precedence order for property application. On Fri, May 12, 2017 at 11:01 AM <[email protected]> wrote: > Propchange: > poi/trunk/src/resources/ooxml/org/apache/poi/xssf/usermodel/presetTableStyles.xml > > ------------------------------------------------------------------------------ > svn:eol-style = native > > Added: poi/trunk/test-data/spreadsheet/tableStyle.xlsx > URL: > http://svn.apache.org/viewvc/poi/trunk/test-data/spreadsheet/tableStyle.xlsx?rev=1795002&view=auto > > ============================================================================== > Binary file - no diff available. > > Propchange: poi/trunk/test-data/spreadsheet/tableStyle.xlsx > > ------------------------------------------------------------------------------ > svn:mime-type = application/octet-stream > > Added: poi/trunk/test-data/spreadsheet/~$tableStyle.xlsx > URL: > http://svn.apache.org/viewvc/poi/trunk/test-data/spreadsheet/%7E%24tableStyle.xlsx?rev=1795002&view=auto > > ============================================================================== > Binary file - no diff available. > > Propchange: poi/trunk/test-data/spreadsheet/~$tableStyle.xlsx > > ------------------------------------------------------------------------------ > svn:mime-type = application/octet-stream > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
