aboutsummaryrefslogtreecommitdiffstats
path: root/src/testcases/org/apache/poi/hssf/usermodel/TestOLE2Embeding.java
diff options
context:
space:
mode:
authorNick Burch <nick@apache.org>2007-08-15 14:40:02 +0000
committerNick Burch <nick@apache.org>2007-08-15 14:40:02 +0000
commit26163ce8e53ab061410cea2ff0be90322b481375 (patch)
tree4bcb4ff05d6c00d11c64ee4c87b83c07278a3a6a /src/testcases/org/apache/poi/hssf/usermodel/TestOLE2Embeding.java
parent9cedf7aae08640c92c8e2497c27d5ce72554cdcf (diff)
downloadpoi-26163ce8e53ab061410cea2ff0be90322b481375.tar.gz
poi-26163ce8e53ab061410cea2ff0be90322b481375.zip
Patch from Trejkaz from bug #43116 - Fix for Escher handling of embeded OLE2 documents
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@566196 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/testcases/org/apache/poi/hssf/usermodel/TestOLE2Embeding.java')
-rw-r--r--src/testcases/org/apache/poi/hssf/usermodel/TestOLE2Embeding.java26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/testcases/org/apache/poi/hssf/usermodel/TestOLE2Embeding.java b/src/testcases/org/apache/poi/hssf/usermodel/TestOLE2Embeding.java
new file mode 100644
index 0000000000..b0fd77b889
--- /dev/null
+++ b/src/testcases/org/apache/poi/hssf/usermodel/TestOLE2Embeding.java
@@ -0,0 +1,26 @@
+package org.apache.poi.hssf.usermodel;
+
+import java.io.File;
+import java.io.FileInputStream;
+
+import junit.framework.TestCase;
+
+public class TestOLE2Embeding extends TestCase {
+ public void testEmbeding() throws Exception {
+ String dirname = System.getProperty("HSSF.testdata.path");
+ String filename = dirname + "/ole2-embedding.xls";
+
+ File file = new File(filename);
+ FileInputStream in = new FileInputStream(file);
+ HSSFWorkbook workbook;
+
+ // This used to break, until bug #43116 was fixed
+ workbook = new HSSFWorkbook(in);
+
+ in.close();
+
+ // Check we can get at the Escher layer still
+ workbook.getAllPictures();
+ }
+}
+