poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 43877] - Cant open the saved XLS has 58 controls
Date Thu, 22 Nov 2007 16:34:22 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43877>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43877





------- Additional Comments From yegor@dinom.ru  2007-11-22 08:34 -------
I found what's wrong. It wasn't trivial and took two brain-teasing days to
figure it out :).

In org.apache.poi.hssf.record.RecordFactory we have a place where continuation
for drawing records is handled:


                        else if (record.getSid() == ContinueRecord.sid &&
                                 ((lastRecord instanceof ObjRecord) ||
(lastRecord instanceof TextObjectRecord))) {
                          // Drawing records have a very strange continue behaviour.
                          //There can actually be OBJ records mixed between the
continues.
                          lastDrawingRecord.processContinueRecord(
((ContinueRecord)record).getData() );

The problem is that this case is not handled when writing out the records. That
is if we have an OBJ record mixed with continues we read them properly.
BUT when we serialize the drawing record this structure  is lost and it results
in corrupted xls. It is reproducible with any xls file having a
continue record after OBJ. I reproduced it with 35565.xls used by
org.apache.poi.hssf.usermodel.TestBugs.test35565(). After re-save it becomes
unreadable.

The fix is coming soon.

Yegor

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Mime
View raw message