|Summary:||[PATCH] Several Ptg updates: AreaPtg(String) is deprecated, replace ErrorConstants with FormulaError, remove hard-coded strings|
|Product:||POI||Reporter:||Javen O'Neal <onealj>|
|Component:||SS Common||Assignee:||POI Developers List <dev>|
|Attachments:||various changes to Ptg classes|
Description Javen O'Neal 2015-09-04 23:52:29 UTC
Created attachment 33063 [details] various changes to Ptg classes From bug 56328, AreaReference(String) has been deprecated. This makes AreaPtg(String), Area3DPtg(String, externIdx), Area3DPxg(SheetIdentifier, String), Area3DPxg(int, SheetIdentifier, String) deprecated constructors. I have provided alternative constructors for all but Area3DPtg (I saw other constructors with Ptg(int externIdx, String ref), so I didn't want to add another constructor in case this gets refactored in the future to make the parameter order consistent. Added test cases for new constructors. Overhauled ErrPtg to replace the deprecated ErrorConstants (as of r1658185) with FormulaError. org.apache.poi.ss.forumula.constant/ErrorConstant.java looks like it duplicates the functionality of org.apache.poi.ss.usermodel.ErrorConstants (deprecated) and org.apache.poi.ss.usermodel.FormulaError. Some decision should be made to consolidate these classes if only one is needed. My suggestion is to deprecate org.apache.poi.ss.formula.constant.ErrorConstant so that only FormulaError remains (FormulaError is an enum and has the highest quality and cquantity conversion methods. Moved several hard-coded strings in Ptg classes to static class variables.