From c62002e7ba87b8b5755c409c8efa4b1f13958557 Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Mon, 25 Jul 2022 09:25:05 +0000 Subject: refactor smart art code git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903000 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/poi/examples/xslf/SmartArtConversionDemo.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'poi-examples') diff --git a/poi-examples/src/main/java/org/apache/poi/examples/xslf/SmartArtConversionDemo.java b/poi-examples/src/main/java/org/apache/poi/examples/xslf/SmartArtConversionDemo.java index 56bc53d5b1..546711b507 100644 --- a/poi-examples/src/main/java/org/apache/poi/examples/xslf/SmartArtConversionDemo.java +++ b/poi-examples/src/main/java/org/apache/poi/examples/xslf/SmartArtConversionDemo.java @@ -77,9 +77,8 @@ public class SmartArtConversionDemo { CTBlipFillProperties blipFillProps = ctShape.getSpPr().getBlipFill(); CTBlip blip = blipFillProps.getBlip(); - // In SmartArt diagrams, the references to images/embeds are stored in drawing#.xml.rels. When read by - // POI it copies this relationship to the parent slide to allow POI to correctly resolve the images. - POIXMLDocumentPart inputPicturePart = diagram.getSheet().getRelationById(blip.getEmbed()); + // Relationships for SmartArt diagrams are stored in `drawing#.xml.rels`, not `slide#.xml.rels`. + POIXMLDocumentPart inputPicturePart = diagram.getDiagramDrawing().getRelationById(blip.getEmbed()); if (inputPicturePart == null || inputPicturePart.getPackagePart() == null) { continue; -- cgit v1.2.3