poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 60902] New: .cloneCellStyle as a Workbook method
Date Wed, 22 Mar 2017 14:15:12 GMT

            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: dev@poi.apache.org
          Reporter: dollinger.florian@gmx.de
  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: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org

View raw message