/** * @return whether this run of text is formatted as capitalized text. */ public boolean isCapitals() { return findDefinedProperty(props -> props.isSetCap(), props -> props.getCap()) .map(caps -> caps != STTextCapsType.NONE) .orElse(false); }
/** * @return which caps style this run of text is formatted with. */ public CapsType getCapitals() { return findDefinedProperty(props -> props.isSetCap(), props -> props.getCap()) .map(caps -> CapsType.valueOf(caps)) .orElse(null); }
public void setCapitals(CapsType caps) { if (caps == null) { if (props.isSetCap()) { props.unsetCap(); } } else { props.setCap(caps.underlying); } }
@Override public boolean fetch(CTTextCharacterProperties props){ if (props != null && props.isSetCap()) { int idx = props.getCap().intValue() - 1; setValue(TextCap.values()[idx]); return true; } return false; } };
/** * @return whether a run of text will be formatted as a superscript text. Default is false. */ public TextCap getTextCap() { CTTextCharacterProperties rPr = getRPr(); if(rPr.isSetCap()){ return TextCap.values()[rPr.getCap().intValue() - 1]; } return TextCap.NONE; }
/** * @return whether this run of text is formatted as capitalized text. */ public boolean isCapitals() { return findDefinedProperty(props -> props.isSetCap(), props -> props.getCap()) .map(caps -> caps != STTextCapsType.NONE) .orElse(false); }
public void setCapitals(CapsType caps) { if (caps == null) { if (props.isSetCap()) { props.unsetCap(); } } else { props.setCap(caps.underlying); } }
/** * @return which caps style this run of text is formatted with. */ public CapsType getCapitals() { return findDefinedProperty(props -> props.isSetCap(), props -> props.getCap()) .map(caps -> CapsType.valueOf(caps)) .orElse(null); }
/** * @return whether a run of text will be formatted as a superscript text. Default is false. */ public TextCap getTextCap() { CTTextCharacterProperties rPr = getRPr(); if(rPr.isSetCap()){ return TextCap.values()[rPr.getCap().intValue() - 1]; } return TextCap.NONE; }
@Override public boolean fetch(CTTextCharacterProperties props){ if (props != null && props.isSetCap()) { int idx = props.getCap().intValue() - 1; setValue(TextCap.values()[idx]); return true; } return false; } };
public boolean fetch(CTTextCharacterProperties props){ if(props.isSetCap()){ int idx = props.getCap().intValue() - 1; setValue(TextCap.values()[idx]); return true; } return false; } };