Bug 57010

Summary: [patch] Implement PROPER function
Product: POI Reporter: Patrick Böker <patrick.boeker>
Component: HSSFAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: enhancement Keywords: PatchAvailable
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: All   
Attachments: proper.diff
proper_java6_comp.diff

Description Patrick Böker 2014-09-23 16:10:13 UTC
Created attachment 32049 [details]
proper.diff

Implement and test the PROPER function. I checked some Unicode letters too, but I don't know if it behaves exactly as Excel in all Unicode (corner)cases.
Comment 1 Dominik Stadler 2014-10-13 19:35:14 UTC
Unfortunately this does not apply cleanly, Character.isAlphabetic() was added in Java 7, however we still want to be compatible with Java 6 as well, can you redo the patch with this implemented slightly different so it still works with Java 6 as well?
Comment 2 Patrick Böker 2014-10-14 08:25:03 UTC
Created attachment 32109 [details]
proper_java6_comp.diff

Replaced Character class usage with a regular expression.
Comment 3 Patrick Böker 2014-10-14 08:26:13 UTC
(Hopefully) Java 6 compatible version is there.
Comment 4 Dominik Stadler 2014-10-20 19:58:24 UTC
Applied as r1633215, I had to adjust the regular expression as "\P{IsAlphabetic}" is not available in Java 6, I used \P{IsL}, according to the unit test this has the same effect.