Dear Andy,

> Ahh yes...  try adding code to swallow this record, test and supply a 
> patch and I'll apply it.  Nice work, I think this has been something 
> we've been trying to figure out for a little while now.

Removing all 0x1c1 records when saving the workbook has solved all the
problems. I did try to figure out what the 8 bytes of data could
represent, without success.

Because the changes I made are against version 1.5.1 and are rather
simple, I guess it doesn't make much sense to send my contribution as
a patch. As a consequence, please find attached the RecalcIdRecord
class. Here are the changes to make to the existing classes:

RecordFactory.java:
   Add RecalcIdRecord.class to the records array.
   
Workbook.java
   Change the loop inserialize(), serialize(int, byte []) and
   getSize() with:

   for (int k = 0; k < records.size(); k++)
   {
       Record record = (( Record ) records.get(k));
       // Let's skip RECALCID records, as they are only used for optimization
       if(record.getSid() != RecalcIdRecord.sid || ((RecalcIdRecord)record).isNeeded())
       {
           pos += record.serialize(pos + offset, data);   // rec.length;
       }
   }

You may want to make the isNeeded() method a member of the Record
class.

Take care,

Luc

-- 
Luc Girardin  Macrofocus GmbH, Wasserwerkstr. 10, CH-8006 Zurich
       email: [EMAIL PROTECTED]
       phone: +41 1 350 52 18
         fax: +41 1 350 52 19
         web: http://www.macrofocus.com/

Where in the world should you travel - or perhaps even relocate - to
pay less, earn more, and improve your living conditions? Find it out
with City'O'Scope, available at http://www.macrofocus.com/cityoscope/

Attachment: RecalcIdRecord.java
Description: Binary data

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to