poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From max...@apache.org
Subject svn commit: r901215 - /poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/OLEShape.java
Date Wed, 20 Jan 2010 14:33:59 GMT
Author: maxcom
Date: Wed Jan 20 14:33:58 2010
New Revision: 901215

URL: http://svn.apache.org/viewvc?rev=901215&view=rev
Log:
PowerPoint OLEShape: extract last version of embedded ole object

Modified:
    poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/OLEShape.java

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/OLEShape.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/OLEShape.java?rev=901215&r1=901214&r2=901215&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/OLEShape.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/OLEShape.java Wed Jan 20 14:33:58
2010
@@ -84,12 +84,20 @@
 
         //persist reference
         int ref = getExEmbed().getExOleObjAtom().getObjStgDataRef();
+
+        ObjectData data = null;
+
         for (int i = 0; i < ole.length; i++) {
-            if(ole[i].getExOleObjStg().getPersistId() == ref) return ole[i];
+            if(ole[i].getExOleObjStg().getPersistId() == ref) {
+                data=ole[i];
+            }
+        }
 
+        if (data==null) {
+            logger.log(POILogger.WARN, "OLE data not found");
         }
-        logger.log(POILogger.WARN, "OLE data not found");
-        return null;
+
+        return data;
     }
 
     /**



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


Mime
View raw message