From c950d95a654e7dedaff1c90012b3106a32064fa0 Mon Sep 17 00:00:00 2001 From: Andreas Beeker Date: Wed, 25 Dec 2013 22:18:53 +0000 Subject: [PATCH] javadoc house-keeping git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1553422 13f79535-47bb-0310-9956-ffa450edef68 --- .../poi/hssf/usermodel/HSSFPatriarch.java | 3 +- .../poi/poifs/crypt/CryptoFunctions.java | 8 ++--- .../poi/poifs/property/NPropertyTable.java | 1 - .../poi/ss/formula/functions/Complex.java | 10 +++--- .../apache/poi/ss/formula/functions/Mirr.java | 2 +- .../poi/ss/formula/functions/Roman.java | 8 +++-- .../org/apache/poi/util/CodePageUtil.java | 2 +- .../poi/poifs/crypt/agile/AgileDecryptor.java | 4 +-- .../poi/xslf/usermodel/XSLFTextRun.java | 16 ++++------ .../poi/xssf/extractor/XSSFExportToXml.java | 2 +- .../poi/xssf/usermodel/XSSFSimpleShape.java | 32 +++++++++++++++---- 11 files changed, 54 insertions(+), 34 deletions(-) diff --git a/src/java/org/apache/poi/hssf/usermodel/HSSFPatriarch.java b/src/java/org/apache/poi/hssf/usermodel/HSSFPatriarch.java index 46395b51c8..7745801fd2 100644 --- a/src/java/org/apache/poi/hssf/usermodel/HSSFPatriarch.java +++ b/src/java/org/apache/poi/hssf/usermodel/HSSFPatriarch.java @@ -45,6 +45,7 @@ import org.apache.poi.hssf.record.ObjRecord; import org.apache.poi.hssf.util.CellReference; import org.apache.poi.poifs.filesystem.DirectoryEntry; import org.apache.poi.poifs.filesystem.DirectoryNode; +import org.apache.poi.poifs.filesystem.POIFSFileSystem; import org.apache.poi.ss.usermodel.Chart; import org.apache.poi.ss.usermodel.ClientAnchor; import org.apache.poi.ss.usermodel.Drawing; @@ -218,7 +219,7 @@ public final class HSSFPatriarch implements HSSFShapeContainer, Drawing { * * @param anchor the client anchor describes how this picture is * attached to the sheet. - * @param storageId the storageId returned by {@link HSSFWorkbook.addOlePackage} + * @param storageId the storageId returned by {@link HSSFWorkbook#addOlePackage(POIFSFileSystem,String,String,String)} * @param pictureIndex the index of the picture (used as preview image) in the * workbook collection of pictures. * diff --git a/src/java/org/apache/poi/poifs/crypt/CryptoFunctions.java b/src/java/org/apache/poi/poifs/crypt/CryptoFunctions.java index 42ca434198..7286823a1b 100644 --- a/src/java/org/apache/poi/poifs/crypt/CryptoFunctions.java +++ b/src/java/org/apache/poi/poifs/crypt/CryptoFunctions.java @@ -65,13 +65,13 @@ public class CryptoFunctions { * monotonically on each iteration until PasswordKey.spinCount iterations have been performed. * The value of iterator on the last iteration MUST be one less than PasswordKey.spinCount. * - * For POI, H_final will be calculated by {@link generateKey()} + * For POI, H_final will be calculated by {@link #generateKey(byte[],HashAlgorithm,byte[],int)} * * @param password * @param hashAlgorithm * @param salt * @param spinCount - * @return + * @return the hashed password */ public static byte[] hashPassword(String password, HashAlgorithm hashAlgorithm, byte salt[], int spinCount) { // If no password was given, use the default @@ -146,7 +146,7 @@ public class CryptoFunctions { * @param hashAlgorithm * @param blockKey * @param keySize - * @return + * @return intermediate key */ public static byte[] generateKey(byte[] passwordHash, HashAlgorithm hashAlgorithm, byte[] blockKey, int keySize) { MessageDigest hashAlgo = getMessageDigest(hashAlgorithm); @@ -166,7 +166,7 @@ public class CryptoFunctions { * @param chain * @param vec * @param cipherMode Cipher.DECRYPT_MODE or Cipher.ENCRYPT_MODE - * @return + * @return the requested cipher * @throws GeneralSecurityException */ public static Cipher getCipher(SecretKey key, CipherAlgorithm cipherAlgorithm, ChainingMode chain, byte[] vec, int cipherMode, String padding) { diff --git a/src/java/org/apache/poi/poifs/property/NPropertyTable.java b/src/java/org/apache/poi/poifs/property/NPropertyTable.java index 4f3a1968e6..aed08a521b 100644 --- a/src/java/org/apache/poi/poifs/property/NPropertyTable.java +++ b/src/java/org/apache/poi/poifs/property/NPropertyTable.java @@ -77,7 +77,6 @@ public final class NPropertyTable extends PropertyTableBase { * Builds * @param startAt * @param filesystem - * @return * @throws IOException */ private static List buildProperties(final Iterator dataSource, diff --git a/src/java/org/apache/poi/ss/formula/functions/Complex.java b/src/java/org/apache/poi/ss/formula/functions/Complex.java index 7f205f3ffe..1e0bd5bfdc 100644 --- a/src/java/org/apache/poi/ss/formula/functions/Complex.java +++ b/src/java/org/apache/poi/ss/formula/functions/Complex.java @@ -18,7 +18,11 @@ package org.apache.poi.ss.formula.functions; import org.apache.poi.ss.formula.OperationEvaluationContext; -import org.apache.poi.ss.formula.eval.*; +import org.apache.poi.ss.formula.eval.ErrorEval; +import org.apache.poi.ss.formula.eval.EvaluationException; +import org.apache.poi.ss.formula.eval.OperandResolver; +import org.apache.poi.ss.formula.eval.StringEval; +import org.apache.poi.ss.formula.eval.ValueEval; /** * Implementation for Excel COMPLEX () function.

@@ -126,10 +130,6 @@ public class Complex extends Var2or3ArgFunction implements FreeRefFunction { return new StringEval(strb.toString()); } - /** - * @param number - * @return - */ private boolean isDoubleAnInt(double number) { return (number == Math.floor(number)) && !Double.isInfinite(number); } diff --git a/src/java/org/apache/poi/ss/formula/functions/Mirr.java b/src/java/org/apache/poi/ss/formula/functions/Mirr.java index e98433976a..934f508811 100644 --- a/src/java/org/apache/poi/ss/formula/functions/Mirr.java +++ b/src/java/org/apache/poi/ss/formula/functions/Mirr.java @@ -41,7 +41,7 @@ import org.apache.poi.ss.formula.eval.EvaluationException; * * @see Wikipedia on MIRR * @see Excel MIRR - * @see {@link Irr} + * @see Irr */ public class Mirr extends MultiOperandNumericFunction { diff --git a/src/java/org/apache/poi/ss/formula/functions/Roman.java b/src/java/org/apache/poi/ss/formula/functions/Roman.java index d1abd9acc4..45b400e2f7 100644 --- a/src/java/org/apache/poi/ss/formula/functions/Roman.java +++ b/src/java/org/apache/poi/ss/formula/functions/Roman.java @@ -17,7 +17,11 @@ package org.apache.poi.ss.formula.functions; -import org.apache.poi.ss.formula.eval.*; +import org.apache.poi.ss.formula.eval.ErrorEval; +import org.apache.poi.ss.formula.eval.EvaluationException; +import org.apache.poi.ss.formula.eval.OperandResolver; +import org.apache.poi.ss.formula.eval.StringEval; +import org.apache.poi.ss.formula.eval.ValueEval; /** * Implementation for Excel WeekNum() function.

@@ -87,7 +91,6 @@ public class Roman extends Fixed2ArgFunction { * Classic conversion. * * @param number - * @return */ private String integerToRoman(int number) { StringBuilder result = new StringBuilder(); @@ -105,7 +108,6 @@ public class Roman extends Fixed2ArgFunction { * * @param result * @param form - * @return */ public String makeConcise(String result, int form) { if (form > 0) { diff --git a/src/java/org/apache/poi/util/CodePageUtil.java b/src/java/org/apache/poi/util/CodePageUtil.java index c8a629f447..02e0ed3c0c 100644 --- a/src/java/org/apache/poi/util/CodePageUtil.java +++ b/src/java/org/apache/poi/util/CodePageUtil.java @@ -263,7 +263,7 @@ public class CodePageUtil * @return The character encoding's name, in either Java Lang format * (eg Cp1251, ISO8859_5) or Java NIO format (eg windows-1252, ISO-8859-9) * - * See Encodings supported by Java + * @see Supported Encodings * * @exception UnsupportedEncodingException if the specified codepage is * less than zero. diff --git a/src/ooxml/java/org/apache/poi/poifs/crypt/agile/AgileDecryptor.java b/src/ooxml/java/org/apache/poi/poifs/crypt/agile/AgileDecryptor.java index 193e7a766b..ccd930853b 100644 --- a/src/ooxml/java/org/apache/poi/poifs/crypt/agile/AgileDecryptor.java +++ b/src/ooxml/java/org/apache/poi/poifs/crypt/agile/AgileDecryptor.java @@ -198,11 +198,11 @@ public class AgileDecryptor extends Decryptor { * instead of a password, it's also possible to decrypt via certificate. * Warning: this code is experimental and hasn't been validated * - * {@linkplain http://social.msdn.microsoft.com/Forums/en-US/cc9092bb-0c82-4b5b-ae21-abf643bdb37c/agile-encryption-with-certificates} + * @see Agile encryption with certificates * * @param keyPair * @param x509 - * @return + * @return true, when the data can be successfully decrypted with the given private key * @throws GeneralSecurityException */ public boolean verifyPassword(KeyPair keyPair, X509Certificate x509) throws GeneralSecurityException { diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTextRun.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTextRun.java index c6f0591704..16d0e803b1 100644 --- a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTextRun.java +++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTextRun.java @@ -16,6 +16,12 @@ ==================================================================== */ package org.apache.poi.xslf.usermodel; +import java.awt.Color; +import java.awt.font.FontRenderContext; +import java.awt.font.TextAttribute; +import java.awt.font.TextLayout; +import java.text.AttributedString; + import org.apache.poi.util.Beta; import org.apache.poi.xslf.model.CharacterPropertyFetcher; import org.openxmlformats.schemas.drawingml.x2006.main.CTRegularTextRun; @@ -27,17 +33,11 @@ import org.openxmlformats.schemas.drawingml.x2006.main.CTTextCharacterProperties import org.openxmlformats.schemas.drawingml.x2006.main.CTTextFont; import org.openxmlformats.schemas.drawingml.x2006.main.CTTextNormalAutofit; import org.openxmlformats.schemas.drawingml.x2006.main.CTTextParagraphProperties; +import org.openxmlformats.schemas.drawingml.x2006.main.STSchemeColorVal; import org.openxmlformats.schemas.drawingml.x2006.main.STTextStrikeType; import org.openxmlformats.schemas.drawingml.x2006.main.STTextUnderlineType; -import org.openxmlformats.schemas.drawingml.x2006.main.STSchemeColorVal; import org.openxmlformats.schemas.presentationml.x2006.main.CTPlaceholder; -import java.awt.Color; -import java.awt.font.FontRenderContext; -import java.awt.font.TextLayout; -import java.awt.font.TextAttribute; -import java.text.AttributedString; - /** * Represents a run of text within the containing text body. The run element is the * lowest level text separation mechanism within a text body. @@ -90,8 +90,6 @@ public class XSLFTextRun { /** * Replace a tab with the effective number of white spaces. - * - * @return */ private String tab2space(){ AttributedString string = new AttributedString(" "); diff --git a/src/ooxml/java/org/apache/poi/xssf/extractor/XSSFExportToXml.java b/src/ooxml/java/org/apache/poi/xssf/extractor/XSSFExportToXml.java index 80b0c34deb..aa68c26384 100644 --- a/src/ooxml/java/org/apache/poi/xssf/extractor/XSSFExportToXml.java +++ b/src/ooxml/java/org/apache/poi/xssf/extractor/XSSFExportToXml.java @@ -249,7 +249,7 @@ public class XSSFExportToXml implements Comparator{ * Validate the generated XML against the XML Schema associated with the XSSFMap * * @param xml the XML to validate - * @return + * @return true, if document is valid */ private boolean isValid(Document xml) throws SAXException{ boolean isValid = false; diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSimpleShape.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSimpleShape.java index d24bd01e6d..44fc91bbf9 100644 --- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSimpleShape.java +++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSimpleShape.java @@ -21,16 +21,36 @@ import java.util.ArrayList; import java.util.Iterator; import java.util.List; - import org.apache.poi.hssf.util.HSSFColor; -import org.openxmlformats.schemas.drawingml.x2006.main.*; +import org.apache.poi.ss.usermodel.VerticalAlignment; +import org.apache.poi.util.Internal; +import org.apache.poi.util.Units; +import org.openxmlformats.schemas.drawingml.x2006.main.CTNonVisualDrawingProps; +import org.openxmlformats.schemas.drawingml.x2006.main.CTPoint2D; +import org.openxmlformats.schemas.drawingml.x2006.main.CTPositiveSize2D; +import org.openxmlformats.schemas.drawingml.x2006.main.CTPresetGeometry2D; +import org.openxmlformats.schemas.drawingml.x2006.main.CTRegularTextRun; +import org.openxmlformats.schemas.drawingml.x2006.main.CTSRgbColor; +import org.openxmlformats.schemas.drawingml.x2006.main.CTShapeProperties; +import org.openxmlformats.schemas.drawingml.x2006.main.CTSolidColorFillProperties; +import org.openxmlformats.schemas.drawingml.x2006.main.CTTextBody; +import org.openxmlformats.schemas.drawingml.x2006.main.CTTextBodyProperties; +import org.openxmlformats.schemas.drawingml.x2006.main.CTTextCharacterProperties; +import org.openxmlformats.schemas.drawingml.x2006.main.CTTextFont; +import org.openxmlformats.schemas.drawingml.x2006.main.CTTextParagraph; +import org.openxmlformats.schemas.drawingml.x2006.main.CTTransform2D; +import org.openxmlformats.schemas.drawingml.x2006.main.STShapeType; +import org.openxmlformats.schemas.drawingml.x2006.main.STTextAlignType; +import org.openxmlformats.schemas.drawingml.x2006.main.STTextAnchoringType; +import org.openxmlformats.schemas.drawingml.x2006.main.STTextHorzOverflowType; +import org.openxmlformats.schemas.drawingml.x2006.main.STTextUnderlineType; +import org.openxmlformats.schemas.drawingml.x2006.main.STTextVertOverflowType; +import org.openxmlformats.schemas.drawingml.x2006.main.STTextVerticalType; +import org.openxmlformats.schemas.drawingml.x2006.main.STTextWrappingType; import org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTShape; import org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTShapeNonVisual; import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTRElt; import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTRPrElt; -import org.apache.poi.util.Internal; -import org.apache.poi.util.Units; -import org.apache.poi.ss.usermodel.VerticalAlignment; import org.openxmlformats.schemas.spreadsheetml.x2006.main.STUnderlineValues; /** @@ -244,7 +264,7 @@ public class XSSFSimpleShape extends XSSFShape implements Iterable