本文整理了Java中org.apache.poi.xslf.usermodel.XSLFTextShape.getTextBody()
方法的一些代码示例,展示了XSLFTextShape.getTextBody()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XSLFTextShape.getTextBody()
方法的具体详情如下:
包路径:org.apache.poi.xslf.usermodel.XSLFTextShape
类名称:XSLFTextShape
方法名:getTextBody
暂无
代码示例来源:origin: org.apache.poi/poi-ooxml
/**
* unset text from this shape
*/
public void clearText() {
_paragraphs.clear();
CTTextBody txBody = getTextBody(true);
txBody.setPArray(null); // remove any existing paragraphs
}
代码示例来源:origin: org.apache.poi/poi-ooxml
/* package */ XSLFTextShape(XmlObject shape, XSLFSheet sheet) {
super(shape, sheet);
_paragraphs = new ArrayList<>();
CTTextBody txBody = getTextBody(false);
if (txBody != null) {
for (CTTextParagraph p : txBody.getPArray()) {
_paragraphs.add(newTextParagraph(p));
}
}
}
代码示例来源:origin: org.apache.poi/poi-ooxml
@Beta
public XDDFTextBody getTextBody() {
CTTextBody txBody = getTextBody(false);
if (txBody == null) {
return null;
}
return new XDDFTextBody(this, txBody);
}
代码示例来源:origin: org.apache.poi/poi-ooxml
protected CTTextBodyProperties getTextBodyPr(boolean create) {
CTTextBody textBody = getTextBody(create);
if (textBody == null) {
return null;
}
CTTextBodyProperties textBodyPr = textBody.getBodyPr();
if (textBodyPr == null && create) {
textBodyPr = textBody.addNewBodyPr();
}
return textBodyPr;
}
代码示例来源:origin: org.apache.poi/poi-ooxml
/**
* add a new paragraph run to this shape
*
* @return created paragraph run
*/
public XSLFTextParagraph addNewTextParagraph() {
CTTextBody txBody = getTextBody(false);
CTTextParagraph p;
if (txBody == null) {
txBody = getTextBody(true);
p = txBody.getPArray(0);
p.removeR(0);
} else {
p = txBody.addNewP();
}
XSLFTextParagraph paragraph = newTextParagraph(p);
_paragraphs.add(paragraph);
return paragraph;
}
代码示例来源:origin: org.apache.poi/poi-ooxml
@Override
public XSLFTextRun setText(String text) {
// calling clearText or setting to a new Array leads to a
// XmlValueDisconnectedException
if (!_paragraphs.isEmpty()) {
CTTextBody txBody = getTextBody(false);
int cntPs = txBody.sizeOfPArray();
for (int i = cntPs; i > 1; i--) {
txBody.removeP(i - 1);
_paragraphs.remove(i - 1);
}
_paragraphs.get(0).clearButKeepProperties();
}
return appendText(text, false);
}
代码示例来源:origin: org.apache.poi/poi-ooxml
CTTextBody otherTB = otherTS.getTextBody(false);
CTTextBody thisTB = getTextBody(true);
if (otherTB == null) {
return;
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
/**
* unset text from this shape
*/
public void clearText() {
_paragraphs.clear();
CTTextBody txBody = getTextBody(true);
txBody.setPArray(null); // remove any existing paragraphs
}
代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev
/**
* unset text from this shape
*/
public void clearText(){
_paragraphs.clear();
CTTextBody txBody = getTextBody(true);
txBody.setPArray(null); // remove any existing paragraphs
}
代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev
protected CTTextBodyProperties getTextBodyPr(){
CTTextBody textBody = getTextBody(false);
return textBody == null ? null : textBody.getBodyPr();
}
代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev
/*package*/ XSLFTextShape(XmlObject shape, XSLFSheet sheet) {
super(shape, sheet);
_paragraphs = new ArrayList<XSLFTextParagraph>();
CTTextBody txBody = getTextBody(false);
if (txBody != null) {
for (CTTextParagraph p : txBody.getPList()) {
_paragraphs.add(new XSLFTextParagraph(p, this));
}
}
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
/* package */ XSLFTextShape(XmlObject shape, XSLFSheet sheet) {
super(shape, sheet);
_paragraphs = new ArrayList<>();
CTTextBody txBody = getTextBody(false);
if (txBody != null) {
for (CTTextParagraph p : txBody.getPArray()) {
_paragraphs.add(newTextParagraph(p));
}
}
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
protected CTTextBodyProperties getTextBodyPr(boolean create) {
CTTextBody textBody = getTextBody(create);
if (textBody == null) {
return null;
}
CTTextBodyProperties textBodyPr = textBody.getBodyPr();
if (textBodyPr == null && create) {
textBodyPr = textBody.addNewBodyPr();
}
return textBodyPr;
}
代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev
/**
* add a new paragraph run to this shape
*
* @return created paragraph run
*/
public XSLFTextParagraph addNewTextParagraph() {
CTTextBody txBody = getTextBody(true);
CTTextParagraph p = txBody.addNewP();
XSLFTextParagraph paragraph = new XSLFTextParagraph(p, this);
_paragraphs.add(paragraph);
return paragraph;
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
@Beta
public XDDFTextBody getTextBody() {
CTTextBody txBody = getTextBody(false);
if (txBody == null) {
return null;
}
return new XDDFTextBody(this, txBody);
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
/**
* add a new paragraph run to this shape
*
* @return created paragraph run
*/
public XSLFTextParagraph addNewTextParagraph() {
CTTextBody txBody = getTextBody(false);
CTTextParagraph p;
if (txBody == null) {
txBody = getTextBody(true);
p = txBody.getPArray(0);
p.removeR(0);
} else {
p = txBody.addNewP();
}
XSLFTextParagraph paragraph = newTextParagraph(p);
_paragraphs.add(paragraph);
return paragraph;
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
@Override
public XSLFTextRun setText(String text) {
// calling clearText or setting to a new Array leads to a
// XmlValueDisconnectedException
if (!_paragraphs.isEmpty()) {
CTTextBody txBody = getTextBody(false);
int cntPs = txBody.sizeOfPArray();
for (int i = cntPs; i > 1; i--) {
txBody.removeP(i - 1);
_paragraphs.remove(i - 1);
}
_paragraphs.get(0).clearButKeepProperties();
}
return appendText(text, false);
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
CTTextBody otherTB = otherTS.getTextBody(false);
CTTextBody thisTB = getTextBody(true);
if (otherTB == null) {
return;
内容来源于网络,如有侵权,请联系作者删除!