ASF Bugzilla – Attachment 20428 Details for
Bug 42794
[PATCH] HSSF cannot read XLS files created by Microsoft Access
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for fillFields in BOFRecord
mypatch.patch (text/plain), 1.28 KB, created by
Richard Evans
on 2007-07-02 07:17:11 UTC
(
hide
)
Description:
patch for fillFields in BOFRecord
Filename:
MIME Type:
Creator:
Richard Evans
Created:
2007-07-02 07:17:11 UTC
Size:
1.28 KB
patch
obsolete
>Index: src/java/org/apache/poi/hssf/record/BOFRecord.java >=================================================================== >--- src/java/org/apache/poi/hssf/record/BOFRecord.java (revision 552497) >+++ src/java/org/apache/poi/hssf/record/BOFRecord.java (working copy) >@@ -29,6 +29,7 @@ > * REFERENCE: PG 289 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)<P> > * @author Andrew C. Oliver > * @author Jason Height (jheight at chariot dot net dot au) >+ * @author Richard Evans (richard.evans at datanomic.com) > * @version 2.0-pre > */ > >@@ -110,10 +111,24 @@ > { > field_1_version = in.readShort(); > field_2_type = in.readShort(); >- field_3_build = in.readShort(); >- field_4_year = in.readShort(); >- field_5_history = in.readInt(); >- field_6_rversion = in.readInt(); >+ >+ // Some external tools do not generate all of the remaining fields >+ >+ if (in.remaining() >= 2) { >+ field_3_build = in.readShort(); >+ } >+ >+ if (in.remaining() >= 2) { >+ field_4_year = in.readShort(); >+ } >+ >+ if (in.remaining() >= 4) { >+ field_5_history = in.readInt(); >+ } >+ >+ if (in.remaining() >= 4) { >+ field_6_rversion = in.readInt(); >+ } > } > > /**
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 42794
: 20428 |
20429