diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFCommonSlideData.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFCommonSlideData.java index 9111b18b6..b32a430f3 100644 --- a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFCommonSlideData.java +++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFCommonSlideData.java @@ -26,16 +26,10 @@ public class XSLFCommonSlideData { List out = new ArrayList(); - CTShape[] shapes = gs.getSpArray(); - for (int i = 0; i < shapes.length; i++) { - CTTextBody ctTextBody = shapes[i].getTxBody(); - if (ctTextBody==null) { - continue; - } + processShape(gs, out); - DrawingTextBody textBody = new DrawingTextBody(ctTextBody); - - out.addAll(Arrays.asList(textBody.getParagraphs())); + for (CTGroupShape shape : gs.getGrpSpArray()) { + processShape(shape, out); } CTGraphicalObjectFrame[] graphicFrames = gs.getGraphicFrameArray(); @@ -64,4 +58,18 @@ public class XSLFCommonSlideData { return out; } + private void processShape(CTGroupShape gs, List out) { + CTShape[] shapes = gs.getSpArray(); + for (int i = 0; i < shapes.length; i++) { + CTTextBody ctTextBody = shapes[i].getTxBody(); + if (ctTextBody==null) { + continue; + } + + DrawingTextBody textBody = new DrawingTextBody(ctTextBody); + + out.addAll(Arrays.asList(textBody.getParagraphs())); + } + } + }