public boolean fetch(CTTextParagraphProperties props){ if(props.isSetBuSzPct()){ setValue(props.getBuSzPct().getVal() * 0.001); return true; } if(props.isSetBuSzPts()){ setValue( - props.getBuSzPts().getVal() * 0.01); return true; } return false; } };
public boolean fetch(CTTextParagraphProperties props){ if(props.isSetBuSzPct()){ setValue(props.getBuSzPct().getVal() * 0.001); return true; } if(props.isSetBuSzPts()){ setValue( - props.getBuSzPts().getVal() * 0.01); return true; } return false; } };
public XDDFBulletSize getBulletSize() { if (props.isSetBuSzPct()) { return new XDDFBulletSizePercent(props.getBuSzPct(), null); } else if (props.isSetBuSzPts()) { return new XDDFBulletSizePoints(props.getBuSzPts()); } else if (props.isSetBuSzTx()) { return new XDDFBulletSizeFollowText(props.getBuSzTx()); } else { return null; } }
/** * Sets the bullet size that is to be used within a paragraph. * This may be specified in two different ways, percentage spacing and font point spacing: * <p> * If bulletSize >= 0, then bulletSize is a percentage of the font size. * If bulletSize < 0, then it specifies the size in points * </p> */ @SuppressWarnings("WeakerAccess") public void setBulletFontSize(double bulletSize){ CTTextParagraphProperties pr = _p.isSetPPr() ? _p.getPPr() : _p.addNewPPr(); if(bulletSize >= 0) { CTTextBulletSizePercent pt = pr.isSetBuSzPct() ? pr.getBuSzPct() : pr.addNewBuSzPct(); pt.setVal((int)(bulletSize*1000)); if(pr.isSetBuSzPts()) pr.unsetBuSzPts(); } else { CTTextBulletSizePoint pt = pr.isSetBuSzPts() ? pr.getBuSzPts() : pr.addNewBuSzPts(); pt.setVal((int)(-bulletSize*100)); if(pr.isSetBuSzPct()) pr.unsetBuSzPct(); } }
/** * Sets the bullet size that is to be used within a paragraph. * This may be specified in two different ways, percentage spacing and font point spacing: * <p> * If bulletSize >= 0, then bulletSize is a percentage of the font size. * If bulletSize < 0, then it specifies the size in points * </p> */ public void setBulletFontSize(double bulletSize){ CTTextParagraphProperties pr = _p.isSetPPr() ? _p.getPPr() : _p.addNewPPr(); if(bulletSize >= 0) { // percentage CTTextBulletSizePercent pt = pr.isSetBuSzPct() ? pr.getBuSzPct() : pr.addNewBuSzPct(); pt.setVal((int)(bulletSize*1000)); // unset points if percentage is now set if(pr.isSetBuSzPts()) pr.unsetBuSzPts(); } else { // points CTTextBulletSizePoint pt = pr.isSetBuSzPts() ? pr.getBuSzPts() : pr.addNewBuSzPts(); pt.setVal((int)(-bulletSize*100)); // unset percentage if points is now set if(pr.isSetBuSzPct()) pr.unsetBuSzPct(); } }
public boolean fetch(CTTextParagraphProperties props){ if(props.isSetBuSzPct()){ setValue(props.getBuSzPct().getVal() * 0.001); return true; } if(props.isSetBuSzPts()){ setValue( - props.getBuSzPts().getVal() * 0.01); return true; } return false; } };
public boolean fetch(CTTextParagraphProperties props){ if(props.isSetBuSzPct()){ setValue(props.getBuSzPct().getVal() * 0.001); return true; } if(props.isSetBuSzPts()){ setValue( - props.getBuSzPts().getVal() * 0.01); return true; } return false; } };
public boolean fetch(CTTextParagraphProperties props){ if(props.isSetBuSzPct()){ setValue(props.getBuSzPct().getVal() * 0.001); return true; } if(props.isSetBuSzPts()){ setValue( - props.getBuSzPts().getVal() * 0.01); return true; } return false; } };
public XDDFBulletSize getBulletSize() { if (props.isSetBuSzPct()) { return new XDDFBulletSizePercent(props.getBuSzPct(), null); } else if (props.isSetBuSzPts()) { return new XDDFBulletSizePoints(props.getBuSzPts()); } else if (props.isSetBuSzTx()) { return new XDDFBulletSizeFollowText(props.getBuSzTx()); } else { return null; } }
/** * Sets the bullet size that is to be used within a paragraph. * This may be specified in two different ways, percentage spacing and font point spacing: * <p> * If bulletSize >= 0, then bulletSize is a percentage of the font size. * If bulletSize < 0, then it specifies the size in points * </p> * * @return the bullet size */ public void setBulletFontSize(double bulletSize){ CTTextParagraphProperties pr = _p.isSetPPr() ? _p.getPPr() : _p.addNewPPr(); if(bulletSize >= 0) { CTTextBulletSizePercent pt = pr.isSetBuSzPct() ? pr.getBuSzPct() : pr.addNewBuSzPct(); pt.setVal((int)(bulletSize*1000)); if(pr.isSetBuSzPts()) pr.unsetBuSzPts(); } else { CTTextBulletSizePoint pt = pr.isSetBuSzPts() ? pr.getBuSzPts() : pr.addNewBuSzPts(); pt.setVal((int)(-bulletSize*100)); if(pr.isSetBuSzPct()) pr.unsetBuSzPct(); } }
/** * Sets the bullet size that is to be used within a paragraph. * This may be specified in two different ways, percentage spacing and font point spacing: * <p> * If bulletSize >= 0, then bulletSize is a percentage of the font size. * If bulletSize < 0, then it specifies the size in points * </p> */ @SuppressWarnings("WeakerAccess") public void setBulletFontSize(double bulletSize){ CTTextParagraphProperties pr = _p.isSetPPr() ? _p.getPPr() : _p.addNewPPr(); if(bulletSize >= 0) { CTTextBulletSizePercent pt = pr.isSetBuSzPct() ? pr.getBuSzPct() : pr.addNewBuSzPct(); pt.setVal((int)(bulletSize*1000)); if(pr.isSetBuSzPts()) pr.unsetBuSzPts(); } else { CTTextBulletSizePoint pt = pr.isSetBuSzPts() ? pr.getBuSzPts() : pr.addNewBuSzPts(); pt.setVal((int)(-bulletSize*100)); if(pr.isSetBuSzPct()) pr.unsetBuSzPct(); } }
/** * Sets the bullet size that is to be used within a paragraph. * This may be specified in two different ways, percentage spacing and font point spacing: * <p> * If bulletSize >= 0, then bulletSize is a percentage of the font size. * If bulletSize < 0, then it specifies the size in points * </p> */ public void setBulletFontSize(double bulletSize){ CTTextParagraphProperties pr = _p.isSetPPr() ? _p.getPPr() : _p.addNewPPr(); if(bulletSize >= 0) { // percentage CTTextBulletSizePercent pt = pr.isSetBuSzPct() ? pr.getBuSzPct() : pr.addNewBuSzPct(); pt.setVal((int)(bulletSize*1000)); // unset points if percentage is now set if(pr.isSetBuSzPts()) pr.unsetBuSzPts(); } else { // points CTTextBulletSizePoint pt = pr.isSetBuSzPts() ? pr.getBuSzPts() : pr.addNewBuSzPts(); pt.setVal((int)(-bulletSize*100)); // unset percentage if points is now set if(pr.isSetBuSzPct()) pr.unsetBuSzPct(); } }