removed unused imports of deprecated classes, fixed javadoc errors

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@764203 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Yegor Kozlov 2009-04-11 14:15:27 +00:00
parent 76ba6889d4
commit 050f386bba
23 changed files with 38 additions and 40 deletions

View File

@ -61,7 +61,7 @@ public class SVTableModel extends AbstractTableModel {
HSSFRow r = st.getRow(row); HSSFRow r = st.getRow(row);
HSSFCell c = null; HSSFCell c = null;
if (r != null) { if (r != null) {
c = r.getCell((short)col); c = r.getCell(col);
} }
return c; return c;
} }

View File

@ -31,7 +31,6 @@ import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.util.CellRangeAddress; import org.apache.poi.ss.util.CellRangeAddress;
import org.apache.poi.poifs.filesystem.POIFSFileSystem; import org.apache.poi.poifs.filesystem.POIFSFileSystem;
import org.apache.poi.ss.util.Region;
/** /**
* File for HSSF testing/examples * File for HSSF testing/examples

View File

@ -57,9 +57,12 @@ import org.apache.poi.poifs.filesystem.POIFSFileSystem;
* Returns the textual content of the file, suitable for * Returns the textual content of the file, suitable for
* indexing by something like Lucene, but not really * indexing by something like Lucene, but not really
* intended for display to the user. * intended for display to the user.
* <p>
* To turn an excel file into a CSV or similar, then see * To turn an excel file into a CSV or similar, then see
* the XLS2CSVmra example * the XLS2CSVmra example
* @see org.apache.poi.hssf.eventusermodel.examples.XLS2CSVmra * </p>
* <link href="http://svn.apache.org/repos/asf/poi/trunk/src/examples/src/org/apache/poi/hssf/eventusermodel/examples/XLS2CSVmra.java">
* http://svn.apache.org/repos/asf/poi/trunk/src/examples/src/org/apache/poi/hssf/eventusermodel/examples/XLS2CSVmra.java</link>
*/ */
public class EventBasedExcelExtractor extends POIOLE2TextExtractor { public class EventBasedExcelExtractor extends POIOLE2TextExtractor {
private POIFSFileSystem fs; private POIFSFileSystem fs;

View File

@ -37,12 +37,17 @@ import org.apache.poi.ss.usermodel.HeaderFooter;
/** /**
* A text extractor for Excel files. * A text extractor for Excel files.
* <p>
* Returns the textual content of the file, suitable for * Returns the textual content of the file, suitable for
* indexing by something like Lucene, but not really * indexing by something like Lucene, but not really
* intended for display to the user. * intended for display to the user.
* </p>
* <p>
* To turn an excel file into a CSV or similar, then see * To turn an excel file into a CSV or similar, then see
* the XLS2CSVmra example * the XLS2CSVmra example
* @see org.apache.poi.hssf.eventusermodel.examples.XLS2CSVmra * </p>
* <link href="http://svn.apache.org/repos/asf/poi/trunk/src/examples/src/org/apache/poi/hssf/eventusermodel/examples/XLS2CSVmra.java">
* http://svn.apache.org/repos/asf/poi/trunk/src/examples/src/org/apache/poi/hssf/eventusermodel/examples/XLS2CSVmra.java</link>
*/ */
public class ExcelExtractor extends POIOLE2TextExtractor implements org.apache.poi.ss.extractor.ExcelExtractor { public class ExcelExtractor extends POIOLE2TextExtractor implements org.apache.poi.ss.extractor.ExcelExtractor {
private HSSFWorkbook _wb; private HSSFWorkbook _wb;

View File

@ -912,7 +912,7 @@ public final class Workbook implements Model {
/** /**
* use this function to add a Shared String Table to an existing sheet (say * use this function to add a Shared String Table to an existing sheet (say
* generated by a different java api) without an sst.... * generated by a different java api) without an sst....
* @see #createSST() * @see #createExtendedSST()
* @see org.apache.poi.hssf.record.SSTRecord * @see org.apache.poi.hssf.record.SSTRecord
*/ */

View File

@ -31,8 +31,5 @@ For overviews, tutorials, examples, guides, and tool documentation, please see:
<li><a href="http://poi.apache.org">Apache POI Project</a> <li><a href="http://poi.apache.org">Apache POI Project</a>
</ul> </ul>
<!-- Put @see and @since tags down here. -->
@see org.apache.poi.poifs
@see org.apache.poi.hpsf
</body> </body>
</html> </html>

View File

@ -438,9 +438,7 @@ public final class CFRuleRecord extends StandardRecord {
* Subclasses should implement this so that their data is passed back in a * Subclasses should implement this so that their data is passed back in a
* byte array. * byte array.
* *
* @param pOffset to begin writing at * @param out the stream to write to
* @param data byte array containing instance data
* @return number of bytes written
*/ */
public void serialize(LittleEndianOutput out) { public void serialize(LittleEndianOutput out) {

View File

@ -57,21 +57,21 @@ public final class DVALRecord extends StandardRecord {
} }
/** /**
* @param field_1_options the options of the dialog * @param options the options of the dialog
*/ */
public void setOptions(short options) { public void setOptions(short options) {
field_1_options = options; field_1_options = options;
} }
/** /**
* @param field_2_horiz_pos the Horizontal position of the dialog * @param horiz_pos the Horizontal position of the dialog
*/ */
public void setHorizontalPos(int horiz_pos) { public void setHorizontalPos(int horiz_pos) {
field_2_horiz_pos = horiz_pos; field_2_horiz_pos = horiz_pos;
} }
/** /**
* @param field_3_vert_pos the Vertical position of the dialog * @param vert_pos the Vertical position of the dialog
*/ */
public void setVerticalPos(int vert_pos) { public void setVerticalPos(int vert_pos) {
field_3_vert_pos = vert_pos; field_3_vert_pos = vert_pos;

View File

@ -28,8 +28,6 @@ import org.apache.poi.util.LittleEndianOutput;
* REFERENCE: PG 313 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)<P> * REFERENCE: PG 313 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)<P>
* @author Andrew C. Oliver (acoliver at apache dot org) * @author Andrew C. Oliver (acoliver at apache dot org)
* @author Jason Height (jheight at apache dot org) * @author Jason Height (jheight at apache dot org)
*
* @see org.apache.poi.hssf.record.ExtSSTInfoSubRecord
*/ */
public final class ExtSSTRecord extends StandardRecord { public final class ExtSSTRecord extends StandardRecord {
public final static short sid = 0x00FF; public final static short sid = 0x00FF;

View File

@ -18,7 +18,7 @@
package org.apache.poi.hssf.record; package org.apache.poi.hssf.record;
/** /**
* Common base class of {@link Record} and {@link RecordAggregate} * Common base class of {@link Record} and {@link org.apache.poi.hssf.record.aggregates.RecordAggregate}
* *
* @author Josh Micich * @author Josh Micich
*/ */

View File

@ -51,7 +51,7 @@ public abstract class StandardRecord extends Record {
* Write the data content of this BIFF record. The 'ushort sid' and 'ushort size' header fields * Write the data content of this BIFF record. The 'ushort sid' and 'ushort size' header fields
* have already been written by the superclass.<br/> * have already been written by the superclass.<br/>
* *
* The subclass must write the exact number of bytes as reported by {@link Record#getDataSize()} * The subclass must write the exact number of bytes as reported by {@link org.apache.poi.hssf.record.Record#getRecordSize()}}
*/ */
protected abstract void serialize(LittleEndianOutput out); protected abstract void serialize(LittleEndianOutput out);
} }

View File

@ -35,7 +35,7 @@ import org.apache.poi.ss.usermodel.Workbook;
/** /**
* An alternative workbook evaluator that saves memory in situations where a single workbook is * An alternative workbook evaluator that saves memory in situations where a single workbook is
* concurrently and independently evaluated many times. With standard formula evaluation, around * concurrently and independently evaluated many times. With standard formula evaluation, around
* 90% of memory consumption is due to loading of the {@link HSSFWorkbook} or {@link XSSFWorkbook}. * 90% of memory consumption is due to loading of the {@link HSSFWorkbook} or {@link org.apache.poi.xssf.usermodel.XSSFWorkbook}.
* This class enables a 'master workbook' to be loaded just once and shared between many evaluation * This class enables a 'master workbook' to be loaded just once and shared between many evaluation
* clients. Each evaluation client creates its own {@link ForkedEvaluator} and can set cell values * clients. Each evaluation client creates its own {@link ForkedEvaluator} and can set cell values
* that will be used for local evaluations (and don't disturb evaluations on other evaluators). * that will be used for local evaluations (and don't disturb evaluations on other evaluators).

View File

@ -26,7 +26,6 @@ import org.apache.xmlbeans.XmlException;
import org.apache.poi.openxml4j.exceptions.InvalidFormatException; import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
import org.apache.poi.openxml4j.exceptions.OpenXML4JException; import org.apache.poi.openxml4j.exceptions.OpenXML4JException;
import org.apache.poi.openxml4j.opc.*; import org.apache.poi.openxml4j.opc.*;
import org.apache.poi.openxml4j.opc.Package;
public abstract class POIXMLDocument extends POIXMLDocumentPart{ public abstract class POIXMLDocument extends POIXMLDocumentPart{

View File

@ -25,7 +25,6 @@ import org.apache.poi.util.POILogger;
import org.apache.poi.util.POILogFactory; import org.apache.poi.util.POILogFactory;
import org.apache.poi.openxml4j.exceptions.OpenXML4JException; import org.apache.poi.openxml4j.exceptions.OpenXML4JException;
import org.apache.poi.openxml4j.opc.*; import org.apache.poi.openxml4j.opc.*;
import org.apache.poi.openxml4j.opc.Package;
/** /**
* Represents an entry of a OOXML package. * Represents an entry of a OOXML package.

View File

@ -90,7 +90,7 @@ public abstract class Package extends OPCPackage {
} }
/** /**
* @deprecated use {@link OPCPackage#open(File)} * @deprecated use {@link OPCPackage#openOrCreate(java.io.File)}
*/ */
public static Package openOrCreate(File file) throws InvalidFormatException { public static Package openOrCreate(File file) throws InvalidFormatException {
Package retPackage = null; Package retPackage = null;

View File

@ -640,7 +640,7 @@ public class XWPFParagraph {
* paragraph in the document in absolute units. * paragraph in the document in absolute units.
* *
* @return bigInteger - value representing the spacing after the paragraph * @return bigInteger - value representing the spacing after the paragraph
* @see #setSpacingAfterLines(BigInteger) * @see #setSpacingAfterLines(int)
*/ */
public int getSpacingAfterLines() { public int getSpacingAfterLines() {
CTSpacing spacing = getCTSpacing(false); CTSpacing spacing = getCTSpacing(false);
@ -669,7 +669,7 @@ public class XWPFParagraph {
* paragraph in the document in absolute units. * paragraph in the document in absolute units.
* *
* @return the spacing that should be added above the first line * @return the spacing that should be added above the first line
* @see #setSpacingBefore(BigInteger) * @see #setSpacingBefore(int)
*/ */
public int getSpacingBefore() { public int getSpacingBefore() {
CTSpacing spacing = getCTSpacing(false); CTSpacing spacing = getCTSpacing(false);
@ -700,7 +700,7 @@ public class XWPFParagraph {
* The value of this attribute is specified in one hundredths of a line. * The value of this attribute is specified in one hundredths of a line.
* *
* @return the spacing that should be added before the first line in this paragraph * @return the spacing that should be added before the first line in this paragraph
* @see #setSpacingBeforeLines(BigInteger) * @see #setSpacingBeforeLines(int)
*/ */
public int getSpacingBeforeLines() { public int getSpacingBeforeLines() {
CTSpacing spacing = getCTSpacing(false); CTSpacing spacing = getCTSpacing(false);

View File

@ -407,7 +407,7 @@ public class XWPFRun {
* A break is a special character which is used to override the * A break is a special character which is used to override the
* normal line breaking that would be performed based on the normal layout * normal line breaking that would be performed based on the normal layout
* of the document's contents. * of the document's contents.
* @see addCarriageReturn() * @see #addCarriageReturn()
*/ */
public void addBreak() { public void addBreak() {
run.addNewBr(); run.addNewBr();

View File

@ -34,7 +34,7 @@ import java.awt.geom.Rectangle2D;
* </p> * </p>
* <p> * <p>
* When you add a shape, you usually specify the dimensions of the shape and the position * When you add a shape, you usually specify the dimensions of the shape and the position
* of the upper<EFBFBD>left corner of the bounding box for the shape relative to the upper<EFBFBD>left * of the upper'left corner of the bounding box for the shape relative to the upper'left
* corner of the page, worksheet, or slide. Distances in the drawing layer are measured * corner of the page, worksheet, or slide. Distances in the drawing layer are measured
* in points (72 points = 1 inch). * in points (72 points = 1 inch).
* </p> * </p>

View File

@ -35,8 +35,8 @@ import org.apache.poi.ddf.EscherRecordFactory;
/** /**
* Holds information about all pictures embedded in Word Document either via "Insert -> Picture -> From File" or via * Holds information about all pictures embedded in Word Document either via "Insert -> Picture -> From File" or via
* clipboard. Responsible for images extraction and determining whether some document<EFBFBD>s piece contains embedded image. * clipboard. Responsible for images extraction and determining whether some document's piece contains embedded image.
* Analyzes raw data bytestream <EFBFBD>Data<EFBFBD> (where Word stores all embedded objects) provided by HWPFDocument. * Analyzes raw data bytestream 'Data' (where Word stores all embedded objects) provided by HWPFDocument.
* *
* Word stores images as is within so called "Data stream" - the stream within a Word docfile containing various data * Word stores images as is within so called "Data stream" - the stream within a Word docfile containing various data
* that hang off of characters in the main stream. For example, binary data describing in-line pictures and/or * that hang off of characters in the main stream. For example, binary data describing in-line pictures and/or

View File

@ -73,11 +73,11 @@ public final class TestOleEmbedding extends TestCase {
HSSFWorkbook wb = new HSSFWorkbook(data.getData()); HSSFWorkbook wb = new HSSFWorkbook(data.getData());
HSSFSheet sheet = wb.getSheetAt(0); HSSFSheet sheet = wb.getSheetAt(0);
//verify we can access the xls data //verify we can access the xls data
assertEquals(1, sheet.getRow(0).getCell((short)0).getNumericCellValue(), 0); assertEquals(1, sheet.getRow(0).getCell(0).getNumericCellValue(), 0);
assertEquals(1, sheet.getRow(1).getCell((short)0).getNumericCellValue(), 0); assertEquals(1, sheet.getRow(1).getCell(0).getNumericCellValue(), 0);
assertEquals(2, sheet.getRow(2).getCell((short)0).getNumericCellValue(), 0); assertEquals(2, sheet.getRow(2).getCell(0).getNumericCellValue(), 0);
assertEquals(3, sheet.getRow(3).getCell((short)0).getNumericCellValue(), 0); assertEquals(3, sheet.getRow(3).getCell(0).getNumericCellValue(), 0);
assertEquals(8, sheet.getRow(5).getCell((short)0).getNumericCellValue(), 0); assertEquals(8, sheet.getRow(5).getCell(0).getNumericCellValue(), 0);
} else if ("Document".equals(ole.getInstanceName())){ } else if ("Document".equals(ole.getInstanceName())){
//creating a HWPF document //creating a HWPF document
HWPFDocument doc = new HWPFDocument(data.getData()); HWPFDocument doc = new HWPFDocument(data.getData());

View File

@ -859,7 +859,7 @@ public final class TestFormulas extends TestCase {
public void test27272_1() throws Exception { public void test27272_1() throws Exception {
HSSFWorkbook wb = openSample("27272_1.xls"); HSSFWorkbook wb = openSample("27272_1.xls");
wb.getSheetAt(0); wb.getSheetAt(0);
assertEquals("Reference for named range ", "Compliance!#REF!",wb.getNameAt(0).getReference()); assertEquals("Reference for named range ", "Compliance!#REF!",wb.getNameAt(0).getRefersToFormula());
File outF = File.createTempFile("bug27272_1",".xls"); File outF = File.createTempFile("bug27272_1",".xls");
wb.write(new FileOutputStream(outF)); wb.write(new FileOutputStream(outF));
System.out.println("Open "+outF.getAbsolutePath()+" in Excel"); System.out.println("Open "+outF.getAbsolutePath()+" in Excel");
@ -867,7 +867,7 @@ public final class TestFormulas extends TestCase {
/** Unknown Ptg 3D*/ /** Unknown Ptg 3D*/
public void test27272_2() throws Exception { public void test27272_2() throws Exception {
HSSFWorkbook wb = openSample("27272_2.xls"); HSSFWorkbook wb = openSample("27272_2.xls");
assertEquals("Reference for named range ", "LOAD.POD_HISTORIES!#REF!",wb.getNameAt(0).getReference()); assertEquals("Reference for named range ", "LOAD.POD_HISTORIES!#REF!",wb.getNameAt(0).getRefersToFormula());
File outF = File.createTempFile("bug27272_2",".xls"); File outF = File.createTempFile("bug27272_2",".xls");
wb.write(new FileOutputStream(outF)); wb.write(new FileOutputStream(outF));
System.out.println("Open "+outF.getAbsolutePath()+" in Excel"); System.out.println("Open "+outF.getAbsolutePath()+" in Excel");

View File

@ -230,11 +230,11 @@ public final class TestAreaReference extends TestCase {
HSSFName aNamedCell = wb.getNameAt(idx); HSSFName aNamedCell = wb.getNameAt(idx);
// Should have 2 references // Should have 2 references
assertEquals(ref, aNamedCell.getReference()); assertEquals(ref, aNamedCell.getRefersToFormula());
// Check the parsing of the reference into cells // Check the parsing of the reference into cells
assertFalse(AreaReference.isContiguous(aNamedCell.getReference())); assertFalse(AreaReference.isContiguous(aNamedCell.getRefersToFormula()));
AreaReference[] arefs = AreaReference.generateContiguous(aNamedCell.getReference()); AreaReference[] arefs = AreaReference.generateContiguous(aNamedCell.getRefersToFormula());
assertEquals(2, arefs.length); assertEquals(2, arefs.length);
assertEquals(refA, arefs[0].formatAsString()); assertEquals(refA, arefs[0].formatAsString());
assertEquals(refB, arefs[1].formatAsString()); assertEquals(refB, arefs[1].formatAsString());

View File

@ -23,7 +23,7 @@ import junit.framework.AssertionFailedError;
import org.apache.poi.ss.formula.FormulaParser; import org.apache.poi.ss.formula.FormulaParser;
import org.apache.poi.ss.formula.FormulaParser.FormulaParseException; import org.apache.poi.ss.formula.FormulaParser.FormulaParseException;
/** /**
* Avoids making {@link FormulaParser#FormulaParseException} public * Avoids making {@link FormulaParseException} public
* *
* @author Josh Micich * @author Josh Micich
*/ */