/** * setNumID of Paragraph * * @param numPos */ public void setNumID(BigInteger numPos) { if (paragraph.getPPr() == null) { paragraph.addNewPPr(); } if (paragraph.getPPr().getNumPr() == null) { paragraph.getPPr().addNewNumPr(); } if (paragraph.getPPr().getNumPr().getNumId() == null) { paragraph.getPPr().getNumPr().addNewNumId(); } paragraph.getPPr().getNumPr().getNumId().setVal(numPos); }
/** * Returns Ilvl of the numeric style for this paragraph. * Returns null if this paragraph does not have numeric style. * * @return Ilvl as BigInteger */ public BigInteger getNumIlvl() { if (paragraph.getPPr() != null) { if (paragraph.getPPr().getNumPr() != null) { if (paragraph.getPPr().getNumPr().getIlvl() != null) { return paragraph.getPPr().getNumPr().getIlvl().getVal(); } } } return null; }
/** * If style exist for this paragraph * NumId of the paragraph will be returned. * If style not exist null will be returned * * @return NumID as BigInteger */ public BigInteger getNumID() { if (paragraph.getPPr() != null) { if (paragraph.getPPr().getNumPr() != null) { if (paragraph.getPPr().getNumPr().getNumId() != null) { return paragraph.getPPr().getNumPr().getNumId().getVal(); } } } return null; }
protected XWPFNum getXWPFNum( CTNumPr numPr ) { CTDecimalNumber numID = numPr.getNumId(); if ( numID == null ) { // numID can be null, ignore the numbering // see https://code.google.com/p/xdocreport/issues/detail?id=239 return null; } XWPFNum num = document.getNumbering().getNum( numID.getVal() ); return num; }
/** * setNumID of Paragraph * @param numPos */ public void setNumID(BigInteger numPos) { if(paragraph.getPPr()==null) paragraph.addNewPPr(); if(paragraph.getPPr().getNumPr()==null) paragraph.getPPr().addNewNumPr(); if(paragraph.getPPr().getNumPr().getNumId()==null){ paragraph.getPPr().getNumPr().addNewNumId(); } paragraph.getPPr().getNumPr().getNumId().setVal(numPos); }
protected XWPFNum getXWPFNum( CTNumPr numPr ) { CTDecimalNumber numID = numPr.getNumId(); if ( numID == null ) { // numID can be null, ignore the numbering // see https://code.google.com/p/xdocreport/issues/detail?id=239 return null; } XWPFNum num = document.getNumbering().getNum( numID.getVal() ); return num; }
/** * Returns Ilvl of the numeric style for this paragraph. * Returns null if this paragraph does not have numeric style. * * @return Ilvl as BigInteger */ public BigInteger getNumIlvl() { if (paragraph.getPPr() != null) { if (paragraph.getPPr().getNumPr() != null) { if (paragraph.getPPr().getNumPr().getIlvl() != null) { return paragraph.getPPr().getNumPr().getIlvl().getVal(); } } } return null; }
/** * setNumID of Paragraph * * @param numPos */ public void setNumID(BigInteger numPos) { if (paragraph.getPPr() == null) { paragraph.addNewPPr(); } if (paragraph.getPPr().getNumPr() == null) { paragraph.getPPr().addNewNumPr(); } if (paragraph.getPPr().getNumPr().getNumId() == null) { paragraph.getPPr().getNumPr().addNewNumId(); } paragraph.getPPr().getNumPr().getNumId().setVal(numPos); }
protected XWPFNum getXWPFNum( CTNumPr numPr ) { CTDecimalNumber numID = numPr.getNumId(); if ( numID == null ) { // numID can be null, ignore the numbering // see https://code.google.com/p/xdocreport/issues/detail?id=239 return null; } XWPFNum num = document.getNumbering().getNum( numID.getVal() ); return num; }
/** * If style exist for this paragraph * NumId of the paragraph will be returned. * If style not exist null will be returned * @return NumID as BigInteger */ public BigInteger getNumID(){ if(paragraph.getPPr()!=null){ if(paragraph.getPPr().getNumPr()!=null){ if(paragraph.getPPr().getNumPr().getNumId()!=null) return paragraph.getPPr().getNumPr().getNumId().getVal(); } } return null; }
/** * If style exist for this paragraph * NumId of the paragraph will be returned. * If style not exist null will be returned * * @return NumID as BigInteger */ public BigInteger getNumID() { if (paragraph.getPPr() != null) { if (paragraph.getPPr().getNumPr() != null) { if (paragraph.getPPr().getNumPr().getNumId() != null) { return paragraph.getPPr().getNumPr().getNumId().getVal(); } } } return null; }