poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 43247] [PATCH] Support for getting OLE object data from slide show
Date Wed, 16 Apr 2008 11:50:47 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=43247


Yegor Kozlov <yegor@dinom.ru> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




--- Comment #8 from Yegor Kozlov <yegor@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


Mime
View raw message