Package org.openxmlformats.schemas.wordprocessingml.x2006.main

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


  /**
   * Add a new num with an abstractNumID
   * @return return NumId of the added num
   */
  public BigInteger addNum(BigInteger abstractNumID){
    CTNum ctNum = this.ctNumbering.addNewNum();
    ctNum.addNewAbstractNumId();
    ctNum.getAbstractNumId().setVal(abstractNumID);
    ctNum.setNumId(BigInteger.valueOf(nums.size()+1));
    XWPFNum num = new XWPFNum(ctNum, this);
    nums.add(num);
    return ctNum.getNumId();
  }
View Full Code Here


  /**
   * Add a new num with an abstractNumID
   * @return return NumId of the added num
   */
  public BigInteger addNum(BigInteger abstractNumID){
    CTNum ctNum = this.ctNumbering.addNewNum();
    ctNum.addNewAbstractNumId();
    ctNum.getAbstractNumId().setVal(abstractNumID);
    ctNum.setNumId(BigInteger.valueOf(nums.size()+1));
    XWPFNum num = new XWPFNum(ctNum, this);
    nums.add(num);
    return ctNum.getNumId();
  }
View Full Code Here

  /**
   * Add a new num with an abstractNumID
   * @return return NumId of the added num
   */
  public BigInteger addNum(BigInteger abstractNumID){
    CTNum ctNum = this.ctNumbering.addNewNum();
    ctNum.addNewAbstractNumId();
    ctNum.getAbstractNumId().setVal(abstractNumID);
    ctNum.setNumId(BigInteger.valueOf(nums.size()+1));
    XWPFNum num = new XWPFNum(ctNum, this);
    nums.add(num);
    return ctNum.getNumId();
  }
View Full Code Here

   * Add a new num with an abstractNumID and a numID
   * @param abstractNumID
   * @param numID
   */
  public void addNum(BigInteger abstractNumID, BigInteger numID){
    CTNum ctNum = this.ctNumbering.addNewNum();
    ctNum.addNewAbstractNumId();
    ctNum.getAbstractNumId().setVal(abstractNumID);
    ctNum.setNumId(numID);
    XWPFNum num = new XWPFNum(ctNum, this);
    nums.add(num);
  }
View Full Code Here

  /**
   * Add a new num with an abstractNumID
   * @return return NumId of the added num
   */
  public BigInteger addNum(BigInteger abstractNumID){
    CTNum ctNum = this.ctNumbering.addNewNum();
    ctNum.addNewAbstractNumId();
    ctNum.getAbstractNumId().setVal(abstractNumID);
    ctNum.setNumId(BigInteger.valueOf(nums.size()+1));
    XWPFNum num = new XWPFNum(ctNum, this);
    nums.add(num);
    return ctNum.getNumId();
  }
View Full Code Here

   * Add a new num with an abstractNumID and a numID
   * @param abstractNumID
   * @param numID
   */
  public void addNum(BigInteger abstractNumID, BigInteger numID){
    CTNum ctNum = this.ctNumbering.addNewNum();
    ctNum.addNewAbstractNumId();
    ctNum.getAbstractNumId().setVal(abstractNumID);
    ctNum.setNumId(numID);
    XWPFNum num = new XWPFNum(ctNum, this);
    nums.add(num);
  }
View Full Code Here

        XWPFParagraph p = doc.createParagraph();

        CTP ctp = p.getCTP();
        CTPPr ppr = ctp.getPPr()== null? ctp.addNewPPr() : ctp.getPPr();

        CTOnOff wordWrap = ppr.addNewWordWrap();
        wordWrap.setVal(STOnOff.FALSE);
        assertEquals(false, p.isWordWrap());

        p.setWordWrap(true);
        assertEquals(STOnOff.TRUE, ppr.getWordWrap().getVal());
    }
View Full Code Here

        XWPFParagraph p = doc.createParagraph();

        CTP ctp = p.getCTP();
        CTPPr ppr = ctp.getPPr()== null? ctp.addNewPPr() : ctp.getPPr();

        CTOnOff pageBreak = ppr.addNewPageBreakBefore();
        pageBreak.setVal(STOnOff.FALSE);
        assertEquals(false, p.isPageBreak());

        p.setPageBreak(true);
        assertEquals(STOnOff.TRUE, ppr.getPageBreakBefore().getVal());
    }
View Full Code Here

     * @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

     *
     * @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;
        }
        return false;
    }
View Full Code Here

TOP

Related Classes of org.openxmlformats.schemas.wordprocessingml.x2006.main.CTNum

Copyright © 2018 www.massapicom. 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.