ASF Bugzilla – Attachment 20737 Details for
Bug 43247
[PATCH] Support for getting OLE object data from slide show
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
TestOleEmbedding.java
TestOleEmbedding.java (text/plain), 1.69 KB, created by
Trejkaz (pen name)
on 2007-08-29 21:41:51 UTC
(
hide
)
Description:
TestOleEmbedding.java
Filename:
MIME Type:
Creator:
Trejkaz (pen name)
Created:
2007-08-29 21:41:51 UTC
Size:
1.69 KB
patch
obsolete
> >import java.io.File; >import java.io.FileInputStream; > >import org.apache.poi.hslf.HSLFSlideShow; >import org.apache.poi.hslf.usermodel.ObjectData; >import org.apache.poi.hslf.usermodel.PictureData; > >import junit.framework.TestCase; > >public class TestOleEmbedding extends TestCase >{ > /** > * Tests support for OLE objects. > * > * @throws Exception if an error occurs. > */ > public void testOleEmbedding2003() throws Exception > { > File file = new File("ole2-embedding-2003.ppt"); > HSLFSlideShow slideShow = new HSLFSlideShow(new FileInputStream(file)); > try > { > // Placeholder EMFs for clients that don't support the OLE components. > PictureData[] pictures = slideShow.getPictures(); > assertEquals("Should be two pictures", 2, pictures.length); > assertDigestEquals("Wrong data for picture 1", "8d1fbadf4814f321bb1ccdd056e3c788", > pictures[0].getData()); > assertDigestEquals("Wrong data for picture 2", "987a698e83559cf3d38a0deeba1cc63b", > pictures[1].getData()); > > // Actual embedded objects. > ObjectData[] objects = slideShow.getEmbeddedObjects(); > assertEquals("Should be two objects", 2, objects.length); > assertDigestEquals("Wrong data for objecs 1", "0d1fcc61a83de5c4894dc0c88e9a019d", > objects[0].getData()); > assertDigestEquals("Wrong data for object 2", "b323604b2003a7299c77c2693b641495", > objects[1].getData()); > } > finally > { > slideShow.close(); > } > } >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 43247
:
20735
|
20736
| 20737 |
20748