Search in sources :

Example 21 with BooleanDefaultTrue

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

the class Docx4j_工具类_S3_Test method addRPrBoldStyle.

/**
 * @Description: 加粗
 */
public void addRPrBoldStyle(RPr runProperties) {
    BooleanDefaultTrue b = new BooleanDefaultTrue();
    b.setVal(true);
    runProperties.setB(b);
}
Also used : BooleanDefaultTrue(org.docx4j.wml.BooleanDefaultTrue)

Example 22 with BooleanDefaultTrue

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

the class Docx4j_工具类_S3_Test method addRPrItalicStyle.

/**
 * @Description: 倾斜
 */
public void addRPrItalicStyle(RPr runProperties) {
    BooleanDefaultTrue b = new BooleanDefaultTrue();
    b.setVal(true);
    runProperties.setI(b);
}
Also used : BooleanDefaultTrue(org.docx4j.wml.BooleanDefaultTrue)

Example 23 with BooleanDefaultTrue

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

the class Docx4j_工具类_S3_Test method setParaVanish.

public void setParaVanish(PPr ppr, boolean isVanish) {
    ParaRPr parRpr = getParaRPr(ppr);
    BooleanDefaultTrue vanish = parRpr.getVanish();
    if (vanish != null) {
        vanish.setVal(isVanish);
    } else {
        vanish = new BooleanDefaultTrue();
        parRpr.setVanish(vanish);
        vanish.setVal(isVanish);
    }
}
Also used : ParaRPr(org.docx4j.wml.ParaRPr) BooleanDefaultTrue(org.docx4j.wml.BooleanDefaultTrue)

Example 24 with BooleanDefaultTrue

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

the class Docx4j_工具类_S3_Test method addRPrStrikeStyle.

/**
 * @Description: 设置删除线样式
 */
public void addRPrStrikeStyle(RPr runProperties, boolean isStrike, boolean isDStrike) {
    // 删除线
    if (isStrike) {
        BooleanDefaultTrue strike = new BooleanDefaultTrue();
        strike.setVal(true);
        runProperties.setStrike(strike);
    }
    // 双删除线
    if (isDStrike) {
        BooleanDefaultTrue dStrike = new BooleanDefaultTrue();
        dStrike.setVal(true);
        runProperties.setDstrike(dStrike);
    }
}
Also used : BooleanDefaultTrue(org.docx4j.wml.BooleanDefaultTrue)

Example 25 with BooleanDefaultTrue

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

the class Docx4j_工具类_S3_Test method addRPrImprintStyle.

/**
 * @Description: 阴文
 */
public void addRPrImprintStyle(RPr runProperties) {
    BooleanDefaultTrue imprint = new BooleanDefaultTrue();
    imprint.setVal(true);
    runProperties.setImprint(imprint);
}
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