/** * Returns the bullet size that is to be used within a paragraph. This may * be specified in three different ways, follows text size, percentage size * and font points size: * <p> * If returned value is instance of XDDFBulletSizeFollowText, then bullet * size is text size; If returned value is instance of * XDDFBulletSizePercent, then bullet size is a percentage of the font size; * If returned value is instance of XDDFBulletSizePoints, then bullet size * is specified in points. * </p> * * @return the bullet size */ public XDDFBulletSize getBulletSize() { return findDefinedParagraphProperty( props -> props.isSetBuSzPct() || props.isSetBuSzPts() || props.isSetBuSzTx(), props -> new XDDFParagraphBulletProperties(props).getBulletSize()).orElse(null); }
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; } }
public void setBulletSize(XDDFBulletSize size) { if (props.isSetBuSzPct()) { props.unsetBuSzPct(); } if (props.isSetBuSzPts()) { props.unsetBuSzPts(); } if (props.isSetBuSzTx()) { props.unsetBuSzTx(); } if (size != null) { if (size instanceof XDDFBulletSizeFollowText) { props.setBuSzTx(((XDDFBulletSizeFollowText) size).getXmlObject()); } else if (size instanceof XDDFBulletSizePercent) { props.setBuSzPct(((XDDFBulletSizePercent) size).getXmlObject()); } else if (size instanceof XDDFBulletSizePoints) { props.setBuSzPts(((XDDFBulletSizePoints) size).getXmlObject()); } } }
props.unsetBuSzPts(); if (props.isSetBuSzTx()) { props.unsetBuSzTx();
/** * * @param flag whether text in this paragraph has bullets */ public void setBullet(boolean flag) { if(isBullet() == flag) return; CTTextParagraphProperties pr = _p.isSetPPr() ? _p.getPPr() : _p.addNewPPr(); if(flag) { pr.addNewBuFont().setTypeface("Arial"); pr.addNewBuChar().setChar("\u2022"); } else { if (pr.isSetBuFont()) pr.unsetBuFont(); if (pr.isSetBuChar()) pr.unsetBuChar(); if (pr.isSetBuAutoNum()) pr.unsetBuAutoNum(); if (pr.isSetBuBlip()) pr.unsetBuBlip(); if (pr.isSetBuClr()) pr.unsetBuClr(); if (pr.isSetBuClrTx()) pr.unsetBuClrTx(); if (pr.isSetBuFont()) pr.unsetBuFont(); if (pr.isSetBuFontTx()) pr.unsetBuFontTx(); if (pr.isSetBuSzPct()) pr.unsetBuSzPct(); if (pr.isSetBuSzPts()) pr.unsetBuSzPts(); if (pr.isSetBuSzTx()) pr.unsetBuSzTx(); pr.addNewBuNone(); } }
/** * Set or unset this paragraph as a bullet point * * @param flag whether text in this paragraph has bullets */ public void setBullet(boolean flag) { if(isBullet() == flag) return; CTTextParagraphProperties pr = _p.isSetPPr() ? _p.getPPr() : _p.addNewPPr(); if(!flag) { pr.addNewBuNone(); if(pr.isSetBuAutoNum()) pr.unsetBuAutoNum(); if(pr.isSetBuBlip()) pr.unsetBuBlip(); if(pr.isSetBuChar()) pr.unsetBuChar(); if(pr.isSetBuClr()) pr.unsetBuClr(); if(pr.isSetBuClrTx()) pr.unsetBuClrTx(); if(pr.isSetBuFont()) pr.unsetBuFont(); if(pr.isSetBuFontTx()) pr.unsetBuFontTx(); if(pr.isSetBuSzPct()) pr.unsetBuSzPct(); if(pr.isSetBuSzPts()) pr.unsetBuSzPts(); if(pr.isSetBuSzTx()) pr.unsetBuSzTx(); } else { if(pr.isSetBuNone()) pr.unsetBuNone(); if(!pr.isSetBuFont()) pr.addNewBuFont().setTypeface("Arial"); if(!pr.isSetBuAutoNum()) pr.addNewBuChar().setChar("\u2022"); } }
/** * Returns the bullet size that is to be used within a paragraph. This may * be specified in three different ways, follows text size, percentage size * and font points size: * <p> * If returned value is instance of XDDFBulletSizeFollowText, then bullet * size is text size; If returned value is instance of * XDDFBulletSizePercent, then bullet size is a percentage of the font size; * If returned value is instance of XDDFBulletSizePoints, then bullet size * is specified in points. * </p> * * @return the bullet size */ public XDDFBulletSize getBulletSize() { return findDefinedParagraphProperty( props -> props.isSetBuSzPct() || props.isSetBuSzPts() || props.isSetBuSzTx(), props -> new XDDFParagraphBulletProperties(props).getBulletSize()).orElse(null); }
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; } }
public void setBulletSize(XDDFBulletSize size) { if (props.isSetBuSzPct()) { props.unsetBuSzPct(); } if (props.isSetBuSzPts()) { props.unsetBuSzPts(); } if (props.isSetBuSzTx()) { props.unsetBuSzTx(); } if (size != null) { if (size instanceof XDDFBulletSizeFollowText) { props.setBuSzTx(((XDDFBulletSizeFollowText) size).getXmlObject()); } else if (size instanceof XDDFBulletSizePercent) { props.setBuSzPct(((XDDFBulletSizePercent) size).getXmlObject()); } else if (size instanceof XDDFBulletSizePoints) { props.setBuSzPts(((XDDFBulletSizePoints) size).getXmlObject()); } } }
props.unsetBuSzPts(); if (props.isSetBuSzTx()) { props.unsetBuSzTx();
/** * * @param flag whether text in this paragraph has bullets */ public void setBullet(boolean flag) { if(isBullet() == flag) return; CTTextParagraphProperties pr = _p.isSetPPr() ? _p.getPPr() : _p.addNewPPr(); if(flag) { pr.addNewBuFont().setTypeface("Arial"); pr.addNewBuChar().setChar("\u2022"); } else { if (pr.isSetBuFont()) pr.unsetBuFont(); if (pr.isSetBuChar()) pr.unsetBuChar(); if (pr.isSetBuAutoNum()) pr.unsetBuAutoNum(); if (pr.isSetBuBlip()) pr.unsetBuBlip(); if (pr.isSetBuClr()) pr.unsetBuClr(); if (pr.isSetBuClrTx()) pr.unsetBuClrTx(); if (pr.isSetBuFont()) pr.unsetBuFont(); if (pr.isSetBuFontTx()) pr.unsetBuFontTx(); if (pr.isSetBuSzPct()) pr.unsetBuSzPct(); if (pr.isSetBuSzPts()) pr.unsetBuSzPts(); if (pr.isSetBuSzTx()) pr.unsetBuSzTx(); pr.addNewBuNone(); } }
/** * Set or unset this paragraph as a bullet point * * @param flag whether text in this paragraph has bullets */ public void setBullet(boolean flag) { if(isBullet() == flag) return; CTTextParagraphProperties pr = _p.isSetPPr() ? _p.getPPr() : _p.addNewPPr(); if(!flag) { pr.addNewBuNone(); if(pr.isSetBuAutoNum()) pr.unsetBuAutoNum(); if(pr.isSetBuBlip()) pr.unsetBuBlip(); if(pr.isSetBuChar()) pr.unsetBuChar(); if(pr.isSetBuClr()) pr.unsetBuClr(); if(pr.isSetBuClrTx()) pr.unsetBuClrTx(); if(pr.isSetBuFont()) pr.unsetBuFont(); if(pr.isSetBuFontTx()) pr.unsetBuFontTx(); if(pr.isSetBuSzPct()) pr.unsetBuSzPct(); if(pr.isSetBuSzPts()) pr.unsetBuSzPts(); if(pr.isSetBuSzTx()) pr.unsetBuSzTx(); } else { if(pr.isSetBuNone()) pr.unsetBuNone(); if(!pr.isSetBuFont()) pr.addNewBuFont().setTypeface("Arial"); if(!pr.isSetBuAutoNum()) pr.addNewBuChar().setChar("\u2022"); } }