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

--- Comment #8 from Javen O'Neal <[email protected]> ---
After setCellStyleProperty or setCellStyleProperties, if any cell styles are no
longer used in the workbook, there needs to be a method to remove cell styles
from the workbook.

I mentioned this (commented out) in the Javadocs for setCellStyleProperties
[1]. If POI currently supports this, the Javadocs should refer to this. If not,
the functions should be created. For example,
WorkbookUtil.removeUnusedCellStyles(Workbook wb) or
WorkbookUtil.removeStyleFromWorkbookIfUnused(CellStyle style, Workbook wb). Not
sure if this belongs in CellUtil, WorkbookUtil, CellStyleUtil, or as methods on
Workbook or the styles source (StylesTable for XSSF, not sure for HSSF).

I decided against having this cleanup done in setCellStyleProperty/Properties
assuming that the cleanup would run in linear time with respect to number of
cells in a workbook.

[1]
https://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/util/CellUtil.java?view=markup&pathrev=1722607#l187

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to