public int getFontSize() { if (rpr.isSetSz()) return rpr.getSz().getVal().intValue() / 2; return -1; } }
/** * Specifies the font size which shall be applied to all non complex script * characters in the contents of this run when displayed. * * @return value representing the font size */ @Override public int getFontSize() { CTRPr pr = getRunProperties(false); return (pr != null && pr.isSetSz()) ? pr.getSz().getVal().divide(new BigInteger("2")).intValue() : -1; }
/** * Specifies the font size which shall be applied to all non complex script * characters in the contents of this run when displayed. * <p> * If this element is not present, the default value is to leave the value * applied at previous level in the style hierarchy. If this element is * never applied in the style hierarchy, then any appropriate font size may * be used for non complex script characters. * </p> * * @param size The font size as number of point measurements. */ @Override public void setFontSize(int size) { BigInteger bint = new BigInteger(Integer.toString(size)); CTRPr pr = getRunProperties(true); CTHpsMeasure ctSize = pr.isSetSz() ? pr.getSz() : pr.addNewSz(); ctSize.setVal(bint.multiply(new BigInteger("2"))); }
/** * Specifies the font size which shall be applied to all non complex script * characters in the contents of this run when displayed. * * @return value representing the font size */ @Override public int getFontSize() { CTRPr pr = getRunProperties(false); return (pr != null && pr.isSetSz()) ? pr.getSz().getVal().divide(new BigInteger("2")).intValue() : -1; }
public int getFontSize() { if (rpr.isSetSz()) return rpr.getSz().getVal().intValue() / 2; return -1; } }
/** * Specifies the font size which shall be applied to all non complex script * characters in the contents of this run when displayed. * * @return value representing the font size */ public int getFontSize() { CTRPr pr = run.getRPr(); return (pr != null && pr.isSetSz()) ? pr.getSz().getVal().divide(new BigInteger("2")).intValue() : -1; }
@Override public Float getValue( CTRPr pr, XWPFStylesDocument stylesDocument ) { return ( pr != null && pr.isSetSz() ) ? pr.getSz().getVal().divide( new BigInteger( "2" ) ).floatValue() : null; }
@Override public Float getValue( CTRPr pr, XWPFStylesDocument document ) { return ( pr != null && pr.isSetSz() ) ? pr.getSz().getVal().divide( new BigInteger( "2" ) ).floatValue() : null; }
@Override public Float getValue( CTRPr pr, XWPFStylesDocument document ) { return ( pr != null && pr.isSetSz() ) ? pr.getSz().getVal().divide( new BigInteger( "2" ) ).floatValue() : null; }
@Override public Float getValue( CTRPr pr, XWPFStylesDocument stylesDocument ) { return ( pr != null && pr.isSetSz() ) ? pr.getSz().getVal().divide( new BigInteger( "2" ) ).floatValue() : null; }
/** * Specifies the font size which shall be applied to all non complex script * characters in the contents of this run when displayed. * <p> * If this element is not present, the default value is to leave the value * applied at previous level in the style hierarchy. If this element is * never applied in the style hierarchy, then any appropriate font size may * be used for non complex script characters. * </p> * * @param size The font size as number of point measurements. */ @Override public void setFontSize(int size) { BigInteger bint = new BigInteger(Integer.toString(size)); CTRPr pr = getRunProperties(true); CTHpsMeasure ctSize = pr.isSetSz() ? pr.getSz() : pr.addNewSz(); ctSize.setVal(bint.multiply(new BigInteger("2"))); }
/** * Specifies the font size which shall be applied to all non complex script * characters in the contents of this run when displayed. * <p/> * If this element is not present, the default value is to leave the value * applied at previous level in the style hierarchy. If this element is * never applied in the style hierarchy, then any appropriate font size may * be used for non complex script characters. * </p> * * @param size */ public void setFontSize(int size) { BigInteger bint=new BigInteger(""+size); CTRPr pr = run.isSetRPr() ? run.getRPr() : run.addNewRPr(); CTHpsMeasure ctSize = pr.isSetSz() ? pr.getSz() : pr.addNewSz(); ctSize.setVal(bint.multiply(new BigInteger("2"))); }