From: Andreas Beeker Date: Sun, 11 Apr 2021 20:17:06 +0000 (+0000) Subject: :poi - fix javadocs - link to dependent/external project javadocs X-Git-Tag: REL_5_1_0~256 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=382714eccd92667fc83f70115b736c64ebff9700;p=poi.git :poi - fix javadocs - link to dependent/external project javadocs git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1888640 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/poi/build.gradle b/poi/build.gradle index 4ff4342e77..e6ee6bde48 100644 --- a/poi/build.gradle +++ b/poi/build.gradle @@ -31,6 +31,7 @@ final String VERSIONS9 = 'META-INF/versions/9' configurations { tests + javadocs } sourceSets { @@ -59,6 +60,9 @@ dependencies { testImplementation "org.junit.jupiter:junit-jupiter-api:${junitVersion}" testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junitVersion}" + + javadocs project(':poi-ooxml') + javadocs project(':poi-scratchpad') } final String MODULE_NAME = 'org.apache.poi.poi' @@ -201,11 +205,20 @@ test { } javadoc { -// fails currently, need to fix the sources - failOnError = false -// if(JavaVersion.current().isJava9Compatible()) { -// options.addBooleanOption('html5', true) -// } + failOnError = true + doFirst { + options { + if (JavaVersion.current().isJava9Compatible()) { + addBooleanOption('html5', true) + } + links 'https://poi.apache.org/apidocs/dev/' + links 'https://docs.oracle.com/javase/8/docs/api/' + use = true + splitIndex = true + source = "1.8" + classpath += configurations.javadocs.files + } + } } artifacts { diff --git a/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFDataFormat.java b/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFDataFormat.java index 09284dcb90..e9a68aa21b 100644 --- a/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFDataFormat.java +++ b/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFDataFormat.java @@ -34,10 +34,8 @@ import org.apache.poi.ss.usermodel.DataFormat; * International Formats
* Since version 2003 Excel has supported international formats. These are denoted * with a prefix "[$-xxx]" (where xxx is a 1-7 digit hexadecimal number). - * See the Microsoft article - * - * Creating international number formats - * for more details on these codes. + * + * @see Review guidelines for customizing a number format */ public final class HSSFDataFormat implements DataFormat { private static final String[] _builtinFormats = BuiltinFormats.getAll(); @@ -107,7 +105,7 @@ public final class HSSFDataFormat implements DataFormat { } _movedBuiltins = true; } - + // See if we can find it for(int i=0; i<_formats.size(); i++) { if(format.equals(_formats.get(i))) { @@ -168,7 +166,7 @@ public final class HSSFDataFormat implements DataFormat { public static int getNumberOfBuiltinBuiltinFormats() { return _builtinFormats.length; } - + /** * Ensures that the formats list can hold entries * up to and including the entry with this index diff --git a/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFRow.java b/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFRow.java index 0ecc946636..eb1be9c208 100644 --- a/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFRow.java +++ b/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFRow.java @@ -106,7 +106,7 @@ public final class HSSFRow implements Row, Comparable { * @param column - the column number this cell represents * * @return HSSFCell a high level representation of the created cell. - * @throws IllegalArgumentException if columnIndex < 0 or greater than 255, + * @throws IllegalArgumentException if columnIndex < 0 or greater than 255, * the maximum number of columns supported by the Excel binary format (.xls) */ @Override @@ -126,7 +126,7 @@ public final class HSSFRow implements Row, Comparable { * @param columnIndex - the column number this cell represents * * @return HSSFCell a high level representation of the created cell. - * @throws IllegalArgumentException if columnIndex < 0 or greater than 255, + * @throws IllegalArgumentException if columnIndex < 0 or greater than 255, * the maximum number of columns supported by the Excel binary format (.xls) */ @Override diff --git a/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFSheet.java b/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFSheet.java index 975419077c..b37f54605a 100644 --- a/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFSheet.java +++ b/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFSheet.java @@ -1748,7 +1748,7 @@ public final class HSSFSheet implements Sheet { /** * Shifts columns in range [startColumn, endColumn] for n places to the right. - * For n < 0, it will shift columns left. + * For n < 0, it will shift columns left. * Additionally adjusts formulas. * Probably should also process other features (hyperlinks, comments...) in the way analog to shiftRows method * @param startColumn the column to start shifting diff --git a/poi/src/main/java/org/apache/poi/poifs/filesystem/POIFSDocumentPath.java b/poi/src/main/java/org/apache/poi/poifs/filesystem/POIFSDocumentPath.java index 1db851e8b6..9fdd4e824f 100644 --- a/poi/src/main/java/org/apache/poi/poifs/filesystem/POIFSDocumentPath.java +++ b/poi/src/main/java/org/apache/poi/poifs/filesystem/POIFSDocumentPath.java @@ -54,9 +54,10 @@ public class POIFSDocumentPath { * @param components the Strings making up the path to a document. * The Strings must be ordered as they appear in the directory hierarchy of the the document. * The first string must be the name of a directory in the root of the POIFSFileSystem, and - * every Nth (for N > 1) string thereafter must be the name of a directory in the directory - * identified by the (N-1)th string.

If the components parameter is null or has zero length, - * the POIFSDocumentPath is appropriate for a document that is in the root of a POIFSFileSystem + * every Nth (for N > 1) string thereafter must be the name of a directory in the directory + * identified by the (N-1)th string.

+ * If the components parameter is null or has zero length, the POIFSDocumentPath is appropriate + * for a document that is in the root of a POIFSFileSystem * * @exception IllegalArgumentException * if any of the elements in the components parameter are null or have zero length @@ -133,7 +134,7 @@ public class POIFSDocumentPath { * * @return the nth component; * - * @exception ArrayIndexOutOfBoundsException if n < 0 or n >= length() + * @exception ArrayIndexOutOfBoundsException if n < 0 or n >= length() */ public String getComponent(int n) throws ArrayIndexOutOfBoundsException { return components[ n ]; diff --git a/poi/src/main/java/org/apache/poi/poifs/property/DirectoryProperty.java b/poi/src/main/java/org/apache/poi/poifs/property/DirectoryProperty.java index 07846736c2..badb306cba 100644 --- a/poi/src/main/java/org/apache/poi/poifs/property/DirectoryProperty.java +++ b/poi/src/main/java/org/apache/poi/poifs/property/DirectoryProperty.java @@ -33,10 +33,10 @@ import java.util.Set; public class DirectoryProperty extends Property implements Parent, Iterable { /** List of Property instances */ - private List _children; + private final List _children = new ArrayList<>(); /** set of children's names */ - private Set _children_names; + private final Set _children_names = new HashSet<>(); /** * Default constructor @@ -46,8 +46,6 @@ public class DirectoryProperty extends Property implements Parent, Iterable(); - _children_names = new HashSet<>(); setName(name); setSize(0); setPropertyType(PropertyConstants.DIRECTORY_TYPE); @@ -66,8 +64,6 @@ public class DirectoryProperty extends Property implements Parent, Iterable(); - _children_names = new HashSet<>(); } /** @@ -121,7 +117,7 @@ public class DirectoryProperty extends Property implements Parent, Iterable, Serializable { - + /** * compare method. Assumes both parameters are non-null * instances of Property. One property is less than another if @@ -133,9 +129,9 @@ public class DirectoryProperty extends Property implements Parent, Iterable o2. + * positive value if o1 > o2. */ public int compare(Property o1, Property o2) { diff --git a/poi/src/main/java/org/apache/poi/sl/draw/geom/PathCommand.java b/poi/src/main/java/org/apache/poi/sl/draw/geom/PathCommand.java index 76a53e7de2..99406c71a7 100644 --- a/poi/src/main/java/org/apache/poi/sl/draw/geom/PathCommand.java +++ b/poi/src/main/java/org/apache/poi/sl/draw/geom/PathCommand.java @@ -26,11 +26,11 @@ import java.awt.geom.Path2D; * *

    *
  • arcTo
  • - *
  • moveTo/li> - *
  • lineTo/li> - *
  • cubicBezTo/li> - *
  • quadBezTo/li> - *
  • close/li> + *
  • moveTo
  • + *
  • lineTo
  • + *
  • cubicBezTo
  • + *
  • quadBezTo
  • + *
  • close
  • *
*/ public interface PathCommand { diff --git a/poi/src/main/java/org/apache/poi/sl/draw/geom/XYAdjustHandle.java b/poi/src/main/java/org/apache/poi/sl/draw/geom/XYAdjustHandle.java index 46975da2c8..0c1ff04f90 100644 --- a/poi/src/main/java/org/apache/poi/sl/draw/geom/XYAdjustHandle.java +++ b/poi/src/main/java/org/apache/poi/sl/draw/geom/XYAdjustHandle.java @@ -67,11 +67,6 @@ public final class XYAdjustHandle implements AdjustHandle { /** * Gets the value of the pos property. - * - * @return - * possible object is - * {@link CTAdjPoint2D } - * */ public AdjustPoint getPos() { return pos; @@ -79,11 +74,6 @@ public final class XYAdjustHandle implements AdjustHandle { /** * Sets the value of the pos property. - * - * @param value - * allowed object is - * {@link CTAdjPoint2D } - * */ public void setPos(AdjustPoint value) { this.pos = value; diff --git a/poi/src/main/java/org/apache/poi/sl/usermodel/SlideShowFactory.java b/poi/src/main/java/org/apache/poi/sl/usermodel/SlideShowFactory.java index a32123afe5..5a5facb0cf 100644 --- a/poi/src/main/java/org/apache/poi/sl/usermodel/SlideShowFactory.java +++ b/poi/src/main/java/org/apache/poi/sl/usermodel/SlideShowFactory.java @@ -151,7 +151,7 @@ public final class SlideShowFactory { * @return The created SlideShow * * @throws IOException if an error occurs while reading the data - * @throws EncryptedDocumentException If the SlideShow given is password protected + * @throws EncryptedDocumentException If the SlideShow given is password protected */ public static SlideShow create(InputStream inp) throws IOException, EncryptedDocumentException { return create(inp, null); diff --git a/poi/src/main/java/org/apache/poi/sl/usermodel/TextParagraph.java b/poi/src/main/java/org/apache/poi/sl/usermodel/TextParagraph.java index 354b357b94..a6c4394278 100644 --- a/poi/src/main/java/org/apache/poi/sl/usermodel/TextParagraph.java +++ b/poi/src/main/java/org/apache/poi/sl/usermodel/TextParagraph.java @@ -31,7 +31,7 @@ public interface TextParagraph< /** * Specifies a list of text alignment types */ - public enum TextAlign { + enum TextAlign { /** * For horizontal text, left aligned. * For vertical text, top aligned. @@ -54,22 +54,22 @@ public interface TextParagraph< * Align text so that it is justified across the whole line. It * is smart in the sense that it will not justify sentences * which are short - * + * * For horizontal text, flush left and right. * For vertical text, flush top and bottom. */ JUSTIFY, - + /** * Kashida justify low. - */ + */ JUSTIFY_LOW, /** * Distribute space between characters. */ DIST, - + /** * Thai distribution justification. */ @@ -77,28 +77,28 @@ public interface TextParagraph< } /** - * + * */ - public enum FontAlign { + enum FontAlign { AUTO, - + /** * Characters hang from top of line height. * Also known as "Hanging" */ TOP, - + /** * Characters centered within line height. */ CENTER, - + /** * Place characters on font baseline. - * Also known as "Roman" + * Also known as "Roman" */ BASELINE, - + /** * Characters are anchored to the very bottom of a single line. * This is different than BASELINE because of letters such as "g", "q", and "y". @@ -106,15 +106,15 @@ public interface TextParagraph< */ BOTTOM } - - public interface BulletStyle { + + interface BulletStyle { String getBulletCharacter(); String getBulletFont(); - + /** * The bullet point font size - * If bulletFontSize >= 0, then space is a percentage of normal line height. - * If bulletFontSize < 0, the absolute value in points + * If bulletFontSize >= 0, then space is a percentage of normal line height. + * If bulletFontSize < 0, the absolute value in points * * @return the bullet point font size */ @@ -124,7 +124,7 @@ public interface TextParagraph< * Convenience function to set a solid color */ void setBulletFontColor(Color color); - + void setBulletFontColor(PaintStyle color); /** @@ -133,7 +133,7 @@ public interface TextParagraph< * A {@code null} value means to use the text font color. */ PaintStyle getBulletFontColor(); - + AutoNumberingScheme getAutoNumberingScheme(); /** * Index (1-based) of the first auto number value, or null if auto numbering scheme @@ -173,8 +173,8 @@ public interface TextParagraph< * * @param spaceBefore the vertical white space before the paragraph, null to unset */ - void setSpaceBefore(Double spaceBefore); - + void setSpaceBefore(Double spaceBefore); + /** * The amount of vertical white space after the paragraph * This may be specified in two different ways, percentage spacing and font point spacing: @@ -185,7 +185,7 @@ public interface TextParagraph< * * @return the vertical white space after the paragraph or null, if unset */ - Double getSpaceAfter(); + Double getSpaceAfter(); /** * Set the amount of vertical white space that will be present after the paragraph. @@ -206,8 +206,8 @@ public interface TextParagraph< * * @param spaceAfter the vertical white space after the paragraph, null to unset */ - public void setSpaceAfter(Double spaceAfter); - + void setSpaceAfter(Double spaceAfter); + /** * @return the left margin (in points) of the paragraph or null, if unset */ @@ -217,19 +217,19 @@ public interface TextParagraph< * Specifies the left margin of the paragraph. This is specified in addition to the text body * inset and applies only to this text paragraph. That is the text body Inset and the LeftMargin * attributes are additive with respect to the text position. - * + * * @param leftMargin the left margin (in points) or null to unset */ void setLeftMargin(Double leftMargin); - - + + /** * Specifies the right margin of the paragraph. This is specified in addition to the text body * inset and applies only to this text paragraph. That is the text body Inset and the RightMargin * attributes are additive with respect to the text position. - * + * * The right margin is not support and therefore ignored by the HSLF implementation. - * + * * @return the right margin (in points) of the paragraph or null, if unset */ Double getRightMargin(); @@ -238,16 +238,16 @@ public interface TextParagraph< * @param rightMargin the right margin (in points) of the paragraph */ void setRightMargin(Double rightMargin); - + /** * @return the indent (in points) applied to the first line of text in the paragraph. * or null, if unset */ Double getIndent(); - + /** - * Specifies the indent size that will be applied to the first line of text in the paragraph. - * + * Specifies the indent size that will be applied to the first line of text in the paragraph. + * * @param indent the indent (in points) applied to the first line of text in the paragraph */ void setIndent(Double indent); @@ -255,7 +255,7 @@ public interface TextParagraph< /** * @return the text level of this paragraph (0-based). Default is 0. - */ + */ int getIndentLevel(); /** @@ -266,19 +266,19 @@ public interface TextParagraph< * @param level the level (0 ... 4) */ void setIndentLevel(int level); - + /** * Returns the vertical line spacing that is to be used within a paragraph. * This may be specified in two different ways, percentage spacing and font point spacing: *

- * If linespacing >= 0, then linespacing is a percentage of normal line height. - * If linespacing < 0, the absolute value of linespacing is the spacing in points + * If linespacing >= 0, then linespacing is a percentage of normal line height. + * If linespacing < 0, the absolute value of linespacing is the spacing in points *

* * @return the vertical line spacing or null, if unset */ Double getLineSpacing(); - + /** * This element specifies the vertical line spacing that is to be used within a paragraph. * This may be specified in two different ways, percentage spacing and font point spacing: @@ -297,18 +297,18 @@ public interface TextParagraph< * // spacing will be 48 points * paragraph.setLineSpacing(-48.0); * - * + * * @param lineSpacing the vertical line spacing */ void setLineSpacing(Double lineSpacing); String getDefaultFontFamily(); - + /** * @return the default font size, in case its not set in the textrun or null, if unset */ Double getDefaultFontSize(); - + /** * Returns the alignment that is applied to the paragraph. * @@ -325,21 +325,21 @@ public interface TextParagraph< * see {@link org.apache.poi.sl.usermodel.TextParagraph.TextAlign}. * * @param align text align - */ + */ void setTextAlign(TextAlign align); - + /** * Returns the font alignment that is applied to the paragraph. * * If this attribute is omitted, then null is return, * user code can imply the a value of {@link FontAlign#AUTO} - * + * * @return alignment that is applied to the paragraph */ FontAlign getFontAlign(); - + /** - * @return the bullet style of the paragraph, if {@code null} then no bullets are used + * @return the bullet style of the paragraph, if {@code null} then no bullets are used */ BulletStyle getBulletStyle(); @@ -347,19 +347,17 @@ public interface TextParagraph< * Sets the bullet styles. If no styles are given, the bullets are omitted. * Possible attributes are integer/double (bullet size), Color (bullet color), * character (bullet character), string (bullet font), AutoNumberingScheme - * - * @param styles */ void setBulletStyle(Object... styles); - + /** * @return the default size for a tab character within this paragraph in points, null if unset */ Double getDefaultTabSize(); - + TextShape getParentShape(); - + /** * Fetch the text runs that are contained within this block of text */ @@ -368,14 +366,14 @@ public interface TextParagraph< /** * Convenience method to determine if this text paragraph is part of * the slide header or footer - * + * * @return true if this paragraph is part of a header or footer placeholder - * + * * @since POI 3.15-beta2 */ boolean isHeaderOrFooter(); - - + + /** * Get the {@link TabStop TabStops} - the list can't be and it's entries shouldn't be modified. * Opposed to other properties, this method is not cascading to the master sheet, @@ -383,7 +381,7 @@ public interface TextParagraph< * different levels aren't merged. * * @return the tabstop collection or {@code null} if no tabstops are defined - * + * * @since POI 4.0.0 */ List getTabStops(); @@ -391,8 +389,6 @@ public interface TextParagraph< /** * Set the {@link TabStop} collection * - * @param tabStops the {@link TabStop} collection - * * @since POI 4.0.0 */ void addTabStops(double positionInPoints, TabStop.TabStopType tabStopType); @@ -400,7 +396,7 @@ public interface TextParagraph< /** * Removes the tabstops of this paragraphs. * This doesn't affect inherited tabstops, e.g. inherited by the slide master - * + * * @since POI 4.0.0 */ void clearTabStops(); diff --git a/poi/src/main/java/org/apache/poi/ss/format/CellFormatCondition.java b/poi/src/main/java/org/apache/poi/ss/format/CellFormatCondition.java index 96e9c5fcd8..d44e18f4a7 100644 --- a/poi/src/main/java/org/apache/poi/ss/format/CellFormatCondition.java +++ b/poi/src/main/java/org/apache/poi/ss/format/CellFormatCondition.java @@ -49,11 +49,11 @@ public abstract class CellFormatCondition { /** * Returns an instance of a condition object. * - * @param opString The operator as a string. One of "<", - * "<=", ">", ">=", - * "=", "==", "!=", or - * "<>". - * @param constStr The constant (such as "12"). + * @param opString The operator as a string. One of {@code <}, + * {@code <=}, {@code >}, {@code >=}, + * {@code =}, {@code ==}, {@code !=} or + * {@code <>}. + * @param constStr The constant (such as {@code 12}). * * @return A condition object for the given condition. */ diff --git a/poi/src/main/java/org/apache/poi/ss/format/CellFormatPart.java b/poi/src/main/java/org/apache/poi/ss/format/CellFormatPart.java index c03dbc5795..51f67df8b3 100644 --- a/poi/src/main/java/org/apache/poi/ss/format/CellFormatPart.java +++ b/poi/src/main/java/org/apache/poi/ss/format/CellFormatPart.java @@ -38,15 +38,13 @@ import static org.apache.poi.ss.format.CellFormatter.quote; * values. *

* Each format part can contain a color, a condition, and will always contain a - * format specification. For example "[Red][>=10]#" has a color - * ([Red]), a condition (>=10) and a format specification - * (#). + * format specification. For example {@code "[Red][>=10]#"} has a color + * ({@code [Red]}), a condition ({@code >=10}) and a format specification + * ({@code #}). *

* This class also contains patterns for matching the subparts of format * specification. These are used internally, but are made public in case other * code has use for them. - * - * @author Ken Arnold, Industrious Media LLC */ public class CellFormatPart { private static final Logger LOG = Logger.getLogger(CellFormat.class.getName()); diff --git a/poi/src/main/java/org/apache/poi/ss/format/SimpleFraction.java b/poi/src/main/java/org/apache/poi/ss/format/SimpleFraction.java index dec5a275f3..e56430cc5c 100644 --- a/poi/src/main/java/org/apache/poi/ss/format/SimpleFraction.java +++ b/poi/src/main/java/org/apache/poi/ss/format/SimpleFraction.java @@ -26,7 +26,7 @@ public class SimpleFraction { private final int numerator; /** * Create a fraction given a double value and a denominator. - * + * * @param val double value of fraction * @param exactDenom the exact denominator * @return a SimpleFraction with the given values set. @@ -35,17 +35,17 @@ public class SimpleFraction { int num = (int)Math.round(val*exactDenom); return new SimpleFraction(num,exactDenom); } - + /** * Create a fraction given the double value and either the maximum error * allowed or the maximum number of denominator digits. * * @param value the double value to convert to a fraction. * @param maxDenominator maximum denominator value allowed. - * + * * @throws RuntimeException if the continued fraction failed to * converge. - * @throws IllegalArgumentException if value > Integer.MAX_VALUE + * @throws IllegalArgumentException if value > Integer.MAX_VALUE */ public static SimpleFraction buildFractionMaxDenominator(double value, int maxDenominator){ return buildFractionMaxDenominator(value, 0, maxDenominator, 100); diff --git a/poi/src/main/java/org/apache/poi/ss/formula/eval/EvaluationException.java b/poi/src/main/java/org/apache/poi/ss/formula/eval/EvaluationException.java index e094df4649..b0071a728c 100644 --- a/poi/src/main/java/org/apache/poi/ss/formula/eval/EvaluationException.java +++ b/poi/src/main/java/org/apache/poi/ss/formula/eval/EvaluationException.java @@ -21,9 +21,9 @@ package org.apache.poi.ss.formula.eval; * This class is used to simplify error handling logic within operator and function * implementations. Note - OperationEval.evaluate() and Function.evaluate() * method signatures do not throw this exception so it cannot propagate outside.

- * + * * Here is an example coded without EvaluationException, to show how it can help: - *

+ * 
{@code
  * public Eval evaluate(Eval[] args, int srcRow, short srcCol) {
  *	// ...
  *	Eval arg0 = args[0];
@@ -47,14 +47,14 @@ package org.apache.poi.ss.formula.eval;
  *		temp += ((NumericValueEval)ve).getNumberValue();
  *	}
  *	// ...
- * }	 
- * 
- * In this example, if any error is encountered while processing the arguments, an error is + * } + * }
+ * In this example, if any error is encountered while processing the arguments, an error is * returned immediately. This code is difficult to refactor due to all the points where errors * are returned.
* Using EvaluationException allows the error returning code to be consolidated to one * place.

- *

+ * 
{@code
  * public Eval evaluate(Eval[] args, int srcRow, short srcCol) {
  *	try {
  *		// ...
@@ -90,21 +90,21 @@ package org.apache.poi.ss.formula.eval;
  *	}
  *	return temp;
  *}
- * 
+ * }
* It is not mandatory to use EvaluationException, doing so might give the following advantages:
* - Methods can more easily be extracted, allowing for re-use.
* - Type management (typecasting etc) is simpler because error conditions have been separated from * intermediate calculation values.
* - Fewer local variables are required. Local variables can have stronger types.
- * - It is easier to mimic common Excel error handling behaviour (exit upon encountering first - * error), because exceptions conveniently propagate up the call stack regardless of execution + * - It is easier to mimic common Excel error handling behaviour (exit upon encountering first + * error), because exceptions conveniently propagate up the call stack regardless of execution * points or the number of levels of nested calls.

- * + * * Note - Only standard evaluation errors are represented by EvaluationException ( * i.e. conditions expected to be encountered when evaluating arbitrary Excel formulas). Conditions * that could never occur in an Excel spreadsheet should result in runtime exceptions. Care should - * be taken to not translate any POI internal error into an Excel evaluation error code. - * + * be taken to not translate any POI internal error into an Excel evaluation error code. + * * @author Josh Micich */ public final class EvaluationException extends Exception { @@ -127,7 +127,7 @@ public final class EvaluationException extends Exception { public static EvaluationException numberError() { return new EvaluationException(ErrorEval.NUM_ERROR); } - + public ErrorEval getErrorEval() { return _errorEval; } diff --git a/poi/src/main/java/org/apache/poi/ss/formula/eval/RelationalOperationEval.java b/poi/src/main/java/org/apache/poi/ss/formula/eval/RelationalOperationEval.java index 2a9f2e34a7..a9684c95d9 100644 --- a/poi/src/main/java/org/apache/poi/ss/formula/eval/RelationalOperationEval.java +++ b/poi/src/main/java/org/apache/poi/ss/formula/eval/RelationalOperationEval.java @@ -54,7 +54,7 @@ public abstract class RelationalOperationEval extends Fixed2ArgFunction implemen * * Blank > Negative numbers * Blank == 0 - * Blank < Positive numbers + * Blank < Positive numbers * */ diff --git a/poi/src/main/java/org/apache/poi/ss/formula/functions/Countifs.java b/poi/src/main/java/org/apache/poi/ss/formula/functions/Countifs.java index 0ac50635aa..42c158613e 100644 --- a/poi/src/main/java/org/apache/poi/ss/formula/functions/Countifs.java +++ b/poi/src/main/java/org/apache/poi/ss/formula/functions/Countifs.java @@ -32,10 +32,11 @@ public class Countifs extends Baseifs { public static final FreeRefFunction instance = new Countifs(); /** - * https://support.office.com/en-us/article/COUNTIFS-function-dda3dc6e-f74e-4aee-88bc-aa8c2a866842?ui=en-US&rs=en-US&ad=US * COUNTIFS(criteria_range1, criteria1, [criteria_range2, criteria2]...) * need at least 2 arguments and need to have an even number of arguments (criteria_range1, criteria1 plus x*(criteria_range, criteria)) + * * @see org.apache.poi.ss.formula.functions.Baseifs#hasInitialRange() + * @see COUNTIFS function */ protected boolean hasInitialRange() { return false; diff --git a/poi/src/main/java/org/apache/poi/ss/formula/functions/Dec2Bin.java b/poi/src/main/java/org/apache/poi/ss/formula/functions/Dec2Bin.java index cbac6b2ebf..2ec9ea30c7 100644 --- a/poi/src/main/java/org/apache/poi/ss/formula/functions/Dec2Bin.java +++ b/poi/src/main/java/org/apache/poi/ss/formula/functions/Dec2Bin.java @@ -24,7 +24,7 @@ import org.apache.poi.ss.formula.eval.StringEval; import org.apache.poi.ss.formula.eval.ValueEval; /** - * Implementation for Excel Bin2Dec() function.

+ * Implementation for Excel Bin2Dec() function. *

* Syntax:
Bin2Dec (number,[places] )
*

@@ -38,7 +38,7 @@ import org.apache.poi.ss.formula.eval.ValueEval; *

* Remarks *

    - *
  • If number < -512 or if number > 511, DEC2BIN returns the #NUM! error value.
  • + *
  • If number < -512 or if number > 511, DEC2BIN returns the #NUM! error value.
  • *
  • If number is nonnumeric, DEC2BIN returns the #VALUE! error value.
  • *
  • If DEC2BIN requires more than places characters, it returns the #NUM! error value.
  • *
  • If places is not an integer, it is truncated.
  • diff --git a/poi/src/main/java/org/apache/poi/ss/formula/functions/Dec2Hex.java b/poi/src/main/java/org/apache/poi/ss/formula/functions/Dec2Hex.java index 299068d4c1..6af3db0b8b 100644 --- a/poi/src/main/java/org/apache/poi/ss/formula/functions/Dec2Hex.java +++ b/poi/src/main/java/org/apache/poi/ss/formula/functions/Dec2Hex.java @@ -23,7 +23,7 @@ import org.apache.poi.ss.formula.OperationEvaluationContext; import org.apache.poi.ss.formula.eval.*; /** - * Implementation for Excel DELTA() function.

    + * Implementation for Excel DELTA() function. *

    * Syntax:
    DEC2HEX (number,places )
    *

    @@ -35,11 +35,11 @@ import org.apache.poi.ss.formula.eval.*; * Negative numbers are represented using two's-complement notation. * *

      - *
    • If number < -549,755,813,888 or if number > 549,755,813,887, this function returns the #NUM! error value.
    • + *
    • If number < -549,755,813,888 or if number > 549,755,813,887, this function returns the #NUM! error value.
    • *
    • If number is nonnumeric, this function returns the #VALUE! error value.
    • *
    * - *

    places

    + * Places

    * * The number of characters to use. The places argument is useful for padding the * return value with leading 0s (zeros). diff --git a/poi/src/main/java/org/apache/poi/ss/formula/functions/FinanceLib.java b/poi/src/main/java/org/apache/poi/ss/formula/functions/FinanceLib.java index dc4917f5e2..9f7aeaebae 100644 --- a/poi/src/main/java/org/apache/poi/ss/formula/functions/FinanceLib.java +++ b/poi/src/main/java/org/apache/poi/ss/formula/functions/FinanceLib.java @@ -33,13 +33,16 @@ package org.apache.poi.ss.formula.functions; *

* For more info on the terms/abbreviations please use the references below * (hyperlinks are subject to change): - *
Online References: + *

+ * Online References: *

    *
  1. GNU Emacs Calc 2.02 Manual: http://theory.uwinnipeg.ca/gnu/calc/calc_203.html
  2. *
  3. Yahoo Financial Glossary: http://biz.yahoo.com/f/g/nn.html#y
  4. *
  5. MS Excel function reference: http://office.microsoft.com/en-us/assistance/CH062528251033.aspx
  6. *
- *

Implementation Notes:

+ * + * Implementation Notes:

+ * * Symbols used in the formulae that follow:
*