本文整理了Java中org.apache.poi.xwpf.usermodel.XWPFDocument.getTablePos()
方法的一些代码示例,展示了XWPFDocument.getTablePos()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XWPFDocument.getTablePos()
方法的具体详情如下:
包路径:org.apache.poi.xwpf.usermodel.XWPFDocument
类名称:XWPFDocument
方法名:getTablePos
[英]get with the position of a table in the bodyelement array list the position of this table in the table array list
[中]使用bodyelement数组列表中表格的位置获取此表格在表格数组列表中的位置
代码示例来源:origin: org.apache.poi/poi-ooxml
/**
* remove a BodyElement from bodyElements array list
*
* @param pos
* @return true if removing was successfully, else return false
*/
public boolean removeBodyElement(int pos) {
if (pos >= 0 && pos < bodyElements.size()) {
BodyElementType type = bodyElements.get(pos).getElementType();
if (type == BodyElementType.TABLE) {
int tablePos = getTablePos(pos);
tables.remove(tablePos);
ctDocument.getBody().removeTbl(tablePos);
}
if (type == BodyElementType.PARAGRAPH) {
int paraPos = getParagraphPos(pos);
paragraphs.remove(paraPos);
ctDocument.getBody().removeP(paraPos);
}
bodyElements.remove(pos);
return true;
}
return false;
}
代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev
/**
* remove a BodyElement from bodyElements array list
* @param pos
* @return true if removing was successfully, else return false
*/
public boolean removeBodyElement(int pos){
if(pos >= 0 && pos < bodyElements.size()) {
BodyElementType type = bodyElements.get(pos).getElementType();
if(type == BodyElementType.TABLE){
int tablePos = getTablePos(pos);
tables.remove(tablePos);
ctDocument.getBody().removeTbl(tablePos);
}
if(type == BodyElementType.PARAGRAPH){
int paraPos = getParagraphPos(pos);
paragraphs.remove(paraPos);
ctDocument.getBody().removeP(paraPos);
}
bodyElements.remove(pos);
return true;
}
return false;
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
/**
* remove a BodyElement from bodyElements array list
*
* @param pos
* @return true if removing was successfully, else return false
*/
public boolean removeBodyElement(int pos) {
if (pos >= 0 && pos < bodyElements.size()) {
BodyElementType type = bodyElements.get(pos).getElementType();
if (type == BodyElementType.TABLE) {
int tablePos = getTablePos(pos);
tables.remove(tablePos);
ctDocument.getBody().removeTbl(tablePos);
}
if (type == BodyElementType.PARAGRAPH) {
int paraPos = getParagraphPos(pos);
paragraphs.remove(paraPos);
ctDocument.getBody().removeP(paraPos);
}
bodyElements.remove(pos);
return true;
}
return false;
}
内容来源于网络,如有侵权,请联系作者删除!