Examples of CTTextBody


Examples of org.docx4j.dml.CTTextBody

  }

  public CTTextBody processText(org.opendope.SmartArt.dataHierarchy.ListItem thisListItem,
      CTPt thisPoint) {
   
    CTTextBody textBody = thisPoint.getT();
    if (textBody!=null) {
     
      TextBody tb = getDataHierarchyObjectFactory().createTextBody();
      thisListItem.setTextBody(tb);
     
      for(CTTextParagraph p : textBody.getP() ) {
       
        if (!p.getEGTextRun().isEmpty()
            && p.getEGTextRun().get(0) instanceof org.docx4j.dml.CTRegularTextRun
            ) {
          // TODO; assumes a single r child, which is
View Full Code Here

Examples of org.docx4j.dml.CTTextBody

     
      // Find the pt
      CTPt thisPoint = getPoint(modelId);
     
      // attach its text
      CTTextBody textBody = processText(thisListItem, thisPoint);
     
      if (textFormats.size()<thisListItem.getDepth() ) {
        // we don't have a template for this level yet,
        // so add this one as the template for this level
        if (textBody==null) {
View Full Code Here

Examples of org.docx4j.dml.CTTextBody

        } catch (RuntimeException me) {         
          System.out.println(indent + o.getClass().getName() );                   
        }
       
        if (o instanceof org.pptx4j.pml.Shape) {
          CTTextBody txBody = ((org.pptx4j.pml.Shape)o).getTxBody();
          if (txBody!=null) {
            for (CTTextParagraph tp : txBody.getP() ) {
             
              System.out.println(indent + tp.getClass().getName() + "\n\n" + XmlUtils.marshaltoString(tp, true, true, org.pptx4j.jaxb.Context.jcPML,
                  "http://schemas.openxmlformats.org/presentationml/2006/main", "txBody", CTTextParagraph.class));
             
            }
View Full Code Here

Examples of org.openxmlformats.schemas.drawingml.x2006.main.CTTextBody

  }

  private void extractShapeContent(StringBuilder buffy, CTGroupShape gs) {
    CTShape[] shapes = gs.getSpArray();
    for (CTShape shape : shapes) {
      CTTextBody textBody = shape.getTxBody();
      if (textBody != null) {
        CTTextParagraph[] paras = textBody.getPArray();
        for (CTTextParagraph textParagraph : paras) {
          CTRegularTextRun[] textRuns = textParagraph.getRArray();
          for (CTRegularTextRun textRun : textRuns) {
            buffy.append(textRun.getT()).append(' ');
          }
View Full Code Here

Examples of org.openxmlformats.schemas.drawingml.x2006.main.CTTextBody

    private void extractShapeContent(CTGroupShape gs, XHTMLContentHandler xhtml)
            throws SAXException {
        CTShape[] shapes = gs.getSpArray();
        for (CTShape shape : shapes) {
            CTTextBody textBody = shape.getTxBody();
            if (textBody != null) {
                CTTextParagraph[] paras = textBody.getPArray();
                for (CTTextParagraph textParagraph : paras) {
                    CTRegularTextRun[] textRuns = textParagraph.getRArray();
                    for (CTRegularTextRun textRun : textRuns) {
                        xhtml.element("p", textRun.getT());
                    }
View Full Code Here

Examples of org.openxmlformats.schemas.drawingml.x2006.main.CTTextBody

    /*package*/ XSLFTextShape(XmlObject shape, XSLFSheet sheet) {
        super(shape, sheet);

        _paragraphs = new ArrayList<XSLFTextParagraph>();
        CTTextBody txBody = getTextBody(false);
        if (txBody != null) {
            for (CTTextParagraph p : txBody.getPList()) {
                _paragraphs.add(new XSLFTextParagraph(p, this));
            }
        }
    }
View Full Code Here

Examples of org.openxmlformats.schemas.drawingml.x2006.main.CTTextBody

    /**
     * unset text from this shape
     */
    public void clearText(){
        _paragraphs.clear();
        CTTextBody txBody = getTextBody(true);
        txBody.setPArray(null); // remove any existing paragraphs
    }
View Full Code Here

Examples of org.openxmlformats.schemas.drawingml.x2006.main.CTTextBody

     * add a new paragraph run to this shape
     *
     * @return created paragraph run
     */
    public XSLFTextParagraph addNewTextParagraph() {
        CTTextBody txBody = getTextBody(true);
        CTTextParagraph p = txBody.addNewP();
        XSLFTextParagraph paragraph = new XSLFTextParagraph(p, this);
        _paragraphs.add(paragraph);
        return paragraph;
    }
View Full Code Here

Examples of org.openxmlformats.schemas.drawingml.x2006.main.CTTextBody

        }
        return TextAutofit.NORMAL;
    }

    protected CTTextBodyProperties getTextBodyPr(){
        CTTextBody textBody = getTextBody(false);
        return textBody == null ? null : textBody.getBodyPr();
    }
View Full Code Here

Examples of org.openxmlformats.schemas.drawingml.x2006.main.CTTextBody

  }
 
  private void extractText(CTGroupShape gs, StringBuffer text) {
    CTShape[] shapes = gs.getSpArray();
    for (int i = 0; i < shapes.length; i++) {
      CTTextBody textBody =
        shapes[i].getTxBody();
      if(textBody != null) {
        CTTextParagraph[] paras =
          textBody.getPArray();
        for (int j = 0; j < paras.length; j++) {
          CTRegularTextRun[] textRuns =
            paras[j].getRArray();
          for (int k = 0; k < textRuns.length; k++) {
            text.append( textRuns[k].getT() );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.