/** * Returns the vertical line spacing that is to be used within a paragraph. * This may be specified in two different ways, percentage spacing or font * points spacing: * <p> * If line spacing is a percentage of normal line height, result is instance * of XDDFSpacingPercent. If line spacing is expressed in points, result is * instance of XDDFSpacingPoints. * </p> * * @return the vertical line spacing. */ public XDDFSpacing getLineSpacing() { return findDefinedParagraphProperty(props -> props.isSetLnSpc(), props -> props.getLnSpc()) .map(spacing -> extractSpacing(spacing)).orElse(null); }
public boolean fetch(CTTextParagraphProperties props){ if(props.isSetLnSpc()){ CTTextSpacing spc = props.getLnSpc(); if(spc.isSetSpcPct()) setValue( spc.getSpcPct().getVal()*0.001 ); else if (spc.isSetSpcPts()) setValue( -spc.getSpcPts().getVal()*0.01 ); return true; } return false; } };
/** * Returns the vertical line spacing that is to be used within a paragraph. * This may be specified in two different ways, percentage spacing or font * points spacing: * <p> * If line spacing is a percentage of normal line height, result is instance * of XDDFSpacingPercent. If line spacing is expressed in points, result is * instance of XDDFSpacingPoints. * </p> * * @return the vertical line spacing. */ public XDDFSpacing getLineSpacing() { return findDefinedParagraphProperty(props -> props.isSetLnSpc(), props -> props.getLnSpc()) .map(spacing -> extractSpacing(spacing)).orElse(null); }
public boolean fetch(CTTextParagraphProperties props){ if(props.isSetLnSpc()){ CTTextSpacing spc = props.getLnSpc(); if(spc.isSetSpcPct()) setValue( spc.getSpcPct().getVal()*0.001 ); else if (spc.isSetSpcPts()) setValue( -spc.getSpcPts().getVal()*0.01 ); return true; } return false; } };
public boolean fetch(CTTextParagraphProperties props){ if(props.isSetLnSpc()){ CTTextSpacing spc = props.getLnSpc(); if(spc.isSetSpcPct()) setValue( spc.getSpcPct().getVal()*0.001 ); else if (spc.isSetSpcPts()) setValue( -spc.getSpcPts().getVal()*0.01 ); return true; } return false; } };