Bug 57989 - [PATCH] Add a method to set the title of an XSSFChart
Summary: [PATCH] Add a method to set the title of an XSSFChart
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: XSSF (show other bugs)
Version: 3.12-FINAL
Hardware: PC All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords: PatchAvailable
Depends on:
Blocks:
 
Reported: 2015-06-02 12:12 UTC by Jim King
Modified: 2016-02-21 21:17 UTC (History)
0 users



Attachments
Patch file for changes to XSSFChart.java and addition of a new unit test. (7.52 KB, patch)
2015-06-02 12:12 UTC, Jim King
Details | Diff
Workbook for unit test; contains a chart with no title. (12.33 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2015-06-02 12:14 UTC, Jim King
Details
Workbook for unit test; contains a chart with a title. (12.44 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2015-06-02 12:15 UTC, Jim King
Details

Note You need to log in before you can comment on or make changes to this bug.
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.