diff --git a/src/java/org/apache/poi/hssf/model/DrawingManager2.java b/src/java/org/apache/poi/hssf/model/DrawingManager2.java index 51abcde5b9..e5deeb02e5 100644 --- a/src/java/org/apache/poi/hssf/model/DrawingManager2.java +++ b/src/java/org/apache/poi/hssf/model/DrawingManager2.java @@ -45,6 +45,11 @@ public class DrawingManager2 drawingGroups.clear(); } + /** + * Creates a new drawing group + * + * @return a new drawing group + */ public EscherDgRecord createDgRecord() { EscherDgRecord dg = new EscherDgRecord(); @@ -60,9 +65,11 @@ public class DrawingManager2 } /** - * Allocates new shape id for the new drawing group id. - * - * @return a new shape id. + * Allocates new shape id for the drawing group id. + * + * @param drawingGroupId the drawing group id + * + * @return a new shape id */ public int allocateShapeId(short drawingGroupId) { @@ -71,7 +78,10 @@ public class DrawingManager2 } /** - * Allocates new shape id for the new drawing group id. + * Allocates new shape id for the drawing group + * + * @param drawingGroupId the drawing group id + * @param dg the EscherDgRecord which receives the new shape * * @return a new shape id. */ @@ -109,6 +119,8 @@ public class DrawingManager2 /** * Finds the next available (1 based) drawing group id + * + * @return the next available drawing group id */ public short findNewDrawingGroupId() { @@ -140,11 +152,19 @@ public class DrawingManager2 return next; } + /** + * Returns the drawing group container record + * + * @return the drawing group container record + */ public EscherDggRecord getDgg() { return dgg; } + /** + * Increment the drawing counter + */ public void incrementDrawingsSaved(){ dgg.setDrawingsSaved(dgg.getDrawingsSaved()+1); } diff --git a/src/java/org/apache/poi/hssf/model/InternalSheet.java b/src/java/org/apache/poi/hssf/model/InternalSheet.java index b810eaa926..ab07b7c7ab 100644 --- a/src/java/org/apache/poi/hssf/model/InternalSheet.java +++ b/src/java/org/apache/poi/hssf/model/InternalSheet.java @@ -87,7 +87,6 @@ import org.apache.poi.util.POILogger; * really know what you're doing. I recommend you read the Microsoft Excel 97 Developer's * Kit (Microsoft Press) and the documentation at http://sc.openoffice.org/excelfileformat.pdf * before even attempting to use this. - *
*
* @see org.apache.poi.hssf.model.InternalWorkbook
* @see org.apache.poi.hssf.usermodel.HSSFSheet
@@ -410,6 +409,8 @@ public final class InternalSheet {
* can be added to a sheet. The Record object does not implement cloneable.
* When adding a new record, implement a public clone method if and only if the record
* belongs to a sheet.
+ *
+ * @return the cloned sheet
*/
public InternalSheet cloneSheet() {
Listnull
if there isn't one for the given name.
*/
@@ -1963,7 +1987,8 @@ public final class InternalWorkbook {
return commentRecords.get(nameRecord.getNameText());
}
- /** creates new name
+ /**
+ * creates new name
* @return new name record
*/
public NameRecord createName(){
@@ -1971,8 +1996,11 @@ public final class InternalWorkbook {
}
- /** creates new name
- * @return new name record
+ /**
+ * adds a name record
+ *
+ * @param name the name record to be added
+ * @return the given name record
*/
public NameRecord addName(NameRecord name)
{
@@ -1985,6 +2013,10 @@ public final class InternalWorkbook {
/**
* Generates a NameRecord to represent a built-in region
+ *
+ * @param builtInName the built-in name
+ * @param sheetNumber the sheet number
+ *
* @return a new NameRecord
*/
public NameRecord createBuiltInName(byte builtInName, int sheetNumber) {
@@ -2018,6 +2050,8 @@ public final class InternalWorkbook {
/**
* If a {@link NameCommentRecord} is added or the name it references
* is renamed, then this will update the lookup cache for it.
+ *
+ * @param commentRecord the comment record
*/
public void updateNameCommentRecordCache(final NameCommentRecord commentRecord) {
if(commentRecords.containsValue(commentRecord)) {
@@ -2084,6 +2118,10 @@ public final class InternalWorkbook {
/**
* Returns the first occurance of a record matching a particular sid.
+ *
+ * @param sid the sid
+ *
+ * @return the matching record or {@code null} if it wasn't found
*/
public Record findFirstRecordBySid(short sid) {
for (Record record : records) {
@@ -2112,6 +2150,11 @@ public final class InternalWorkbook {
/**
* Returns the next occurance of a record matching a particular sid.
+ *
+ * @param sid the sid
+ * @param pos specifies the n-th matching sid
+ *
+ * @return the matching record or {@code null} if it wasn't found
*/
public Record findNextRecordBySid(short sid, int pos) {
int matches = 0;
@@ -2146,6 +2189,8 @@ public final class InternalWorkbook {
/**
* Returns the custom palette in use for this workbook; if a custom palette record
* does not exist, then it is created.
+ *
+ * @return the custom palette
*/
public PaletteRecord getCustomPalette()
{
@@ -2169,6 +2214,8 @@ public final class InternalWorkbook {
/**
* Finds the primary drawing group, if one already exists
+ *
+ * @return the primary drawing group
*/
public DrawingManager2 findDrawingGroup() {
if(drawingManager != null) {
@@ -2388,6 +2435,8 @@ public final class InternalWorkbook {
/**
* is the workbook protected with a password (not encrypted)?
+ *
+ * @return {@code true} if the workbook is write protected
*/
public boolean isWriteProtected() {
if (fileShare == null) {
@@ -2400,7 +2449,9 @@ public final class InternalWorkbook {
/**
* protect a workbook with a password (not encypted, just sets writeprotect
* flags and the password.
- * @param password to set
+ *
+ * @param password the password
+ * @param username the username
*/
public void writeProtectWorkbook( String password, String username ) {
FileSharingRecord frec = getFileSharing();
@@ -2549,6 +2600,8 @@ public final class InternalWorkbook {
}
/**
* Updates named ranges due to moving of cells
+ *
+ * @param shifter the formula shifter
*/
public void updateNamesAfterCellShift(FormulaShifter shifter) {
for (int i = 0 ; i < getNumNames() ; ++i){
@@ -2563,6 +2616,8 @@ public final class InternalWorkbook {
/**
* Get or create RecalcIdRecord
*
+ * @return a new RecalcIdRecord
+ *
* @see org.apache.poi.hssf.usermodel.HSSFWorkbook#setForceFormulaRecalculation(boolean)
*/
public RecalcIdRecord getRecalcId(){