XSLFCommonSlideData: extract text data from group shape
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@907626 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
943d3d19e1
commit
b8dbb48254
@ -26,16 +26,10 @@ public class XSLFCommonSlideData {
|
||||
|
||||
List<DrawingParagraph> out = new ArrayList<DrawingParagraph>();
|
||||
|
||||
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<DrawingParagraph> 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()));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user