public XDDFRunProperties getDefaultRunProperties() { if (props.isSetDefRPr()) { return new XDDFRunProperties(props.getDefRPr()); } else { return null; } }
private <R> Optional<R> findDefinedRunProperty(Function<CTTextCharacterProperties, Boolean> isSet, Function<CTTextCharacterProperties, R> getter, int level) { final CTTextCharacterProperties props = _p.getPPr().isSetDefRPr() ? _p.getPPr().getDefRPr() : null; if (props != null && isSet.apply(props)) { return Optional.ofNullable(getter.apply(props)); } else { return _parent.findDefinedRunProperty(isSet, getter, level); } } }
public abstract boolean fetch(CTTextCharacterProperties props);
@Internal protected <R> Optional<R> findDefinedRunProperty(Function<CTTextCharacterProperties, Boolean> isSet, Function<CTTextCharacterProperties, R> getter, int level) { if (_body.isSetLstStyle() && level >= 0) { CTTextListStyle list = _body.getLstStyle(); CTTextParagraphProperties props = level == 0 ? list.getDefPPr() : retrieveProperties(list, level); if (props != null && props.isSetDefRPr() && isSet.apply(props.getDefRPr())) { return Optional.of(getter.apply(props.getDefRPr())); } else { return findDefinedRunProperty(isSet, getter, level - 1); } } else if (_parent != null) { return _parent.findDefinedRunProperty(isSet, getter); } else { return Optional.empty(); } }
@Override public Double getDefaultFontSize() { CTTextCharacterProperties endPr = _p.getEndParaRPr(); if (endPr == null || !endPr.isSetSz()) { // inherit the font size from the master style CTTextParagraphProperties masterStyle = getDefaultMasterStyle(); if (masterStyle != null) { endPr = masterStyle.getDefRPr(); } } return (endPr == null || !endPr.isSetSz()) ? 12 : (endPr.getSz() / 100.); }
public XDDFRunProperties getDefaultRunProperties() { if (props.isSetDefRPr()) { return new XDDFRunProperties(props.getDefRPr()); } else { return null; } }
private <R> Optional<R> findDefinedRunProperty(Function<CTTextCharacterProperties, Boolean> isSet, Function<CTTextCharacterProperties, R> getter, int level) { final CTTextCharacterProperties props = _p.getPPr().isSetDefRPr() ? _p.getPPr().getDefRPr() : null; if (props != null && isSet.apply(props)) { return Optional.ofNullable(getter.apply(props)); } else { return _parent.findDefinedRunProperty(isSet, getter, level); } } }
public abstract boolean fetch(CTTextCharacterProperties props);
public abstract boolean fetch(CTTextCharacterProperties props);
@Internal protected <R> Optional<R> findDefinedRunProperty(Function<CTTextCharacterProperties, Boolean> isSet, Function<CTTextCharacterProperties, R> getter, int level) { if (_body.isSetLstStyle() && level >= 0) { CTTextListStyle list = _body.getLstStyle(); CTTextParagraphProperties props = level == 0 ? list.getDefPPr() : retrieveProperties(list, level); if (props != null && props.isSetDefRPr() && isSet.apply(props.getDefRPr())) { return Optional.of(getter.apply(props.getDefRPr())); } else { return findDefinedRunProperty(isSet, getter, level - 1); } } else if (_parent != null) { return _parent.findDefinedRunProperty(isSet, getter); } else { return Optional.empty(); } }
@Override public Double getDefaultFontSize() { CTTextCharacterProperties endPr = _p.getEndParaRPr(); if (endPr == null || !endPr.isSetSz()) { // inherit the font size from the master style CTTextParagraphProperties masterStyle = getDefaultMasterStyle(); if (masterStyle != null) { endPr = masterStyle.getDefRPr(); } } return (endPr == null || !endPr.isSetSz()) ? 12 : (endPr.getSz() / 100.); }