You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2013/11/25 23:32:45 UTC
[Bug 55758] Problems embedding non-office OLE object into PPT
SlideShow
https://issues.apache.org/bugzilla/show_bug.cgi?id=55758
--- Comment #1 from Andreas Beeker <an...@gmx.de> ---
Created attachment 31076
--> https://issues.apache.org/bugzilla/attachment.cgi?id=31076&action=edit
OLE-implementation for Accelrys Draw .mol-file embedding
The attachment contains a c# project to process a .mol file and generated
the neccessary ole object to be embedded by the also included java class.
An Accelrys Draw (AD) ole objects contains two streams.
1. "Contents": the bigger one, which is a concatenation of the following
formats:
- a mol-file
- a skc-file
- a mol-file, an ASCII-file, same as the 1st file, but with a line
length (byte) as first char of the line
- a emf-file
- a wmf-file
each file is prefixed with little endian integer, which specifies the file
length
2. "\1Ole10Native": a "malformed" Ole10Native object, which is a subset of the
Contents stream
as it works out, it's enough to embed the Contents stream
In the trial version, AD provides a few .net libraries and
JNI-Bridge consisting out of jar and two dlls. Although it's
possible to produce a few files of the mentioned above with
the bridge, it lacks emf/wmf support. There's a function
to copy data to and from the clipboard, which has the format
of the contents stream, but it's not working.
After a bit of decompiling of the .net and .jar files,
I've started a small workaround c# project and it became visible
that the clipboard function always throws a "coinitialize hasn't
been called" error, no matter if I called coinitialize manually
or tweaked around the appartment model of the calling code.
The other functions work as designed.
So finally the solution is that c# helper, which generates the
contents stream and an emf preview image, and the embedding code
based on #55579.
It took a bit until the ensemble worked on Peters environment,
so in the rare case, that anybody else uses this code ;) ...
you might need to change the .net dll references and/or copy
various AD dlls to the local working dir.
As for the POI part this is only a very specific test, I'll
(try to) close this bug as "won't fix"
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org