Bug 58331 - [PATCH] Several Ptg updates: AreaPtg(String) is deprecated, replace ErrorConstants with FormulaError, remove hard-coded strings
Summary: [PATCH] Several Ptg updates: AreaPtg(String) is deprecated, replace ErrorCons...
Status: NEW
Alias: None
Product: POI
Classification: Unclassified
Component: SS Common (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 enhancement (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords: PatchAvailable
Depends on:
Blocks:
 
Reported: 2015-09-04 23:52 UTC by Javen O'Neal
Modified: 2015-09-05 07:30 UTC (History)
0 users



Attachments
various changes to Ptg classes (30.64 KB, patch)
2015-09-04 23:52 UTC, Javen O'Neal
Details | Diff

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