Bug 57010 - [patch] Implement PROPER function
Summary: [patch] Implement PROPER function
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: unspecified
Hardware: PC All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords: PatchAvailable
Depends on:
Blocks:
 
Reported: 2014-09-23 16:10 UTC by Patrick Zimmermann
Modified: 2014-10-20 19:58 UTC (History)
0 users



Attachments
proper.diff (5.38 KB, text/plain)
2014-09-23 16:10 UTC, Patrick Zimmermann
Details
proper_java6_comp.diff (5.15 KB, patch)
2014-10-14 08:25 UTC, Patrick Zimmermann
Details | Diff

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