diff --git a/src/java/org/apache/poi/ddf/DefaultEscherRecordFactory.java b/src/java/org/apache/poi/ddf/DefaultEscherRecordFactory.java
index e99b88796..74407f293 100644
--- a/src/java/org/apache/poi/ddf/DefaultEscherRecordFactory.java
+++ b/src/java/org/apache/poi/ddf/DefaultEscherRecordFactory.java
@@ -45,14 +45,6 @@ public class DefaultEscherRecordFactory implements EscherRecordFactory {
// no instance initialisation
}
- /**
- * Generates an escher record including the any children contained under that record.
- * An exception is thrown if the record could not be generated.
- *
- * @param data The byte array containing the records
- * @param offset The starting offset into the byte array
- * @return The generated escher record
- */
@Override
public EscherRecord createRecord(byte[] data, int offset) {
short options = LittleEndian.getShort( data, offset );
diff --git a/src/java/org/apache/poi/ddf/EscherDump.java b/src/java/org/apache/poi/ddf/EscherDump.java
index f0d80b11d..45905c936 100644
--- a/src/java/org/apache/poi/ddf/EscherDump.java
+++ b/src/java/org/apache/poi/ddf/EscherDump.java
@@ -65,8 +65,8 @@ public final class EscherDump {
* @param in An input stream to read from.
* @param out An output stream to write to.
*
- * @throws IOException
- * @throws LittleEndian.BufferUnderrunException
+ * @throws IOException if the data can't be read or written
+ * @throws LittleEndian.BufferUnderrunException if an buffer underrun occurs
*/
public void dumpOld(long maxLength, InputStream in, PrintStream out)
throws IOException, LittleEndian.BufferUnderrunException {
diff --git a/src/java/org/apache/poi/ddf/EscherPropertyFactory.java b/src/java/org/apache/poi/ddf/EscherPropertyFactory.java
index efea00438..979655727 100644
--- a/src/java/org/apache/poi/ddf/EscherPropertyFactory.java
+++ b/src/java/org/apache/poi/ddf/EscherPropertyFactory.java
@@ -17,16 +17,14 @@
package org.apache.poi.ddf;
-import org.apache.poi.util.LittleEndian;
-
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
+import org.apache.poi.util.LittleEndian;
+
/**
* Generates a property given a reference into the byte array storing that property.
- *
- * @author Glen Stampoultzis
*/
public final class EscherPropertyFactory {
/**
@@ -34,6 +32,7 @@ public final class EscherPropertyFactory {
*
* @param data The byte array containing the property
* @param offset The starting offset into the byte array
+ * @param numProperties The number of properties to be read
* @return The new properties
*/
public List options is an internal field. Use {@link #setInstance(short)} ()} and
- * {@link #setVersion(short)} ()} to set the actual fields.
- * options is an internal field. Use {@link #getInstance()} and
- * {@link #getVersion()} to access actual fields.
- *
+ *
+ * Note that {@code options} is an internal field.
+ * Use {@link #getInstance()} and {@link #getVersion()} to access actual fields.
+ *
+ * @param options the record options
*/
@Internal
public void setOptions( short options ) {
@@ -200,6 +199,8 @@ public abstract class EscherRecord {
/**
* Sets the record id for this record.
+ *
+ * @param recordId the record id
*/
public void setRecordId( short recordId ) {
_recordId = recordId;
@@ -226,14 +227,21 @@ public abstract class EscherRecord {
/**
* Escher records may need to be clonable in the future.
+ *
+ * @return the cloned object
+ *
+ * @throws CloneNotSupportedException if the subclass hasn't implemented {@link Cloneable}
*/
@Override
public EscherRecord clone() throws CloneNotSupportedException {
- throw new CloneNotSupportedException( "The class " + getClass().getName() + " needs to define a clone method" );
+ return (EscherRecord)super.clone();
}
/**
* Returns the indexed child record.
+ *
+ * @param index the index of the child within the child records
+ * @return the indexed child record
*/
public EscherRecord getChild( int index ) {
return getChildRecords().get(index);
@@ -254,6 +262,8 @@ public abstract class EscherRecord {
/**
* Subclasses should return the short name for this escher record.
+ *
+ * @return the short name for this escher record
*/
public abstract String getRecordName();
@@ -270,8 +280,7 @@ public abstract class EscherRecord {
/**
* Sets the instance part of record
*
- * @param value
- * instance part value
+ * @param value instance part value
*/
public void setInstance( short value )
{
@@ -291,8 +300,7 @@ public abstract class EscherRecord {
/**
* Sets the version part of record
*
- * @param value
- * version part value
+ * @param value version part value
*/
public void setVersion( short value )
{
diff --git a/src/java/org/apache/poi/ddf/EscherRecordFactory.java b/src/java/org/apache/poi/ddf/EscherRecordFactory.java
index faf9c7461..401bbd08c 100644
--- a/src/java/org/apache/poi/ddf/EscherRecordFactory.java
+++ b/src/java/org/apache/poi/ddf/EscherRecordFactory.java
@@ -20,13 +20,15 @@ package org.apache.poi.ddf;
/**
* The escher record factory interface allows for the creation of escher
* records from a pointer into a data array.
- *
- * @author Glen Stampoultzis (glens at apache.org)
*/
public interface EscherRecordFactory {
/**
- * Create a new escher record from the data provided. Does not attempt
- * to fill the contents of the record however.
+ * Generates an escher record including any children contained under that record.
+ * An exception is thrown if the record could not be generated.
+ *
+ * @param data The byte array containing the records
+ * @param offset The starting offset into the byte array
+ * @return The generated escher record
*/
EscherRecord createRecord( byte[] data, int offset );
}
diff --git a/src/java/org/apache/poi/ddf/EscherSerializationListener.java b/src/java/org/apache/poi/ddf/EscherSerializationListener.java
index 3eeaaccd1..dcc5eeeb8 100644
--- a/src/java/org/apache/poi/ddf/EscherSerializationListener.java
+++ b/src/java/org/apache/poi/ddf/EscherSerializationListener.java
@@ -19,8 +19,6 @@ package org.apache.poi.ddf;
/**
* Interface for listening to escher serialization events.
- *
- * @author Glen Stampoultzis (glens at apache.org)
*/
public interface EscherSerializationListener
{
@@ -29,6 +27,7 @@ public interface EscherSerializationListener
*
* @param offset The position in the data array at which the record will be serialized.
* @param recordId The id of the record about to be serialized.
+ * @param record The record to be serialized
*/
void beforeRecordSerialize(int offset, short recordId, EscherRecord record);
@@ -39,6 +38,7 @@ public interface EscherSerializationListener
* @param recordId The id of the record about to be serialized
* @param size The number of bytes written for this record. If it is a container
* record then this will include the size of any included records.
+ * @param record The record which was serialized
*/
void afterRecordSerialize(int offset, short recordId, int size, EscherRecord record);
}
diff --git a/src/java/org/apache/poi/ddf/EscherSimpleProperty.java b/src/java/org/apache/poi/ddf/EscherSimpleProperty.java
index b33168194..3872aa905 100644
--- a/src/java/org/apache/poi/ddf/EscherSimpleProperty.java
+++ b/src/java/org/apache/poi/ddf/EscherSimpleProperty.java
@@ -32,6 +32,9 @@ public class EscherSimpleProperty extends EscherProperty
/**
* The id is distinct from the actual property number. The id includes the property number the blip id
* flag and an indicator whether the property is complex or not.
+ *
+ * @param id the property id
+ * @param propertyValue the property value
*/
public EscherSimpleProperty( short id, int propertyValue )
{
@@ -40,8 +43,12 @@ public class EscherSimpleProperty extends EscherProperty
}
/**
- * Constructs a new escher property. The three parameters are combined to form a property
- * id.
+ * Constructs a new escher property. The three parameters are combined to form a property id.
+ *
+ * @param propertyNumber the property number
+ * @param isComplex true, if its a complex property
+ * @param isBlipId true, if its a blip
+ * @param propertyValue the property value
*/
public EscherSimpleProperty( short propertyNumber, boolean isComplex, boolean isBlipId, int propertyValue )
{
diff --git a/src/java/org/apache/poi/hpsf/DocumentSummaryInformation.java b/src/java/org/apache/poi/hpsf/DocumentSummaryInformation.java
index 43660ded0..0f8c629cf 100644
--- a/src/java/org/apache/poi/hpsf/DocumentSummaryInformation.java
+++ b/src/java/org/apache/poi/hpsf/DocumentSummaryInformation.java
@@ -39,6 +39,7 @@ public class DocumentSummaryInformation extends SpecialPropertySet
public static final String DEFAULT_STREAM_NAME =
"\005DocumentSummaryInformation";
+ @Override
public PropertyIDMap getPropertySetIDMap() {
return PropertyIDMap.getDocumentSummaryInformationProperties();
}
@@ -64,7 +65,7 @@ public class DocumentSummaryInformation extends SpecialPropertySet
/**
- * Returns the category (or Returns the category (or {@code null}). Returns the presentation format (or
- * options
is an internal field.
+ * Use {@link #setInstance(short)} ()} and {@link #setVersion(short)} ()} to set the actual fields.
+ *
* @return The options field for this record. All records have one.
*/
@Internal
@@ -122,13 +121,13 @@ public abstract class EscherRecord {
}
/**
- * Set the options this this record. Container records should have the
- * last nibble set to 0xF.
- *
- * null
).null
).
Returns the heading pair (or null
)
+ *
Returns the heading pair (or {@code null}) * when this method is implemented. Please note that the * return type is likely to change! * @@ -429,7 +430,7 @@ public class DocumentSummaryInformation extends SpecialPropertySet /** - *
Returns the doc parts (or null
)
+ *
Returns the doc parts (or {@code null}) * when this method is implemented. Please note that the * return type is likely to change! * @@ -465,7 +466,7 @@ public class DocumentSummaryInformation extends SpecialPropertySet /** - *
Returns the manager (or null
).
Returns the manager (or {@code null}).
* * @return The manager value */ @@ -497,7 +498,7 @@ public class DocumentSummaryInformation extends SpecialPropertySet /** - *Returns the company (or null
).
Returns the company (or {@code null}).
* * @return The company value */ @@ -563,7 +564,7 @@ public class DocumentSummaryInformation extends SpecialPropertySet * {@link DocumentSummaryInformation} does not contain this char count. *This is the whitespace-including version of {@link SummaryInformation#getCharCount()}
*
- * @return The character count or null
+ * @return The character count or {@code null}
*/
public int getCharCountWithSpaces()
{
@@ -592,9 +593,11 @@ public class DocumentSummaryInformation extends SpecialPropertySet
/**
- *
Get if the User Defined Property Set has been updated outside of the - * Application.
- *If it has (true), the hyperlinks should be updated on document load.
+ * Get if the User Defined Property Set has been updated outside of the + * Application.+ * If it has (true), the hyperlinks should be updated on document load. + * + * @return true, if the hyperlinks should be updated on document load */ public boolean getHyperlinksChanged() { @@ -604,6 +607,8 @@ public class DocumentSummaryInformation extends SpecialPropertySet /** * Set the flag for if the User Defined Property Set has been updated outside * of the Application. + * + * @param changed true, if the User Defined Property Set has been updated */ public void setHyperlinksChanged(boolean changed) { @@ -623,10 +628,12 @@ public class DocumentSummaryInformation extends SpecialPropertySet /** - *
Gets the version of the Application which wrote the + * Gets the version of the Application which wrote the * Property set, stored with the two high order bytes having the major - * version number, and the two low order bytes the minor version number.
- *This will be 0 if no version is set.
+ * version number, and the two low order bytes the minor version number.+ * This will be 0 if no version is set. + * + * @return the Application version */ public int getApplicationVersion() { @@ -637,6 +644,8 @@ public class DocumentSummaryInformation extends SpecialPropertySet * Sets the Application version, which must be a 4 byte int with * the two high order bytes having the major version number, and the * two low order bytes the minor version number. + * + * @param version the Application version */ public void setApplicationVersion(int version) { @@ -655,8 +664,10 @@ public class DocumentSummaryInformation extends SpecialPropertySet /** - *
Returns the VBA digital signature for the VBA project
- * embedded in the document (or null
).
Gets the content type of the file (or null
).
Gets the content status of the file (or null
).
Gets the document language, which is normally unset and empty
- * (or null
).
Gets the document version as a string, which is normally unset and empty
- * (or null
).
* * (As with all chart related records, documentation is lacking. * See {@link ChartRecord} for more details) - * - * @author Glen Stampoultzis (glens at apache.org) */ public final class ChartFormatRecord extends StandardRecord { public static final short sid = 0x1014; diff --git a/src/java/org/apache/poi/hssf/record/chart/ChartRecord.java b/src/java/org/apache/poi/hssf/record/chart/ChartRecord.java index 3909a0c41..8a4deeb8b 100644 --- a/src/java/org/apache/poi/hssf/record/chart/ChartRecord.java +++ b/src/java/org/apache/poi/hssf/record/chart/ChartRecord.java @@ -22,9 +22,9 @@ import org.apache.poi.hssf.record.StandardRecord; import org.apache.poi.util.LittleEndianOutput; /** - * CHART (0x1002)
+ * CHART (0x1002)* - * The chart record is used to define the location and size of a chart.
+ * The chart record is used to define the location and size of a chart.
*
* Chart related records don't seem to be covered in either the
* OOO
@@ -37,8 +37,6 @@ import org.apache.poi.util.LittleEndianOutput;
* blog
* suggests that some documentation for these records is available in "MSDN Library, Feb 1998",
* but no later.
- *
- * @author Glen Stampoultzis (glens at apache.org)
*/
public final class ChartRecord extends StandardRecord implements Cloneable {
public final static short sid = 0x1002;
diff --git a/src/java/org/apache/poi/hssf/record/chart/ChartStartBlockRecord.java b/src/java/org/apache/poi/hssf/record/chart/ChartStartBlockRecord.java
index b35a9ee25..80ef48181 100644
--- a/src/java/org/apache/poi/hssf/record/chart/ChartStartBlockRecord.java
+++ b/src/java/org/apache/poi/hssf/record/chart/ChartStartBlockRecord.java
@@ -23,9 +23,7 @@ import org.apache.poi.util.HexDump;
import org.apache.poi.util.LittleEndianOutput;
/**
- * STARTBLOCK - Chart Future Record Type Start Block (0x0852)
- *
- * @author Patrick Cheng
+ * STARTBLOCK - Chart Future Record Type Start Block (0x0852)
*/
public final class ChartStartBlockRecord extends StandardRecord implements Cloneable {
public static final short sid = 0x0852;
diff --git a/src/java/org/apache/poi/hssf/record/chart/ChartStartObjectRecord.java b/src/java/org/apache/poi/hssf/record/chart/ChartStartObjectRecord.java
index 505894349..aa2ed5f4f 100644
--- a/src/java/org/apache/poi/hssf/record/chart/ChartStartObjectRecord.java
+++ b/src/java/org/apache/poi/hssf/record/chart/ChartStartObjectRecord.java
@@ -23,9 +23,7 @@ import org.apache.poi.util.HexDump;
import org.apache.poi.util.LittleEndianOutput;
/**
- * STARTOBJECT - Chart Future Record Type Start Object (0x0854)
- *
- * @author Patrick Cheng
+ * STARTOBJECT - Chart Future Record Type Start Object (0x0854)
*/
public final class ChartStartObjectRecord extends StandardRecord {
public static final short sid = 0x0854;
diff --git a/src/java/org/apache/poi/hssf/record/chart/ChartTitleFormatRecord.java b/src/java/org/apache/poi/hssf/record/chart/ChartTitleFormatRecord.java
index f724aada3..f98891db0 100644
--- a/src/java/org/apache/poi/hssf/record/chart/ChartTitleFormatRecord.java
+++ b/src/java/org/apache/poi/hssf/record/chart/ChartTitleFormatRecord.java
@@ -25,7 +25,7 @@ import org.apache.poi.hssf.record.StandardRecord;
import org.apache.poi.util.LittleEndianOutput;
/**
- * CHARTTITLEFORMAT (0x1050)
* Describes the formatting runs associated with a chart title. */ public class ChartTitleFormatRecord extends StandardRecord { diff --git a/src/java/org/apache/poi/hssf/record/chart/DatRecord.java b/src/java/org/apache/poi/hssf/record/chart/DatRecord.java index 68a0ed60c..18d07bf02 100644 --- a/src/java/org/apache/poi/hssf/record/chart/DatRecord.java +++ b/src/java/org/apache/poi/hssf/record/chart/DatRecord.java @@ -25,9 +25,7 @@ import org.apache.poi.util.HexDump; import org.apache.poi.util.LittleEndianOutput; /** - * The dat record is used to store options for the chart.
- * - * @author Glen Stampoultzis (glens at apache.org) + * The dat record is used to store options for the chart. */ public final class DatRecord extends StandardRecord implements Cloneable { public final static short sid = 0x1063; diff --git a/src/java/org/apache/poi/hssf/record/chart/DataFormatRecord.java b/src/java/org/apache/poi/hssf/record/chart/DataFormatRecord.java index b2328943b..715160852 100644 --- a/src/java/org/apache/poi/hssf/record/chart/DataFormatRecord.java +++ b/src/java/org/apache/poi/hssf/record/chart/DataFormatRecord.java @@ -25,9 +25,7 @@ import org.apache.poi.util.HexDump; import org.apache.poi.util.LittleEndianOutput; /** - * The data format record is used to index into a series. - * - * @author Glen Stampoultzis (glens at apache.org) + * The data format record is used to index into a series. */ public final class DataFormatRecord extends StandardRecord implements Cloneable { public final static short sid = 0x1006; diff --git a/src/java/org/apache/poi/hssf/record/chart/DataLabelExtensionRecord.java b/src/java/org/apache/poi/hssf/record/chart/DataLabelExtensionRecord.java index 9fd23c487..abda36e5b 100644 --- a/src/java/org/apache/poi/hssf/record/chart/DataLabelExtensionRecord.java +++ b/src/java/org/apache/poi/hssf/record/chart/DataLabelExtensionRecord.java @@ -23,9 +23,7 @@ import org.apache.poi.util.HexDump; import org.apache.poi.util.LittleEndianOutput; /** - * DATALABEXT - Chart Data Label Extension (0x086A)
*
- * The series list record defines the series displayed as an overlay to the main chart record.
+ * The series list record defines the series displayed as an overlay to the main chart record.
* * (As with all chart related records, documentation is lacking. * See {@link ChartRecord} for more details) - * - * @author Glen Stampoultzis (glens at apache.org) */ public final class SeriesListRecord extends StandardRecord { public final static short sid = 0x1016; diff --git a/src/java/org/apache/poi/hssf/record/chart/SeriesRecord.java b/src/java/org/apache/poi/hssf/record/chart/SeriesRecord.java index 91be5aa9a..0ff5564ac 100644 --- a/src/java/org/apache/poi/hssf/record/chart/SeriesRecord.java +++ b/src/java/org/apache/poi/hssf/record/chart/SeriesRecord.java @@ -23,9 +23,7 @@ import org.apache.poi.util.HexDump; import org.apache.poi.util.LittleEndianOutput; /** - * The series record describes the overall data for a series.
- * - * @author Glen Stampoultzis (glens at apache.org) + * The series record describes the overall data for a series. */ public final class SeriesRecord extends StandardRecord { public final static short sid = 0x1003; diff --git a/src/java/org/apache/poi/hssf/record/chart/SeriesTextRecord.java b/src/java/org/apache/poi/hssf/record/chart/SeriesTextRecord.java index 01a78b51a..7e349895a 100644 --- a/src/java/org/apache/poi/hssf/record/chart/SeriesTextRecord.java +++ b/src/java/org/apache/poi/hssf/record/chart/SeriesTextRecord.java @@ -24,10 +24,8 @@ import org.apache.poi.util.LittleEndianOutput; import org.apache.poi.util.StringUtil; /** - * SERIESTEXT (0x100D) - * Defines a series name - * - * @author Andrew C. Oliver (acoliver at apache.org) + * SERIESTEXT (0x100D)+ * Defines a series name */ public final class SeriesTextRecord extends StandardRecord { public final static short sid = 0x100D; diff --git a/src/java/org/apache/poi/hssf/record/chart/SeriesToChartGroupRecord.java b/src/java/org/apache/poi/hssf/record/chart/SeriesToChartGroupRecord.java index 164f82c7f..fcb73e84f 100644 --- a/src/java/org/apache/poi/hssf/record/chart/SeriesToChartGroupRecord.java +++ b/src/java/org/apache/poi/hssf/record/chart/SeriesToChartGroupRecord.java @@ -23,11 +23,9 @@ import org.apache.poi.util.HexDump; import org.apache.poi.util.LittleEndianOutput; /** - * Indicates the chart-group index for a series. The order probably defines the mapping. - * So the 0th record probably means the 0th series. The only field in this of course defines which chart - * group the 0th series (for instance) would map to. Confusing? Well thats because it is. (p 522 BCG)
- * - * @author Andrew C. Oliver (acoliver at apache.org) + * Indicates the chart-group index for a series. The order probably defines the mapping. + * So the 0th record probably means the 0th series. The only field in this of course defines which chart + * group the 0th series (for instance) would map to. Confusing? Well thats because it is. (p 522 BCG) */ public final class SeriesToChartGroupRecord extends StandardRecord { public final static short sid = 0x1045; diff --git a/src/java/org/apache/poi/hssf/record/chart/SheetPropertiesRecord.java b/src/java/org/apache/poi/hssf/record/chart/SheetPropertiesRecord.java index eae23a432..d264459f8 100644 --- a/src/java/org/apache/poi/hssf/record/chart/SheetPropertiesRecord.java +++ b/src/java/org/apache/poi/hssf/record/chart/SheetPropertiesRecord.java @@ -25,12 +25,10 @@ import org.apache.poi.util.HexDump; import org.apache.poi.util.LittleEndianOutput; /** - * Describes a chart sheet properties record. SHTPROPS (0x1044) + * Describes a chart sheet properties record. SHTPROPS (0x1044)* * (As with all chart related records, documentation is lacking. * See {@link ChartRecord} for more details) - * - * @author Glen Stampoultzis (glens at apache.org) */ public final class SheetPropertiesRecord extends StandardRecord { public final static short sid = 0x1044; diff --git a/src/java/org/apache/poi/hssf/record/chart/TextRecord.java b/src/java/org/apache/poi/hssf/record/chart/TextRecord.java index 1772d3006..28fb65318 100644 --- a/src/java/org/apache/poi/hssf/record/chart/TextRecord.java +++ b/src/java/org/apache/poi/hssf/record/chart/TextRecord.java @@ -25,9 +25,7 @@ import org.apache.poi.util.HexDump; import org.apache.poi.util.LittleEndianOutput; /** - * The text record is used to define text stored on a chart.
- * - * @author Glen Stampoultzis (glens at apache.org) + * The text record is used to define text stored on a chart. */ public final class TextRecord extends StandardRecord { public final static short sid = 0x1025; diff --git a/src/java/org/apache/poi/hssf/record/chart/UnitsRecord.java b/src/java/org/apache/poi/hssf/record/chart/UnitsRecord.java index 1ad666229..cab88c077 100644 --- a/src/java/org/apache/poi/hssf/record/chart/UnitsRecord.java +++ b/src/java/org/apache/poi/hssf/record/chart/UnitsRecord.java @@ -23,9 +23,7 @@ import org.apache.poi.util.HexDump; import org.apache.poi.util.LittleEndianOutput; /** - * The units record describes units. - * - * @author Glen Stampoultzis (glens at apache.org) + * The units record describes units. */ public final class UnitsRecord extends StandardRecord { public final static short sid = 0x1001; diff --git a/src/java/org/apache/poi/hssf/record/chart/ValueRangeRecord.java b/src/java/org/apache/poi/hssf/record/chart/ValueRangeRecord.java index df3aa7c00..e098011a6 100644 --- a/src/java/org/apache/poi/hssf/record/chart/ValueRangeRecord.java +++ b/src/java/org/apache/poi/hssf/record/chart/ValueRangeRecord.java @@ -25,9 +25,7 @@ import org.apache.poi.util.HexDump; import org.apache.poi.util.LittleEndianOutput; /** - * The value range record defines the range of the value axis. - * - * @author Glen Stampoultzis (glens at apache.org) + * The value range record defines the range of the value axis. */ public final class ValueRangeRecord extends StandardRecord { public final static short sid = 0x101f; diff --git a/src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java b/src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java index 89b3c9e99..f0c10efd0 100644 --- a/src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java +++ b/src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java @@ -490,32 +490,26 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet { } /** - * Set the width (in units of 1/256th of a character width) - * - *+ * Set the width (in units of 1/256th of a character width)
+ * * The maximum column width for an individual cell is 255 characters. * This value represents the number of characters that can be displayed - * in a cell that is formatted with the standard font (first font in the workbook). - *
- * - *+ * in a cell that is formatted with the standard font (first font in the workbook).
+ *
* Character width is defined as the maximum digit width
* of the numbers 0, 1, 2, ... 9
as rendered
- * using the default font (first font in the workbook).
- *
+ * using the default font (first font in the workbook).
+ * * Unless you are using a very special font, the default character is '0' (zero), - * this is true for Arial (default font font in HSSF) and Calibri (default font in XSSF) - *
- * - *+ * this is true for Arial (default font font in HSSF) and Calibri (default font in XSSF)
+ * * Please note, that the width set by this method includes 4 pixels of margin padding (two on each side), * plus 1 pixel padding for the gridlines (Section 3.3.1.12 of the OOXML spec). - * This results is a slightly less value of visible characters than passed to this method (approx. 1/2 of a character). - *
- *+ * This results is a slightly less value of visible characters than passed to this method (approx. 1/2 of a character).
+ * * To compute the actual number of visible characters, - * Excel uses the following formula (Section 3.3.1.12 of the OOXML spec): - *
+ * Excel uses the following formula (Section 3.3.1.12 of the OOXML spec):
+ *
*
+ * when the workbook is opened.
+ *
* Calculating the formula values with {@link org.apache.poi.ss.usermodel.FormulaEvaluator} is the
* recommended solution, but this may be used for certain cases where
- * evaluation in POI is not possible.
- *
+ * evaluation in POI is not possible.
+ *
* It is recommended to force recalcuation of formulas on workbook level using
* {@link org.apache.poi.ss.usermodel.Workbook#setForceFormulaRecalculation(boolean)}
* to ensure that all cross-worksheet formuals and external dependencies are updated.
- *
+ *
+ * Calls {@code shiftRows(startRow, endRow, n, false, false);}
+ *
* Additionally shifts merged regions that are completely defined in these
* rows (ie. merged 2 cells on a row to be shifted).
*
@@ -1517,12 +1506,11 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
/**
* Shifts rows between startRow and endRow n number of rows.
* If you use a negative number, it will shift rows up.
- * Code ensures that rows don't wrap around
- *
+ *
* Additionally shifts merged regions that are completely defined in these
- * rows (ie. merged 2 cells on a row to be shifted).
- *
+ *
* TODO Might want to add bounds checking here
*
* @param startRow the row to start shifting
@@ -1539,12 +1527,11 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
/**
* Shifts rows between startRow and endRow n number of rows.
* If you use a negative number, it will shift rows up.
- * Code ensures that rows don't wrap around
- *
+ *
* Additionally shifts merged regions that are completely defined in these
- * rows (ie. merged 2 cells on a row to be shifted).
- *
+ *
* TODO Might want to add bounds checking here
*
* @param startRow the row to start shifting
@@ -1738,11 +1725,9 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
}
/**
- * Creates a split (freezepane). Any existing freezepane or split pane is overwritten.
- *
+ * Creates a split (freezepane). Any existing freezepane or split pane is overwritten.
+ *
* If both colSplit and rowSplit are zero then the existing freeze pane is removed
- *
+ * Creates a split (freezepane). Any existing freezepane or split pane is overwritten.
+ *
* If both colSplit and rowSplit are zero then the existing freeze pane is removed
- *
+ *
* For example,
+ *
* For example,
+ *
* This process can be relatively slow on large sheets, so this should
* normally only be called once per column, at the end of your
* processing.
@@ -2155,12 +2138,12 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
}
/**
- * Adjusts the column width to fit the contents.
- *
+ *
* This process can be relatively slow on large sheets, so this should
* normally only be called once per column, at the end of your
- * processing.
- *
+ *
* You can specify whether the content of merged cells should be considered or ignored.
* Default is to ignore merged cells.
*
diff --git a/src/ooxml/java/org/apache/poi/POIXMLProperties.java b/src/ooxml/java/org/apache/poi/POIXMLProperties.java
index a8cb58dfe..1efc9419c 100644
--- a/src/ooxml/java/org/apache/poi/POIXMLProperties.java
+++ b/src/ooxml/java/org/apache/poi/POIXMLProperties.java
@@ -154,10 +154,11 @@ public class POIXMLProperties {
return name.substring(name.lastIndexOf('/'));
}
/**
- * Returns the Document thumbnail image data, or
- *
* width = Truncate([{Number of Visible Characters} *
* {Maximum Digit Width} + {5 pixel padding}]/{Maximum Digit Width}*256)/256
@@ -531,7 +525,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
*
* @param columnIndex - the column to set (0-based)
* @param width - the width in units of 1/256th of a character width
- * @throws IllegalArgumentException if width > 255*256 (the maximum column width in Excel is 255 characters)
+ * @throws IllegalArgumentException if width > 255*256 (the maximum column width in Excel is 255 characters)
*/
@Override
public void setColumnWidth(int columnIndex, int width) {
@@ -809,19 +803,15 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
/**
* Control if Excel should be asked to recalculate all formulas on this sheet
- * when the workbook is opened.
- *
- *
@@ -1497,11 +1487,10 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
/**
* Shifts rows between startRow and endRow n number of rows.
* If you use a negative number, it will shift rows up.
- * Code ensures that rows don't wrap around.
- *
- * Calls shiftRows(startRow, endRow, n, false, false);
- *
- *
+ * Code ensures that rows don't wrap around.
sheet.setColumnBreak(2);
breaks the sheet into two parts
* with columns A,B,C in the first and D,E,... in the second. Simuilar, sheet.setRowBreak(2);
* breaks the sheet into two parts with first three rows (rownum=1...3) in the first part
@@ -1918,10 +1901,10 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
/**
* Sets a page break at the indicated column.
- * Breaks occur above the specified row and left of the specified column inclusive.
- * sheet.setColumnBreak(2);
breaks the sheet into two parts
- * with columns A,B,C in the first and D,E,... in the second. Simuilar, sheet.setRowBreak(2);
+ * with columns A,B,C in the first and D,E,... in the second. Simuilar, {@code sheet.setRowBreak(2);}
* breaks the sheet into two parts with first three rows (rownum=1...3) in the first part
* and rows starting with rownum=4 in the second.
*
@@ -2141,8 +2124,8 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
}
/**
- * Adjusts the column width to fit the contents.
- * null
if there isn't one.
+ * Returns the Document thumbnail image data, or {@code null} if there isn't one.
*
* @return The thumbnail data, or null
+ *
+ * @throws IOException if the thumbnail can't be read
*/
public InputStream getThumbnailImage() throws IOException {
PackagePart tPart = getThumbnailPart();
@@ -166,11 +167,12 @@ public class POIXMLProperties {
}
/**
- * Sets the Thumbnail for the document, replacing any existing
- * one.
+ * Sets the Thumbnail for the document, replacing any existing one.
*
- * @param name The filename for the thumbnail image, eg thumbnail.jpg
+ * @param filename The filename for the thumbnail image, eg {@code thumbnail.jpg}
* @param imageData The inputstream to read the thumbnail image from
+ *
+ * @throws IOException if the thumbnail can't be written
*/
public void setThumbnail(String filename, InputStream imageData) throws IOException {
PackagePart tPart = getThumbnailPart();
diff --git a/src/ooxml/java/org/apache/poi/POIXMLPropertiesTextExtractor.java b/src/ooxml/java/org/apache/poi/POIXMLPropertiesTextExtractor.java
index 1ed72abaa..b2621ebd1 100644
--- a/src/ooxml/java/org/apache/poi/POIXMLPropertiesTextExtractor.java
+++ b/src/ooxml/java/org/apache/poi/POIXMLPropertiesTextExtractor.java
@@ -38,8 +38,9 @@ public class POIXMLPropertiesTextExtractor extends POIXMLTextExtractor {
private final DateFormat dateFormat;
/**
- * Creates a new POIXMLPropertiesTextExtractor for the
- * given open document.
+ * Creates a new POIXMLPropertiesTextExtractor for the given open document.
+ *
+ * @param doc the given open document
*/
public POIXMLPropertiesTextExtractor(POIXMLDocument doc) {
super(doc);
@@ -52,6 +53,8 @@ public class POIXMLPropertiesTextExtractor extends POIXMLTextExtractor {
* Creates a new POIXMLPropertiesTextExtractor, for the
* same file that another TextExtractor is already
* working on.
+ *
+ * @param otherExtractor the extractor referencing the given file
*/
public POIXMLPropertiesTextExtractor(POIXMLTextExtractor otherExtractor) {
this(otherExtractor.getDocument());
@@ -77,6 +80,8 @@ public class POIXMLPropertiesTextExtractor extends POIXMLTextExtractor {
/**
* Returns the core document properties, eg author
+ *
+ * @return the core document properties
*/
@SuppressWarnings("resource")
public String getCorePropertiesText() {
@@ -113,8 +118,9 @@ public class POIXMLPropertiesTextExtractor extends POIXMLTextExtractor {
return text.toString();
}
/**
- * Returns the extended document properties, eg
- * application
+ * Returns the extended document properties, eg application
+ *
+ * @return the extended document properties
*/
@SuppressWarnings("resource")
public String getExtendedPropertiesText() {
@@ -146,8 +152,9 @@ public class POIXMLPropertiesTextExtractor extends POIXMLTextExtractor {
return text.toString();
}
/**
- * Returns the custom document properties, if
- * there are any
+ * Returns the custom document properties, if there are any
+ *
+ * @return the custom document properties
*/
@SuppressWarnings({ "resource" })
public String getCustomPropertiesText() {
diff --git a/src/ooxml/java/org/apache/poi/POIXMLRelation.java b/src/ooxml/java/org/apache/poi/POIXMLRelation.java
index 68b4174eb..8578f8025 100644
--- a/src/ooxml/java/org/apache/poi/POIXMLRelation.java
+++ b/src/ooxml/java/org/apache/poi/POIXMLRelation.java
@@ -18,8 +18,6 @@ package org.apache.poi;
/**
* Represents a descriptor of a OOXML relation.
- *
- * @author Yegor Kozlov
*/
public abstract class POIXMLRelation {
@@ -100,8 +98,10 @@ public abstract class POIXMLRelation {
}
/**
- * Returns the filename for the nth one of these,
- * e.g. /xl/comments4.xml
+ * Returns the filename for the nth one of these, e.g. /xl/comments4.xml
+ *
+ * @param index the suffix for the document type
+ * @return the filename including the suffix
*/
public String getFileName(int index) {
if(_defaultName.indexOf("#") == -1) {
@@ -114,6 +114,9 @@ public abstract class POIXMLRelation {
/**
* Returns the index of the filename within the package for the given part.
* e.g. 4 for /xl/comments4.xml
+ *
+ * @param part the part to read the suffix from
+ * @return the suffix
*/
public Integer getFileNameIndex(POIXMLDocumentPart part) {
String regex = _defaultName.replace("#", "(\\d+)");
diff --git a/src/ooxml/java/org/apache/poi/POIXMLTextExtractor.java b/src/ooxml/java/org/apache/poi/POIXMLTextExtractor.java
index db771ce7c..6001a7051 100644
--- a/src/ooxml/java/org/apache/poi/POIXMLTextExtractor.java
+++ b/src/ooxml/java/org/apache/poi/POIXMLTextExtractor.java
@@ -38,18 +38,24 @@ public abstract class POIXMLTextExtractor extends POITextExtractor {
/**
* Returns the core document properties
+ *
+ * @return the core document properties
*/
public CoreProperties getCoreProperties() {
return _document.getProperties().getCoreProperties();
}
/**
* Returns the extended document properties
+ *
+ * @return the extended document properties
*/
public ExtendedProperties getExtendedProperties() {
return _document.getProperties().getExtendedProperties();
}
/**
* Returns the custom document properties
+ *
+ * @return the custom document properties
*/
public CustomProperties getCustomProperties() {
return _document.getProperties().getCustomProperties();
@@ -57,6 +63,8 @@ public abstract class POIXMLTextExtractor extends POITextExtractor {
/**
* Returns opened document
+ *
+ * @return the opened document
*/
public final POIXMLDocument getDocument() {
return _document;
@@ -64,6 +72,8 @@ public abstract class POIXMLTextExtractor extends POITextExtractor {
/**
* Returns the opened OPCPackage that contains the document
+ *
+ * @return the opened OPCPackage
*/
public OPCPackage getPackage() {
return _document.getPackage();
diff --git a/src/ooxml/java/org/apache/poi/openxml4j/opc/OPCPackage.java b/src/ooxml/java/org/apache/poi/openxml4j/opc/OPCPackage.java
index fcd50ada6..d5f5d03ae 100644
--- a/src/ooxml/java/org/apache/poi/openxml4j/opc/OPCPackage.java
+++ b/src/ooxml/java/org/apache/poi/openxml4j/opc/OPCPackage.java
@@ -492,7 +492,8 @@ public abstract class OPCPackage implements RelationshipSource, Closeable {
* the addition of a thumbnail in a package. You can do the same work by
* using the traditionnal relationship and part mechanism.
*
- * @param path The full path to the image file.
+ * @param filename The full path to the image file.
+ * @param data the image data
*/
public void addThumbnail(String filename, InputStream data) throws IOException {
// Check parameter
diff --git a/src/scratchpad/src/org/apache/poi/hslf/record/HSLFEscherRecordFactory.java b/src/scratchpad/src/org/apache/poi/hslf/record/HSLFEscherRecordFactory.java
index a37ea943c..bd8d507cb 100644
--- a/src/scratchpad/src/org/apache/poi/hslf/record/HSLFEscherRecordFactory.java
+++ b/src/scratchpad/src/org/apache/poi/hslf/record/HSLFEscherRecordFactory.java
@@ -40,14 +40,7 @@ public class HSLFEscherRecordFactory extends DefaultEscherRecordFactory {
// no instance initialisation
}
- /**
- * Generates an escher record including the any children contained under that record.
- * An exception is thrown if the record could not be generated.
- *
- * @param data The byte array containing the records
- * @param offset The starting offset into the byte array
- * @return The generated escher record
- */
+ @Override
public EscherRecord createRecord(byte[] data, int offset) {
short options = LittleEndian.getShort( data, offset );
short recordId = LittleEndian.getShort( data, offset + 2 );