Examples of CTPPr


Examples of org.openxmlformats.schemas.wordprocessingml.x2006.main.CTPPr

      CTP p = ftr.addNewP();
      byte[] rsidr = doc.getDocument().getBody().getPArray(0).getRsidR();
      byte[] rsidrdefault = doc.getDocument().getBody().getPArray(0).getRsidRDefault();
      p.setRsidP(rsidr);
      p.setRsidRDefault(rsidrdefault);
      CTPPr pPr = p.addNewPPr();
      pPr.addNewPStyle().setVal(pStyle);
    }
    return ftr;
  }
View Full Code Here

Examples of org.openxmlformats.schemas.wordprocessingml.x2006.main.CTPPr

      CTP p = ftr.addNewP();
      byte[] rsidr = doc.getDocument().getBody().getPArray(0).getRsidR();
      byte[] rsidrdefault = doc.getDocument().getBody().getPArray(0).getRsidRDefault();
      p.setRsidP(rsidr);
      p.setRsidRDefault(rsidrdefault);
      CTPPr pPr = p.addNewPPr();
      pPr.addNewPStyle().setVal(pStyle);
    }
    return ftr;
  }
View Full Code Here

Examples of org.openxmlformats.schemas.wordprocessingml.x2006.main.CTPPr

    CTP p = CTP.Factory.newInstance();
    byte[] rsidr = doc.getDocument().getBody().getPArray(0).getRsidR();
    byte[] rsidrdefault = doc.getDocument().getBody().getPArray(0).getRsidRDefault();
    p.setRsidP(rsidr);
    p.setRsidRDefault(rsidrdefault);
    CTPPr pPr = p.addNewPPr();
    pPr.addNewPStyle().setVal("Header");
    // start watermark paragraph
    CTR r = p.addNewR();
    CTRPr rPr = r.addNewRPr();
    rPr.addNewNoProof();
    CTPicture pict = r.addNewPict();
View Full Code Here

Examples of org.openxmlformats.schemas.wordprocessingml.x2006.main.CTPPr

     * </p>
     *
     * @return the paragraph alignment of this paragraph.
     */
    public ParagraphAlignment getAlignment() {
        CTPPr pr = getCTPPr();
        return pr == null || !pr.isSetJc() ? ParagraphAlignment.LEFT
                : ParagraphAlignment.valueOf(pr.getJc().getVal().intValue());
    }
View Full Code Here

Examples of org.openxmlformats.schemas.wordprocessingml.x2006.main.CTPPr

     * </p>
     *
     * @param align the paragraph alignment to apply to this paragraph.
     */
    public void setAlignment(ParagraphAlignment align) {
        CTPPr pr = getCTPPr();
        CTJc jc = pr.isSetJc() ? pr.getJc() : pr.addNewJc();
        STJc.Enum en = STJc.Enum.forInt(align.getValue());
        jc.setVal(en);
    }
View Full Code Here

Examples of org.openxmlformats.schemas.wordprocessingml.x2006.main.CTPPr

     * </p>
     *
     * @return the vertical alignment of this paragraph.
     */
    public TextAlignment getVerticalAlignment() {
        CTPPr pr = getCTPPr();
        return (pr == null || !pr.isSetTextAlignment()) ? TextAlignment.AUTO
                : TextAlignment.valueOf(pr.getTextAlignment().getVal()
                .intValue());
    }
View Full Code Here

Examples of org.openxmlformats.schemas.wordprocessingml.x2006.main.CTPPr

     *
     * @param valign the paragraph vertical alignment to apply to this
     *               paragraph.
     */
    public void setVerticalAlignment(TextAlignment valign) {
        CTPPr pr = getCTPPr();
        CTTextAlignment textAlignment = pr.isSetTextAlignment() ? pr
                .getTextAlignment() : pr.addNewTextAlignment();
        STTextAlignment.Enum en = STTextAlignment.Enum
                .forInt(valign.getValue());
        textAlignment.setVal(en);
    }
View Full Code Here

Examples of org.openxmlformats.schemas.wordprocessingml.x2006.main.CTPPr

     *
     * @param pageBreak -
     *                  boolean value
     */
    public void setPageBreak(boolean pageBreak) {
  CTPPr ppr = getCTPPr();
  CTOnOff ct_pageBreak = ppr.isSetPageBreakBefore() ? ppr
    .getPageBreakBefore() : ppr.addNewPageBreakBefore();
    if (pageBreak)
        ct_pageBreak.setVal(STOnOff.TRUE);
    else
        ct_pageBreak.setVal(STOnOff.FALSE);
    }
View Full Code Here

Examples of org.openxmlformats.schemas.wordprocessingml.x2006.main.CTPPr

     * </p>
     *
     * @return boolean - if page break is set
     */
    public boolean isPageBreak() {
  CTPPr ppr = getCTPPr();
  CTOnOff ct_pageBreak = ppr.isSetPageBreakBefore() ? ppr
    .getPageBreakBefore() : null;
    if (ct_pageBreak != null
      && ct_pageBreak.getVal().intValue() == STOnOff.INT_TRUE)
        return true;
    else
View Full Code Here

Examples of org.openxmlformats.schemas.wordprocessingml.x2006.main.CTPPr

    /**
     * Get a <b>copy</b> of the currently used CTPBrd, if none is used, return
     * a new instance.
     */
    private CTPBdr getCTPBrd(boolean create) {
        CTPPr pr = getCTPPr();
        CTPBdr ct = pr.isSetPBdr() ? pr.getPBdr() : null;
        if (create && ct == null)
            ct = pr.addNewPBdr();
        return ct;
    }
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.