Hi All

In powerpoint documents, you find PPDrawing atoms. Within these you find a 
number of Escher records, some of which have children. (I've attached an 
example dump to the end of the email, if people are interested in what 
records there are)

The problem I'm having is with getting a tree of DDF records for this 
block of data. Currently, I'm forced to use this method:

* grab the length from bytes 5-8
* pass the whole block of bytes to DefaultEscherRecordFactory, and see 
   what it gives me back
* largely ignore record.getRecordSize() (it sometimes lies) and 
   record.getChildRecords() (almost always empty)
* if the record is quite big, try pointing DefaultEscherRecordFactory at 8 
   bytes in, to see if it's got children
* skip on 8 bytes + the length from the header, and repeat


I guess that if getChildRecords() worked properly, that would handle some 
of it. However, because I have lots of records at the top (without an 
Escher container, since they have a powerpoint container), I would still 
be left with having to skip along the bytes calling the record factory.

What is likely to be the best way to go about getting a tree of escher 
records? 

One option that springs to mind is to fix the child records support on 
containers, so it actually works. That handles the tree. Then, create a 
new RecordFactory which returns an array of top level escher records, some 
of which will have children. This would work by calling the normal record 
factory repeatedly, skipping along each time. (It would also require that 
we fix any records that lie about their size).

Any Thoughts?

Nick


Record dump follows:

  At position 7519 (1D5F):
  Type is 1036 (040C), len is 642 (0282)
  That's a PPDrawing

     At position 7535 (1D6F):
     Type is 61448 (F008), len is 8 (0008)
     That's an Escher Record: msofbtDg

     At position 7551 (1D7F):
     Type is 61443 (F003), len is 530 (0212)
     That's an Escher Record: msofbtSpgrContainer

        At position 7559 (1D87):
        Type is 61444 (F004), len is 40 (0028)
        That's an Escher Record: msofbtSpContainer

           At position 7567 (1D8F):
           Type is 61449 (F009), len is 16 (0010)
           That's an Escher Record: msofbtSpgr

           At position 7591 (1DA7):
           Type is 61450 (F00A), len is 8 (0008)
           That's an Escher Record: msofbtSp

        At position 7607 (1DB7):
        Type is 61444 (F004), len is 88 (0058)
        That's an Escher Record: msofbtSpContainer

           At position 7615 (1DBF):
           Type is 61450 (F00A), len is 8 (0008)
           That's an Escher Record: msofbtSp

           At position 7631 (1DCF):
           Type is 61451 (F00B), len is 24 (0018)
           That's an Escher Record: msofbtOPT

           At position 7663 (1DEF):
           Type is 61456 (F010), len is 8 (0008)
           That's an Escher Record: msofbtClientAnchor

           At position 7679 (1DFF):
           Type is 61457 (F011), len is 16 (0010)
           That's an Escher Record: msofbtClientData

        At position 7703 (1E17):
        Type is 61444 (F004), len is 378 (017A)
        That's an Escher Record: msofbtSpContainer

           At position 7711 (1E1F):
           Type is 61450 (F00A), len is 8 (0008)
           That's an Escher Record: msofbtSp

           At position 7727 (1E2F):
           Type is 61451 (F00B), len is 30 (001E)
           That's an Escher Record: msofbtOPT

           At position 7765 (1E55):
           Type is 61456 (F010), len is 8 (0008)
           That's an Escher Record: msofbtClientAnchor

           At position 7781 (1E65):
           Type is 61457 (F011), len is 16 (0010)
           That's an Escher Record: msofbtClientData

           At position 7805 (1E7D):
           Type is 61453 (F00D), len is 276 (0114)
           That's an Escher Record: msofbtClientTextbox

     At position 8089 (1F99):
     Type is 61444 (F004), len is 72 (0048)
     That's an Escher Record: msofbtSpContainer

        At position 8097 (1FA1):
        Type is 61450 (F00A), len is 8 (0008)
        That's an Escher Record: msofbtSp

        At position 8113 (1FB1):
        Type is 61451 (F00B), len is 48 (0030)
        That's an Escher Record: msofbtOPT

 (next PowerPoint record follows)



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List:    http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta POI Project: http://jakarta.apache.org/poi/

Reply via email to