/** * Add a new paragraph run to this shape * * @return created paragraph run */ public XSSFTextParagraph addNewTextParagraph() { CTTextBody txBody = ctShape.getTxBody(); CTTextParagraph p = txBody.addNewP(); XSSFTextParagraph paragraph = new XSSFTextParagraph(p, ctShape); _paragraphs.add(paragraph); return paragraph; }
protected XSSFSimpleShape(XSSFDrawing drawing, CTShape ctShape) { this.drawing = drawing; this.ctShape = ctShape; _paragraphs = new ArrayList<>(); // initialize any existing paragraphs - this will be the default body // paragraph in a new shape, // or existing paragraphs that have been loaded from the file CTTextBody body = ctShape.getTxBody(); if (body == null) { _textBody = null; } else { _textBody = new XDDFTextBody(this, body); for (int i = 0; i < body.sizeOfPArray(); i++) { _paragraphs.add(new XSSFTextParagraph(body.getPArray(i), ctShape)); } } }
XSSFTextParagraph paragraph = new XSSFTextParagraph(p, ctShape); _paragraphs.add(paragraph);
_paragraphs.add(new XSSFTextParagraph(ctShape.getTxBody().getPArray(0), ctShape));
/** * Add a new paragraph run to this shape * * @return created paragraph run */ public XSSFTextParagraph addNewTextParagraph() { CTTextBody txBody = ctShape.getTxBody(); CTTextParagraph p = txBody.addNewP(); XSSFTextParagraph paragraph = new XSSFTextParagraph(p, ctShape); _paragraphs.add(paragraph); return paragraph; }
protected XSSFSimpleShape(XSSFDrawing drawing, CTShape ctShape) { this.drawing = drawing; this.ctShape = ctShape; _paragraphs = new ArrayList<>(); // initialize any existing paragraphs - this will be the default body // paragraph in a new shape, // or existing paragraphs that have been loaded from the file CTTextBody body = ctShape.getTxBody(); if (body == null) { _textBody = null; } else { _textBody = new XDDFTextBody(this, body); for (int i = 0; i < body.sizeOfPArray(); i++) { _paragraphs.add(new XSSFTextParagraph(body.getPArray(i), ctShape)); } } }
XSSFTextParagraph paragraph = new XSSFTextParagraph(p, ctShape); _paragraphs.add(paragraph);
_paragraphs.add(new XSSFTextParagraph(ctShape.getTxBody().getPArray(0), ctShape));