/** * set the escapement type for the font * * @param escapementType super or subscript option * @see #SS_NONE * @see #SS_SUPER * @see #SS_SUB */ @Override public void setEscapementType(short escapementType){ _font.setVertAlignArray(null); if(escapementType != SS_NONE){ _font.addNewVertAlign().setVal(STVerticalAlignRun.Enum.forInt(escapementType + 1)); } }
/** * set normal,super or subscript, that representing the vertical-alignment setting. * Setting this to either subscript or superscript shall make the font size smaller if a * smaller font size is available. * * @param offset - offset type to use (none,super,sub) * @see #SS_NONE * @see #SS_SUPER * @see #SS_SUB */ public void setTypeOffset(short offset) { if(offset == Font.SS_NONE){ _ctFont.setVertAlignArray(null); } else { CTVerticalAlignFontProperty offsetProperty = _ctFont.sizeOfVertAlignArray() == 0 ? _ctFont.addNewVertAlign() : _ctFont.getVertAlignArray(0); switch (offset) { case Font.SS_NONE: offsetProperty.setVal(STVerticalAlignRun.BASELINE); break; case Font.SS_SUB: offsetProperty.setVal(STVerticalAlignRun.SUBSCRIPT); break; case Font.SS_SUPER: offsetProperty.setVal(STVerticalAlignRun.SUPERSCRIPT); break; default: throw new IllegalStateException("Invalid type offset: " + offset); } } }
if(pr.sizeOfCondenseArray() > 0) ctFont.addNewCondense().setVal(pr.getCondenseArray(0).getVal()); if(pr.sizeOfExtendArray() > 0) ctFont.addNewExtend().setVal(pr.getExtendArray(0).getVal()); if(pr.sizeOfVertAlignArray() > 0) ctFont.addNewVertAlign().setVal(pr.getVertAlignArray(0).getVal()); if(pr.sizeOfOutlineArray() > 0) ctFont.addNewOutline().setVal(pr.getOutlineArray(0).getVal()); if(pr.sizeOfShadowArray() > 0) ctFont.addNewShadow().setVal(pr.getShadowArray(0).getVal());
/** * set the escapement type for the font * * @param escapementType super or subscript option * @see #SS_NONE * @see #SS_SUPER * @see #SS_SUB */ @Override public void setEscapementType(short escapementType){ _font.setVertAlignArray(null); if(escapementType != SS_NONE){ _font.addNewVertAlign().setVal(STVerticalAlignRun.Enum.forInt(escapementType + 1)); } }
/** * set the escapement type for the font * * @param escapementType super or subscript option * @see #SS_NONE * @see #SS_SUPER * @see #SS_SUB */ public void setEscapementType(short escapementType){ _font.setVertAlignArray(null); if(escapementType != SS_NONE){ _font.addNewVertAlign().setVal(STVerticalAlignRun.Enum.forInt(escapementType + 1)); } }
/** * set normal,super or subscript, that representing the vertical-alignment setting. * Setting this to either subscript or superscript shall make the font size smaller if a * smaller font size is available. * * @param offset - offset type to use (none,super,sub) * @see #SS_NONE * @see #SS_SUPER * @see #SS_SUB */ public void setTypeOffset(short offset) { if(offset == Font.SS_NONE){ _ctFont.setVertAlignArray(null); } else { CTVerticalAlignFontProperty offsetProperty = _ctFont.sizeOfVertAlignArray() == 0 ? _ctFont.addNewVertAlign() : _ctFont.getVertAlignArray(0); switch (offset) { case Font.SS_NONE: offsetProperty.setVal(STVerticalAlignRun.BASELINE); break; case Font.SS_SUB: offsetProperty.setVal(STVerticalAlignRun.SUBSCRIPT); break; case Font.SS_SUPER: offsetProperty.setVal(STVerticalAlignRun.SUPERSCRIPT); break; default: throw new IllegalStateException("Invalid type offset: " + offset); } } }
/** * set normal,super or subscript, that representing the vertical-alignment setting. * Setting this to either subscript or superscript shall make the font size smaller if a * smaller font size is available. * * @param offset - offset type to use (none,super,sub) * @see #SS_NONE * @see #SS_SUPER * @see #SS_SUB */ public void setTypeOffset(short offset) { if(offset == Font.SS_NONE){ _ctFont.setVertAlignArray(null); } else { CTVerticalAlignFontProperty offsetProperty = _ctFont.sizeOfVertAlignArray() == 0 ? _ctFont.addNewVertAlign() : _ctFont.getVertAlignArray(0); switch (offset) { case Font.SS_NONE: offsetProperty.setVal(STVerticalAlignRun.BASELINE); break; case Font.SS_SUB: offsetProperty.setVal(STVerticalAlignRun.SUBSCRIPT); break; case Font.SS_SUPER: offsetProperty.setVal(STVerticalAlignRun.SUPERSCRIPT); break; } } }
if(pr.sizeOfCondenseArray() > 0) ctFont.addNewCondense().setVal(pr.getCondenseArray(0).getVal()); if(pr.sizeOfExtendArray() > 0) ctFont.addNewExtend().setVal(pr.getExtendArray(0).getVal()); if(pr.sizeOfVertAlignArray() > 0) ctFont.addNewVertAlign().setVal(pr.getVertAlignArray(0).getVal()); if(pr.sizeOfOutlineArray() > 0) ctFont.addNewOutline().setVal(pr.getOutlineArray(0).getVal()); if(pr.sizeOfShadowArray() > 0) ctFont.addNewShadow().setVal(pr.getShadowArray(0).getVal());
if(pr.sizeOfCondenseArray() > 0) ctFont.addNewCondense().setVal(pr.getCondenseArray(0).getVal()); if(pr.sizeOfExtendArray() > 0) ctFont.addNewExtend().setVal(pr.getExtendArray(0).getVal()); if(pr.sizeOfVertAlignArray() > 0) ctFont.addNewVertAlign().setVal(pr.getVertAlignArray(0).getVal()); if(pr.sizeOfOutlineArray() > 0) ctFont.addNewOutline().setVal(pr.getOutlineArray(0).getVal()); if(pr.sizeOfShadowArray() > 0) ctFont.addNewShadow().setVal(pr.getShadowArray(0).getVal());