Bug 40024

Summary: [PATCH] Support for more Ptgs
Product: POI Reporter: Trejkaz (pen name) <trejkaz>
Component: HSSFAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: normal Keywords: PatchAvailable
Priority: P2    
Version: 3.0-dev   
Target Milestone: ---   
Hardware: Other   
OS: other   
Bug Depends on:    
Bug Blocks: 30862, 40005, 40006, 40007, 40009    
Attachments: Patch to add new support for several Ptg types.
AreaErrPtg.xls
ErrPtg.xls
IntersectionPtg.xls
PercentPtg.xls
RangePtg.xls
UnionPtg.xls

Description Trejkaz (pen name) 2006-07-12 04:46:40 UTC
Since they all overlapped in Ptg.java, I decided to coalesce a bunch of patches
which are all interrelated.
Comment 1 Trejkaz (pen name) 2006-07-12 04:47:39 UTC
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)
Comment 2 Trejkaz (pen name) 2006-07-12 04:48:16 UTC
Someone want to commit this?  It comes with free unit tests, and of course no
existing ones break. :-D
Comment 3 Trejkaz (pen name) 2006-07-12 04:49:08 UTC
Marking this superbug to block the other bugs which it fixes.
Comment 4 Avik Sengupta 2006-07-12 14:15:47 UTC
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.
Comment 5 Trejkaz (pen name) 2006-07-12 23:36:59 UTC
Yep.  This patch includes the PercentPtg patch.  They all overlapped a little
too much to separate.
Comment 6 Jason Height 2006-07-26 11:55:26 UTC
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
Comment 7 Trejkaz (pen name) 2006-07-27 00:53:41 UTC
Indeed.  Sorry about that, attaching now.
Comment 8 Trejkaz (pen name) 2006-07-27 00:54:23 UTC
Created attachment 18645 [details]
AreaErrPtg.xls
Comment 9 Trejkaz (pen name) 2006-07-27 00:54:41 UTC
Created attachment 18646 [details]
ErrPtg.xls
Comment 10 Trejkaz (pen name) 2006-07-27 00:54:54 UTC
Created attachment 18647 [details]
IntersectionPtg.xls
Comment 11 Trejkaz (pen name) 2006-07-27 00:55:05 UTC
Created attachment 18648 [details]
PercentPtg.xls
Comment 12 Trejkaz (pen name) 2006-07-27 00:55:18 UTC
Created attachment 18649 [details]
RangePtg.xls
Comment 13 Trejkaz (pen name) 2006-07-27 00:55:34 UTC
Created attachment 18650 [details]
UnionPtg.xls
Comment 14 Jason Height 2006-07-27 14:16:45 UTC
Applied. Fixed.

Avik, Sorry  but i bet you to it. Was working on the shared formula stuff anyhow.

Jason
Comment 15 Avik Sengupta 2006-07-28 07:42:57 UTC
Jason, Thanks!!