</devs>
<release version="3.0.2-FINAL" date="2007-??-??">
+ <action dev="POI-DEVELOPERS" type="fix">43116 - [PATCH] - Fix for Escher layer handling of embeded OLE2 documents</action>
<action dev="POI-DEVELOPERS" type="fix">43108 - [PATCH] - Where permissions deny fetching System Properties, use sensible defaults</action>
<action dev="POI-DEVELOPERS" type="fix">43093 - [PATCH] - Fix formula evaluator support for Area3D references to other sheets</action>
<action dev="POI-DEVELOPERS" type="fix">Improvements to HSSFDateUtils.isADateFormat, and have HSSFDateUtil.isCellDateFormatted use this</action>
<changes>
<release version="3.0.2-FINAL" date="2007-??-??">
+ <action dev="POI-DEVELOPERS" type="fix">43116 - [PATCH] - Fix for Escher layer handling of embeded OLE2 documents</action>
<action dev="POI-DEVELOPERS" type="fix">43108 - [PATCH] - Where permissions deny fetching System Properties, use sensible defaults</action>
<action dev="POI-DEVELOPERS" type="fix">43093 - [PATCH] - Fix formula evaluator support for Area3D references to other sheets</action>
<action dev="POI-DEVELOPERS" type="fix">Improvements to HSSFDateUtils.isADateFormat, and have HSSFDateUtil.isCellDateFormatted use this</action>
*/
public int getRecordSize()
{
- return field_pictureData.length + 4;
+ return field_pictureData.length + HEADER_SIZE;
}
/**
--- /dev/null
+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();
+ }
+}
+