/**
* @see org.apache.poi.xwpf.usermodel.IBody#getTableArray(int)
*/
- @Override
public XWPFTable getTableArray(int pos) {
if(pos > 0 && pos < tables.size()){
return tables.get(pos);
* @param i
* @param table
*/
- @Override
public void insertTable(int pos, XWPFTable table) {
bodyElements.add(pos, table);
int i;
* Returns the paragraph that of position pos
* @see org.apache.poi.xwpf.usermodel.IBody#getParagraphArray(int)
*/
- @Override
public XWPFParagraph getParagraphArray(int pos) {
if(pos > 0 && pos < paragraphs.size()){
return paragraphs.get(pos);
* belongs.
* @see org.apache.poi.xwpf.usermodel.IBody#getPart()
*/
- @Override
public IBody getPart() {
return this;
}
* @return
* @see org.apache.poi.xwpf.usermodel.IBody#getPartType()
*/
- @Override
public BodyType getPartType() {
return BodyType.DOCUMENT;
}
* @param o
* @return
*/
- @Override
public XWPFTableCell getTableCell(CTTc cell) {
XmlCursor cursor = cell.newCursor();
cursor.toParent();
* returns the Part, to which the body belongs, which you need for adding relationship to other parts
* @see org.apache.poi.xwpf.usermodel.IBody#getPart()
*/
- @Override
public IBody getPart() {
return this;
}
* get the PartType of the body
* @see org.apache.poi.xwpf.usermodel.IBody#getPartType()
*/
- @Override
public BodyType getPartType() {
return BodyType.FOOTER;
}
* returns the Part, to which the body belongs, which you need for adding relationship to other parts
* @see org.apache.poi.xwpf.usermodel.IBody#getPart()
*/
- @Override
public IBody getPart() {
return this;
}
* get the PartType of the body
* @see org.apache.poi.xwpf.usermodel.IBody#getPartType()
*/
- @Override
public BodyType getPartType() {
return BodyType.HEADER;
}
* Returns the table at position pos
* @see org.apache.poi.xwpf.usermodel.IBody#getTableArray(int)
*/
- @Override
public XWPFTable getTableArray(int pos) {
if(pos > 0 && pos < tables.size()){
* @param i
* @param table
*/
- @Override
public void insertTable(int pos, XWPFTable table) {
bodyElements.add(pos, table);
int i;
* returns the type of the BodyElement Paragraph
* @see org.apache.poi.xwpf.usermodel.IBodyElement#getElementType()
*/
- @Override
public BodyElementType getElementType() {
return BodyElementType.PARAGRAPH;
}
* returns the part of the bodyElement
* @see org.apache.poi.xwpf.usermodel.IBody#getPart()
*/
- @Override
public IBody getPart() {
if(part != null){
return part.getPart();
* returns the partType of the bodyPart which owns the bodyElement
* @see org.apache.poi.xwpf.usermodel.IBody#getPartType()
*/
- @Override
public BodyType getPartType() {
return part.getPartType();
}
* returns the type of the BodyElement Table
* @see org.apache.poi.xwpf.usermodel.IBodyElement#getElementType()
*/
- @Override
public BodyElementType getElementType() {
return BodyElementType.TABLE;
}
* returns the part of the bodyElement
* @see org.apache.poi.xwpf.usermodel.IBody#getPart()
*/
- @Override
public IBody getPart() {
if(part != null){
return part.getPart();
* returns the partType of the bodyPart which owns the bodyElement
* @see org.apache.poi.xwpf.usermodel.IBody#getPartType()
*/
- @Override
public BodyType getPartType() {
return ((IBody)part).getPartType();
}
* @return null if there is no XWPFParagraph with an corresponding CTPparagraph in the paragraphList of this table
* XWPFParagraph with the correspondig CTP p
*/
- @Override
public XWPFParagraph getParagraph(CTP p){
for (XWPFParagraph paragraph : paragraphs) {
if(p.equals(paragraph.getCTP())){
/**
* @see org.apache.poi.xwpf.usermodel.IBody#getParagraphArray(int)
*/
- @Override
public XWPFParagraph getParagraphArray(int pos) {
if(pos > 0 && pos < paragraphs.size()){
return paragraphs.get(pos);
* get the to which the TableCell belongs
* @see org.apache.poi.xwpf.usermodel.IBody#getPart()
*/
- @Override
public IBody getPart() {
return (IBody) tableRow.getTable().getPart();
}
/**
* @see org.apache.poi.xwpf.usermodel.IBody#getPartType()
*/
- @Override
public BodyType getPartType() {
return BodyType.TABLECELL;
}
* get a table by its CTTbl-Object
* @see org.apache.poi.xwpf.usermodel.IBody#getTable(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTbl)
*/
- @Override
public XWPFTable getTable(CTTbl ctTable) {
for(int i=0; i<tables.size(); i++){
if(getTables().get(i).getCTTbl() == ctTable) return getTables().get(i);
/**
* @see org.apache.poi.xwpf.usermodel.IBodyPart#getTableArray(int)
*/
- @Override
public XWPFTable getTableArray(int pos) {
if(pos > 0 && pos < tables.size()){
return tables.get(pos);
/**
* @see org.apache.poi.xwpf.usermodel.IBodyPart#getTables()
*/
- @Override
public List<XWPFTable> getTables() {
return Collections.unmodifiableList(tables);
}
* inserts an existing XWPFTable to the arrays bodyElements and tables
* @see org.apache.poi.xwpf.usermodel.IBody#insertTable(int, org.apache.poi.xwpf.usermodel.XWPFTable)
*/
- @Override
public void insertTable(int pos, XWPFTable table) {
bodyElements.add(pos, table);
int i;
* @param o
* @return
*/
- @Override
public XWPFTableCell getTableCell(CTTc cell) {
XmlCursor cursor = cell.newCursor();
cursor.toParent();