use of org.apache.poi.xslf.model.ParagraphPropertyFetcher in project poi by apache.
the class XSLFTextParagraph method getSpaceBefore.
@Override
public Double getSpaceBefore() {
ParagraphPropertyFetcher<Double> fetcher = new ParagraphPropertyFetcher<Double>(getIndentLevel()) {
public boolean fetch(CTTextParagraphProperties props) {
if (props.isSetSpcBef()) {
CTTextSpacing spc = props.getSpcBef();
if (spc.isSetSpcPct())
setValue(spc.getSpcPct().getVal() * 0.001);
else if (spc.isSetSpcPts())
setValue(-spc.getSpcPts().getVal() * 0.01);
return true;
}
return false;
}
};
fetchParagraphProperty(fetcher);
return fetcher.getValue();
}
Aggregations