ignore external relations

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1744196 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Andreas Beeker 2016-05-17 07:23:34 +00:00
parent 7b282db0e2
commit e28fff0423

View File

@ -29,6 +29,7 @@ import org.apache.poi.openxml4j.opc.OPCPackage;
import org.apache.poi.openxml4j.opc.PackagePart; import org.apache.poi.openxml4j.opc.PackagePart;
import org.apache.poi.openxml4j.opc.PackageRelationship; import org.apache.poi.openxml4j.opc.PackageRelationship;
import org.apache.poi.openxml4j.opc.PackageRelationshipCollection; import org.apache.poi.openxml4j.opc.PackageRelationshipCollection;
import org.apache.poi.openxml4j.opc.TargetMode;
import org.apache.poi.util.Internal; import org.apache.poi.util.Internal;
import org.apache.xmlbeans.XmlException; import org.apache.xmlbeans.XmlException;
import org.openxmlformats.schemas.presentationml.x2006.main.CTCommentList; import org.openxmlformats.schemas.presentationml.x2006.main.CTCommentList;
@ -82,6 +83,9 @@ public class XSLFSlideShow extends POIXMLDocument {
PackagePart slidePart = corePart.getRelatedPart(corePart.getRelationship(ctSlide.getId2())); PackagePart slidePart = corePart.getRelatedPart(corePart.getRelationship(ctSlide.getId2()));
for(PackageRelationship rel : slidePart.getRelationshipsByType(OLE_OBJECT_REL_TYPE)) { for(PackageRelationship rel : slidePart.getRelationshipsByType(OLE_OBJECT_REL_TYPE)) {
if (TargetMode.EXTERNAL == rel.getTargetMode()) {
continue;
}
// TODO: Add this reference to each slide as well // TODO: Add this reference to each slide as well
embedds.add(slidePart.getRelatedPart(rel)); embedds.add(slidePart.getRelatedPart(rel));
} }