Java Code Examples for org.docx4j.wml.PPr#getSuppressLineNumbers()

The following examples show how to use org.docx4j.wml.PPr#getSuppressLineNumbers() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: WmlElementUtils.java    From docx4j-template with Apache License 2.0 5 votes vote down vote up
/**
 * @Description: 设置段落是否禁止行号(禁止用于当前行号)
 */
public static void setParagraphSuppressLineNum(P p) {
    PPr ppr = getPPr(p);
    BooleanDefaultTrue line = ppr.getSuppressLineNumbers();
    if (line == null) {
        line = new BooleanDefaultTrue();
    }
    line.setVal(true);
    ppr.setSuppressLineNumbers(line);
}
 
Example 2
Source File: Docx4j_工具类_S3_Test.java    From docx4j-template with Apache License 2.0 5 votes vote down vote up
/**
 * @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);
}