Search in sources :

Example 26 with BooleanDefaultTrue

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

the class WordprocessingMLPackageRender method addBoldStyle.

/**
 *  本方法给可运行块属性添加粗体属性. BooleanDefaultTrue是设置b属性的Docx4j对象, 严格
 *  来说我们不需要将值设置为true, 因为这是它的默认值.
 */
public void addBoldStyle(RPr runProperties) {
    BooleanDefaultTrue b = new BooleanDefaultTrue();
    b.setVal(true);
    runProperties.setB(b);
}
Also used : BooleanDefaultTrue(org.docx4j.wml.BooleanDefaultTrue)

Example 27 with BooleanDefaultTrue

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

the class Docx4j_工具类_S3_Test method setParagraphSuppressLineNum.

/**
 * @Description: 设置段落是否禁止行号(禁止用于当前行号)
 */
public void setParagraphSuppressLineNum(P p) {
    PPr ppr = getPPr(p);
    BooleanDefaultTrue line = ppr.getSuppressLineNumbers();
    if (line == null) {
        line = new BooleanDefaultTrue();
    }
    line.setVal(true);
    ppr.setSuppressLineNumbers(line);
}
Also used : PPr(org.docx4j.wml.PPr) BooleanDefaultTrue(org.docx4j.wml.BooleanDefaultTrue)

Example 28 with BooleanDefaultTrue

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

the class TableWithStyledContent method addBoldStyle.

/**
 *  本方法给可运行块属性添加粗体属性. BooleanDefaultTrue是设置b属性的Docx4j对象, 严格
 *  来说我们不需要将值设置为true, 因为这是它的默认值.
 */
private static void addBoldStyle(RPr runProperties) {
    BooleanDefaultTrue b = new BooleanDefaultTrue();
    b.setVal(true);
    runProperties.setB(b);
}
Also used : BooleanDefaultTrue(org.docx4j.wml.BooleanDefaultTrue)

Aggregations

BooleanDefaultTrue (org.docx4j.wml.BooleanDefaultTrue)28 RPr (org.docx4j.wml.RPr)9 Color (org.docx4j.wml.Color)6 HpsMeasure (org.docx4j.wml.HpsMeasure)5 ObjectFactory (org.docx4j.wml.ObjectFactory)5 P (org.docx4j.wml.P)5 R (org.docx4j.wml.R)5 BigInteger (java.math.BigInteger)4 RFonts (org.docx4j.wml.RFonts)4 U (org.docx4j.wml.U)4 File (java.io.File)2 WordprocessingMLPackage (org.docx4j.openpackaging.packages.WordprocessingMLPackage)2 MainDocumentPart (org.docx4j.openpackaging.parts.WordprocessingML.MainDocumentPart)2 ParaRPr (org.docx4j.wml.ParaRPr)2 TcPr (org.docx4j.wml.TcPr)2 Text (org.docx4j.wml.Text)2 Inline (org.docx4j.dml.wordprocessingDrawing.Inline)1 BinaryPartAbstractImage (org.docx4j.openpackaging.parts.WordprocessingML.BinaryPartAbstractImage)1 CTShd (org.docx4j.wml.CTShd)1 Highlight (org.docx4j.wml.Highlight)1