/** * * @return the line end cap style */ @SuppressWarnings("WeakerAccess") public LineCap getLineCap() { PropertyFetcher<LineCap> fetcher = new PropertyFetcher<LineCap>() { @Override public boolean fetch(XSLFShape shape) { CTLineProperties ln = getLn(shape, false); if (ln != null && ln.isSetCap()) { setValue(LineCap.fromOoxmlId(ln.getCap().intValue())); return true; } return false; } }; fetchShapeProperty(fetcher); LineCap cap = fetcher.getValue(); if (cap == null) { CTLineProperties defaultLn = getDefaultLineProperties(); if (defaultLn != null && defaultLn.isSetCap()) { cap = LineCap.fromOoxmlId(defaultLn.getCap().intValue()); } } return cap; }
@Override public boolean fetch(XSLFShape shape) { CTLineProperties ln = getLn(shape, false); if (ln != null && ln.isSetCap()) { setValue(LineCap.fromOoxmlId(ln.getCap().intValue())); return true; } return false; } };
@SuppressWarnings("WeakerAccess") public LineCap getBorderCap(BorderEdge edge) { CTLineProperties ln = getCTLine(edge, false); if (ln == null || ln.isSetNoFill() || !ln.isSetSolidFill() || !ln.isSetCap()) { return null; } return LineCap.fromOoxmlId(ln.getCap().intValue()); }
/** * * @return the line end cap style */ @SuppressWarnings("WeakerAccess") public LineCap getLineCap() { PropertyFetcher<LineCap> fetcher = new PropertyFetcher<LineCap>() { @Override public boolean fetch(XSLFShape shape) { CTLineProperties ln = getLn(shape, false); if (ln != null && ln.isSetCap()) { setValue(LineCap.fromOoxmlId(ln.getCap().intValue())); return true; } return false; } }; fetchShapeProperty(fetcher); LineCap cap = fetcher.getValue(); if (cap == null) { CTLineProperties defaultLn = getDefaultLineProperties(); if (defaultLn != null && defaultLn.isSetCap()) { cap = LineCap.fromOoxmlId(defaultLn.getCap().intValue()); } } return cap; }
@Override public boolean fetch(XSLFShape shape) { CTLineProperties ln = getLn(shape, false); if (ln != null && ln.isSetCap()) { setValue(LineCap.fromOoxmlId(ln.getCap().intValue())); return true; } return false; } };
@SuppressWarnings("WeakerAccess") public LineCap getBorderCap(BorderEdge edge) { CTLineProperties ln = getCTLine(edge, false); if (ln == null || ln.isSetNoFill() || !ln.isSetSolidFill() || !ln.isSetCap()) { return null; } return LineCap.fromOoxmlId(ln.getCap().intValue()); }