@Beta public class XSLFDiagram extends XSLFGraphicFrame
This class converts the diagram to an XSLFGroupShape accessible via getGroupShape(). The underlying
XSLFDiagramDrawing used to create the group shape is accessible via getDiagramDrawing().
In pptx files, these diagrams are generated by creating SmartArt. When a pptx has SmartArt, a directory with the following structure is created:
ppt/
diagrams/
data#.xml
drawing#.xml^
colors#.xml
quickStyle#.xml
layout#.xml
rels/
data#.xml.rels
drawing#.xml.rels
^The `drawing#.xml` file is not in the OpenXML spec. It was added as an extension by Microsoft, namespace: http://schemas.microsoft.com/office/drawing/2008/diagram
The drawing#.xml file contains the rendered output of the diagram. This class reads the underlying drawing#.xml and
converts it to a XSLFGroupShape.
The data, drawing, colors, and quickStyle files are in the OpenXML spec. These contain the instructions that define how to render the diagram. Rendering diagrams from these files is not trivial, they support for loops, if/elses, etc. Integrating such a change into POI would be quite sophisticated and challenging.
XSLFShape.ReparseFactory<T extends org.apache.xmlbeans.XmlObject>| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DRAWINGML_DIAGRAM_URI |
| Modifier and Type | Method and Description |
|---|---|
XSLFDiagramDrawing |
getDiagramDrawing()
Returns the underlying
XSLFDiagramDrawing used to create this diagram. |
org.apache.poi.xslf.usermodel.XSLFDiagram.XSLFDiagramGroupShape |
getGroupShape()
Returns the diagram represented as a grouped shape.
|
getAnchor, getChart, getFallbackPicture, getFlipHorizontal, getFlipVertical, getRotation, getShapeType, hasChart, hasDiagram, setAnchor, setFlipHorizontal, setFlipVertical, setRotationdraw, fetchShapeProperty, getBgPr, getBgRef, getChild, getCNvPr, getFillPaint, getGrpSpPr, getParent, getPlaceholder, getPlaceholderDetails, getShapeId, getShapeName, getShapeProperties, getSheet, getSpStyle, getXmlObject, isPlaceholder, selectPaint, selectPaint, selectPaint, selectPaint, selectPaint, selectPaint, selectProperty, setParent, setPlaceholderclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdraw, getParent, getShapeId, getShapeName, getSheetgetParent, getSheetpublic static final java.lang.String DRAWINGML_DIAGRAM_URI
public XSLFDiagramDrawing getDiagramDrawing()
XSLFDiagramDrawing used to create this diagram.
NOTE: Modifying this drawing will not update the groupShape returned from getGroupShape().
public org.apache.poi.xslf.usermodel.XSLFDiagram.XSLFDiagramGroupShape getGroupShape()
Copyright 2022 The Apache Software Foundation or its licensors, as applicable.