Since they all overlapped in Ptg.java, I decided to coalesce a bunch of patches which are all interrelated.
Created attachment 18593 [details] Patch to add new support for several Ptg types. Various fixes to cover Excel documents that we've seen in the past. * Implemented Ptg 0x0f (intersection) * Implemented Ptg 0x11 (range) * Implemented Ptg 0x14 (percent) * Implemented Ptg 0x1c (error) * Implemented Ptg 0x2b,0x4b,0x6b (area error) * Corrected the function name, and added correct number of function parameters for the ERROR.TYPE() function. * Unit tested reading all new Ptg additions (MemAreaPtg tested as a side effect of testing IntersectionPtg.) * Added unit test for Ptg 0x10 (union)
Someone want to commit this? It comes with free unit tests, and of course no existing ones break. :-D
Marking this superbug to block the other bugs which it fixes.
Yeah, I've seen this, and looks great. Thanks a lot. I'm travelling right now, will commit this in the next few days. I presume I need to commit the patch attached to this bug ONLY? And forget the other patches that you added to bugzilla? Thanks again.
Yep. This patch includes the PercentPtg patch. They all overlapped a little too much to separate.
The patch for the testcases references excel files which are not included. Can you please attach these to this bugzilla entry. ie C:\work\poi\jakarta-poi\src\testcases\org\apache\poi\hssf\data\AreaErrPtg.xls (The system cannot find the file specified) java.io.FileNotFoundException: C:\work\poi\jakarta-poi\src\testcases\org\apache\poi\hssf\data\AreaErrPtg.xls (The system cannot find the file specified) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(FileInputStream.java:106) at org.apache.poi.hssf.record.formula.AbstractPtgTestCase.loadWorkbook(AbstractPtgTestCase.java:51) at org.apache.poi.hssf.record.formula.TestAreaErrPtg.testReading(TestAreaErrPtg.java:34) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) Jason
Indeed. Sorry about that, attaching now.
Created attachment 18645 [details] AreaErrPtg.xls
Created attachment 18646 [details] ErrPtg.xls
Created attachment 18647 [details] IntersectionPtg.xls
Created attachment 18648 [details] PercentPtg.xls
Created attachment 18649 [details] RangePtg.xls
Created attachment 18650 [details] UnionPtg.xls
Applied. Fixed. Avik, Sorry but i bet you to it. Was working on the shared formula stuff anyhow. Jason
Jason, Thanks!!