use of org.docx4j.wml.PPr 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);
}
use of org.docx4j.wml.PPr in project docx4j-template by vindell.
the class Docx4j_工具类_S3_Test method setParaJcAlign.
/**
* @Description: 设置段落水平对齐方式
*/
public void setParaJcAlign(P paragraph, JcEnumeration hAlign) {
if (hAlign != null) {
PPr pprop = paragraph.getPPr();
if (pprop == null) {
pprop = new PPr();
paragraph.setPPr(pprop);
}
Jc align = new Jc();
align.setVal(hAlign);
pprop.setJc(align);
}
}
use of org.docx4j.wml.PPr in project docx4j-template by vindell.
the class HtmlToDOCDemo method setWmlPprSetting.
public static void setWmlPprSetting(Object source, List<Object> targetList) {
PPr sourcePpr = getWmlObjectPpr(source);
if (sourcePpr != null) {
for (int i = 0, iSize = targetList.size(); i < iSize; i++) {
PPr ppr = getWmlObjectPpr(targetList.get(i));
if (ppr != null) {
ppr.setInd(sourcePpr.getInd());
ppr.setSpacing(sourcePpr.getSpacing());
}
}
}
// sourcePpr.getSpacing()
}
Aggregations