public boolean fetch(CTTextParagraphProperties props){ if(props.isSetBuAutoNum() && props.getBuAutoNum().isSetStartAt()) { setValue(props.getBuAutoNum().getStartAt()); return true; } return false; } };
public boolean fetch(CTTextParagraphProperties props) { if (props.isSetBuAutoNum()) { if (props.getBuAutoNum().isSetStartAt()) { setValue(props.getBuAutoNum().getStartAt()); return true; } } return false; } };
public boolean fetch(CTTextParagraphProperties props) { if (props.isSetBuAutoNum()) { AutoNumberingScheme ans = AutoNumberingScheme.forOoxmlID(props.getBuAutoNum().getType().intValue()); if (ans != null) { setValue(ans); return true; } } return false; } };
public boolean fetch(CTTextParagraphProperties props){ if(props.isSetBuAutoNum()) { setValue(ListAutoNumber.values()[props.getBuAutoNum().getType().intValue() - 1]); return true; } return false; } };
/** * Specifies that automatic numbered bullet points should be applied to this paragraph * * @param scheme type of auto-numbering * @param startAt the number that will start number for a given sequence of automatically numbered bullets (1-based). */ @SuppressWarnings("WeakerAccess") public void setBulletAutoNumber(AutoNumberingScheme scheme, int startAt) { if(startAt < 1) throw new IllegalArgumentException("Start Number must be greater or equal that 1") ; CTTextParagraphProperties pr = _p.isSetPPr() ? _p.getPPr() : _p.addNewPPr(); CTTextAutonumberBullet lst = pr.isSetBuAutoNum() ? pr.getBuAutoNum() : pr.addNewBuAutoNum(); lst.setType(STTextAutonumberScheme.Enum.forInt(scheme.ooxmlId)); lst.setStartAt(startAt); }
public XDDFBulletStyle getBulletStyle() { if (props.isSetBuAutoNum()) { return new XDDFBulletStyleAutoNumbered(props.getBuAutoNum()); } else if (props.isSetBuBlip()) { return new XDDFBulletStylePicture(props.getBuBlip()); } else if (props.isSetBuChar()) { return new XDDFBulletStyleCharacter(props.getBuChar()); } else if (props.isSetBuNone()) { return new XDDFBulletStyleNone(props.getBuNone()); } else { return null; } }
/** * Set this paragraph as an automatic numbered bullet point * * @param scheme type of auto-numbering * @param startAt the number that will start number for a given sequence of automatically * numbered bullets (1-based). */ public void setBullet(ListAutoNumber scheme, int startAt) { if(startAt < 1) throw new IllegalArgumentException("Start Number must be greater or equal that 1") ; CTTextParagraphProperties pr = _p.isSetPPr() ? _p.getPPr() : _p.addNewPPr(); CTTextAutonumberBullet lst = pr.isSetBuAutoNum() ? pr.getBuAutoNum() : pr.addNewBuAutoNum(); lst.setType(STTextAutonumberScheme.Enum.forInt(scheme.ordinal() + 1)); lst.setStartAt(startAt); if(!pr.isSetBuFont()) pr.addNewBuFont().setTypeface("Arial"); if(pr.isSetBuNone()) pr.unsetBuNone(); // remove these elements if present as it results in invalid content when opening in Excel. if(pr.isSetBuBlip()) pr.unsetBuBlip(); if(pr.isSetBuChar()) pr.unsetBuChar(); }
/** * Set this paragraph as an automatic numbered bullet point * * @param scheme type of auto-numbering */ public void setBullet(ListAutoNumber scheme) { CTTextParagraphProperties pr = _p.isSetPPr() ? _p.getPPr() : _p.addNewPPr(); CTTextAutonumberBullet lst = pr.isSetBuAutoNum() ? pr.getBuAutoNum() : pr.addNewBuAutoNum(); lst.setType(STTextAutonumberScheme.Enum.forInt(scheme.ordinal() + 1)); if(!pr.isSetBuFont()) pr.addNewBuFont().setTypeface("Arial"); if(pr.isSetBuNone()) pr.unsetBuNone(); // remove these elements if present as it results in invalid content when opening in Excel. if(pr.isSetBuBlip()) pr.unsetBuBlip(); if(pr.isSetBuChar()) pr.unsetBuChar(); }
public boolean fetch(CTTextParagraphProperties props) { if (props.isSetBuAutoNum()) { if (props.getBuAutoNum().isSetStartAt()) { setValue(props.getBuAutoNum().getStartAt()); return true; } } return false; } };
public boolean fetch(CTTextParagraphProperties props){ if(props.isSetBuAutoNum() && props.getBuAutoNum().isSetStartAt()) { setValue(props.getBuAutoNum().getStartAt()); return true; } return false; } };
public boolean fetch(CTTextParagraphProperties props){ if(props.isSetBuAutoNum()) { setValue(ListAutoNumber.values()[props.getBuAutoNum().getType().intValue() - 1]); return true; } return false; } };
public boolean fetch(CTTextParagraphProperties props) { if (props.isSetBuAutoNum()) { AutoNumberingScheme ans = AutoNumberingScheme.forOoxmlID(props.getBuAutoNum().getType().intValue()); if (ans != null) { setValue(ans); return true; } } return false; } };
/** * Specifies that automatic numbered bullet points should be applied to this paragraph * * @param scheme type of auto-numbering * @param startAt the number that will start number for a given sequence of automatically numbered bullets (1-based). */ @SuppressWarnings("WeakerAccess") public void setBulletAutoNumber(AutoNumberingScheme scheme, int startAt) { if(startAt < 1) throw new IllegalArgumentException("Start Number must be greater or equal that 1") ; CTTextParagraphProperties pr = _p.isSetPPr() ? _p.getPPr() : _p.addNewPPr(); CTTextAutonumberBullet lst = pr.isSetBuAutoNum() ? pr.getBuAutoNum() : pr.addNewBuAutoNum(); lst.setType(STTextAutonumberScheme.Enum.forInt(scheme.ooxmlId)); lst.setStartAt(startAt); }
/** * Specifies that automatic numbered bullet points should be applied to this paragraph * * @param scheme type of auto-numbering * @param startAt the number that will start number for a given sequence of automatically numbered bullets (1-based). */ public void setBulletAutoNumber(ListAutoNumber scheme, int startAt) { if(startAt < 1) throw new IllegalArgumentException("Start Number must be greater or equal that 1") ; CTTextParagraphProperties pr = _p.isSetPPr() ? _p.getPPr() : _p.addNewPPr(); CTTextAutonumberBullet lst = pr.isSetBuAutoNum() ? pr.getBuAutoNum() : pr.addNewBuAutoNum(); lst.setType(STTextAutonumberScheme.Enum.forInt(scheme.ordinal() + 1)); lst.setStartAt(startAt); }
public XDDFBulletStyle getBulletStyle() { if (props.isSetBuAutoNum()) { return new XDDFBulletStyleAutoNumbered(props.getBuAutoNum()); } else if (props.isSetBuBlip()) { return new XDDFBulletStylePicture(props.getBuBlip()); } else if (props.isSetBuChar()) { return new XDDFBulletStyleCharacter(props.getBuChar()); } else if (props.isSetBuNone()) { return new XDDFBulletStyleNone(props.getBuNone()); } else { return null; } }
/** * Set this paragraph as an automatic numbered bullet point * * @param scheme type of auto-numbering * @param startAt the number that will start number for a given sequence of automatically * numbered bullets (1-based). */ public void setBullet(ListAutoNumber scheme, int startAt) { if(startAt < 1) throw new IllegalArgumentException("Start Number must be greater or equal that 1") ; CTTextParagraphProperties pr = _p.isSetPPr() ? _p.getPPr() : _p.addNewPPr(); CTTextAutonumberBullet lst = pr.isSetBuAutoNum() ? pr.getBuAutoNum() : pr.addNewBuAutoNum(); lst.setType(STTextAutonumberScheme.Enum.forInt(scheme.ordinal() + 1)); lst.setStartAt(startAt); if(!pr.isSetBuFont()) pr.addNewBuFont().setTypeface("Arial"); if(pr.isSetBuNone()) pr.unsetBuNone(); // remove these elements if present as it results in invalid content when opening in Excel. if(pr.isSetBuBlip()) pr.unsetBuBlip(); if(pr.isSetBuChar()) pr.unsetBuChar(); }
/** * Set this paragraph as an automatic numbered bullet point * * @param scheme type of auto-numbering */ public void setBullet(ListAutoNumber scheme) { CTTextParagraphProperties pr = _p.isSetPPr() ? _p.getPPr() : _p.addNewPPr(); CTTextAutonumberBullet lst = pr.isSetBuAutoNum() ? pr.getBuAutoNum() : pr.addNewBuAutoNum(); lst.setType(STTextAutonumberScheme.Enum.forInt(scheme.ordinal() + 1)); if(!pr.isSetBuFont()) pr.addNewBuFont().setTypeface("Arial"); if(pr.isSetBuNone()) pr.unsetBuNone(); // remove these elements if present as it results in invalid content when opening in Excel. if(pr.isSetBuBlip()) pr.unsetBuBlip(); if(pr.isSetBuChar()) pr.unsetBuChar(); }