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 2008/04/16 13:50:47 UTC
DO NOT REPLY [Bug 43247] [PATCH] Support for getting OLE object data
from slide show
https://issues.apache.org/bugzilla/show_bug.cgi?id=43247
Yegor Kozlov <ye...@dinom.ru> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #8 from Yegor Kozlov <ye...@dinom.ru> 2008-04-16 04:50:46 PST ---
Finally I can resolve it.
I implemented OLEShape which extends Picture and can be used to retrieve the
OLE data and some basic properties (progID, short and full names).
The usage is something like this:
Shape[] shape = slide.getShapes();
for (int i = 0; i < shape.length; i++) {
if (shape[i] instanceof OLEShape) {
OLEShape ole = (OLEShape) shape[i];
ObjectData data = ole.getObjectData();
String name = ole.getInstanceName();
if ("Worksheet".equals(name)) {
HSSFWorkbook wb = new HSSFWorkbook(data.getData());
} else if ("Document".equals(name)) {
HWPFDocument doc = new HWPFDocument(data.getData());
}
}
}
Regards,
Yegor
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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