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;
*
* @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.
*
* monotonically on each iteration until PasswordKey.spinCount iterations have been performed.\r
* The value of iterator on the last iteration MUST be one less than PasswordKey.spinCount.\r
* \r
- * For POI, H_final will be calculated by {@link generateKey()}\r
+ * For POI, H_final will be calculated by {@link #generateKey(byte[],HashAlgorithm,byte[],int)}\r
*\r
* @param password\r
* @param hashAlgorithm\r
* @param salt\r
* @param spinCount\r
- * @return\r
+ * @return the hashed password\r
*/\r
public static byte[] hashPassword(String password, HashAlgorithm hashAlgorithm, byte salt[], int spinCount) {\r
// If no password was given, use the default\r
* @param hashAlgorithm\r
* @param blockKey\r
* @param keySize\r
- * @return\r
+ * @return intermediate key\r
*/\r
public static byte[] generateKey(byte[] passwordHash, HashAlgorithm hashAlgorithm, byte[] blockKey, int keySize) {\r
MessageDigest hashAlgo = getMessageDigest(hashAlgorithm);\r
* @param chain\r
* @param vec\r
* @param cipherMode Cipher.DECRYPT_MODE or Cipher.ENCRYPT_MODE\r
- * @return\r
+ * @return the requested cipher\r
* @throws GeneralSecurityException\r
*/\r
public static Cipher getCipher(SecretKey key, CipherAlgorithm cipherAlgorithm, ChainingMode chain, byte[] vec, int cipherMode, String padding) {\r
* Builds
* @param startAt
* @param filesystem
- * @return
* @throws IOException
*/
private static List<Property> buildProperties(final Iterator<ByteBuffer> dataSource,
package org.apache.poi.ss.formula.functions;\r
\r
import org.apache.poi.ss.formula.OperationEvaluationContext;\r
-import org.apache.poi.ss.formula.eval.*;\r
+import org.apache.poi.ss.formula.eval.ErrorEval;\r
+import org.apache.poi.ss.formula.eval.EvaluationException;\r
+import org.apache.poi.ss.formula.eval.OperandResolver;\r
+import org.apache.poi.ss.formula.eval.StringEval;\r
+import org.apache.poi.ss.formula.eval.ValueEval;\r
\r
/**\r
* Implementation for Excel COMPLEX () function.<p/>\r
return new StringEval(strb.toString());\r
}\r
\r
- /**\r
- * @param number\r
- * @return\r
- */\r
private boolean isDoubleAnInt(double number) {\r
return (number == Math.floor(number)) && !Double.isInfinite(number);\r
}\r
*\r
* @see <a href="http://en.wikipedia.org/wiki/MIRR">Wikipedia on MIRR</a>\r
* @see <a href="http://office.microsoft.com/en-001/excel-help/mirr-HP005209180.aspx">Excel MIRR</a>\r
- * @see {@link Irr}\r
+ * @see Irr\r
*/\r
public class Mirr extends MultiOperandNumericFunction {\r
\r
\r
package org.apache.poi.ss.formula.functions;\r
\r
-import org.apache.poi.ss.formula.eval.*;\r
+import org.apache.poi.ss.formula.eval.ErrorEval;\r
+import org.apache.poi.ss.formula.eval.EvaluationException;\r
+import org.apache.poi.ss.formula.eval.OperandResolver;\r
+import org.apache.poi.ss.formula.eval.StringEval;\r
+import org.apache.poi.ss.formula.eval.ValueEval;\r
\r
/**\r
* Implementation for Excel WeekNum() function.<p/>\r
* Classic conversion.\r
*\r
* @param number\r
- * @return\r
*/\r
private String integerToRoman(int number) {\r
StringBuilder result = new StringBuilder();\r
*\r
* @param result\r
* @param form\r
- * @return\r
*/\r
public String makeConcise(String result, int form) {\r
if (form > 0) {\r
* @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 <a href="http://docs.oracle.com/javase/6/docs/technotes/guides/intl/encoding.doc.html">Encodings supported by Java</a>
+ * @see <a href="http://docs.oracle.com/javase/6/docs/technotes/guides/intl/encoding.doc.html">Supported Encodings</a>
*
* @exception UnsupportedEncodingException if the specified codepage is
* less than zero.
* 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 <a href="http://social.msdn.microsoft.com/Forums/en-US/cc9092bb-0c82-4b5b-ae21-abf643bdb37c/agile-encryption-with-certificates">Agile encryption with certificates</a>
*
* @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 {
==================================================================== */\r
package org.apache.poi.xslf.usermodel;\r
\r
+import java.awt.Color;\r
+import java.awt.font.FontRenderContext;\r
+import java.awt.font.TextAttribute;\r
+import java.awt.font.TextLayout;\r
+import java.text.AttributedString;\r
+\r
import org.apache.poi.util.Beta;\r
import org.apache.poi.xslf.model.CharacterPropertyFetcher;\r
import org.openxmlformats.schemas.drawingml.x2006.main.CTRegularTextRun;\r
import org.openxmlformats.schemas.drawingml.x2006.main.CTTextFont;\r
import org.openxmlformats.schemas.drawingml.x2006.main.CTTextNormalAutofit;\r
import org.openxmlformats.schemas.drawingml.x2006.main.CTTextParagraphProperties;\r
+import org.openxmlformats.schemas.drawingml.x2006.main.STSchemeColorVal;\r
import org.openxmlformats.schemas.drawingml.x2006.main.STTextStrikeType;\r
import org.openxmlformats.schemas.drawingml.x2006.main.STTextUnderlineType;\r
-import org.openxmlformats.schemas.drawingml.x2006.main.STSchemeColorVal;\r
import org.openxmlformats.schemas.presentationml.x2006.main.CTPlaceholder;\r
\r
-import java.awt.Color;\r
-import java.awt.font.FontRenderContext;\r
-import java.awt.font.TextLayout;\r
-import java.awt.font.TextAttribute;\r
-import java.text.AttributedString;\r
-\r
/**\r
* Represents a run of text within the containing text body. The run element is the\r
* lowest level text separation mechanism within a text body.\r
\r
/**\r
* Replace a tab with the effective number of white spaces.\r
- *\r
- * @return\r
*/\r
private String tab2space(){\r
AttributedString string = new AttributedString(" ");\r
* 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;
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;
/**
* Returns a string containing an appropriate prefix for an auto-numbering bullet
* @param scheme the auto-numbering scheme used by the bullet
* @param value the value of the bullet
- * @return
+ * @return appropriate prefix for an auto-numbering bullet
*/
private String getBulletPrefix(ListAutoNumber scheme, int value){
StringBuilder out = new StringBuilder();