mirror of https://github.com/apache/poi.git
Fix 1.6-isms from the patch from bug #48574
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@953707 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
91f1934fcc
commit
2064225f6d
|
@ -304,7 +304,6 @@ public class XWPFDocument extends POIXMLDocument implements Document, IBody {
|
||||||
/**
|
/**
|
||||||
* @see org.apache.poi.xwpf.usermodel.IBody#getTableArray(int)
|
* @see org.apache.poi.xwpf.usermodel.IBody#getTableArray(int)
|
||||||
*/
|
*/
|
||||||
@Override
|
|
||||||
public XWPFTable getTableArray(int pos) {
|
public XWPFTable getTableArray(int pos) {
|
||||||
if(pos > 0 && pos < tables.size()){
|
if(pos > 0 && pos < tables.size()){
|
||||||
return tables.get(pos);
|
return tables.get(pos);
|
||||||
|
@ -942,7 +941,6 @@ public class XWPFDocument extends POIXMLDocument implements Document, IBody {
|
||||||
* @param i
|
* @param i
|
||||||
* @param table
|
* @param table
|
||||||
*/
|
*/
|
||||||
@Override
|
|
||||||
public void insertTable(int pos, XWPFTable table) {
|
public void insertTable(int pos, XWPFTable table) {
|
||||||
bodyElements.add(pos, table);
|
bodyElements.add(pos, table);
|
||||||
int i;
|
int i;
|
||||||
|
@ -1163,7 +1161,6 @@ public class XWPFDocument extends POIXMLDocument implements Document, IBody {
|
||||||
* Returns the paragraph that of position pos
|
* Returns the paragraph that of position pos
|
||||||
* @see org.apache.poi.xwpf.usermodel.IBody#getParagraphArray(int)
|
* @see org.apache.poi.xwpf.usermodel.IBody#getParagraphArray(int)
|
||||||
*/
|
*/
|
||||||
@Override
|
|
||||||
public XWPFParagraph getParagraphArray(int pos) {
|
public XWPFParagraph getParagraphArray(int pos) {
|
||||||
if(pos > 0 && pos < paragraphs.size()){
|
if(pos > 0 && pos < paragraphs.size()){
|
||||||
return paragraphs.get(pos);
|
return paragraphs.get(pos);
|
||||||
|
@ -1179,7 +1176,6 @@ public class XWPFDocument extends POIXMLDocument implements Document, IBody {
|
||||||
* belongs.
|
* belongs.
|
||||||
* @see org.apache.poi.xwpf.usermodel.IBody#getPart()
|
* @see org.apache.poi.xwpf.usermodel.IBody#getPart()
|
||||||
*/
|
*/
|
||||||
@Override
|
|
||||||
public IBody getPart() {
|
public IBody getPart() {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@ -1190,7 +1186,6 @@ public class XWPFDocument extends POIXMLDocument implements Document, IBody {
|
||||||
* @return
|
* @return
|
||||||
* @see org.apache.poi.xwpf.usermodel.IBody#getPartType()
|
* @see org.apache.poi.xwpf.usermodel.IBody#getPartType()
|
||||||
*/
|
*/
|
||||||
@Override
|
|
||||||
public BodyType getPartType() {
|
public BodyType getPartType() {
|
||||||
return BodyType.DOCUMENT;
|
return BodyType.DOCUMENT;
|
||||||
}
|
}
|
||||||
|
@ -1200,7 +1195,6 @@ public class XWPFDocument extends POIXMLDocument implements Document, IBody {
|
||||||
* @param o
|
* @param o
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
|
||||||
public XWPFTableCell getTableCell(CTTc cell) {
|
public XWPFTableCell getTableCell(CTTc cell) {
|
||||||
XmlCursor cursor = cell.newCursor();
|
XmlCursor cursor = cell.newCursor();
|
||||||
cursor.toParent();
|
cursor.toParent();
|
||||||
|
|
|
@ -138,7 +138,6 @@ public class XWPFFooter extends XWPFHeaderFooter {
|
||||||
* returns the Part, to which the body belongs, which you need for adding relationship to other parts
|
* 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()
|
* @see org.apache.poi.xwpf.usermodel.IBody#getPart()
|
||||||
*/
|
*/
|
||||||
@Override
|
|
||||||
public IBody getPart() {
|
public IBody getPart() {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@ -147,7 +146,6 @@ public class XWPFFooter extends XWPFHeaderFooter {
|
||||||
* get the PartType of the body
|
* get the PartType of the body
|
||||||
* @see org.apache.poi.xwpf.usermodel.IBody#getPartType()
|
* @see org.apache.poi.xwpf.usermodel.IBody#getPartType()
|
||||||
*/
|
*/
|
||||||
@Override
|
|
||||||
public BodyType getPartType() {
|
public BodyType getPartType() {
|
||||||
return BodyType.FOOTER;
|
return BodyType.FOOTER;
|
||||||
}
|
}
|
||||||
|
|
|
@ -147,7 +147,6 @@ public class XWPFHeader extends XWPFHeaderFooter {
|
||||||
* returns the Part, to which the body belongs, which you need for adding relationship to other parts
|
* 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()
|
* @see org.apache.poi.xwpf.usermodel.IBody#getPart()
|
||||||
*/
|
*/
|
||||||
@Override
|
|
||||||
public IBody getPart() {
|
public IBody getPart() {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@ -156,7 +155,6 @@ public class XWPFHeader extends XWPFHeaderFooter {
|
||||||
* get the PartType of the body
|
* get the PartType of the body
|
||||||
* @see org.apache.poi.xwpf.usermodel.IBody#getPartType()
|
* @see org.apache.poi.xwpf.usermodel.IBody#getPartType()
|
||||||
*/
|
*/
|
||||||
@Override
|
|
||||||
public BodyType getPartType() {
|
public BodyType getPartType() {
|
||||||
return BodyType.HEADER;
|
return BodyType.HEADER;
|
||||||
}
|
}
|
||||||
|
|
|
@ -441,7 +441,6 @@ public abstract class XWPFHeaderFooter extends POIXMLDocumentPart implements IBo
|
||||||
* Returns the table at position pos
|
* Returns the table at position pos
|
||||||
* @see org.apache.poi.xwpf.usermodel.IBody#getTableArray(int)
|
* @see org.apache.poi.xwpf.usermodel.IBody#getTableArray(int)
|
||||||
*/
|
*/
|
||||||
@Override
|
|
||||||
public XWPFTable getTableArray(int pos) {
|
public XWPFTable getTableArray(int pos) {
|
||||||
|
|
||||||
if(pos > 0 && pos < tables.size()){
|
if(pos > 0 && pos < tables.size()){
|
||||||
|
@ -455,7 +454,6 @@ public abstract class XWPFHeaderFooter extends POIXMLDocumentPart implements IBo
|
||||||
* @param i
|
* @param i
|
||||||
* @param table
|
* @param table
|
||||||
*/
|
*/
|
||||||
@Override
|
|
||||||
public void insertTable(int pos, XWPFTable table) {
|
public void insertTable(int pos, XWPFTable table) {
|
||||||
bodyElements.add(pos, table);
|
bodyElements.add(pos, table);
|
||||||
int i;
|
int i;
|
||||||
|
|
|
@ -1278,7 +1278,6 @@ public class XWPFParagraph implements IBodyElement{
|
||||||
* returns the type of the BodyElement Paragraph
|
* returns the type of the BodyElement Paragraph
|
||||||
* @see org.apache.poi.xwpf.usermodel.IBodyElement#getElementType()
|
* @see org.apache.poi.xwpf.usermodel.IBodyElement#getElementType()
|
||||||
*/
|
*/
|
||||||
@Override
|
|
||||||
public BodyElementType getElementType() {
|
public BodyElementType getElementType() {
|
||||||
return BodyElementType.PARAGRAPH;
|
return BodyElementType.PARAGRAPH;
|
||||||
}
|
}
|
||||||
|
@ -1287,7 +1286,6 @@ public class XWPFParagraph implements IBodyElement{
|
||||||
* returns the part of the bodyElement
|
* returns the part of the bodyElement
|
||||||
* @see org.apache.poi.xwpf.usermodel.IBody#getPart()
|
* @see org.apache.poi.xwpf.usermodel.IBody#getPart()
|
||||||
*/
|
*/
|
||||||
@Override
|
|
||||||
public IBody getPart() {
|
public IBody getPart() {
|
||||||
if(part != null){
|
if(part != null){
|
||||||
return part.getPart();
|
return part.getPart();
|
||||||
|
@ -1299,7 +1297,6 @@ public class XWPFParagraph implements IBodyElement{
|
||||||
* returns the partType of the bodyPart which owns the bodyElement
|
* returns the partType of the bodyPart which owns the bodyElement
|
||||||
* @see org.apache.poi.xwpf.usermodel.IBody#getPartType()
|
* @see org.apache.poi.xwpf.usermodel.IBody#getPartType()
|
||||||
*/
|
*/
|
||||||
@Override
|
|
||||||
public BodyType getPartType() {
|
public BodyType getPartType() {
|
||||||
return part.getPartType();
|
return part.getPartType();
|
||||||
}
|
}
|
||||||
|
|
|
@ -291,7 +291,6 @@ public class XWPFTable implements IBodyElement{
|
||||||
* returns the type of the BodyElement Table
|
* returns the type of the BodyElement Table
|
||||||
* @see org.apache.poi.xwpf.usermodel.IBodyElement#getElementType()
|
* @see org.apache.poi.xwpf.usermodel.IBodyElement#getElementType()
|
||||||
*/
|
*/
|
||||||
@Override
|
|
||||||
public BodyElementType getElementType() {
|
public BodyElementType getElementType() {
|
||||||
return BodyElementType.TABLE;
|
return BodyElementType.TABLE;
|
||||||
}
|
}
|
||||||
|
@ -301,7 +300,6 @@ public class XWPFTable implements IBodyElement{
|
||||||
* returns the part of the bodyElement
|
* returns the part of the bodyElement
|
||||||
* @see org.apache.poi.xwpf.usermodel.IBody#getPart()
|
* @see org.apache.poi.xwpf.usermodel.IBody#getPart()
|
||||||
*/
|
*/
|
||||||
@Override
|
|
||||||
public IBody getPart() {
|
public IBody getPart() {
|
||||||
if(part != null){
|
if(part != null){
|
||||||
return part.getPart();
|
return part.getPart();
|
||||||
|
@ -314,7 +312,6 @@ public class XWPFTable implements IBodyElement{
|
||||||
* returns the partType of the bodyPart which owns the bodyElement
|
* returns the partType of the bodyPart which owns the bodyElement
|
||||||
* @see org.apache.poi.xwpf.usermodel.IBody#getPartType()
|
* @see org.apache.poi.xwpf.usermodel.IBody#getPartType()
|
||||||
*/
|
*/
|
||||||
@Override
|
|
||||||
public BodyType getPartType() {
|
public BodyType getPartType() {
|
||||||
return ((IBody)part).getPartType();
|
return ((IBody)part).getPartType();
|
||||||
}
|
}
|
||||||
|
|
|
@ -114,7 +114,6 @@ public class XWPFTableCell implements IBody {
|
||||||
* @return null if there is no XWPFParagraph with an corresponding CTPparagraph in the paragraphList of this table
|
* @return null if there is no XWPFParagraph with an corresponding CTPparagraph in the paragraphList of this table
|
||||||
* XWPFParagraph with the correspondig CTP p
|
* XWPFParagraph with the correspondig CTP p
|
||||||
*/
|
*/
|
||||||
@Override
|
|
||||||
public XWPFParagraph getParagraph(CTP p){
|
public XWPFParagraph getParagraph(CTP p){
|
||||||
for (XWPFParagraph paragraph : paragraphs) {
|
for (XWPFParagraph paragraph : paragraphs) {
|
||||||
if(p.equals(paragraph.getCTP())){
|
if(p.equals(paragraph.getCTP())){
|
||||||
|
@ -232,7 +231,6 @@ public class XWPFTableCell implements IBody {
|
||||||
/**
|
/**
|
||||||
* @see org.apache.poi.xwpf.usermodel.IBody#getParagraphArray(int)
|
* @see org.apache.poi.xwpf.usermodel.IBody#getParagraphArray(int)
|
||||||
*/
|
*/
|
||||||
@Override
|
|
||||||
public XWPFParagraph getParagraphArray(int pos) {
|
public XWPFParagraph getParagraphArray(int pos) {
|
||||||
if(pos > 0 && pos < paragraphs.size()){
|
if(pos > 0 && pos < paragraphs.size()){
|
||||||
return paragraphs.get(pos);
|
return paragraphs.get(pos);
|
||||||
|
@ -247,7 +245,6 @@ public class XWPFTableCell implements IBody {
|
||||||
* get the to which the TableCell belongs
|
* get the to which the TableCell belongs
|
||||||
* @see org.apache.poi.xwpf.usermodel.IBody#getPart()
|
* @see org.apache.poi.xwpf.usermodel.IBody#getPart()
|
||||||
*/
|
*/
|
||||||
@Override
|
|
||||||
public IBody getPart() {
|
public IBody getPart() {
|
||||||
return (IBody) tableRow.getTable().getPart();
|
return (IBody) tableRow.getTable().getPart();
|
||||||
}
|
}
|
||||||
|
@ -256,7 +253,6 @@ public class XWPFTableCell implements IBody {
|
||||||
/**
|
/**
|
||||||
* @see org.apache.poi.xwpf.usermodel.IBody#getPartType()
|
* @see org.apache.poi.xwpf.usermodel.IBody#getPartType()
|
||||||
*/
|
*/
|
||||||
@Override
|
|
||||||
public BodyType getPartType() {
|
public BodyType getPartType() {
|
||||||
return BodyType.TABLECELL;
|
return BodyType.TABLECELL;
|
||||||
}
|
}
|
||||||
|
@ -266,7 +262,6 @@ public class XWPFTableCell implements IBody {
|
||||||
* get a table by its CTTbl-Object
|
* get a table by its CTTbl-Object
|
||||||
* @see org.apache.poi.xwpf.usermodel.IBody#getTable(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTbl)
|
* @see org.apache.poi.xwpf.usermodel.IBody#getTable(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTbl)
|
||||||
*/
|
*/
|
||||||
@Override
|
|
||||||
public XWPFTable getTable(CTTbl ctTable) {
|
public XWPFTable getTable(CTTbl ctTable) {
|
||||||
for(int i=0; i<tables.size(); i++){
|
for(int i=0; i<tables.size(); i++){
|
||||||
if(getTables().get(i).getCTTbl() == ctTable) return getTables().get(i);
|
if(getTables().get(i).getCTTbl() == ctTable) return getTables().get(i);
|
||||||
|
@ -278,7 +273,6 @@ public class XWPFTableCell implements IBody {
|
||||||
/**
|
/**
|
||||||
* @see org.apache.poi.xwpf.usermodel.IBodyPart#getTableArray(int)
|
* @see org.apache.poi.xwpf.usermodel.IBodyPart#getTableArray(int)
|
||||||
*/
|
*/
|
||||||
@Override
|
|
||||||
public XWPFTable getTableArray(int pos) {
|
public XWPFTable getTableArray(int pos) {
|
||||||
if(pos > 0 && pos < tables.size()){
|
if(pos > 0 && pos < tables.size()){
|
||||||
return tables.get(pos);
|
return tables.get(pos);
|
||||||
|
@ -290,7 +284,6 @@ public class XWPFTableCell implements IBody {
|
||||||
/**
|
/**
|
||||||
* @see org.apache.poi.xwpf.usermodel.IBodyPart#getTables()
|
* @see org.apache.poi.xwpf.usermodel.IBodyPart#getTables()
|
||||||
*/
|
*/
|
||||||
@Override
|
|
||||||
public List<XWPFTable> getTables() {
|
public List<XWPFTable> getTables() {
|
||||||
return Collections.unmodifiableList(tables);
|
return Collections.unmodifiableList(tables);
|
||||||
}
|
}
|
||||||
|
@ -300,7 +293,6 @@ public class XWPFTableCell implements IBody {
|
||||||
* inserts an existing XWPFTable to the arrays bodyElements and 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)
|
* @see org.apache.poi.xwpf.usermodel.IBody#insertTable(int, org.apache.poi.xwpf.usermodel.XWPFTable)
|
||||||
*/
|
*/
|
||||||
@Override
|
|
||||||
public void insertTable(int pos, XWPFTable table) {
|
public void insertTable(int pos, XWPFTable table) {
|
||||||
bodyElements.add(pos, table);
|
bodyElements.add(pos, table);
|
||||||
int i;
|
int i;
|
||||||
|
@ -327,7 +319,6 @@ public class XWPFTableCell implements IBody {
|
||||||
* @param o
|
* @param o
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
|
||||||
public XWPFTableCell getTableCell(CTTc cell) {
|
public XWPFTableCell getTableCell(CTTc cell) {
|
||||||
XmlCursor cursor = cell.newCursor();
|
XmlCursor cursor = cell.newCursor();
|
||||||
cursor.toParent();
|
cursor.toParent();
|
||||||
|
|
Loading…
Reference in New Issue