Fix and update JavaDoc entries, and correct areas with wildy inconsistent whitespace / style to the surrounding code

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1492804 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Nick Burch 2013-06-13 18:34:54 +00:00
parent 5863a82a6e
commit ab19d2e09c
4 changed files with 661 additions and 682 deletions

View File

@ -41,8 +41,6 @@ import org.openxmlformats.schemas.wordprocessingml.x2006.main.FootnotesDocument;
/** /**
* Looks after the collection of Footnotes for a document * Looks after the collection of Footnotes for a document
*
* @author Mike McEuen (mceuen@hp.com)
*/ */
public class XWPFFootnotes extends POIXMLDocumentPart { public class XWPFFootnotes extends POIXMLDocumentPart {
private List<XWPFFootnote> listFootnote = new ArrayList<XWPFFootnote>(); private List<XWPFFootnote> listFootnote = new ArrayList<XWPFFootnote>();
@ -157,5 +155,4 @@ public class XWPFFootnotes extends POIXMLDocumentPart {
return (XWPFDocument)getParent(); return (XWPFDocument)getParent();
} }
} }
}//end class }

View File

@ -39,24 +39,11 @@ import org.openxmlformats.schemas.wordprocessingml.x2006.main.STBorder;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.STTblWidth; import org.openxmlformats.schemas.wordprocessingml.x2006.main.STTblWidth;
/** /**
* Sketch of XWPFTable class. Only table's text is being hold. * <p>Sketch of XWPFTable class. Only table's text is being hold.</p>
* <p/> * <p>Specifies the contents of a table present in the document. A table is a set
* Specifies the contents of a table present in the document. A table is a set * of paragraphs (and other block-level content) arranged in rows and columns.</p>
* of paragraphs (and other block-level content) arranged in rows and columns.
*
* @author Yury Batrakov (batrakov at gmail.com)
* @author Gregg Morris (gregg dot morris at gmail dot com) - added
* setStyleID()
* getRowBandSize(), setRowBandSize()
* getColBandSize(), setColBandSize()
* getInsideHBorderType(), getInsideHBorderSize(), getInsideHBorderSpace(), getInsideHBorderColor()
* getInsideVBorderType(), getInsideVBorderSize(), getInsideVBorderSpace(), getInsideVBorderColor()
* setInsideHBorder(), setInsideVBorder()
* getCellMarginTop(), getCellMarginLeft(), getCellMarginBottom(), getCellMarginRight()
* setCellMargins()
*/ */
public class XWPFTable implements IBodyElement { public class XWPFTable implements IBodyElement {
protected StringBuffer text = new StringBuffer(); protected StringBuffer text = new StringBuffer();
private CTTbl ctTbl; private CTTbl ctTbl;
protected List<XWPFTableRow> tableRows; protected List<XWPFTableRow> tableRows;
@ -227,8 +214,7 @@ public class XWPFTable implements IBodyElement{
*/ */
public void setWidth(int width) { public void setWidth(int width) {
CTTblPr tblPr = getTrPr(); CTTblPr tblPr = getTrPr();
CTTblWidth tblWidth = tblPr.isSetTblW() ? tblPr.getTblW() : tblPr CTTblWidth tblWidth = tblPr.isSetTblW() ? tblPr.getTblW() : tblPr.addNewTblW();
.addNewTblW();
tblWidth.setW(new BigInteger("" + width)); tblWidth.setW(new BigInteger("" + width));
} }
@ -631,4 +617,4 @@ public class XWPFTable implements IBodyElement{
} }
return null; return null;
} }
}// end class }

View File

@ -37,11 +37,8 @@ import org.openxmlformats.schemas.wordprocessingml.x2006.main.STShd;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.STVerticalJc; import org.openxmlformats.schemas.wordprocessingml.x2006.main.STVerticalJc;
/** /**
* XWPFTableCell class. * Represents a Cell within a {@link XWPFTable}. The
* * Cell is the thing that holds the actual content (paragraphs etc)
* @author Gregg Morris (gregg dot morris at gmail dot com) - added XWPFVertAlign enum,
* setColor(),
* setVerticalAlignment()
*/ */
public class XWPFTableCell implements IBody { public class XWPFTableCell implements IBody {
private final CTTc ctTc; private final CTTc ctTc;
@ -245,8 +242,9 @@ public class XWPFTableCell implements IBody {
* @return the inserted paragraph * @return the inserted paragraph
*/ */
public XWPFParagraph insertNewParagraph(XmlCursor cursor){ public XWPFParagraph insertNewParagraph(XmlCursor cursor){
if(!isCursorInTableCell(cursor)) if(!isCursorInTableCell(cursor)) {
return null; return null;
}
String uri = CTP.type.getName().getNamespaceURI(); String uri = CTP.type.getName().getNamespaceURI();
String localPart = "p"; String localPart = "p";
@ -346,7 +344,6 @@ public class XWPFTableCell implements IBody {
return tableRow.getTable().getPart(); return tableRow.getTable().getPart();
} }
/** /**
* @see org.apache.poi.xwpf.usermodel.IBody#getPartType() * @see org.apache.poi.xwpf.usermodel.IBody#getPartType()
*/ */
@ -443,4 +440,4 @@ public class XWPFTableCell implements IBody {
public XWPFDocument getXWPFDocument() { public XWPFDocument getXWPFDocument() {
return part.getXWPFDocument(); return part.getXWPFDocument();
} }
}// end class }

View File

@ -30,11 +30,11 @@ import org.openxmlformats.schemas.wordprocessingml.x2006.main.STOnOff;
/** /**
* @author gisellabronzetti * A row within an {@link XWPFTable}. Rows mostly just have
* @author gregg morris - added removeCell(), setCantSplitRow(), setRepeatHeader() * sizings and stylings, the interesting content lives inside
* the child {@link XWPFTableCell}s
*/ */
public class XWPFTableRow { public class XWPFTableRow {
private CTRow ctRow; private CTRow ctRow;
private XWPFTable table; private XWPFTable table;
private List<XWPFTableCell> tableCells; private List<XWPFTableCell> tableCells;
@ -205,5 +205,4 @@ public class XWPFTableRow {
} }
return repeat; return repeat;
} }
}
}// end class