use of org.openxmlformats.schemas.drawingml.x2006.main.CTTextTabStop in project poi by apache.
the class XSLFTextParagraph method getTabStop.
public double getTabStop(final int idx) {
ParagraphPropertyFetcher<Double> fetcher = new ParagraphPropertyFetcher<Double>(getIndentLevel()) {
public boolean fetch(CTTextParagraphProperties props) {
if (props.isSetTabLst()) {
CTTextTabStopList tabStops = props.getTabLst();
if (idx < tabStops.sizeOfTabArray()) {
CTTextTabStop ts = tabStops.getTabArray(idx);
double val = Units.toPoints(ts.getPos());
setValue(val);
return true;
}
}
return false;
}
};
fetchParagraphProperty(fetcher);
return fetcher.getValue() == null ? 0. : fetcher.getValue();
}
Aggregations