Example usage for org.apache.poi.xwpf.usermodel LineSpacingRule valueOf

List of usage examples for org.apache.poi.xwpf.usermodel LineSpacingRule valueOf

Introduction

In this page you can find the example usage for org.apache.poi.xwpf.usermodel LineSpacingRule valueOf.

Prototype

public static LineSpacingRule valueOf(int type) 

Source Link

Usage

From source file:apachepoitest.XWPFParagraphClone.java

License:Apache License

/**
 * Specifies how the spacing between lines is calculated as stored in the
 * line attribute. If this attribute is omitted, then it shall be assumed to
 * be of a value auto if a line attribute value is present.
 *
 * @return rule/*from  w w  w  . j  av  a2 s.co m*/
 * @see LineSpacingRule
 * @see #setSpacingLineRule(LineSpacingRule)
 */
public LineSpacingRule getSpacingLineRule() {
    CTSpacing spacing = getCTSpacing(false);
    return (spacing != null && spacing.isSetLineRule())
            ? LineSpacingRule.valueOf(spacing.getLineRule().intValue())
            : LineSpacingRule.AUTO;
}