https://bz.apache.org/bugzilla/show_bug.cgi?id=60902
Bug ID: 60902
Summary: .cloneCellStyle as a Workbook method
Product: POI
Version: 3.16-dev
Hardware: PC
Status: NEW
Severity: normal
Priority: P2
Component: XSSF
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
Since cloneCellStyle is a method for a CellStyle, you always have to create a
new CellStyle in order to clone a Style from another workbook, even if the
style already exists - this may lead to a lot of redundant styles.
I suggest a new method on the XSSFWorkbook called cloneCellStyle:
/**
* Searches in the current Workbook for an equivalent CellStyle to the given one
(from another Workbook).
* If none exists, it will be created.
*
* @param src The CellStyle that is going to be cloned
* @return CellStyle The created or looked up CellStyle in the current Workbook
*/
public XSSFCellStyle cloneCellStyle(XSSFCellStyle src) {
// ... TODO ...
}
I will attach a first (already working) patch.
--
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]