https://bz.apache.org/bugzilla/show_bug.cgi?id=66176
Bug ID: 66176
Summary: [PATCH] Integrate SmartArt diagrams from powerpoint
presentations
Product: POI
Version: unspecified
Hardware: PC
OS: Mac OS X 10.1
Status: NEW
Severity: normal
Priority: P2
Component: XSLF
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
Created attachment 38341
--> https://bz.apache.org/bugzilla/attachment.cgi?id=38341&action=edit
Patch file to integrate smartart. A few java files and one added test pptx
file.
Following up from https://bz.apache.org/bugzilla/show_bug.cgi?id=66145
This patch adds a basic integration to enable POI to read SmartArt diagrams and
enable consumers to read the underlying shapes as `XSLFShape`s. Before, only
the `GraphicalObjectData` of the `XSLFGraphicFrame` was available.
This will allow consumers to extract text, shapes, images, etc. from SmartArt
diagrams.
Some technical details:
- A new relation `XSLFDiagramDrawing` is added to read the
`diagrams/drawing#.xml` file
- A new subclass of `XSLFGraphicFrame` has been added; `XSLFDiagram`
The implementation opts to read from the `drawing#.xml` file, since this is
basically a rendered snapshot of the diagram.
> This specifies a visual representation of the last successful layout for a
> diagram.
https://docs.microsoft.com/en-us/openspecs/office_standards/ms-odrawxml/d0015cd5-9296-4547-ac40-eec467896f3d
Trying to process the `layout#.xml` will be quite complex and require a lot of
effort. It is quite similar to a rendering engine with loops and if/elses, etc.
See this talk about how libreoffice implemented SmartArt to learn more:
https://av.tib.eu/media/44343
Reading the drawing#.xml file will be a great step forward for consumers to be
able to get data from these diagrams.
Just even having access to the text or shapes is quite useful.
Thanks
Yaseen
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]