Bug 27272 - [PATCH] Unknown Ptg 3c (60)
Summary: [PATCH] Unknown Ptg 3c (60)
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 2.0-FINAL
Hardware: PC All
: P3 normal with 12 votes (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
: 32258 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-02-26 22:31 UTC by Todd McGrath
Modified: 2005-06-21 06:44 UTC (History)
2 users (show)



Attachments
test spreadsheet (13.00 KB, application/octet-stream)
2004-02-26 22:32 UTC, Todd McGrath
Details
recreate code (1.46 KB, text/plain)
2004-02-26 22:34 UTC, Todd McGrath
Details
Another file that causes this bug. (50.50 KB, application/vnd.ms-excel)
2005-04-27 01:08 UTC, likwidd
Details
Patch that adds support for Ptgs 0x3c and 0x3d (1.91 KB, patch)
2005-05-16 19:55 UTC, Patrick Luby
Details | Diff
Revised patch that adds support for Ptgs 0x3c and 0x3d (1.29 KB, patch)
2005-05-17 17:20 UTC, Patrick Luby
Details | Diff
New DeletedArea3DPtg class. Put this in the src/java/org/apache/poi/hssf/record/formula directory before building. (1.30 KB, text/plain)
2005-05-17 17:22 UTC, Patrick Luby
Details
New DeletedRef3DPtg class. Put this in the src/java/org/apache/poi/hssf/record/formula directory before building. (1.26 KB, text/plain)
2005-05-17 17:23 UTC, Patrick Luby
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Todd McGrath 2004-02-26 22:31:56 UTC
I'll submit code and .xls file to recreate.  

Don't know what in the spreadsheet is causing the Unknown Ptg 3c (60) 
warnings.  The spreadsheet contains no formulas that I can see.  

Originally discussed here:
http://www.mail-archive.com/poi-user%40jakarta.apache.org/msg03684.html

If you run sample code, then open the testoutauto.xls file and attempt to save, 
Excel crashes
Comment 1 Todd McGrath 2004-02-26 22:32:46 UTC
Created attachment 10576 [details]
test spreadsheet
Comment 2 Todd McGrath 2004-02-26 22:34:51 UTC
Created attachment 10577 [details]
recreate code
Comment 3 Avik Sengupta 2004-11-18 14:41:11 UTC
*** Bug 32258 has been marked as a duplicate of this bug. ***
Comment 4 likwidd 2005-04-27 01:08:29 UTC
Created attachment 14853 [details]
Another file that causes this bug. 

This is just another spread sheet that causes this error.. hope it helps.
Comment 5 Patrick Luby 2005-05-16 19:55:16 UTC
Created attachment 15052 [details]
Patch that adds support for Ptgs 0x3c and 0x3d
Comment 6 Patrick Luby 2005-05-16 19:57:23 UTC
I ran into this same bug for Ptgs 0x3c and 0x3d. Looking at the Excel filtering
code in OpenOffice.org, I found that these Ptgs are processed identically to
Ptgs 0x3a and 0x3b, respectively.

Attached is a "cvs diff -u" patch to the CVS trunk that adds support for these
two Ptgs to POI. I don't have commit access to POI so can one of the POI
committers review my patch and note if there are any issues?
Comment 7 Avik Sengupta 2005-05-17 07:59:13 UTC
Patrick, thanks for this, but you will have to attach the DeletedArea3DPtg.java
and the DeletedRef3DPtg.java... they are not in the diff. 

Also, can you pls get rid of the diff in forrest.properties 
(cvs diff -u src/) 

thanks again, this is very useful. 
Comment 8 Patrick Luby 2005-05-17 17:20:33 UTC
Created attachment 15058 [details]
Revised patch that adds support for Ptgs 0x3c and 0x3d

This revised patch removes the forrest.properties diff and the garbage lines at
the beginning of the last patch.
Comment 9 Patrick Luby 2005-05-17 17:22:59 UTC
Created attachment 15059 [details]
New DeletedArea3DPtg class. Put this in the src/java/org/apache/poi/hssf/record/formula directory before building.
Comment 10 Patrick Luby 2005-05-17 17:23:56 UTC
Created attachment 15060 [details]
New DeletedRef3DPtg class. Put this in the src/java/org/apache/poi/hssf/record/formula directory before building.
Comment 11 Patrick Luby 2005-05-17 17:28:05 UTC
Sorry about the first patch file and the missing new files. I have attached the
following items to form a complete patch:

Patch file: http://issues.apache.org/bugzilla/attachment.cgi?id=15058
New file: http://issues.apache.org/bugzilla/attachment.cgi?id=15059
New file: http://issues.apache.org/bugzilla/attachment.cgi?id=15060
Comment 12 Avik Sengupta 2005-05-19 16:58:42 UTC
Committed. Thanks Patrick! Please verify. 

Note a minor change to the semantics of HSSFName.getReference():
Earlier, if we couldnt parse a ptg, we returned '#REF!'. Now we return '#REF!'
if its DeletedArea or DeletedRef Ptgs, which is more correct. If we cant parse
the ptg, we return 'Error'

Comment 13 Patrick Luby 2005-05-25 02:30:52 UTC
I did a clean checkout and build and I verified that the committed files work.
Comment 14 Andy Oliver 2005-06-21 14:44:00 UTC
not sure why someone changed the title to "opc data"