public XDDFRunProperties addAfterLastRunProperties() { if (!_p.isSetEndParaRPr()) { _p.addNewEndParaRPr(); } return getAfterLastRunProperties(); }
public XDDFRunProperties getAfterLastRunProperties() { if (_p.isSetEndParaRPr()) { return new XDDFRunProperties(_p.getEndParaRPr()); } else { return null; } }
public void setAfterLastRunProperties(XDDFRunProperties properties) { if (properties == null) { if (_p.isSetEndParaRPr()) { _p.unsetEndParaRPr(); } } else { _p.setEndParaRPr(properties.getXmlObject()); } }
/** * Helper method for appending text and keeping paragraph and character properties. * The character properties are moved to the end paragraph marker */ /* package */ void clearButKeepProperties() { CTTextParagraph thisP = getXmlObject(); for (int i=thisP.sizeOfBrArray(); i>0; i--) { thisP.removeBr(i-1); } for (int i=thisP.sizeOfFldArray(); i>0; i--) { thisP.removeFld(i-1); } if (!_runs.isEmpty()) { int size = _runs.size(); XSLFTextRun lastRun = _runs.get(size-1); CTTextCharacterProperties cpOther = lastRun.getRPr(false); if (cpOther != null) { if (thisP.isSetEndParaRPr()) { thisP.unsetEndParaRPr(); } CTTextCharacterProperties cp = thisP.addNewEndParaRPr(); cp.set(cpOther); } for (int i=size; i>0; i--) { thisP.removeR(i-1); } _runs.clear(); } }
if (thisP.isSetEndParaRPr()) thisP.unsetEndParaRPr();
public XDDFRunProperties addAfterLastRunProperties() { if (!_p.isSetEndParaRPr()) { _p.addNewEndParaRPr(); } return getAfterLastRunProperties(); }
public XDDFRunProperties getAfterLastRunProperties() { if (_p.isSetEndParaRPr()) { return new XDDFRunProperties(_p.getEndParaRPr()); } else { return null; } }
public void setAfterLastRunProperties(XDDFRunProperties properties) { if (properties == null) { if (_p.isSetEndParaRPr()) { _p.unsetEndParaRPr(); } } else { _p.setEndParaRPr(properties.getXmlObject()); } }
/** * Helper method for appending text and keeping paragraph and character properties. * The character properties are moved to the end paragraph marker */ /* package */ void clearButKeepProperties() { CTTextParagraph thisP = getXmlObject(); for (int i=thisP.sizeOfBrArray(); i>0; i--) { thisP.removeBr(i-1); } for (int i=thisP.sizeOfFldArray(); i>0; i--) { thisP.removeFld(i-1); } if (!_runs.isEmpty()) { int size = _runs.size(); XSLFTextRun lastRun = _runs.get(size-1); CTTextCharacterProperties cpOther = lastRun.getRPr(false); if (cpOther != null) { if (thisP.isSetEndParaRPr()) { thisP.unsetEndParaRPr(); } CTTextCharacterProperties cp = thisP.addNewEndParaRPr(); cp.set(cpOther); } for (int i=size; i>0; i--) { thisP.removeR(i-1); } _runs.clear(); } }
if (thisP.isSetEndParaRPr()) thisP.unsetEndParaRPr();