You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Daniel Noll <da...@nuix.com> on 2007/08/13 09:03:41 UTC

Embedded OLE2 objects

Hi all.

Does anyone have some pointers on where to start if I want to add support for 
extracting embedded OLE2 objects?  Ultimately I need to do it for all three 
formats (I know they're all different...) but if anyone has some pointers for 
getting started on even one of them, that would be great.

As far as I can tell for Word, CharacterRun.isOle2() returns true when there 
is an OLE2 object there, but I'm not sure what to do next as getObjOffset() 
returns an offset at which there doesn't seem to be any OLE2 data.

Daniel

-- 
Daniel Noll
Nuix Pty Ltd
Suite 79, 89 Jones St, Ultimo NSW 2007, Australia    Ph: +61 2 9280 0699
Web: http://nuix.com/                               Fax: +61 2 9212 6902

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


Re: Embedded OLE2 objects

Posted by Daniel Noll <da...@nuix.com>.
On Monday 13 August 2007 17:03:41 Daniel Noll wrote:
> As far as I can tell for Word, CharacterRun.isOle2() returns true when
> there is an OLE2 object there, but I'm not sure what to do next as
> getObjOffset() returns an offset at which there doesn't seem to be any OLE2
> data.

Here's the results of some further investigation.

At offset 0 in the PicturesTable there is actually an EMF of the embedded 
object.

  run.getPicOffset() => 1248525022

There is a directory in the OLE2 filesystem under ObjectPool 
called "_1248525022", matching this number perfectly.

So it seems to be pretty easy conceptually for Word format to find the 
embedded objects, but what I find odd is that the pic offset points to the 
object, not the obj offset... almost like some Microsoft engineer screwed up 
once and then all future versions had to implement the same bug to maintain 
compatibility.

Daniel


-- 
Daniel Noll
Nuix Pty Ltd
Suite 79, 89 Jones St, Ultimo NSW 2007, Australia    Ph: +61 2 9280 0699
Web: http://nuix.com/                               Fax: +61 2 9212 6902

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