Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFFont.java URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFFont.java?rev=712196&r1=712195&r2=712196&view=diff ============================================================================== --- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFFont.java (original) +++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFFont.java Fri Nov 7 08:57:23 2008 @@ -38,7 +38,7 @@ public static final short DEFAULT_FONT_SIZE = 11; /** * Default font color is black - * @see IndexedColors.BLACK + * @see org.apache.poi.ss.usermodel.IndexedColors#BLACK */ public static final short DEFAULT_FONT_COLOR = IndexedColors.BLACK.getIndex();
Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFFormulaEvaluator.java URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFFormulaEvaluator.java?rev=712196&r1=712195&r2=712196&view=diff ============================================================================== --- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFFormulaEvaluator.java (original) +++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFFormulaEvaluator.java Fri Nov 7 08:57:23 2008 @@ -1,246 +1,244 @@ -/* ==================================================================== - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -==================================================================== */ - -package org.apache.poi.xssf.usermodel; - -import java.util.Iterator; - -import org.apache.poi.hssf.record.formula.eval.BoolEval; -import org.apache.poi.hssf.record.formula.eval.ErrorEval; -import org.apache.poi.hssf.record.formula.eval.NumberEval; -import org.apache.poi.hssf.record.formula.eval.StringEval; -import org.apache.poi.hssf.record.formula.eval.ValueEval; -import org.apache.poi.hssf.usermodel.HSSFCell; -import org.apache.poi.ss.formula.WorkbookEvaluator; -import org.apache.poi.ss.usermodel.Cell; -import org.apache.poi.ss.usermodel.CellValue; -import org.apache.poi.ss.usermodel.FormulaEvaluator; -import org.apache.poi.ss.usermodel.Row; -import org.apache.poi.ss.usermodel.Sheet; - -/** - * Evaluates formula cells.<p/> - * - * For performance reasons, this class keeps a cache of all previously calculated intermediate - * cell values. Be sure to call [EMAIL PROTECTED] #clearCache()} if any workbook cells are changed between - * calls to evaluate~ methods on this class. - * - * @author Amol S. Deshmukh < amolweb at ya hoo dot com > - * @author Josh Micich - */ -public class XSSFFormulaEvaluator implements FormulaEvaluator { - - private WorkbookEvaluator _bookEvaluator; - - public XSSFFormulaEvaluator(XSSFWorkbook workbook) { - _bookEvaluator = new WorkbookEvaluator(XSSFEvaluationWorkbook.create(workbook)); - } - - /** - * Should be called whenever there are major changes (e.g. moving sheets) to input cells - * in the evaluated workbook. - * Failure to call this method after changing cell values will cause incorrect behaviour - * of the evaluate~ methods of this class - */ - public void clearAllCachedResultValues() { - _bookEvaluator.clearAllCachedResultValues(); - } - public void notifySetFormula(Cell cell) { - _bookEvaluator.notifyUpdateCell(new XSSFEvaluationCell((XSSFCell)cell)); - } - public void notifyDeleteCell(Cell cell) { - _bookEvaluator.notifyDeleteCell(new XSSFEvaluationCell((XSSFCell)cell)); - } - - /** - * If cell contains a formula, the formula is evaluated and returned, - * else the CellValue simply copies the appropriate cell value from - * the cell and also its cell type. This method should be preferred over - * evaluateInCell() when the call should not modify the contents of the - * original cell. - * @param cell - */ - public CellValue evaluate(Cell cell) { - if (cell == null) { - return null; - } - - switch (cell.getCellType()) { - case XSSFCell.CELL_TYPE_BOOLEAN: - return CellValue.valueOf(cell.getBooleanCellValue()); - case XSSFCell.CELL_TYPE_ERROR: - return CellValue.getError(cell.getErrorCellValue()); - case XSSFCell.CELL_TYPE_FORMULA: - return evaluateFormulaCellValue(cell); - case XSSFCell.CELL_TYPE_NUMERIC: - return new CellValue(cell.getNumericCellValue()); - case XSSFCell.CELL_TYPE_STRING: - return new CellValue(cell.getRichStringCellValue().getString()); - } - throw new IllegalStateException("Bad cell type (" + cell.getCellType() + ")"); - } - - - /** - * If cell contains formula, it evaluates the formula, - * and saves the result of the formula. The cell - * remains as a formula cell. - * Else if cell does not contain formula, this method leaves - * the cell unchanged. - * Note that the type of the formula result is returned, - * so you know what kind of value is also stored with - * the formula. - * <pre> - * int evaluatedCellType = evaluator.evaluateFormulaCell(cell); - * </pre> - * Be aware that your cell will hold both the formula, - * and the result. If you want the cell replaced with - * the result of the formula, use [EMAIL PROTECTED] #evaluateInCell(HSSFCell)} - * @param cell The cell to evaluate - * @return The type of the formula result (the cell's type remains as HSSFCell.CELL_TYPE_FORMULA however) - */ - public int evaluateFormulaCell(Cell cell) { - if (cell == null || cell.getCellType() != XSSFCell.CELL_TYPE_FORMULA) { - return -1; - } - CellValue cv = evaluateFormulaCellValue(cell); - // cell remains a formula cell, but the cached value is changed - setCellValue(cell, cv); - return cv.getCellType(); - } - - /** - * If cell contains formula, it evaluates the formula, and - * puts the formula result back into the cell, in place - * of the old formula. - * Else if cell does not contain formula, this method leaves - * the cell unchanged. - * Note that the same instance of HSSFCell is returned to - * allow chained calls like: - * <pre> - * int evaluatedCellType = evaluator.evaluateInCell(cell).getCellType(); - * </pre> - * Be aware that your cell value will be changed to hold the - * result of the formula. If you simply want the formula - * value computed for you, use [EMAIL PROTECTED] #evaluateFormulaCell(HSSFCell)} - * @param cell - */ - public XSSFCell evaluateInCell(Cell cell) { - if (cell == null) { - return null; - } - XSSFCell result = (XSSFCell) cell; - if (cell.getCellType() == XSSFCell.CELL_TYPE_FORMULA) { - CellValue cv = evaluateFormulaCellValue(cell); - setCellType(cell, cv); // cell will no longer be a formula cell - setCellValue(cell, cv); - } - return result; - } - private static void setCellType(Cell cell, CellValue cv) { - int cellType = cv.getCellType(); - switch (cellType) { - case XSSFCell.CELL_TYPE_BOOLEAN: - case XSSFCell.CELL_TYPE_ERROR: - case XSSFCell.CELL_TYPE_NUMERIC: - case XSSFCell.CELL_TYPE_STRING: - cell.setCellType(cellType); - return; - case XSSFCell.CELL_TYPE_BLANK: - // never happens - blanks eventually get translated to zero - case XSSFCell.CELL_TYPE_FORMULA: - // this will never happen, we have already evaluated the formula - } - throw new IllegalStateException("Unexpected cell value type (" + cellType + ")"); - } - - private static void setCellValue(Cell cell, CellValue cv) { - int cellType = cv.getCellType(); - switch (cellType) { - case XSSFCell.CELL_TYPE_BOOLEAN: - cell.setCellValue(cv.getBooleanValue()); - break; - case XSSFCell.CELL_TYPE_ERROR: - cell.setCellErrorValue(cv.getErrorValue()); - break; - case XSSFCell.CELL_TYPE_NUMERIC: - cell.setCellValue(cv.getNumberValue()); - break; - case XSSFCell.CELL_TYPE_STRING: - cell.setCellValue(new XSSFRichTextString(cv.getStringValue())); - break; - case XSSFCell.CELL_TYPE_BLANK: - // never happens - blanks eventually get translated to zero - case XSSFCell.CELL_TYPE_FORMULA: - // this will never happen, we have already evaluated the formula - default: - throw new IllegalStateException("Unexpected cell value type (" + cellType + ")"); - } - } - - /** - * Loops over all cells in all sheets of the supplied - * workbook. - * For cells that contain formulas, their formulas are - * evaluated, and the results are saved. These cells - * remain as formula cells. - * For cells that do not contain formulas, no changes - * are made. - * This is a helpful wrapper around looping over all - * cells, and calling evaluateFormulaCell on each one. - */ - public static void evaluateAllFormulaCells(XSSFWorkbook wb) { - XSSFFormulaEvaluator evaluator = new XSSFFormulaEvaluator(wb); - for(int i=0; i<wb.getNumberOfSheets(); i++) { - Sheet sheet = wb.getSheetAt(i); - - for (Iterator<Row> rit = sheet.rowIterator(); rit.hasNext();) { - Row r = rit.next(); - - for (Iterator cit = r.cellIterator(); cit.hasNext();) { - XSSFCell c = (XSSFCell) cit.next(); - if (c.getCellType() == XSSFCell.CELL_TYPE_FORMULA) - evaluator.evaluateFormulaCell(c); - } - } - } - } - - /** - * Returns a CellValue wrapper around the supplied ValueEval instance. - * @param eval - */ - private CellValue evaluateFormulaCellValue(Cell cell) { - ValueEval eval = _bookEvaluator.evaluate(new XSSFEvaluationCell((XSSFCell) cell)); - if (eval instanceof NumberEval) { - NumberEval ne = (NumberEval) eval; - return new CellValue(ne.getNumberValue()); - } - if (eval instanceof BoolEval) { - BoolEval be = (BoolEval) eval; - return CellValue.valueOf(be.getBooleanValue()); - } - if (eval instanceof StringEval) { - StringEval ne = (StringEval) eval; - return new CellValue(ne.getStringValue()); - } - if (eval instanceof ErrorEval) { - return CellValue.getError(((ErrorEval)eval).getErrorCode()); - } - throw new RuntimeException("Unexpected eval class (" + eval.getClass().getName() + ")"); - } -} +/* ==================================================================== + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +==================================================================== */ + +package org.apache.poi.xssf.usermodel; + +import java.util.Iterator; + +import org.apache.poi.hssf.record.formula.eval.BoolEval; +import org.apache.poi.hssf.record.formula.eval.ErrorEval; +import org.apache.poi.hssf.record.formula.eval.NumberEval; +import org.apache.poi.hssf.record.formula.eval.StringEval; +import org.apache.poi.hssf.record.formula.eval.ValueEval; +import org.apache.poi.ss.formula.WorkbookEvaluator; +import org.apache.poi.ss.usermodel.Cell; +import org.apache.poi.ss.usermodel.CellValue; +import org.apache.poi.ss.usermodel.FormulaEvaluator; +import org.apache.poi.ss.usermodel.Row; +import org.apache.poi.ss.usermodel.Sheet; + +/** + * Evaluates formula cells.<p/> + * + * For performance reasons, this class keeps a cache of all previously calculated intermediate + * cell values. Be sure to call [EMAIL PROTECTED] #clearAllCachedResultValues()} if any workbook cells are changed between + * calls to evaluate~ methods on this class. + * + * @author Amol S. Deshmukh < amolweb at ya hoo dot com > + * @author Josh Micich + */ +public class XSSFFormulaEvaluator implements FormulaEvaluator { + + private WorkbookEvaluator _bookEvaluator; + + public XSSFFormulaEvaluator(XSSFWorkbook workbook) { + _bookEvaluator = new WorkbookEvaluator(XSSFEvaluationWorkbook.create(workbook)); + } + + /** + * Should be called whenever there are major changes (e.g. moving sheets) to input cells + * in the evaluated workbook. + * Failure to call this method after changing cell values will cause incorrect behaviour + * of the evaluate~ methods of this class + */ + public void clearAllCachedResultValues() { + _bookEvaluator.clearAllCachedResultValues(); + } + public void notifySetFormula(Cell cell) { + _bookEvaluator.notifyUpdateCell(new XSSFEvaluationCell((XSSFCell)cell)); + } + public void notifyDeleteCell(Cell cell) { + _bookEvaluator.notifyDeleteCell(new XSSFEvaluationCell((XSSFCell)cell)); + } + + /** + * If cell contains a formula, the formula is evaluated and returned, + * else the CellValue simply copies the appropriate cell value from + * the cell and also its cell type. This method should be preferred over + * evaluateInCell() when the call should not modify the contents of the + * original cell. + * @param cell + */ + public CellValue evaluate(Cell cell) { + if (cell == null) { + return null; + } + + switch (cell.getCellType()) { + case XSSFCell.CELL_TYPE_BOOLEAN: + return CellValue.valueOf(cell.getBooleanCellValue()); + case XSSFCell.CELL_TYPE_ERROR: + return CellValue.getError(cell.getErrorCellValue()); + case XSSFCell.CELL_TYPE_FORMULA: + return evaluateFormulaCellValue(cell); + case XSSFCell.CELL_TYPE_NUMERIC: + return new CellValue(cell.getNumericCellValue()); + case XSSFCell.CELL_TYPE_STRING: + return new CellValue(cell.getRichStringCellValue().getString()); + } + throw new IllegalStateException("Bad cell type (" + cell.getCellType() + ")"); + } + + + /** + * If cell contains formula, it evaluates the formula, + * and saves the result of the formula. The cell + * remains as a formula cell. + * Else if cell does not contain formula, this method leaves + * the cell unchanged. + * Note that the type of the formula result is returned, + * so you know what kind of value is also stored with + * the formula. + * <pre> + * int evaluatedCellType = evaluator.evaluateFormulaCell(cell); + * </pre> + * Be aware that your cell will hold both the formula, + * and the result. If you want the cell replaced with + * the result of the formula, use [EMAIL PROTECTED] #evaluate(org.apache.poi.ss.usermodel.Cell)} } + * @param cell The cell to evaluate + * @return The type of the formula result (the cell's type remains as HSSFCell.CELL_TYPE_FORMULA however) + */ + public int evaluateFormulaCell(Cell cell) { + if (cell == null || cell.getCellType() != XSSFCell.CELL_TYPE_FORMULA) { + return -1; + } + CellValue cv = evaluateFormulaCellValue(cell); + // cell remains a formula cell, but the cached value is changed + setCellValue(cell, cv); + return cv.getCellType(); + } + + /** + * If cell contains formula, it evaluates the formula, and + * puts the formula result back into the cell, in place + * of the old formula. + * Else if cell does not contain formula, this method leaves + * the cell unchanged. + * Note that the same instance of HSSFCell is returned to + * allow chained calls like: + * <pre> + * int evaluatedCellType = evaluator.evaluateInCell(cell).getCellType(); + * </pre> + * Be aware that your cell value will be changed to hold the + * result of the formula. If you simply want the formula + * value computed for you, use [EMAIL PROTECTED] #evaluateFormulaCell(org.apache.poi.ss.usermodel.Cell)} } + * @param cell + */ + public XSSFCell evaluateInCell(Cell cell) { + if (cell == null) { + return null; + } + XSSFCell result = (XSSFCell) cell; + if (cell.getCellType() == XSSFCell.CELL_TYPE_FORMULA) { + CellValue cv = evaluateFormulaCellValue(cell); + setCellType(cell, cv); // cell will no longer be a formula cell + setCellValue(cell, cv); + } + return result; + } + private static void setCellType(Cell cell, CellValue cv) { + int cellType = cv.getCellType(); + switch (cellType) { + case XSSFCell.CELL_TYPE_BOOLEAN: + case XSSFCell.CELL_TYPE_ERROR: + case XSSFCell.CELL_TYPE_NUMERIC: + case XSSFCell.CELL_TYPE_STRING: + cell.setCellType(cellType); + return; + case XSSFCell.CELL_TYPE_BLANK: + // never happens - blanks eventually get translated to zero + case XSSFCell.CELL_TYPE_FORMULA: + // this will never happen, we have already evaluated the formula + } + throw new IllegalStateException("Unexpected cell value type (" + cellType + ")"); + } + + private static void setCellValue(Cell cell, CellValue cv) { + int cellType = cv.getCellType(); + switch (cellType) { + case XSSFCell.CELL_TYPE_BOOLEAN: + cell.setCellValue(cv.getBooleanValue()); + break; + case XSSFCell.CELL_TYPE_ERROR: + cell.setCellErrorValue(cv.getErrorValue()); + break; + case XSSFCell.CELL_TYPE_NUMERIC: + cell.setCellValue(cv.getNumberValue()); + break; + case XSSFCell.CELL_TYPE_STRING: + cell.setCellValue(new XSSFRichTextString(cv.getStringValue())); + break; + case XSSFCell.CELL_TYPE_BLANK: + // never happens - blanks eventually get translated to zero + case XSSFCell.CELL_TYPE_FORMULA: + // this will never happen, we have already evaluated the formula + default: + throw new IllegalStateException("Unexpected cell value type (" + cellType + ")"); + } + } + + /** + * Loops over all cells in all sheets of the supplied + * workbook. + * For cells that contain formulas, their formulas are + * evaluated, and the results are saved. These cells + * remain as formula cells. + * For cells that do not contain formulas, no changes + * are made. + * This is a helpful wrapper around looping over all + * cells, and calling evaluateFormulaCell on each one. + */ + public static void evaluateAllFormulaCells(XSSFWorkbook wb) { + XSSFFormulaEvaluator evaluator = new XSSFFormulaEvaluator(wb); + for(int i=0; i<wb.getNumberOfSheets(); i++) { + Sheet sheet = wb.getSheetAt(i); + + for (Iterator<Row> rit = sheet.rowIterator(); rit.hasNext();) { + Row r = rit.next(); + + for (Iterator cit = r.cellIterator(); cit.hasNext();) { + XSSFCell c = (XSSFCell) cit.next(); + if (c.getCellType() == XSSFCell.CELL_TYPE_FORMULA) + evaluator.evaluateFormulaCell(c); + } + } + } + } + + /** + * Returns a CellValue wrapper around the supplied ValueEval instance. + */ + private CellValue evaluateFormulaCellValue(Cell cell) { + ValueEval eval = _bookEvaluator.evaluate(new XSSFEvaluationCell((XSSFCell) cell)); + if (eval instanceof NumberEval) { + NumberEval ne = (NumberEval) eval; + return new CellValue(ne.getNumberValue()); + } + if (eval instanceof BoolEval) { + BoolEval be = (BoolEval) eval; + return CellValue.valueOf(be.getBooleanValue()); + } + if (eval instanceof StringEval) { + StringEval ne = (StringEval) eval; + return new CellValue(ne.getStringValue()); + } + if (eval instanceof ErrorEval) { + return CellValue.getError(((ErrorEval)eval).getErrorCode()); + } + throw new RuntimeException("Unexpected eval class (" + eval.getClass().getName() + ")"); + } +} Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPicture.java URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPicture.java?rev=712196&r1=712195&r2=712196&view=diff ============================================================================== --- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPicture.java (original) +++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPicture.java Fri Nov 7 08:57:23 2008 @@ -223,7 +223,8 @@ * Return the dimension of this image * * @param part the package part holding raw picture data - * @param type type of the picture: [EMAIL PROTECTED] Workbook#PICTURE_TYPE_JPEG, Workbook#PICTURE_TYPE_PNG or Workbook#PICTURE_TYPE_DIB) + * @param type type of the picture: [EMAIL PROTECTED] Workbook#PICTURE_TYPE_JPEG}, + * [EMAIL PROTECTED] Workbook#PICTURE_TYPE_PNG} or [EMAIL PROTECTED] Workbook#PICTURE_TYPE_DIB} * * @return image dimension in pixels */ Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPictureData.java URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPictureData.java?rev=712196&r1=712195&r2=712196&view=diff ============================================================================== --- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPictureData.java (original) +++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPictureData.java Fri Nov 7 08:57:23 2008 @@ -101,12 +101,12 @@ * Return an integer constant that specifies type of this picture * * @return an integer constant that specifies type of this picture - * @see Workbook#PICTURE_TYPE_EMF - * @see Workbook#PICTURE_TYPE_WMF - * @see Workbook#PICTURE_TYPE_PICT - * @see Workbook#PICTURE_TYPE_JPEG - * @see Workbook#PICTURE_TYPE_PNG - * @see Workbook#PICTURE_TYPE_DIB + * @see org.apache.poi.ss.usermodel.Workbook#PICTURE_TYPE_EMF + * @see org.apache.poi.ss.usermodel.Workbook#PICTURE_TYPE_WMF + * @see org.apache.poi.ss.usermodel.Workbook#PICTURE_TYPE_PICT + * @see org.apache.poi.ss.usermodel.Workbook#PICTURE_TYPE_JPEG + * @see org.apache.poi.ss.usermodel.Workbook#PICTURE_TYPE_PNG + * @see org.apache.poi.ss.usermodel.Workbook#PICTURE_TYPE_DIB */ public int getPictureType(){ String contentType = getPackagePart().getContentType(); Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRow.java URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRow.java?rev=712196&r1=712195&r2=712196&view=diff ============================================================================== --- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRow.java (original) +++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRow.java Fri Nov 7 08:57:23 2008 @@ -163,7 +163,7 @@ /** * Returns the cell at the given (0 based) index, - * with the [EMAIL PROTECTED] MissingCellPolicy} from the parent Workbook. + * with the [EMAIL PROTECTED] org.apache.poi.ss.usermodel.Row.MissingCellPolicy} from the parent Workbook. * * @return the cell at the given (0 based) index */ @@ -172,7 +172,7 @@ } /** - * Returns the cell at the given (0 based) index, with the specified [EMAIL PROTECTED] MissingCellPolicy} + * Returns the cell at the given (0 based) index, with the specified [EMAIL PROTECTED] org.apache.poi.ss.usermodel.Row.MissingCellPolicy} * * @return the cell at the given (0 based) index * @throws IllegalArgumentException if cellnum < 0 or the specified MissingCellPolicy is invalid Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java?rev=712196&r1=712195&r2=712196&view=diff ============================================================================== --- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java (original) +++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java Fri Nov 7 08:57:23 2008 @@ -254,12 +254,12 @@ * @param format The format of the picture. * * @return the index to this picture (0 based), the added picture can be obtained from [EMAIL PROTECTED] #getAllPictures()} . - * @see #PICTURE_TYPE_EMF - * @see #PICTURE_TYPE_WMF - * @see #PICTURE_TYPE_PICT - * @see #PICTURE_TYPE_JPEG - * @see #PICTURE_TYPE_PNG - * @see #PICTURE_TYPE_DIB + * @see Workbook#PICTURE_TYPE_EMF + * @see Workbook#PICTURE_TYPE_WMF + * @see Workbook#PICTURE_TYPE_PICT + * @see Workbook#PICTURE_TYPE_JPEG + * @see Workbook#PICTURE_TYPE_PNG + * @see Workbook#PICTURE_TYPE_DIB * @see #getAllPictures() */ public int addPicture(byte[] pictureData, int format) { @@ -283,12 +283,12 @@ * @param format The format of the picture. * * @return the index to this picture (0 based), the added picture can be obtained from [EMAIL PROTECTED] #getAllPictures()} . - * @see #PICTURE_TYPE_EMF - * @see #PICTURE_TYPE_WMF - * @see #PICTURE_TYPE_PICT - * @see #PICTURE_TYPE_JPEG - * @see #PICTURE_TYPE_PNG - * @see #PICTURE_TYPE_DIB + * @see Workbook#PICTURE_TYPE_EMF + * @see Workbook#PICTURE_TYPE_WMF + * @see Workbook#PICTURE_TYPE_PICT + * @see Workbook#PICTURE_TYPE_JPEG + * @see Workbook#PICTURE_TYPE_PNG + * @see Workbook#PICTURE_TYPE_DIB * @see #getAllPictures() */ public int addPicture(InputStream is, int format) throws IOException { Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/extensions/XSSFHeaderFooter.java URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/extensions/XSSFHeaderFooter.java?rev=712196&r1=712195&r2=712196&view=diff ============================================================================== --- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/extensions/XSSFHeaderFooter.java (original) +++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/extensions/XSSFHeaderFooter.java Fri Nov 7 08:57:23 2008 @@ -111,10 +111,6 @@ return this.headerFooter; } - /** - * - * @return - */ public String getValue() { String value = getText(); if(value == null) Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/ActiveXShape.java URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/ActiveXShape.java?rev=712196&r1=712195&r2=712196&view=diff ============================================================================== --- poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/ActiveXShape.java (original) +++ poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/ActiveXShape.java Fri Nov 7 08:57:23 2008 @@ -78,7 +78,7 @@ /** * Assign a control to this shape * - * @see [EMAIL PROTECTED] org.apache.poi.hslf.usermodel.SlideShow#addMovie(String, int)} + * @see org.apache.poi.hslf.usermodel.SlideShow#addMovie(String, int) * @param idx the index of the movie */ public void setActiveXIndex(int idx){ Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/MovieShape.java URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/MovieShape.java?rev=712196&r1=712195&r2=712196&view=diff ============================================================================== --- poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/MovieShape.java (original) +++ poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/MovieShape.java Fri Nov 7 08:57:23 2008 @@ -95,7 +95,7 @@ /** * Assign a movie to this shape * - * @see [EMAIL PROTECTED] org.apache.poi.hslf.usermodel.SlideShow#addMovie(String, int)} + * @see org.apache.poi.hslf.usermodel.SlideShow#addMovie(String, int) * @param idx the index of the movie */ public void setMovieIndex(int idx){ Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/OLEShape.java URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/OLEShape.java?rev=712196&r1=712195&r2=712196&view=diff ============================================================================== --- poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/OLEShape.java (original) +++ poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/OLEShape.java Fri Nov 7 08:57:23 2008 @@ -104,7 +104,6 @@ * 5. CString (4026), Instance ClipboardName (3) that appears in the paste special dialog. * 6. MetaFile( 4033), optional * </p> - * @return */ public ExEmbed getExEmbed(){ if(_exEmbed == null){ Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/AnimationInfoAtom.java URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/AnimationInfoAtom.java?rev=712196&r1=712195&r2=712196&view=diff ============================================================================== --- poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/AnimationInfoAtom.java (original) +++ poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/AnimationInfoAtom.java Fri Nov 7 08:57:23 2008 @@ -203,14 +203,14 @@ /** * A signed integer that specifies the delay time, in milliseconds, before the animation starts to play. - * If [EMAIL PROTECTED] Automatic} is 0x1, this value MUST be greater than or equal to 0; otherwise, this field MUST be ignored. + * If [EMAIL PROTECTED] #Automatic} is 0x1, this value MUST be greater than or equal to 0; otherwise, this field MUST be ignored. */ public int getDelayTime(){ return LittleEndian.getInt(_recdata, 12); } /** * A signed integer that specifies the delay time, in milliseconds, before the animation starts to play. - * If [EMAIL PROTECTED] Automatic} is 0x1, this value MUST be greater than or equal to 0; otherwise, this field MUST be ignored. + * If [EMAIL PROTECTED] #Automatic} is 0x1, this value MUST be greater than or equal to 0; otherwise, this field MUST be ignored. */ public void setDelayTime(int id){ LittleEndian.putInt(_recdata, 12, id); Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/HeadersFootersAtom.java URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/HeadersFootersAtom.java?rev=712196&r1=712195&r2=712196&view=diff ============================================================================== --- poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/HeadersFootersAtom.java (original) +++ poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/HeadersFootersAtom.java Fri Nov 7 08:57:23 2008 @@ -34,13 +34,15 @@ /** * A bit that specifies whether the date is displayed in the footer. - * @see [EMAIL PROTECTED] #getMask()}, [EMAIL PROTECTED] #setMask(int)}}, + * @see #getMask() + * @see #setMask(int) */ public static final int fHasDate = 1; /** * A bit that specifies whether the current datetime is used for displaying the datetime. - * @see [EMAIL PROTECTED] #getMask()}, [EMAIL PROTECTED] #setMask(int)}}, + * @see #getMask() + * @see #setMask(int) */ public static final int fHasTodayDate = 2; @@ -48,28 +50,32 @@ * A bit that specifies whether the date specified in UserDateAtom record * is used for displaying the datetime. * - * @see [EMAIL PROTECTED] #getMask()}, [EMAIL PROTECTED] #setMask(int)}}, + * @see #getMask() + * @see #setMask(int) */ public static final int fHasUserDate = 4; /** * A bit that specifies whether the slide number is displayed in the footer. * - * @see [EMAIL PROTECTED] #getMask()}, [EMAIL PROTECTED] #setMask(int)}}, + * @see #getMask() + * @see #setMask(int) */ public static final int fHasSlideNumber = 8; /** * bit that specifies whether the header text is displayed. * - * @see [EMAIL PROTECTED] #getMask()}, [EMAIL PROTECTED] #setMask(int)}}, + * @see #getMask() + * @see #setMask(int) */ public static final int fHasHeader = 16; /** * bit that specifies whether the footer text is displayed. * - * @see [EMAIL PROTECTED] #getMask()}, [EMAIL PROTECTED] #setMask(int)}}, + * @see #getMask() + * @see #setMask(int) */ public static final int fHasFooter = 32; Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/MAPIMessage.java URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/MAPIMessage.java?rev=712196&r1=712195&r2=712196&view=diff ============================================================================== --- poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/MAPIMessage.java (original) +++ poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/MAPIMessage.java Fri Nov 7 08:57:23 2008 @@ -75,7 +75,6 @@ /** * Gets a string value based on the passed chunk. * @param chunk - * @return * @throws ChunkNotFoundException */ public String getStringFromChunk(StringChunk chunk) throws ChunkNotFoundException { @@ -97,7 +96,6 @@ /** * Gets the subject line of the Outlook Message - * @return * @throws ChunkNotFoundException */ public String getSubject() throws ChunkNotFoundException { @@ -108,7 +106,6 @@ /** * Gets the display value of the "TO" line of the outlook message * This is not the actual list of addresses/values that will be sent to if you click Reply in the email. - * @return * @throws ChunkNotFoundException */ public String getDisplayTo() throws ChunkNotFoundException { @@ -118,7 +115,6 @@ /** * Gets the display value of the "FROM" line of the outlook message * This is not the actual address that was sent from but the formated display of the user name. - * @return * @throws ChunkNotFoundException */ public String getDisplayFrom() throws ChunkNotFoundException { @@ -128,7 +124,6 @@ /** * Gets the display value of the "TO" line of the outlook message * This is not the actual list of addresses/values that will be sent to if you click Reply in the email. - * @return * @throws ChunkNotFoundException */ public String getDisplayCC() throws ChunkNotFoundException { @@ -138,7 +133,6 @@ /** * Gets the display value of the "TO" line of the outlook message * This is not the actual list of addresses/values that will be sent to if you click Reply in the email. - * @return * @throws ChunkNotFoundException */ public String getDisplayBCC() throws ChunkNotFoundException { @@ -149,7 +143,6 @@ /** * Gets the conversation topic of the parsed Outlook Message. * This is the part of the subject line that is after the RE: and FWD: - * @return * @throws ChunkNotFoundException */ public String getConversationTopic() throws ChunkNotFoundException { @@ -161,7 +154,6 @@ * (Yes, you can use this to determine if a message is a calendar item, note, or actual outlook Message) * For emails the class will be IPM.Note * - * @return * @throws ChunkNotFoundException */ public String getMessageClass() throws ChunkNotFoundException { Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/datatypes/Chunk.java URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/datatypes/Chunk.java?rev=712196&r1=712195&r2=712196&view=diff ============================================================================== --- poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/datatypes/Chunk.java (original) +++ poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/datatypes/Chunk.java Fri Nov 7 08:57:23 2008 @@ -26,7 +26,6 @@ /** * Gets the id of this chunk - * @return */ public int getChunkId() { return this.chunkId; @@ -34,7 +33,6 @@ /** * Gets the numeric type of this chunk. - * @return */ public int getType() { return this.type; @@ -42,7 +40,6 @@ /** * Creates a string to use to identify this chunk in the POI file system object. - * @return */ public String getEntryName() { String type = Integer.toHexString(this.type); @@ -56,7 +53,6 @@ /** * Gets a reference to a ByteArrayOutputStream that contains the value of this chunk. - * @return */ public abstract ByteArrayOutputStream getValueByteArray(); Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/parsers/POIFSChunkParser.java URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/parsers/POIFSChunkParser.java?rev=712196&r1=712195&r2=712196&view=diff ============================================================================== --- poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/parsers/POIFSChunkParser.java (original) +++ poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/parsers/POIFSChunkParser.java Fri Nov 7 08:57:23 2008 @@ -66,7 +66,6 @@ /** * Get a reference to the FileSystem object that this object is currently using. - * @return */ public POIFSFileSystem getFileSystem() { return this.fs; @@ -117,7 +116,6 @@ /** * Pull the chunk data that's stored in this object's hashmap out and return it as a HashMap. * @param entryName - * @return */ public Object getChunk(HashMap dirMap, String entryName) { if(dirMap == null) return null; @@ -143,8 +141,8 @@ /** * Pulls a ByteArrayOutputStream from this objects HashMap, this can be used to read a byte array of the contents of the given chunk. - * @param directoryMap, chunk - * @return + * @param dirNode + * @param chunk * @throws ChunkNotFoundException */ public Chunk getDocumentNode(HashMap dirNode, Chunk chunk) throws ChunkNotFoundException { @@ -161,7 +159,6 @@ /** * Pulls a Chunk out of this objects root Node tree. * @param chunk - * @return * @throws ChunkNotFoundException */ public Chunk getDocumentNode(Chunk chunk) throws ChunkNotFoundException { Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/PicturesTable.java URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/PicturesTable.java?rev=712196&r1=712195&r2=712196&view=diff ============================================================================== --- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/PicturesTable.java (original) +++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/PicturesTable.java Fri Nov 7 08:57:23 2008 @@ -72,7 +72,7 @@ /** * - * @param document + * @param _document * @param _dataStream */ public PicturesTable(HWPFDocument _document, byte[] _dataStream, byte[] _mainStream, FSPATable fspa, EscherRecordHolder dgg) Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/TextPiece.java URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/TextPiece.java?rev=712196&r1=712195&r2=712196&view=diff ============================================================================== --- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/TextPiece.java (original) +++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/TextPiece.java Fri Nov 7 08:57:23 2008 @@ -105,7 +105,6 @@ * Works only in characters, not in bytes! * @param start Local start position, in characters * @param end Local end position, in characters - * @return */ public String substring(int start, int end) { Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/TextPieceTable.java URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/TextPieceTable.java?rev=712196&r1=712195&r2=712196&view=diff ============================================================================== --- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/TextPieceTable.java (original) +++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/TextPieceTable.java Fri Nov 7 08:57:23 2008 @@ -157,7 +157,7 @@ * In a very evil fashion, you have to actually * know this to make sense of character and * paragraph properties :( - * @param cp The character offset to check about + * @param bytePos The character offset to check about */ public boolean isUnicodeAtByteOffset(int bytePos) { boolean lastWas = false; Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/HeaderStories.java URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/HeaderStories.java?rev=712196&r1=712195&r2=712196&view=diff ============================================================================== --- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/HeaderStories.java (original) +++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/HeaderStories.java Fri Nov 7 08:57:23 2008 @@ -89,7 +89,6 @@ * Returns the correct, defined header for the given * one based page * @param pageNumber The one based page number - * @return */ public String getHeader(int pageNumber) { // First page header is optional, only return @@ -124,7 +123,6 @@ * Returns the correct, defined footer for the given * one based page * @param pageNumber The one based page number - * @return */ public String getFooter(int pageNumber) { // First page footer is optional, only return Modified: poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFFormulaEvaluator.java URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFFormulaEvaluator.java?rev=712196&r1=712195&r2=712196&view=diff ============================================================================== --- poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFFormulaEvaluator.java (original) +++ poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFFormulaEvaluator.java Fri Nov 7 08:57:23 2008 @@ -81,7 +81,7 @@ } /** - * [EMAIL PROTECTED] HSSFFormulaEvaluator#evaluate(HSSFCell)} should behave the same whether the cell + * [EMAIL PROTECTED] HSSFFormulaEvaluator#evaluate(org.apache.poi.ss.usermodel.Cell)} should behave the same whether the cell * is <code>null</code> or blank. */ public void testEvaluateBlank() { Modified: poi/trunk/src/testcases/org/apache/poi/ss/formula/TestCellCacheEntry.java URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/formula/TestCellCacheEntry.java?rev=712196&r1=712195&r2=712196&view=diff ============================================================================== --- poi/trunk/src/testcases/org/apache/poi/ss/formula/TestCellCacheEntry.java (original) +++ poi/trunk/src/testcases/org/apache/poi/ss/formula/TestCellCacheEntry.java Fri Nov 7 08:57:23 2008 @@ -23,7 +23,7 @@ import org.apache.poi.hssf.record.formula.eval.ValueEval; /** - * Tests [EMAIL PROTECTED] CellCacheEntry}. + * Tests [EMAIL PROTECTED] org.apache.poi.ss.formula.CellCacheEntry}. * * @author Josh Micich */ Modified: poi/trunk/src/testcases/org/apache/poi/ss/formula/TestEvaluationCache.java URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/formula/TestEvaluationCache.java?rev=712196&r1=712195&r2=712196&view=diff ============================================================================== --- poi/trunk/src/testcases/org/apache/poi/ss/formula/TestEvaluationCache.java (original) +++ poi/trunk/src/testcases/org/apache/poi/ss/formula/TestEvaluationCache.java Fri Nov 7 08:57:23 2008 @@ -47,7 +47,7 @@ import org.apache.poi.ss.usermodel.CellValue; /** - * Tests [EMAIL PROTECTED] EvaluationCache}. Makes sure that where possible (previously calculated) cached + * Tests [EMAIL PROTECTED] org.apache.poi.ss.formula.EvaluationCache}. Makes sure that where possible (previously calculated) cached * values are used. Also checks that changing cell values causes the correct (minimal) set of * dependent cached values to be cleared. * --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]