use of org.openxmlformats.schemas.wordprocessingml.x2006.main.CTHpsMeasure in project poi by apache.
the class XWPFRun method setKerning.
public void setKerning(int kern) {
CTRPr pr = run.isSetRPr() ? run.getRPr() : run.addNewRPr();
CTHpsMeasure kernmes = pr.isSetKern() ? pr.getKern() : pr.addNewKern();
kernmes.setVal(BigInteger.valueOf(kern));
}
use of org.openxmlformats.schemas.wordprocessingml.x2006.main.CTHpsMeasure in project poi by apache.
the class XWPFRun method setFontSize.
/**
* Specifies the font size which shall be applied to all non complex script
* characters in the contents of this run when displayed.
* <p/>
* If this element is not present, the default value is to leave the value
* applied at previous level in the style hierarchy. If this element is
* never applied in the style hierarchy, then any appropriate font size may
* be used for non complex script characters.
* </p>
*
* @param size
*/
public void setFontSize(int size) {
BigInteger bint = new BigInteger("" + size);
CTRPr pr = run.isSetRPr() ? run.getRPr() : run.addNewRPr();
CTHpsMeasure ctSize = pr.isSetSz() ? pr.getSz() : pr.addNewSz();
ctSize.setVal(bint.multiply(new BigInteger("2")));
}
Aggregations