public XDDFRunProperties addAfterLastRunProperties() { if (!_p.isSetEndParaRPr()) { _p.addNewEndParaRPr(); } return getAfterLastRunProperties(); }
/** * 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(); } }
public XDDFRunProperties addAfterLastRunProperties() { if (!_p.isSetEndParaRPr()) { _p.addNewEndParaRPr(); } return getAfterLastRunProperties(); }
/** * 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(); } }
public static void setAxisTitle(XSSFChart chart, int axisIdx, String title) { CTValAx valAx = chart.getCTChart().getPlotArea().getValAxArray(axisIdx); CTTitle ctTitle = valAx.addNewTitle(); ctTitle.addNewLayout(); ctTitle.addNewOverlay().setVal(false); CTTextBody rich = ctTitle.addNewTx().addNewRich(); rich.addNewBodyPr(); rich.addNewLstStyle(); CTTextParagraph p = rich.addNewP(); p.addNewPPr().addNewDefRPr(); p.addNewR().setT(title); p.addNewEndParaRPr(); }
CTTextParagraph p = body.addNewP(); p.addNewPPr().setAlgn(STTextAlignType.CTR); CTTextCharacterProperties endPr = p.addNewEndParaRPr(); endPr.setLang("en-US"); endPr.setSz(1100);