Bug 57989

Summary: [PATCH] Add a method to set the title of an XSSFChart
Product: POI Reporter: Jim King <jimking629>
Component: XSSFAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: enhancement Keywords: PatchAvailable
Priority: P2    
Version: 3.12-FINAL   
Target Milestone: ---   
Hardware: PC   
OS: All   
Attachments: Patch file for changes to XSSFChart.java and addition of a new unit test.
Workbook for unit test; contains a chart with no title.
Workbook for unit test; contains a chart with a title.

Description Jim King 2015-06-02 12:12:10 UTC
Created attachment 32783 [details]
Patch file for changes to XSSFChart.java and addition of a new unit test.

XSSFChart has a getTitle method but no corresponding setTitle method. This patch adds a setTitle method.

I have included a unit test, but I will caution that I have not tested this patch with all possible cases of OOXML document structure. I have tested the two use cases that were important to me:

- Create a new XLSX file containing a chart with a title and open that file in Excel 2013.
- Create a new XLSX file containing a chart in Excel 2013, then use POI to add/modify the chart title, then re-open the file in Excel 2013.
Comment 1 Jim King 2015-06-02 12:14:20 UTC
Created attachment 32784 [details]
Workbook for unit test; contains a chart with no title.

Workbook created in Excel 2013 for the unit test in the patch. This file should go in test-data/spreadsheet.
Comment 2 Jim King 2015-06-02 12:15:16 UTC
Created attachment 32785 [details]
Workbook for unit test; contains a chart with a title.

Workbook created in Excel 2013 for the unit test in the patch. This file should go in test-data/spreadsheet.
Comment 3 Nick Burch 2016-02-21 21:17:45 UTC
Thanks, patch applied in r1731566.