PowerPoint OLEShape: extract last version of embedded ole object

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@901215 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Maxim Valyanskiy 2010-01-20 14:33:58 +00:00
parent 8f421fc5b0
commit ed3cae95f8

View File

@ -84,12 +84,20 @@ public final class OLEShape extends Picture {
//persist reference
int ref = getExEmbed().getExOleObjAtom().getObjStgDataRef();
for (int i = 0; i < ole.length; i++) {
if(ole[i].getExOleObjStg().getPersistId() == ref) return ole[i];
ObjectData data = null;
for (int i = 0; i < ole.length; i++) {
if(ole[i].getExOleObjStg().getPersistId() == ref) {
data=ole[i];
}
}
logger.log(POILogger.WARN, "OLE data not found");
return null;
if (data==null) {
logger.log(POILogger.WARN, "OLE data not found");
}
return data;
}
/**