]> source.dussan.org Git - poi.git/commitdiff
ignore external relations
authorAndreas Beeker <kiwiwings@apache.org>
Tue, 17 May 2016 07:23:34 +0000 (07:23 +0000)
committerAndreas Beeker <kiwiwings@apache.org>
Tue, 17 May 2016 07:23:34 +0000 (07:23 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1744196 13f79535-47bb-0310-9956-ffa450edef68

src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSlideShow.java

index a91e451f8910bdb4cc1a2becdf8ac4194fc1f8b1..8a49e394357fe20ea19876d06825d6f4b91b37ba 100644 (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.PackageRelationship;
 import org.apache.poi.openxml4j.opc.PackageRelationshipCollection;
+import org.apache.poi.openxml4j.opc.TargetMode;
 import org.apache.poi.util.Internal;
 import org.apache.xmlbeans.XmlException;
 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()));
 
                        for(PackageRelationship rel : slidePart.getRelationshipsByType(OLE_OBJECT_REL_TYPE)) {
+                           if (TargetMode.EXTERNAL == rel.getTargetMode()) {
+                               continue;
+                           }
                                // TODO: Add this reference to each slide as well
                                embedds.add(slidePart.getRelatedPart(rel));
                        }