Bug 40024 - [PATCH] Support for more Ptgs
Summary: [PATCH] Support for more Ptgs
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 3.0-dev
Hardware: Other other
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords: PatchAvailable
Depends on:
Blocks: 30862 40005 40006 40007 40009
  Show dependency tree
 
Reported: 2006-07-12 04:46 UTC by Trejkaz (pen name)
Modified: 2006-07-28 00:42 UTC (History)
0 users



Attachments
Patch to add new support for several Ptg types. (53.55 KB, patch)
2006-07-12 04:47 UTC, Trejkaz (pen name)
Details | Diff
AreaErrPtg.xls (13.50 KB, application/octet-stream)
2006-07-27 00:54 UTC, Trejkaz (pen name)
Details
ErrPtg.xls (13.50 KB, application/octet-stream)
2006-07-27 00:54 UTC, Trejkaz (pen name)
Details
IntersectionPtg.xls (13.50 KB, application/octet-stream)
2006-07-27 00:54 UTC, Trejkaz (pen name)
Details
PercentPtg.xls (13.50 KB, application/octet-stream)
2006-07-27 00:55 UTC, Trejkaz (pen name)
Details
RangePtg.xls (13.50 KB, application/octet-stream)
2006-07-27 00:55 UTC, Trejkaz (pen name)
Details
UnionPtg.xls (13.50 KB, application/octet-stream)
2006-07-27 00:55 UTC, Trejkaz (pen name)
Details

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