poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n...@apache.org
Subject svn commit: r566196 - in /poi/trunk/src: documentation/content/xdocs/ java/org/apache/poi/ddf/ testcases/org/apache/poi/hssf/data/ testcases/org/apache/poi/hssf/usermodel/
Date Wed, 15 Aug 2007 14:40:03 GMT
Author: nick
Date: Wed Aug 15 07:40:02 2007
New Revision: 566196

URL: http://svn.apache.org/viewvc?view=rev&rev=566196
Log:
Patch from Trejkaz from bug #43116 - Fix for Escher handling of embeded OLE2 documents

Added:
    poi/trunk/src/testcases/org/apache/poi/hssf/data/ole2-embedding.xls   (with props)
    poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestOLE2Embeding.java   (with props)
Modified:
    poi/trunk/src/documentation/content/xdocs/   (props changed)
    poi/trunk/src/documentation/content/xdocs/changes.xml
    poi/trunk/src/documentation/content/xdocs/status.xml
    poi/trunk/src/java/org/apache/poi/ddf/EscherBlipRecord.java

Propchange: poi/trunk/src/documentation/content/xdocs/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Aug 15 07:40:02 2007
@@ -0,0 +1 @@
+*.swp

Modified: poi/trunk/src/documentation/content/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/poi/trunk/src/documentation/content/xdocs/changes.xml?view=diff&rev=566196&r1=566195&r2=566196
==============================================================================
--- poi/trunk/src/documentation/content/xdocs/changes.xml (original)
+++ poi/trunk/src/documentation/content/xdocs/changes.xml Wed Aug 15 07:40:02 2007
@@ -36,6 +36,7 @@
     </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>

Modified: poi/trunk/src/documentation/content/xdocs/status.xml
URL: http://svn.apache.org/viewvc/poi/trunk/src/documentation/content/xdocs/status.xml?view=diff&rev=566196&r1=566195&r2=566196
==============================================================================
--- poi/trunk/src/documentation/content/xdocs/status.xml (original)
+++ poi/trunk/src/documentation/content/xdocs/status.xml Wed Aug 15 07:40:02 2007
@@ -33,6 +33,7 @@
 
     <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>

Modified: poi/trunk/src/java/org/apache/poi/ddf/EscherBlipRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ddf/EscherBlipRecord.java?view=diff&rev=566196&r1=566195&r2=566196
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ddf/EscherBlipRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/ddf/EscherBlipRecord.java Wed Aug 15 07:40:02 2007
@@ -92,7 +92,7 @@
      */
     public int getRecordSize()
     {
-        return field_pictureData.length + 4;
+        return field_pictureData.length + HEADER_SIZE;
     }
 
     /**

Added: poi/trunk/src/testcases/org/apache/poi/hssf/data/ole2-embedding.xls
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/data/ole2-embedding.xls?view=auto&rev=566196
==============================================================================
Binary file - no diff available.

Propchange: poi/trunk/src/testcases/org/apache/poi/hssf/data/ole2-embedding.xls
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestOLE2Embeding.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestOLE2Embeding.java?view=auto&rev=566196
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestOLE2Embeding.java (added)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestOLE2Embeding.java Wed Aug 15
07:40:02 2007
@@ -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();
+  }
+}
+

Propchange: poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestOLE2Embeding.java
------------------------------------------------------------------------------
    svn:eol-style = native



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message