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 fab3c433ef
commit 3f0d9084f8
1 changed files with 12 additions and 4 deletions

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;
}
/**