Search in sources :

Example 11 with HpsMeasure

use of org.docx4j.wml.HpsMeasure in project docx4j-template by vindell.

the class ChangingTheStyleSheet method changeFontSize.

/**
 * Change the font size of the given run properties to the given value.
 *
 * @param runProperties
 * @param fontSize  Twice the size needed, as it is specified as half-point value
 */
private static void changeFontSize(RPr runProperties, int fontSize) {
    HpsMeasure size = new HpsMeasure();
    size.setVal(BigInteger.valueOf(fontSize));
    runProperties.setSz(size);
}
Also used : HpsMeasure(org.docx4j.wml.HpsMeasure)

Aggregations

HpsMeasure (org.docx4j.wml.HpsMeasure)11 BigInteger (java.math.BigInteger)9 BooleanDefaultTrue (org.docx4j.wml.BooleanDefaultTrue)5 RPr (org.docx4j.wml.RPr)5 Color (org.docx4j.wml.Color)4 RFonts (org.docx4j.wml.RFonts)4 U (org.docx4j.wml.U)4 CTShd (org.docx4j.wml.CTShd)1 CTSignedHpsMeasure (org.docx4j.wml.CTSignedHpsMeasure)1 Highlight (org.docx4j.wml.Highlight)1 ObjectFactory (org.docx4j.wml.ObjectFactory)1 P (org.docx4j.wml.P)1 ParaRPr (org.docx4j.wml.ParaRPr)1 R (org.docx4j.wml.R)1