* Method main
*
* Given 1 argument takes that as the filename, inputs it and dumps the
- * cell values/types out to sys.out.<br/>
+ * cell values/types out to sys.out.<br>
*
* given 2 arguments where the second argument is the word "write" and the
* first is the filename - writes out a sample (test) spreadsheet
- * see {@link HSSFReadWrite#testCreateSampleSheet(String)}.<br/>
+ * see {@link HSSFReadWrite#testCreateSampleSheet(String)}.<br>
*
* given 2 arguments where the first is an input filename and the second
* an output filename (not write), attempts to fully read in the
- * spreadsheet and fully write it out.<br/>
+ * spreadsheet and fully write it out.<br>
*
* given 3 arguments where the first is an input filename and the second an
* output filename (not write) and the third is "modify1", attempts to read in the
/**
* This field is the magic number to convert from a Character width to a java
* pixel width.
- * <p/>
+ * <p>
* When the "normal" font size in a workbook changes, this effects all of the
* heights and widths. Unfortunately there is no way to retrieve this
* information, hence the MAGIC number.
- * <p/>
+ * <p>
* This number may only work for the normal style font size of Arial size 10.
*/
private static final int magicCharFactor = 7;
* initial paint of the component, and then executed at the appropriate time,
* such as at the end of the containing object's {@link
* JComponent#paintChildren(Graphics)} method.
- * <p/>
+ * <p>
* It is up to the parent component to invoke the {@link #paint(Graphics2D)}
* method of this objet at that appropriate time.
*
* is retrieved from the first object found that has a {@link
* #PENDING_PAINTINGS} client property, starting with this component and
* looking up its ancestors (parent, parent's parent, etc.)
- * <p/>
+ * <p>
* This allows any descendant of a component that has a {@link
* PendingPaintings} property to add its own pending paintings.
*
* org.apache.poi.hssf.eventusermodel.examples.
* As with the HSSF version, this tries to spot missing
* rows and cells, and output empty entries for them.
- * <p/>
+ * <p>
* Data sheets are read using a SAX parser to keep the
* memory footprint relatively small, so this should be
* able to read enormous workbooks. The styles table and
* (read-only) class is used for the shared string table
* because the standard POI SharedStringsTable grows very
* quickly with the number of unique strings.
- * <p/>
+ * <p>
* For a more advanced implementation of SAX event parsing
* of XLSX files, see {@link XSSFEventBasedExcelExtractor}
* and {@link XSSFSheetXMLHandler}. Note that for many cases,
* Called to test whether or not the embedded workbook was correctly
* updated. This method simply recovers the first cell from the first row
* of the first workbook and tests the value it contains.
- * <p/>
+ * <p>
* Note that execution will not continue up to the assertion as the
* embedded workbook is now corrupted and causes an IllegalArgumentException
* with the following message
- * <p/>
+ * <p>
* <em>java.lang.IllegalArgumentException: Your InputStream was neither an
* OLE2 stream, nor an OOXML stream</em>
- * <p/>
+ * <p>
* to be thrown when the WorkbookFactory.createWorkbook(InputStream) method
* is executed.
*
/**
* A BuildFileTest is a TestCase which executes targets from an Ant buildfile
* for testing.
- * <p/>
+ * <p>
* This class provides a number of utility methods for particular build file
* tests which extend this class.
*
/**
* Automatically calls the target called "tearDown"
* from the build file tested if it exits.
- * <p/>
+ * <p>
* This allows to use Ant tasks directly in the build file
* to clean up after each test. Note that no "setUp" target
* is automatically called, since it's trivial to have a
/**
* Gets the log the BuildFileTest object.
- * <p/>
+ * <p>
* Only valid if configureProject() has been called.
*
* @return The log value
private PageSettingsBlock _psBlock;
/**
- * 'Worksheet Protection Block'<br/>
+ * 'Worksheet Protection Block'<br>
* Aggregate object is always present, but possibly empty.
*/
private final WorksheetProtectionBlock _protectionBlock = new WorksheetProtectionBlock();
import org.apache.poi.ss.usermodel.Workbook;
/**
- * Link Table (OOO pdf reference: 4.10.3 ) <p/>
+ * Link Table (OOO pdf reference: 4.10.3 ) <p>
*
* The main data of all types of references is stored in the Link Table inside the Workbook Globals
* Substream (4.2.5). The Link Table itself is optional and occurs only if there are any
* references in the document.
- * <p/>
+ * <p>
*
* In BIFF8 the Link Table consists of
* <ul>
- * <li>zero or more EXTERNALBOOK Blocks<p/>
+ * <li>zero or more EXTERNALBOOK Blocks<p>
* each consisting of
* <ul>
* <li>exactly one EXTERNALBOOK (0x01AE) record</li>
* <li>zero or more EXTERNALNAME (0x0023) records</li>
- * <li>zero or more CRN Blocks<p/>
+ * <li>zero or more CRN Blocks<p>
* each consisting of
* <ul>
* <li>exactly one XCT (0x0059)record</li>
import org.apache.poi.hssf.record.pivottable.ViewDefinitionRecord;
/**
- * Finds correct insert positions for records in workbook streams<p/>
+ * Finds correct insert positions for records in workbook streams<p>
*
* See OOO excelfileformat.pdf sec. 4.2.5 'Record Order in a BIFF8 Workbook Stream'
*/
/**
* The link's path string. This is the <code>rgb</code> field of a
* <code>XLUnicodeStringNoCch</code>. Therefore it will contain at least one leading special
- * character (0x01 or 0x02) and probably other ones.<p/>
+ * character (0x01 or 0x02) and probably other ones.<p>
* @see <A href="http://msdn.microsoft.com/en-us/library/dd923491(office.12).aspx">
* DConFile [MS-XLS s. 2.5.77]</A> and
* <A href="http://msdn.microsoft.com/en-us/library/dd950157(office.12).aspx">
* VirtualPath [MS-XLS s. 2.5.69]</a>
- * <p/>
+ * <p>
*/
private byte[] path;
/**
/**
* 'rgoper' / 'Last received results of the DDE link'
- * (seems to be only applicable to DDE links)<br/>
+ * (seems to be only applicable to DDE links)<br>
* Logically this is a 2-D array, which has been flattened into 1-D array here.
*/
private Object[] _ddeValues;
}
/**
- * Read a GUID in standard text form e.g.<br/>
+ * Read a GUID in standard text form e.g.<br>
* 13579BDF-0246-8ACE-0123-456789ABCDEF
- * <br/> -> <br/>
+ * <br> -> <br>
* 0x13579BDF, 0x0246, 0x8ACE 0x0123456789ABCDEF
*/
public static GUID parse(String rep) {
private String _address;
/**
* Text describing a place in document. In Excel UI, this is appended to the
- * address, (after a '#' delimiter).<br/>
+ * address, (after a '#' delimiter).<br>
* This field is optional. If present, the {@link #HLINK_PLACE} must be set.
*/
private String _textMark;
private boolean field_5_hasMultibyte;
private String field_6_author;
/**
- * Saves padding byte value to reduce delta during round-trip serialization.<br/>
+ * Saves padding byte value to reduce delta during round-trip serialization.<br>
*
* The documentation is not clear about how padding should work. In any case
* Excel(2007) does something different.
private static final Class<?>[] CONSTRUCTOR_ARGS = { RecordInputStream.class, };
/**
- * contains the classes for all the records we want to parse.<br/>
+ * contains the classes for all the records we want to parse.<br>
* Note - this most but not *every* subclass of Record.
*/
@SuppressWarnings("unchecked")
* the {@link Ptg} tokens for the formula. However as it turns out in these
* cases, Excel encodes the unshared {@link Ptg} tokens in the right place (inside the {@link
* FormulaRecord}). So the the only thing that needs to be done is to ignore the erroneous
- * shared formula flag.<br/>
+ * shared formula flag.<br>
*
* This method may also be used for setting breakpoints to help diagnose issues regarding the
* abnormally-set 'shared formula' flags.
- * (see TestValueRecordsAggregate.testSpuriousSharedFormulaFlag()).<p/>
+ * (see TestValueRecordsAggregate.testSpuriousSharedFormulaFlag()).<p>
*/
private static void handleMissingSharedFormulaRecord(FormulaRecord formula) {
// make sure 'unshared' formula is actually available
private static final ContinueRecord[] EMPTY_CONTINUE_RECORD_ARRAY = { };
private final Record _pls;
/**
- * holds any continue records found after the PLS record.<br/>
+ * holds any continue records found after the PLS record.<br>
* This would not be required if PLS was properly interpreted.
* Currently, PLS is an {@link UnknownRecord} and does not automatically
* include any trailing {@link ContinueRecord}s.
}
/** Returns the number of row blocks.
- * <p/>The row blocks are goupings of rows that contain the DBCell record
+ * <p>The row blocks are goupings of rows that contain the DBCell record
* after them
*/
public int getRowBlockCount() {
/**
* Groups the sheet protection records for a worksheet.
- * <p/>
+ * <p>
*
* See OOO excelfileformat.pdf sec 4.18.2 'Sheet Protection in a Workbook
* (BIFF5-BIFF8)'
* This method reads {@link WorksheetProtectionBlock} records from the supplied RecordStream
* until the first non-WorksheetProtectionBlock record is encountered. As each record is read,
* it is incorporated into this WorksheetProtectionBlock.
- * <p/>
+ * <p>
* As per the OOO documentation, the protection block records can be expected to be written
* together (with no intervening records), but earlier versions of POI (prior to Jun 2009)
* didn't do this. Workbooks with sheet protection created by those earlier POI versions
* seemed to be valid (Excel opens them OK). So PO allows continues to support reading of files
* with non continuous worksheet protection blocks.
*
- * <p/>
+ * <p>
* <b>Note</b> - when POI writes out this WorksheetProtectionBlock, the records will always be
* written in one consolidated block (in the standard ordering) regardless of how scattered the
* records were when they were originally read.
import org.apache.poi.util.LittleEndianOutput;
/**
- * The area format record is used to define the colours and patterns for an area.<p/>
+ * The area format record is used to define the colours and patterns for an area.<p>
*
* @author Glen Stampoultzis (glens at apache.org)
*/
import org.apache.poi.util.LittleEndianOutput;
/**
- * The area record is used to define a area chart.<p/>
+ * The area record is used to define a area chart.<p>
*
* @author Glen Stampoultzis (glens at apache.org)
*/
import org.apache.poi.util.LittleEndianOutput;
/**
- * The axis line format record defines the axis type details.<p/>
+ * The axis line format record defines the axis type details.<p>
*
* @author Glen Stampoultzis (glens at apache.org)
*/
import org.apache.poi.util.LittleEndianOutput;
/**
- * The axis options record provides unit information and other various tidbits about the axis.<p/>
+ * The axis options record provides unit information and other various tidbits about the axis.<p>
*
* @author Andrew C. Oliver(acoliver at apache.org)
*/
import org.apache.poi.util.LittleEndianOutput;
/**
- * The axis size and location<p/>
+ * The axis size and location<p>
*
* @author Glen Stampoultzis (glens at apache.org)
*/
import org.apache.poi.util.LittleEndianOutput;
/**
- * The axis record defines the type of an axis.<p/>
+ * The axis record defines the type of an axis.<p>
*
* @author Glen Stampoultzis (glens at apache.org)
*/
import org.apache.poi.util.LittleEndianOutput;
/**
- * The number of axes used on a chart.<p/>
+ * The number of axes used on a chart.<p>
*
* @author Glen Stampoultzis (glens at apache.org)
*/
import org.apache.poi.util.LittleEndianOutput;
/**
- * The bar record is used to define a bar chart.<p/>
+ * The bar record is used to define a bar chart.<p>
*
* @author Glen Stampoultzis (glens at apache.org)
*/
import org.apache.poi.util.LittleEndianOutput;
/**
- * CATLAB - Category Labels (0x0856)<br/>
+ * CATLAB - Category Labels (0x0856)<br>
*
* @author Patrick Cheng
*/
import org.apache.poi.util.LittleEndianOutput;
/**
- * This record refers to a category or series axis and is used to specify label/tickmark frequency.<p/>
+ * This record refers to a category or series axis and is used to specify label/tickmark frequency.<p>
*
* @author Glen Stampoultzis (glens at apache.org)
*/
import org.apache.poi.util.LittleEndianOutput;
/**
- * ENDBLOCK - Chart Future Record Type End Block (0x0853)<br/>
+ * ENDBLOCK - Chart Future Record Type End Block (0x0853)<br>
*
* @author Patrick Cheng
*/
import org.apache.poi.util.LittleEndianOutput;
/**
- * The font index record indexes into the font table for the text record.<p/>
+ * The font index record indexes into the font table for the text record.<p>
*
* @author Glen Stampoultzis (glens at apache.org)
*/
import org.apache.poi.util.LittleEndianOutput;
/**
- * The series label record defines the type of label associated with the data format record.<p/>
+ * The series label record defines the type of label associated with the data format record.<p>
*
* @author Glen Stampoultzis (glens at apache.org)
*/
import org.apache.poi.util.LittleEndianOutput;
/**
- * The Tick record defines how tick marks and label positioning/formatting<p/>
+ * The Tick record defines how tick marks and label positioning/formatting<p>
*
* @author Andrew C. Oliver(acoliver at apache.org)
*/
import org.apache.poi.util.StringUtil;
/**
- * Title: Unicode String<p/>
+ * Title: Unicode String<p>
* Description: Unicode String - just standard fields that are in several records.
- * It is considered more desirable then repeating it in all of them.<p/>
- * This is often called a XLUnicodeRichExtendedString in MS documentation.<p/>
- * REFERENCE: PG 264 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)<p/>
+ * It is considered more desirable then repeating it in all of them.<p>
+ * This is often called a XLUnicodeRichExtendedString in MS documentation.<p>
+ * REFERENCE: PG 264 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)<p>
* REFERENCE: PG 951 Excel Binary File Format (.xls) Structure Specification v20091214
*/
public class UnicodeString implements Comparable<UnicodeString> {
return MAX_DATA_SIZE - _size;
}
/**
- * Finishes writing the current record and updates 'ushort size' field.<br/>
+ * Finishes writing the current record and updates 'ushort size' field.<br>
* After this method is called, only {@link #getTotalSize()} may be called.
*/
public void terminate() {
import org.apache.poi.util.StringUtil;
/**
- * SXDI - Data Item (0x00C5)<br/>
+ * SXDI - Data Item (0x00C5)<br>
*
* @author Patrick Cheng
*/
import org.apache.poi.util.StringUtil;
/**
- * SXVDEX - Extended PivotTable View Fields (0x0100)<br/>
+ * SXVDEX - Extended PivotTable View Fields (0x0100)<br>
*
* @author Patrick Cheng
*/
import org.apache.poi.util.RecordFormatException;
/**
- * SXPI - Page Item (0x00B6)<br/>
+ * SXPI - Page Item (0x00B6)<br>
*
* @author Patrick Cheng
*/
import org.apache.poi.util.LittleEndianOutput;
/**
- * SXIDSTM - Stream ID (0x00D5)<br/>
+ * SXIDSTM - Stream ID (0x00D5)<br>
*
* @author Patrick Cheng
*/
import org.apache.poi.util.StringUtil;
/**
- * SXVIEW - View Definition (0x00B0)<br/>
+ * SXVIEW - View Definition (0x00B0)<br>
*/
public final class ViewDefinitionRecord extends StandardRecord {
public static final short sid = 0x00B0;
import org.apache.poi.util.StringUtil;
/**
- * SXVD - View Fields (0x00B1)<br/>
+ * SXVD - View Fields (0x00B1)<br>
*
* @author Patrick Cheng
*/
import org.apache.poi.util.LittleEndianOutput;
/**
- * SXVS - View Source (0x00E3)<br/>
+ * SXVS - View Source (0x00E3)<br>
*
* @author Patrick Cheng
*/
/**
- * Chooses a new boolean value for the cell when its type is changing.<p/>
+ * Chooses a new boolean value for the cell when its type is changing.<p>
*
* Usually the caller is calling setCellType() with the intention of calling
* setCellValue(boolean) straight afterwards. This method only exists to give
import org.apache.poi.ss.usermodel.DataFormat;
/**
- * Identifies both built-in and user defined formats within a workbook.<p/>
- * See {@link BuiltinFormats} for a list of supported built-in formats.<p/>
+ * Identifies both built-in and user defined formats within a workbook.<p>
+ * See {@link BuiltinFormats} for a list of supported built-in formats.<p>
*
- * <b>International Formats</b><br/>
+ * <b>International Formats</b><br>
* 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
import org.apache.poi.ss.usermodel.Workbook;
/**
- * Evaluates formula cells.<p/>
+ * Evaluates formula cells.<p>
*
* For performance reasons, this class keeps a cache of all previously calculated intermediate
* cell values. Be sure to call {@link #clearAllCachedResultValues()} if any workbook cells are changed between
/**
* Represents binary object (i.e. OLE) data stored in the file. Eg. A GIF, JPEG etc...
- * <p/>
+ * <p>
* Right now, 13, july, 2012 can not be created from scratch
*/
public final class HSSFObjectData extends HSSFPicture implements ObjectData {
* If the default font is changed the resized image can be streched vertically or horizontally.
* </p>
* <p>
- * <code>resize(1.0,1.0)</code> keeps the original size,<br/>
- * <code>resize(0.5,0.5)</code> resize to 50% of the original,<br/>
- * <code>resize(2.0,2.0)</code> resizes to 200% of the original.<br/>
+ * <code>resize(1.0,1.0)</code> keeps the original size,<br>
+ * <code>resize(0.5,0.5)</code> resize to 50% of the original,<br>
+ * <code>resize(2.0,2.0)</code> resizes to 200% of the original.<br>
* <code>resize({@link Double#MAX_VALUE},{@link Double#MAX_VALUE})</code> resizes to the dimension of the embedded image.
* </p>
*
* <code>
* Truncate([numChars*7+5]/7*256)/256 = 8;
* </code>
- * <p/>
+ * <p>
* which gives <code>7.29</code>.
*
* @param columnIndex - the column to set (0-based)
/**
* A factory method allowing to create a conditional formatting rule
- * with a cell comparison operator<p/>
+ * with a cell comparison operator<p>
* TODO - formulas containing cell references are currently not parsed properly
*
* @param comparisonOperation - a constant value from
/**
* A factory method allowing to create a conditional formatting rule with a formula.<br>
*
- * The formatting rules are applied by Excel when the value of the formula not equal to 0.<p/>
+ * The formatting rules are applied by Excel when the value of the formula not equal to 0.<p>
* TODO - formulas containing cell references are currently not parsed properly
* @param formula - formula for the valued, compared with the cell
*/
}
/**
- * Removes sheet at the given index.<p/>
+ * Removes sheet at the given index.<p>
*
* Care must be taken if the removed sheet is the currently active or only selected sheet in
* the workbook. There are a few situations when Excel must have a selection and/or active
- * sheet. (For example when printing - see Bug 40414).<br/>
+ * sheet. (For example when printing - see Bug 40414).<br>
*
* This method makes sure that if the removed sheet was active, another sheet will become
* active in its place. Furthermore, if the removed sheet was the only selected sheet, another
public final class AreaReference extends org.apache.poi.ss.util.AreaReference {
/**
* Create an area ref from a string representation. Sheet names containing special characters should be
- * delimited and escaped as per normal syntax rules for formulas.<br/>
+ * delimited and escaped as per normal syntax rules for formulas.<br>
* The area reference must be contiguous (i.e. represent a single rectangle, not a union of rectangles)
*/
public AreaReference(String reference) {
import org.apache.poi.util.LittleEndianOutput;
/**
- * See OOO documentation: excelfileformat.pdf sec 2.5.14 - 'Cell Range Address'<p/>
+ * See OOO documentation: excelfileformat.pdf sec 2.5.14 - 'Cell Range Address'<p>
*
* Implements a CellRangeAddress with 8-but column fields.
*/
@Internal
public class CryptoFunctions {
/**
- * <p><cite>2.3.4.7 ECMA-376 Document Encryption Key Generation (Standard Encryption)<br/>
+ * <p><cite>2.3.4.7 ECMA-376 Document Encryption Key Generation (Standard Encryption)<br>
* 2.3.4.11 Encryption Key Generation (Agile Encryption)</cite></p>
*
* <p>The encryption key for ECMA-376 document encryption [ECMA-376] using agile
* generated by using the following method, where H() is a hash function that MUST be the same as
* specified in section 2.3.4.11 and a plus sign (+) represents concatenation:</p>
* <ul>
- * <li>If a blockKey is provided, let IV be a hash of the KeySalt and the following value:<br/>
+ * <li>If a blockKey is provided, let IV be a hash of the KeySalt and the following value:<br>
* {@code blockKey: IV = H(KeySalt + blockKey)}</li>
- * <li>If a blockKey is not provided, let IV be equal to the following value:<br/>
+ * <li>If a blockKey is not provided, let IV be equal to the following value:<br>
* {@code KeySalt:IV = KeySalt}</li>
* <li>If the number of bytes in the value of IV is less than the the value of the blockSize attribute
* corresponding to the cipherAlgorithm attribute, pad the array of bytes by appending 0x36 until
/**
* Create a POIFSFileSystem from an <tt>InputStream</tt>. Normally the stream is read until
- * EOF. The stream is always closed.<p/>
+ * EOF. The stream is always closed.<p>
*
* Some streams are usable after reaching EOF (typically those that return <code>true</code>
* for <tt>markSupported()</tt>). In the unlikely case that the caller has such a stream
/**
* Create a OPOIFSFileSystem from an <tt>InputStream</tt>. Normally the stream is read until
- * EOF. The stream is always closed.<p/>
+ * EOF. The stream is always closed.<p>
*
* Some streams are usable after reaching EOF (typically those that return <code>true</code>
* for <tt>markSupported()</tt>). In the unlikely case that the caller has such a stream
/**
* Create a POIFSFileSystem from an <tt>InputStream</tt>. Normally the stream is read until
- * EOF. The stream is always closed.<p/>
+ * EOF. The stream is always closed.<p>
*
* Some streams are usable after reaching EOF (typically those that return <code>true</code>
* for <tt>markSupported()</tt>). In the unlikely case that the caller has such a stream
/**
* Maximum number size (in blocks) of the allocation table as supported by
- * POI.<br/>
+ * POI.<br>
*
* This constant has been chosen to help POI identify corrupted data in the
* header block (rather than crash immediately with {@link OutOfMemoryError}
/**
* Wraps a <tt>byte</tt> array and provides simple data input access.
* Internally, this class maintains a buffer read index, so that for the most part, primitive
- * data can be read in a data-input-stream-like manner.<p/>
+ * data can be read in a data-input-stream-like manner.<p>
*
* Note - the calling class should call the {@link #available()} method to detect end-of-buffer
* and move to the next data block when the current is exhausted.
* For optimisation reasons, no error handling is performed in this class. Thus, mistakes in
* calling code ran may raise ugly exceptions here, like {@link ArrayIndexOutOfBoundsException},
- * etc .<p/>
+ * etc .<p>
*
* The multi-byte primitive input methods ({@link #readUShortLE()}, {@link #readIntLE()} and
* {@link #readLongLE()}) have corresponding 'spanning read' methods which (when required) perform
/**
* {@inheritDoc}
- * <p/>
+ * <p>
* For a date, this is <tt>"mm/d/y"</tt>.
*/
public void simpleValue(StringBuffer toAppendTo, Object value) {
/**
* {@inheritDoc}
- * <p/>
+ * <p>
* For a date, this is <tt>"mm/d/y"</tt>.
*/
public void simpleValue(StringBuffer toAppendTo, Object value) {
* Format a value according to the standard Excel behavior. This "standard" is
* not explicitly documented by Microsoft, so the behavior is determined by
* experimentation; see the tests.
- * <p/>
+ * <p>
* An Excel format has up to four parts, separated by semicolons. Each part
* specifies what to do with particular kinds of values, depending on the number
* of parts given:
* fourth part (example: text in the cell's usual color, with the text value
* surround by brackets).</dd>
* </dl>
- * <p/>
+ * <p>
* A given format part may specify a given Locale, by including something
* like <tt>[$$-409]</tt> or <tt>[$£-809]</tt> or <tt>[$-40C]</tt>. These
* are (currently) largely ignored. You can use {@link DateFormatConverter}
* to look these up into Java Locales if desired.
- * <p/>
+ * <p>
* In addition to these, there is a general format that is used when no format
* is specified. This formatting is presented by the {@link #GENERAL_FORMAT}
* object.
* Objects of this class represent a single part of a cell format expression.
* Each cell can have up to four of these for positive, zero, negative, and text
* values.
- * <p/>
+ * <p>
* Each format part can contain a color, a condition, and will always contain a
* format specification. For example <tt>"[Red][>=10]#"</tt> has a color
* (<tt>[Red]</tt>), a condition (<tt>>=10</tt>) and a format specification
* (<tt>#</tt>).
- * <p/>
+ * <p>
* 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.
* the result is the original format, and that starting from that situation,
* the indexes of the original special characters can be used to place the new
* characters. As just described, this is not true for the exponent's sign.
- * <p/>
+ * <p>
* So here is how we handle it:
*
* (1) When parsing the format, remove the sign from after the 'e' and put it
/**
* {@inheritDoc}
- * <p/>
+ * <p>
* For a number, this is <tt>"#"</tt> for integer values, and <tt>"#.#"</tt>
* for floating-point values.
*/
/**
* {@inheritDoc}
- * <p/>
+ * <p>
* For text, this is just printing the text.
*/
public void simpleValue(StringBuffer toAppendTo, Object value) {
import org.apache.poi.ss.usermodel.Workbook;
/**
- * Common functionality across file formats for evaluating formula cells.<p/>
+ * Common functionality across file formats for evaluating formula cells.<p>
*/
public abstract class BaseFormulaEvaluator implements FormulaEvaluator, WorkbookEvaluatorProvider {
protected final WorkbookEvaluator _bookEvaluator;
import org.apache.poi.ss.formula.IEvaluationListener.ICacheEntry;
/**
- * Stores the parameters that identify the evaluation of one cell.<br/>
+ * Stores the parameters that identify the evaluation of one cell.<br>
*/
abstract class CellCacheEntry implements ICacheEntry {
public static final CellCacheEntry[] EMPTY_ARRAY = { };
import org.apache.poi.ss.formula.eval.ValueEval;
/**
- * Stores details about the current evaluation of a cell.<br/>
+ * Stores details about the current evaluation of a cell.<br>
*/
final class CellEvaluationFrame {
import org.apache.poi.ss.util.SheetUtil;
/**
- * Evaluates Conditional Formatting constraints.<p/>
+ * Evaluates Conditional Formatting constraints.<p>
*
* For performance reasons, this class keeps a cache of all previously evaluated rules and cells.
* Be sure to call {@link #clearAllCachedFormats()} if any conditional formats are modified, added, or deleted,
* and {@link #clearAllCachedValues()} whenever cell values change.
- * <p/>
+ * <p>
*
*/
public class ConditionalFormattingEvaluator {
* All the underlying structures, for both HSSF and XSSF, repeatedly go to the raw bytes/XML for the
* different pieces used in the ConditionalFormatting* structures. That's highly inefficient,
* and can cause significant lag when checking formats for large workbooks.
- * <p/>
+ * <p>
* Instead we need a cached version that is discarded when definitions change.
- * <p/>
+ * <p>
* Sheets don't implement equals, and since its an interface,
* there's no guarantee instances won't be recreated on the fly by some implementation.
* So we use sheet name.
/**
* Evaluating rules for cells in their region(s) is expensive, so we want to cache them,
* and empty/reevaluate the cache when values change.
- * <p/>
+ * <p>
* Rule lists are in priority order, as evaluated by Excel (smallest priority # for XSSF, definition order for HSSF)
- * <p/>
+ * <p>
* CellReference implements equals().
*/
private final Map<CellReference, List<EvaluationConditionalFormatRule>> values = new HashMap<CellReference, List<EvaluationConditionalFormatRule>>();
/**
* Call this whenever cell values change in the workbook, so condional formats are re-evaluated
* for all cells.
- * <p/>
+ * <p>
* TODO: eventually this should work like {@link EvaluationCache#notifyUpdateCell(int, int, EvaluationCell)}
* and only clear values that need recalculation based on the formula dependency tree.
*/
* This checks all applicable {@link ConditionalFormattingRule}s for the cell's sheet,
* in defined "priority" order, returning the matches if any. This is a property currently
* not exposed from <code>CTCfRule</code> in <code>XSSFConditionalFormattingRule</code>.
- * <p/>
+ * <p>
* Most cells will have zero or one applied rule, but it is possible to define multiple rules
* that apply at the same time to the same cell, thus the List result.
- * <p/>
+ * <p>
* Note that to properly apply conditional rules, care must be taken to offset the base
* formula by the relative position of the current cell, or the wrong value is checked.
* This is handled by {@link WorkbookEvaluator#evaluate(String, CellReference, CellRangeAddressBase)}.
* This checks all applicable {@link ConditionalFormattingRule}s for the cell's sheet,
* in defined "priority" order, returning the matches if any. This is a property currently
* not exposed from <code>CTCfRule</code> in <code>XSSFConditionalFormattingRule</code>.
- * <p/>
+ * <p>
* Most cells will have zero or one applied rule, but it is possible to define multiple rules
* that apply at the same time to the same cell, thus the List result.
- * <p/>
+ * <p>
* Note that to properly apply conditional rules, care must be taken to offset the base
* formula by the relative position of the current cell, or the wrong value is checked.
* This is handled by {@link WorkbookEvaluator#evaluate(String, CellReference, CellRangeAddressBase)}.
/**
* Conditional formatting rules can apply only to cells in the sheet to which they are attached.
* The POI data model does not have a back-reference to the owning sheet, so it must be passed in separately.
- * <p/>
+ * <p>
* We could overload this with convenience methods taking a sheet name and sheet index as well.
- * <p/>
+ * <p>
* @param sheet containing the rule
* @param conditionalFormattingIndex of the {@link ConditionalFormatting} instance in the sheet's array
* @param ruleIndex of the {@link ConditionalFormattingRule} instance within the {@link ConditionalFormatting}
import org.apache.poi.ss.util.SheetUtil;
/**
- * Evaluates Data Validation constraints.<p/>
+ * Evaluates Data Validation constraints.<p>
*
* For performance reasons, this class keeps a cache of all previously retrieved {@link DataValidation} instances.
* Be sure to call {@link #clearAllCachedValues()} if any workbook validation definitions are
* added, modified, or deleted.
- * <p/>
+ * <p>
* Changing cell values should be fine, as long as the corresponding {@link WorkbookEvaluator#clearAllCachedResultValues()}
* is called as well.
*
/**
* Expensive to compute, so cache them as they are retrieved.
- * <p/>
+ * <p>
* Sheets don't implement equals, and since its an interface,
* there's no guarantee instances won't be recreated on the fly by some implementation.
* So we use sheet name.
* If {@link #getValidationForCell(CellReference)} returns an instance, and the
* {@link ValidationType} is {@link ValidationType#LIST}, return the valid
* values, whether they are from a static list or cell range.
- * <p/>
+ * <p>
* For all other validation types, or no validation at all, this method
* returns null.
- * <p/>
+ * <p>
* This method could throw an exception if the validation type is not LIST,
* but since this method is mostly useful in UI contexts, null seems the
* easier path.
* Use the validation returned by {@link #getValidationForCell(CellReference)} if you
* want the error display details. This is the validation checked by this
* method, which attempts to replicate Excel's data validation rules.
- * <p/>
+ * <p>
* Note that to properly apply some validations, care must be taken to
* offset the base validation formula by the relative position of the
* current cell, or the wrong value is checked.
/**
* Abstracts a cell for the purpose of formula evaluation. This interface represents both formula
- * and non-formula cells.<br/>
+ * and non-formula cells.<br>
*
* For POI internal use only
*
* {@link ConditionalFormattingEvaluator}. This references a rule, its owning
* {@link ConditionalFormatting}, its priority order (lower index = higher priority in Excel),
* and the information needed to evaluate the rule for a given cell.
- * <p/>
+ * <p>
* Having this all combined and cached avoids repeated access calls to the
* underlying structural objects, XSSF CT* objects and HSSF raw byte structures.
* Those objects can be referenced from here. This object will be out of sync if
* anything modifies the referenced structures' evaluation properties.
- * <p/>
+ * <p>
* The assumption is that consuming applications will read the display properties once and
* create whatever style objects they need, caching those at the application level.
* Thus this class only caches values needed for evaluation, not display.
/**
* Per Excel Help, XSSF rule priority is sheet-wide, not just within the owning ConditionalFormatting object.
* This can be seen by creating 4 rules applying to two different ranges and examining the XML.
- * <p/>
+ * <p>
* HSSF priority is based on definition/persistence order.
*
* @param o
import org.apache.poi.ss.formula.ptg.NamePtg;
import org.apache.poi.ss.formula.ptg.Ptg;
/**
- * Abstracts a name record for formula evaluation.<br/>
+ * Abstracts a name record for formula evaluation.<br>
*
* For POI internal use only
*
import org.apache.poi.util.Internal;
/**
- * Abstracts a sheet for the purpose of formula evaluation.<br/>
+ * Abstracts a sheet for the purpose of formula evaluation.<br>
*
* For POI internal use only
*
/**
* Notifies this evaluation tracker that evaluation of the specified cell is
- * about to start.<br/>
+ * about to start.<br>
*
* In the case of a <code>true</code> return code, the caller should
* continue evaluation of the specified cell, and also be sure to call
- * <tt>endEvaluate()</tt> when complete.<br/>
+ * <tt>endEvaluate()</tt> when complete.<br>
*
* In the case of a <code>null</code> return code, the caller should
* return an evaluation result of
* <tt>ErrorEval.CIRCULAR_REF_ERROR<tt>, and not call <tt>endEvaluate()</tt>.
- * <br/>
+ * <br>
* @return <code>false</code> if the specified cell is already being evaluated
*/
public boolean startEvaluate(FormulaCellCacheEntry cce) {
}
/**
- * Notifies this evaluation tracker that the evaluation of the specified cell is complete. <p/>
+ * Notifies this evaluation tracker that the evaluation of the specified cell is complete. <p>
*
* Every successful call to <tt>startEvaluate</tt> must be followed by a call to <tt>endEvaluate</tt> (recommended in a finally block) to enable
- * proper tracking of which cells are being evaluated at any point in time.<p/>
+ * proper tracking of which cells are being evaluated at any point in time.<p>
*
* Assuming a well behaved client, parameters to this method would not be
* required. However, they have been included to assert correct behaviour,
import org.apache.poi.util.Internal;
/**
- * Abstracts a workbook for the purpose of formula evaluation.<br/>
+ * Abstracts a workbook for the purpose of formula evaluation.<br>
*
* For POI internal use only
*
package org.apache.poi.ss.formula;
/**
- * Should be implemented by any {@link org.apache.poi.ss.formula.ptg.Ptg} subclass that needs has an extern sheet index <br/>
+ * Should be implemented by any {@link org.apache.poi.ss.formula.ptg.Ptg} subclass that needs has an extern sheet index <br>
*
* For POI internal use only
*
* <term> ::= <factor> [ <mulop> <factor> ]*
* <factor> ::= <number> | (<expression>) | <cellRef> | <function>
* <function> ::= <functionName> ([expression [, expression]*])
- * <p/>
+ * <p>
* For POI internal use only
- * <p/>
+ * <p>
*/
@Internal
public final class FormulaParser {
import org.apache.poi.ss.util.CellReference;
/**
- * Abstracts a workbook for the purpose of formula parsing.<br/>
+ * Abstracts a workbook for the purpose of formula parsing.<br>
*
* For POI internal use only
*
import org.apache.poi.ss.formula.ptg.Ptg;
/**
- * Common logic for rendering formulas.<br/>
+ * Common logic for rendering formulas.<br>
*
* For POI internal use only
*
import org.apache.poi.ss.formula.ptg.NameXPtg;
/**
- * Abstracts a workbook for the purpose of converting formula to text.<br/>
+ * Abstracts a workbook for the purpose of converting formula to text.<br>
*
* For POI internal use only
*
import org.apache.poi.ss.formula.eval.ValueEval;
/**
- * Tests can implement this class to track the internal working of the {@link WorkbookEvaluator}.<br/>
+ * Tests can implement this class to track the internal working of the {@link WorkbookEvaluator}.<br>
*
* For POI internal testing use only
*
/**
* Used to help optimise cell evaluation result caching by allowing applications to specify which
- * parts of a workbook are <em>final</em>.<br/>
+ * parts of a workbook are <em>final</em>.<br>
* The term <b>final</b> is introduced here to denote immutability or 'having constant definition'.
* This classification refers to potential actions (on the evaluated workbook) by the evaluating
* application. It does not refer to operations performed by the evaluator ({@link
- * WorkbookEvaluator}).<br/>
- * <br/>
+ * WorkbookEvaluator}).<br>
+ * <br>
* <b>General guidelines</b>:
* <ul>
* <li>a plain value cell can be marked as 'final' if it will not be changed after the first call
* <li>value</li>
* <li>array</li>
* </ul>
- * <p/>
+ * <p>
*
* The final operand class chosen for each token depends on the formula type and the token's place
* in the formula. If POI gets the operand class wrong, Excel <em>may</em> interpret the formula
* incorrectly. This condition is typically manifested as a formula cell that displays as '#VALUE!',
- * but resolves correctly when the user presses F2, enter.<p/>
+ * but resolves correctly when the user presses F2, enter.<p>
*
* The logic implemented here was partially inspired by the description in
* "OpenOffice.org's Documentation of the Microsoft Excel File Format". The model presented there
* seems to be inconsistent with observed Excel behaviour (These differences have not been fully
* investigated). The implementation in this class has been heavily modified in order to satisfy
- * concrete examples of how Excel performs the same logic (see TestRVA).<p/>
+ * concrete examples of how Excel performs the same logic (see TestRVA).<p>
*
* Hopefully, as additional important test cases are identified and added to the test suite,
* patterns might become more obvious in this code and allow for simplification.
/**
* Used to decide whether sheet names like 'AB123' need delimiting due to the fact that they
* look like cell references.
- * <p/>
+ * <p>
* This code is currently being used for translating formulas represented with <code>Ptg</code>
* tokens into human readable text form. In formula expressions, a sheet name always has a
* trailing '!' so there is little chance for ambiguity. It doesn't matter too much what this
*
* At the time of writing, POI's formula parser tolerates cell-like sheet names in formulas
* with or without delimiters. The same goes for Excel(2007), both manual and automated entry.
- * <p/>
+ * <p>
* For better or worse this implementation attempts to replicate Excel's formula renderer.
* Excel uses range checking on the apparent 'row' and 'column' components. Note however that
* the maximum sheet size varies across versions.
/**
* Note - this method assumes the specified rawSheetName has only letters and digits. It
* cannot be used to match absolute or range references (using the dollar or colon char).
- * <p/>
+ * <p>
* Some notable cases:
* <blockquote><table border="0" cellpadding="1" cellspacing="0"
* summary="Notable cases.">
/**
* Should be implemented by any {@link org.apache.poi.ss.formula.ptg.Ptg} subclass that needs a workbook to render its formula.
- * <br/>
+ * <br>
*
* For POI internal use only
*
import org.apache.poi.util.POILogFactory;
import org.apache.poi.util.POILogger;
/**
- * Evaluates formula cells.<p/>
+ * Evaluates formula cells.<p>
*
* For performance reasons, this class keeps a cache of all previously calculated intermediate
* cell values. Be sure to call {@link #clearAllCachedResultValues()} if any workbook cells are changed between
- * calls to evaluate~ methods on this class.<br/>
+ * calls to evaluate~ methods on this class.<br>
*
* For POI internal use only
*
/**
* returns an appropriate Eval impl instance for the Ptg. The Ptg must be
* one of: Area3DPtg, AreaPtg, ReferencePtg, Ref3DPtg, IntPtg, NumberPtg,
- * StringPtg, BoolPtg <br/>special Note: OperationPtg subtypes cannot be
+ * StringPtg, BoolPtg <br>special Note: OperationPtg subtypes cannot be
* passed here!
*/
private ValueEval getEvalForPtg(Ptg ptg, OperationEvaluationContext ec) {
import org.apache.poi.ss.formula.eval.ValueEval;
import org.apache.poi.ss.formula.functions.FreeRefFunction;
/**
- * Implementation of 'Analysis Toolpak' Excel function IFERROR()<br/>
+ * Implementation of 'Analysis Toolpak' Excel function IFERROR()<br>
*
- * Returns an error text if there is an error in the evaluation<p/>
+ * Returns an error text if there is an error in the evaluation<p>
*
- * <b>Syntax</b><br/>
+ * <b>Syntax</b><br>
* <b>IFERROR</b>(<b>expression</b>, <b>string</b>)
*
* @author Johan Karlsteen
import org.apache.poi.ss.formula.functions.NumericFunction;
/**
- * Implementation of Excel 'Analysis ToolPak' function MROUND()<br/>
+ * Implementation of Excel 'Analysis ToolPak' function MROUND()<br>
*
- * Returns a number rounded to the desired multiple.<p/>
+ * Returns a number rounded to the desired multiple.<p>
*
- * <b>Syntax</b><br/>
+ * <b>Syntax</b><br>
* <b>MROUND</b>(<b>number</b>, <b>multiple</b>)
*
- * <p/>
+ * <p>
*
* @author Yegor Kozlov
*/
import org.apache.poi.ss.formula.functions.FreeRefFunction;
/**
- * Implementation of Excel 'Analysis ToolPak' function NETWORKDAYS()<br/>
+ * Implementation of Excel 'Analysis ToolPak' function NETWORKDAYS()<br>
* Returns the number of workdays given a starting and an ending date, considering an interval of holidays. A workday is any non
* saturday/sunday date.
- * <p/>
- * <b>Syntax</b><br/>
+ * <p>
+ * <b>Syntax</b><br>
* <b>NETWORKDAYS</b>(<b>startDate</b>, <b>endDate</b>, holidays)
- * <p/>
+ * <p>
*
* @author jfaenomoto@gmail.com
*/
import org.apache.poi.ss.formula.functions.FreeRefFunction;
import org.apache.poi.ss.formula.OperationEvaluationContext;
/**
- * Implementation of Excel 'Analysis ToolPak' function ISEVEN() ISODD()<br/>
+ * Implementation of Excel 'Analysis ToolPak' function ISEVEN() ISODD()<br>
*
* @author Josh Micich
*/
import org.apache.poi.ss.formula.OperationEvaluationContext;
/**
- * Implementation of Excel 'Analysis ToolPak' function RANDBETWEEN()<br/>
+ * Implementation of Excel 'Analysis ToolPak' function RANDBETWEEN()<br>
*
- * Returns a random integer number between the numbers you specify.<p/>
+ * Returns a random integer number between the numbers you specify.<p>
*
- * <b>Syntax</b><br/>
- * <b>RANDBETWEEN</b>(<b>bottom</b>, <b>top</b>)<p/>
+ * <b>Syntax</b><br>
+ * <b>RANDBETWEEN</b>(<b>bottom</b>, <b>top</b>)<p>
*
- * <b>bottom</b> is the smallest integer RANDBETWEEN will return.<br/>
- * <b>top</b> is the largest integer RANDBETWEEN will return.<br/>
+ * <b>bottom</b> is the smallest integer RANDBETWEEN will return.<br>
+ * <b>top</b> is the largest integer RANDBETWEEN will return.<br>
* @author Brendan Nolan
*/
import org.apache.poi.ss.usermodel.DateUtil;
/**
- * Implementation of Excel 'Analysis ToolPak' function WORKDAY()<br/>
+ * Implementation of Excel 'Analysis ToolPak' function WORKDAY()<br>
* Returns the date past a number of workdays beginning at a start date, considering an interval of holidays. A workday is any non
* saturday/sunday date.
- * <p/>
- * <b>Syntax</b><br/>
+ * <p>
+ * <b>Syntax</b><br>
* <b>WORKDAY</b>(<b>startDate</b>, <b>days</b>, holidays)
- * <p/>
+ * <p>
*
* @author jfaenomoto@gmail.com
*/
import org.apache.poi.ss.formula.OperationEvaluationContext;
import org.apache.poi.ss.usermodel.DateUtil;
/**
- * Implementation of Excel 'Analysis ToolPak' function YEARFRAC()<br/>
+ * Implementation of Excel 'Analysis ToolPak' function YEARFRAC()<br>
*
- * Returns the fraction of the year spanned by two dates.<p/>
+ * Returns the fraction of the year spanned by two dates.<p>
*
- * <b>Syntax</b><br/>
- * <b>YEARFRAC</b>(<b>startDate</b>, <b>endDate</b>, basis)<p/>
+ * <b>Syntax</b><br>
+ * <b>YEARFRAC</b>(<b>startDate</b>, <b>endDate</b>, basis)<p>
*
* The <b>basis</b> optionally specifies the behaviour of YEARFRAC as follows:
*
/**
- * Internal calculation methods for Excel 'Analysis ToolPak' function YEARFRAC()<br/>
+ * Internal calculation methods for Excel 'Analysis ToolPak' function YEARFRAC()<br>
*
* Algorithm inspired by www.dwheeler.com/yearfrac
*/
/**
* To support Constant Values (2.5.7) as required by the CRN record.
* This class is also used for two dimensional arrays which are encoded by
- * EXTERNALNAME (5.39) records and Array tokens.<p/>
+ * EXTERNALNAME (5.39) records and Array tokens.<p>
*
* @author Josh Micich
*/
import org.apache.poi.util.POILogFactory;
import org.apache.poi.util.POILogger;
/**
- * Represents a constant error code value as encoded in a constant values array. <p/>
+ * Represents a constant error code value as encoded in a constant values array. <p>
*
* This class is a type-safe wrapper for a 16-bit int value performing a similar job to
* <tt>ErrorEval</tt>.
public static final BoolEval TRUE = new BoolEval(true);
/**
- * Convenience method for the following:<br/>
+ * Convenience method for the following:<br>
* <code>(b ? BoolEval.TRUE : BoolEval.FALSE)</code>
*
* @return the <tt>BoolEval</tt> instance representing <tt>b</tt>.
/**
* This class is used to simplify error handling logic <i>within</i> operator and function
* implementations. Note - <tt>OperationEval.evaluate()</tt> and <tt>Function.evaluate()</tt>
- * method signatures do not throw this exception so it cannot propagate outside.<p/>
+ * method signatures do not throw this exception so it cannot propagate outside.<p>
*
* Here is an example coded without <tt>EvaluationException</tt>, to show how it can help:
* <pre>
* </pre>
* 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.<br/>
+ * are returned.<br>
* Using <tt>EvaluationException</tt> allows the error returning code to be consolidated to one
- * place.<p/>
+ * place.<p>
* <pre>
* public Eval evaluate(Eval[] args, int srcRow, short srcCol) {
* try {
* return temp;
*}
* </pre>
- * It is not mandatory to use EvaluationException, doing so might give the following advantages:<br/>
- * - Methods can more easily be extracted, allowing for re-use.<br/>
+ * It is not mandatory to use EvaluationException, doing so might give the following advantages:<br>
+ * - Methods can more easily be extracted, allowing for re-use.<br>
* - Type management (typecasting etc) is simpler because error conditions have been separated from
- * intermediate calculation values.<br/>
- * - Fewer local variables are required. Local variables can have stronger types.<br/>
+ * intermediate calculation values.<br>
+ * - Fewer local variables are required. Local variables can have stronger types.<br>
* - 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.<p/>
+ * points or the number of levels of nested calls.<p>
*
* <b>Note</b> - Only standard evaluation errors are represented by <tt>EvaluationException</tt> (
* i.e. conditions expected to be encountered when evaluating arbitrary Excel formulas). Conditions
*
* Note that the row area (A1:B1) does not include column C and the column area (D2:D3) does
* not include row 4, so the values in C1(=25) and D4(=400) are not accessible to the formula
- * as written, but in the 4 cells A2:B3, the row and column selection works ok.<p/>
+ * as written, but in the 4 cells A2:B3, the row and column selection works ok.<p>
*
* The same concept is extended to references across sheets, such that even multi-row,
- * multi-column areas can be useful.<p/>
+ * multi-column areas can be useful.<p>
*
* Of course with carefully (or carelessly) chosen parameters, cyclic references can occur and
* hence this method <b>can</b> throw a 'circular reference' EvaluationException. Note that
}
/**
- * Applies some conversion rules if the supplied value is not already an integer.<br/>
+ * Applies some conversion rules if the supplied value is not already an integer.<br>
* Value is first coerced to a <tt>double</tt> ( See <tt>coerceValueToDouble()</tt> ).
- * Note - <tt>BlankEval</tt> is converted to <code>0</code>.<p/>
+ * Note - <tt>BlankEval</tt> is converted to <code>0</code>.<p>
*
- * Excel typically converts doubles to integers by truncating toward negative infinity.<br/>
- * The equivalent java code is:<br/>
- * <code>return (int)Math.floor(d);</code><br/>
- * <b>not</b>:<br/>
+ * Excel typically converts doubles to integers by truncating toward negative infinity.<br>
+ * The equivalent java code is:<br>
+ * <code>return (int)Math.floor(d);</code><br>
+ * <b>not</b>:<br>
* <code>return (int)d; // wrong - rounds toward zero</code>
*
*/
}
/**
- * Converts a string to a double using standard rules that Excel would use.<br/>
- * Tolerates leading and trailing spaces, <p/>
+ * Converts a string to a double using standard rules that Excel would use.<br>
+ * Tolerates leading and trailing spaces, <p>
*
* Doesn't support currency prefixes, commas, percentage signs or arithmetic operations strings.
*
- * Some examples:<br/>
- * " 123 " -> 123.0<br/>
- * ".123" -> 0.123<br/>
- * "1E4" -> 1000<br/>
- * "-123" -> -123.0<br/>
- * These not supported yet:<br/>
- * " $ 1,000.00 " -> 1000.0<br/>
- * "$1.25E4" -> 12500.0<br/>
- * "5**2" -> 500<br/>
- * "250%" -> 2.5<br/>
+ * Some examples:<br>
+ * " 123 " -> 123.0<br>
+ * ".123" -> 0.123<br>
+ * "1E4" -> 1000<br>
+ * "-123" -> -123.0<br>
+ * These not supported yet:<br>
+ * " $ 1,000.00 " -> 1000.0<br>
+ * "$1.25E4" -> 12500.0<br>
+ * "5**2" -> 500<br>
+ * "250%" -> 2.5<br>
*
* @return <code>null</code> if the specified text cannot be parsed as a number
*/
/**
- * Implementation of Excel formula token '%'. <p/>
+ * Implementation of Excel formula token '%'. <p>
* @author Josh Micich
*/
public final class PercentEval extends Fixed1ArgFunction {
* Represents a sheet being used for forked evaluation. Initially, objects of this class contain
* only the cells from the master workbook. By calling {@link #getOrCreateUpdatableCell(int, int)},
* the master cell object is logically replaced with a {@link ForkedEvaluationCell} instance, which
- * will be used in all subsequent evaluations.<br/>
+ * will be used in all subsequent evaluations.<br>
*
* For POI internal use only
*/
/**
* Represents a workbook being used for forked evaluation. Most operations are delegated to the
* shared master workbook, except those that potentially involve cell values that may have been
- * updated after a call to {@link #getOrCreateUpdatableCell(String, int, int)}.<br/>
+ * updated after a call to {@link #getOrCreateUpdatableCell(String, int, int)}.<br>
*
* For POI internal use only
*/
}
/**
* Copies the values of all updated cells (modified by calls to {@link
- * #updateCell(String, int, int, ValueEval)}) to the supplied <tt>workbook</tt>.<br/>
+ * #updateCell(String, int, int, ValueEval)}) to the supplied <tt>workbook</tt>.<br>
* Typically, the supplied <tt>workbook</tt> is a writable copy of the 'master workbook',
* but at the very least it must contain sheets with the same names.
*/
package org.apache.poi.ss.formula.functions;
/**
- * <p>Some utils for converting from and to any base<p/>
+ * <p>Some utils for converting from and to any base<p>
*
* @author cedric dot walter @ gmail dot com
*/
import org.apache.poi.ss.formula.eval.ValueEval;
/**
- * Implementation for Excel Bin2Dec() function.<p/>
- * <p/>
- * <b>Syntax</b>:<br/> <b>Bin2Dec </b>(<b>number</b>)<br/>
- * <p/>
+ * Implementation for Excel Bin2Dec() function.<p>
+ * <p>
+ * <b>Syntax</b>:<br> <b>Bin2Dec </b>(<b>number</b>)<br>
+ * <p>
* Converts a binary number to decimal.
- * <p/>
+ * <p>
* Number is the binary number you want to convert. Number cannot contain more than 10 characters (10 bits).
* The most significant bit of number is the sign bit. The remaining 9 bits are magnitude bits.
* Negative numbers are represented using two's-complement notation.
- * <p/>
+ * <p>
* Remark
* If number is not a valid binary number, or if number contains more than 10 characters (10 bits),
* BIN2DEC returns the #NUM! error value.
import org.apache.poi.ss.formula.eval.*;
/**
- * Implementation for Excel CODE () function.<p/>
- * <p/>
- * <b>Syntax</b>:<br/> <b>CODE </b>(<b>text</b> )<br/>
- * <p/>
+ * Implementation for Excel CODE () function.<p>
+ * <p>
+ * <b>Syntax</b>:<br> <b>CODE </b>(<b>text</b> )<br>
+ * <p>
* Returns a numeric code for the first character in a text string. The returned code corresponds to the character set used by your computer.
- * <p/>
+ * <p>
* text The text for which you want the code of the first character.
*
* @author cedric dot walter @ gmail dot com
import org.apache.poi.ss.formula.eval.ValueEval;
/**
- * Implementation for Excel COMPLEX () function.<p/>
- * <p/>
- * <b>Syntax</b>:<br/> <b>COMPLEX </b>(<b>real_num</b>,<b>i_num</b>,<b>suffix </b> )<br/>
- * <p/>
+ * Implementation for Excel COMPLEX () function.<p>
+ * <p>
+ * <b>Syntax</b>:<br> <b>COMPLEX </b>(<b>real_num</b>,<b>i_num</b>,<b>suffix </b> )<br>
+ * <p>
* Converts real and imaginary coefficients into a complex number of the form x + yi or x + yj.
- * <p/>
- * <p/>
+ * <p>
+ * <p>
* All complex number functions accept "i" and "j" for suffix, but neither "I" nor "J".
* Using uppercase results in the #VALUE! error value. All functions that accept two
* or more complex numbers require that all suffixes match.
- * <p/>
+ * <p>
* <b>real_num</b> The real coefficient of the complex number.
* If this argument is nonnumeric, this function returns the #VALUE! error value.
- * <p/>
- * <p/>
+ * <p>
+ * <p>
* <b>i_num</b> The imaginary coefficient of the complex number.
* If this argument is nonnumeric, this function returns the #VALUE! error value.
- * <p/>
- * <p/>
+ * <p>
+ * <p>
* <b>suffix</b> The suffix for the imaginary component of the complex number.
* <ul>
* <li>If omitted, suffix is assumed to be "i".</li>
* {@code DAYS360(start_date,end_date,[method])}
*
* <ul>
- * <li>Start_date, end_date (required):<br/>
- * The two dates between which you want to know the number of days.<br/>
+ * <li>Start_date, end_date (required):<br>
+ * The two dates between which you want to know the number of days.<br>
* If start_date occurs after end_date, the DAYS360 function returns a negative number.</li>
*
- * <li>Method (optional):<br/>
+ * <li>Method (optional):<br>
* A logical value that specifies whether to use the U.S. or European method in the calculation</li>
*
- * <li>Method set to false or omitted:<br/>
+ * <li>Method set to false or omitted:<br>
* the DAYS360 function uses the U.S. (NASD) method. If the starting date is the 31st of a month,
* it becomes equal to the 30th of the same month. If the ending date is the 31st of a month and
* the starting date is earlier than the 30th of a month, the ending date becomes equal to the
* 1st of the next month, otherwise the ending date becomes equal to the 30th of the same month.
- * The month February and leap years are handled in the following way:<br/>
+ * The month February and leap years are handled in the following way:<br>
* On a non-leap year the function {@code =DAYS360("2/28/93", "3/1/93", FALSE)} returns 1 day
- * because the DAYS360 function ignores the extra days added to February.<br/>
+ * because the DAYS360 function ignores the extra days added to February.<br>
* On a leap year the function {@code =DAYS360("2/29/96","3/1/96", FALSE)} returns 1 day for
* the same reason.</li>
*
- * <li>Method Set to true:<br/>
+ * <li>Method Set to true:<br>
* When you set the method parameter to TRUE, the DAYS360 function uses the European method.
* Starting dates or ending dates that occur on the 31st of a month become equal to the 30th of
- * the same month. The month February and leap years are handled in the following way:<br/>
+ * the same month. The month February and leap years are handled in the following way:<br>
* On a non-leap year the function {@code =DAYS360("2/28/93", "3/1/93", TRUE)} returns
* 3 days because the DAYS360 function is counting the extra days added to February to give
- * February 30 days.<br/>
+ * February 30 days.<br>
* On a leap year the function {@code =DAYS360("2/29/96", "3/1/96", TRUE)} returns
* 2 days for the same reason.</li>
* </ul>
import org.apache.poi.ss.formula.eval.ValueEval;
/**
- * Implementation for Excel Bin2Dec() function.<p/>
- * <p/>
- * <b>Syntax</b>:<br/> <b>Bin2Dec </b>(<b>number</b>,<b>[places]</b> )<br/>
- * <p/>
+ * Implementation for Excel Bin2Dec() function.<p>
+ * <p>
+ * <b>Syntax</b>:<br> <b>Bin2Dec </b>(<b>number</b>,<b>[places]</b> )<br>
+ * <p>
* Converts a decimal number to binary.
- * <p/>
+ * <p>
* The DEC2BIN function syntax has the following arguments:
* <ul>
* <li>Number Required. The decimal integer you want to convert. If number is negative, valid place values are ignored and DEC2BIN returns a 10-character (10-bit) binary number in which the most significant bit is the sign bit. The remaining 9 bits are magnitude bits. Negative numbers are represented using two's-complement notation.</li>
* <li>Places Optional. The number of characters to use. If places is omitted, DEC2BIN uses the minimum number of characters necessary. Places is useful for padding the return value with leading 0s (zeros).</li>
* </ul>
- * <p/>
+ * <p>
* Remarks
* <ul>
* <li>If number < -512 or if number > 511, DEC2BIN returns the #NUM! error value.</li>
import org.apache.poi.ss.formula.eval.*;
/**
- * Implementation for Excel DELTA() function.<p/>
- * <p/>
- * <b>Syntax</b>:<br/> <b>DEC2HEX </b>(<b>number</b>,<b>places</b> )<br/>
- * <p/>
+ * Implementation for Excel DELTA() function.<p>
+ * <p>
+ * <b>Syntax</b>:<br> <b>DEC2HEX </b>(<b>number</b>,<b>places</b> )<br>
+ * <p>
* Converts a decimal number to hexadecimal.
*
* The decimal integer you want to convert. If number is negative, places is ignored
import java.math.BigDecimal;
/**
- * Implementation for Excel DELTA() function.<p/>
- * <p/>
- * <b>Syntax</b>:<br/> <b>DELTA </b>(<b>number1</b>,<b>number2</b> )<br/>
- * <p/>
+ * Implementation for Excel DELTA() function.<p>
+ * <p>
+ * <b>Syntax</b>:<br> <b>DELTA </b>(<b>number1</b>,<b>number2</b> )<br>
+ * <p>
* Tests whether two values are equal. Returns 1 if number1 = number2; returns 0 otherwise.
* Use this function to filter a set of values. For example, by summing several DELTA functions
* you calculate the count of equal pairs. This function is also known as the Kronecker Delta function.
import org.apache.poi.util.LocaleUtil;
/**
- * Implementation for the Excel EOMONTH() function.<p/>
- * <p/>
- * EOMONTH() returns the date of the last day of a month..<p/>
- * <p/>
- * <b>Syntax</b>:<br/>
- * <b>EOMONTH</b>(<b>start_date</b>,<b>months</b>)<p/>
- * <p/>
+ * Implementation for the Excel EOMONTH() function.<p>
+ * <p>
+ * EOMONTH() returns the date of the last day of a month..<p>
+ * <p>
+ * <b>Syntax</b>:<br>
+ * <b>EOMONTH</b>(<b>start_date</b>,<b>months</b>)<p>
+ * <p>
* <b>start_date</b> is the starting date of the calculation
* <b>months</b> is the number of months to be added to <b>start_date</b>,
* to give a new date. For this new date, <b>EOMONTH</b> returns the date of
/**
* Implementation for the ERROR.TYPE() Excel function.
* <p>
- * <b>Syntax:</b><br/>
+ * <b>Syntax:</b><br>
* <b>ERROR.TYPE</b>(<b>errorValue</b>)</p>
* <p>
- * Returns a number corresponding to the error type of the supplied argument.<p/>
+ * Returns a number corresponding to the error type of the supplied argument.<p>
* <p>
* <table border="1" cellpadding="1" cellspacing="1" summary="Return values for ERROR.TYPE()">
* <tr><td>errorValue</td><td>Return Value</td></tr>
import java.util.HashMap;
/**
- * Implementation for Excel FACTDOUBLE() function.<p/>
- * <p/>
- * <b>Syntax</b>:<br/> <b>FACTDOUBLE </b>(<b>number</b>)<br/>
- * <p/>
+ * Implementation for Excel FACTDOUBLE() function.<p>
+ * <p>
+ * <b>Syntax</b>:<br> <b>FACTDOUBLE </b>(<b>number</b>)<br>
+ * <p>
* Returns the double factorial of a number.
- * <p/>
+ * <p>
* Number is the value for which to return the double factorial. If number is not an integer, it is truncated.
- * <p/>
+ * <p>
* Remarks
* <ul>
* <li>If number is nonnumeric, FACTDOUBLE returns the #VALUE! error value.</li>
*
* This class is a functon library for common fiscal functions.
* <b>Glossary of terms/abbreviations:</b>
- * <br/>
+ * <br>
* <ul>
* <li><em>FV:</em> Future Value</li>
* <li><em>PV:</em> Present Value</li>
* <li>MS Excel function reference: http://office.microsoft.com/en-us/assistance/CH062528251033.aspx</li>
* </ol>
* <h3>Implementation Notes:</h3>
- * Symbols used in the formulae that follow:<br/>
+ * Symbols used in the formulae that follow:<br>
* <ul>
* <li>p: present value</li>
* <li>f: future value</li>
* For most Excel functions, involving references ((cell, area), (2d, 3d)), the references are
* passed in as arguments, and the exact location remains fixed. However, a select few Excel
* functions have the ability to access cells that were not part of any reference passed as an
- * argument.<br/>
- * Two important functions with this feature are <b>INDIRECT</b> and <b>OFFSET</b><p/>
+ * argument.<br>
+ * Two important functions with this feature are <b>INDIRECT</b> and <b>OFFSET</b><p>
*
* When POI evaluates formulas, each reference argument is capable of evaluating any cell inside
* its range. Actually, even cells outside the reference range but on the same sheet can be
import org.apache.poi.ss.formula.eval.*;
/**
- * Implementation for Excel HEX2DEC() function.<p/>
- * <p/>
- * <b>Syntax</b>:<br/> <b>HEX2DEC </b>(<b>number</b>)<br/>
- * <p/>
+ * Implementation for Excel HEX2DEC() function.<p>
+ * <p>
+ * <b>Syntax</b>:<br> <b>HEX2DEC </b>(<b>number</b>)<br>
+ * <p>
* Converts a hexadecimal number to decimal.
- * <p/>
+ * <p>
* Number is the hexadecimal number you want to convert. Number cannot contain more than 10 characters (40 bits).
* The most significant bit of number is the sign bit.
* The remaining 39 bits are magnitude bits. Negative numbers are represented using two's-complement notation.
import org.apache.poi.ss.formula.functions.LookupUtils.ValueVector;
import org.apache.poi.ss.formula.TwoDEval;
/**
- * Implementation of the HLOOKUP() function.<p/>
+ * Implementation of the HLOOKUP() function.<p>
*
- * HLOOKUP finds a column in a lookup table by the first row value and returns the value from another row.<br/>
+ * HLOOKUP finds a column in a lookup table by the first row value and returns the value from another row.<br>
*
- * <b>Syntax</b>:<br/>
- * <b>HLOOKUP</b>(<b>lookup_value</b>, <b>table_array</b>, <b>row_index_num</b>, range_lookup)<p/>
+ * <b>Syntax</b>:<br>
+ * <b>HLOOKUP</b>(<b>lookup_value</b>, <b>table_array</b>, <b>row_index_num</b>, range_lookup)<p>
*
- * <b>lookup_value</b> The value to be found in the first column of the table array.<br/>
- * <b>table_array</b> An area reference for the lookup data. <br/>
- * <b>row_index_num</b> a 1 based index specifying which row value of the lookup data will be returned.<br/>
+ * <b>lookup_value</b> The value to be found in the first column of the table array.<br>
+ * <b>table_array</b> An area reference for the lookup data. <br>
+ * <b>row_index_num</b> a 1 based index specifying which row value of the lookup data will be returned.<br>
* <b>range_lookup</b> If TRUE (default), HLOOKUP finds the largest value less than or equal to
- * the lookup_value. If FALSE, only exact matches will be considered<br/>
+ * the lookup_value. If FALSE, only exact matches will be considered<br>
*
* @author Josh Micich
*/
import org.apache.poi.ss.formula.eval.ValueEval;
/**
- * Implementation of Excel HYPERLINK function.<p/>
+ * Implementation of Excel HYPERLINK function.<p>
*
* In Excel this function has special behaviour - it causes the displayed cell value to behave like
- * a hyperlink in the GUI. From an evaluation perspective however, it is very simple.<p/>
+ * a hyperlink in the GUI. From an evaluation perspective however, it is very simple.<p>
*
- * <b>Syntax</b>:<br/>
- * <b>HYPERLINK</b>(<b>link_location</b>, friendly_name)<p/>
+ * <b>Syntax</b>:<br>
+ * <b>HYPERLINK</b>(<b>link_location</b>, friendly_name)<p>
*
- * <b>link_location</b> The URL of the hyperlink <br/>
- * <b>friendly_name</b> (optional) the value to display<p/>
+ * <b>link_location</b> The URL of the hyperlink <br>
+ * <b>friendly_name</b> (optional) the value to display<p>
*
* Returns last argument. Leaves type unchanged (does not convert to {@link org.apache.poi.ss.formula.eval.StringEval}).
*
import org.apache.poi.ss.formula.eval.ValueEval;
/**
- * Implementation for Excel ImReal() function.<p/>
- * <p/>
- * <b>Syntax</b>:<br/> <b>ImReal </b>(<b>Inumber</b>)<br/>
- * <p/>
+ * Implementation for Excel ImReal() function.<p>
+ * <p>
+ * <b>Syntax</b>:<br> <b>ImReal </b>(<b>Inumber</b>)<br>
+ * <p>
* Returns the real coefficient of a complex number in x + yi or x + yj text format.
- * <p/>
+ * <p>
* Inumber A complex number for which you want the real coefficient.
- * <p/>
+ * <p>
* Remarks
* <ul>
* <li>If inumber is not in the form x + yi or x + yj, this function returns the #NUM! error value.</li>
import java.util.regex.Pattern;
/**
- * Implementation for Excel IMAGINARY() function.<p/>
- * <p/>
- * <b>Syntax</b>:<br/> <b>IMAGINARY </b>(<b>Inumber</b>)<br/>
- * <p/>
+ * Implementation for Excel IMAGINARY() function.<p>
+ * <p>
+ * <b>Syntax</b>:<br> <b>IMAGINARY </b>(<b>Inumber</b>)<br>
+ * <p>
* Returns the imaginary coefficient of a complex number in x + yi or x + yj text format.
- * <p/>
+ * <p>
* Inumber is a complex number for which you want the imaginary coefficient.
- * <p/>
+ * <p>
* Remarks
* <ul>
* <li>Use COMPLEX to convert real and imaginary coefficients into a complex number.</li>
* Implementation for the Excel function INDEX
* <p>
*
- * Syntax : <br/>
+ * Syntax : <br>
* INDEX ( reference, row_num[, column_num [, area_num]])</br>
* INDEX ( array, row_num[, column_num])
* <table border="0" cellpadding="1" cellspacing="0" summary="Parameter descriptions">
import org.apache.poi.ss.usermodel.Table;
/**
- * Implementation for Excel function INDIRECT<p/>
+ * Implementation for Excel function INDIRECT<p>
*
- * INDIRECT() returns the cell or area reference denoted by the text argument.<p/>
+ * INDIRECT() returns the cell or area reference denoted by the text argument.<p>
*
* <b>Syntax</b>:</br>
- * <b>INDIRECT</b>(<b>ref_text</b>,isA1Style)<p/>
+ * <b>INDIRECT</b>(<b>ref_text</b>,isA1Style)<p>
*
* <b>ref_text</b> a string representation of the desired reference as it would
- * normally be written in a cell formula.<br/>
+ * normally be written in a cell formula.<br>
* <b>isA1Style</b> (default TRUE) specifies whether the ref_text should be
* interpreted as A1-style or R1C1-style.
*
import org.apache.poi.ss.formula.functions.LinearRegressionFunction.FUNCTION;
/**
- * Implementation of Excel function INTERCEPT()<p/>
+ * Implementation of Excel function INTERCEPT()<p>
*
- * Calculates the INTERCEPT of the linear regression line that is used to predict y values from x values<br/>
+ * Calculates the INTERCEPT of the linear regression line that is used to predict y values from x values<br>
* (http://introcs.cs.princeton.edu/java/97data/LinearRegression.java.html)
- * <b>Syntax</b>:<br/>
- * <b>INTERCEPT</b>(<b>arrayX</b>, <b>arrayY</b>)<p/>
+ * <b>Syntax</b>:<br>
+ * <b>INTERCEPT</b>(<b>arrayX</b>, <b>arrayY</b>)<p>
*
*
* @author Johan Karlsteen
/**
* Base class for linear regression functions.
*
- * Calculates the linear regression line that is used to predict y values from x values<br/>
+ * Calculates the linear regression line that is used to predict y values from x values<br>
* (http://introcs.cs.princeton.edu/java/97data/LinearRegression.java.html)
- * <b>Syntax</b>:<br/>
- * <b>INTERCEPT</b>(<b>arrayX</b>, <b>arrayY</b>)<p/>
+ * <b>Syntax</b>:<br>
+ * <b>INTERCEPT</b>(<b>arrayX</b>, <b>arrayY</b>)<p>
* or
- * <b>SLOPE</b>(<b>arrayX</b>, <b>arrayY</b>)<p/>
+ * <b>SLOPE</b>(<b>arrayX</b>, <b>arrayY</b>)<p>
*
*
* @author Johan Karlsteen
};
/**
- * Implementation of Excel <tt>ISERR()</tt> function.<p/>
+ * Implementation of Excel <tt>ISERR()</tt> function.<p>
*
- * <b>Syntax</b>:<br/>
- * <b>ISERR</b>(<b>value</b>)<p/>
+ * <b>Syntax</b>:<br>
+ * <b>ISERR</b>(<b>value</b>)<p>
*
- * <b>value</b> The value to be tested<p/>
+ * <b>value</b> The value to be tested<p>
*
* Returns the logical value <tt>TRUE</tt> if value refers to any error value except
* <tt>'#N/A'</tt>; otherwise, it returns <tt>FALSE</tt>.
};
/**
- * Implementation for Excel ISNA() function.<p/>
+ * Implementation for Excel ISNA() function.<p>
*
- * <b>Syntax</b>:<br/>
- * <b>ISNA</b>(<b>value</b>)<p/>
+ * <b>Syntax</b>:<br>
+ * <b>ISNA</b>(<b>value</b>)<p>
*
- * <b>value</b> The value to be tested<br/>
- * <br/>
+ * <b>value</b> The value to be tested<br>
+ * <br>
* Returns <tt>TRUE</tt> if the specified value is '#N/A', <tt>FALSE</tt> otherwise.
*/
public static final Function ISNA = new LogicalFunction() {
import org.apache.poi.ss.formula.TwoDEval;
/**
- * Implementation of Excel function LOOKUP.<p/>
+ * Implementation of Excel function LOOKUP.<p>
*
* LOOKUP finds an index row in a lookup table by the first column value and returns the value from another column.
*
- * <b>Syntax</b>:<br/>
- * <b>VLOOKUP</b>(<b>lookup_value</b>, <b>lookup_vector</b>, result_vector)<p/>
+ * <b>Syntax</b>:<br>
+ * <b>VLOOKUP</b>(<b>lookup_value</b>, <b>lookup_vector</b>, result_vector)<p>
*
- * <b>lookup_value</b> The value to be found in the lookup vector.<br/>
- * <b>lookup_vector</> An area reference for the lookup data. <br/>
- * <b>result_vector</b> Single row or single column area reference from which the result value is chosen.<br/>
+ * <b>lookup_value</b> The value to be found in the lookup vector.<br>
+ * <b>lookup_vector</> An area reference for the lookup data. <br>
+ * <b>result_vector</b> Single row or single column area reference from which the result value is chosen.<br>
*
* @author Josh Micich
*/
}
/**
- * Enumeration to support <b>4</b> valued comparison results.<p/>
+ * Enumeration to support <b>4</b> valued comparison results.<p>
* Excel lookup functions have complex behaviour in the case where the lookup array has mixed
* types, and/or is unordered. Contrary to suggestions in some Excel documentation, there
* does not appear to be a universal ordering across types. The binary search algorithm used
- * changes behaviour when the evaluated 'mid' value has a different type to the lookup value.<p/>
+ * changes behaviour when the evaluated 'mid' value has a different type to the lookup value.<p>
*
* A simple int might have done the same job, but there is risk in confusion with the well
* known <tt>Comparable.compareTo()</tt> and <tt>Comparator.compare()</tt> which both use
* <tr><td>"abc"</td><td> </td><td>#REF!</td></tr>
* <tr><td>""</td><td> </td><td>#REF!</td></tr>
* <tr><td><blank></td><td> </td><td>#VALUE!</td></tr>
- * </table><br/>
+ * </table><br>
*
* Note - out of range errors (result index too high) are handled by the caller.
* @return column or row index as a zero-based value, never negative.
import org.apache.poi.ss.formula.functions.LookupUtils.ValueVector;
/**
- * Implementation for the MATCH() Excel function.<p/>
+ * Implementation for the MATCH() Excel function.<p>
*
- * <b>Syntax:</b><br/>
- * <b>MATCH</b>(<b>lookup_value</b>, <b>lookup_array</b>, match_type)<p/>
+ * <b>Syntax:</b><br>
+ * <b>MATCH</b>(<b>lookup_value</b>, <b>lookup_array</b>, match_type)<p>
*
* Returns a 1-based index specifying at what position in the <b>lookup_array</b> the specified
- * <b>lookup_value</b> is found.<p/>
+ * <b>lookup_value</b> is found.<p>
*
* Specific matching behaviour can be modified with the optional <b>match_type</b> parameter.
*
* be ordered, MATCH() can produce incorrect results if this requirement is not met. Observed
* behaviour in Excel is to return the lowest index value for which every item after that index
* breaks the match rule.<br>
- * The (ascending) sort order expected by MATCH() is:<br/>
- * numbers (low to high), strings (A to Z), boolean (FALSE to TRUE)<br/>
+ * The (ascending) sort order expected by MATCH() is:<br>
+ * numbers (low to high), strings (A to Z), boolean (FALSE to TRUE)<br>
* MATCH() ignores all elements in the lookup_array with a different type to the lookup_value.
* Type conversion of the lookup_array elements is never performed.
*/
/**
* If d < 0, returns short -1
- * <br/>
+ * <br>
* If d > 0, returns short 1
- * <br/>
+ * <br>
* If d == 0, returns short 0
* <p> If d is NaN, then 1 will be returned. It is the responsibility
* of caller to check for d isNaN if some other value is desired.
* Note: this function is different from java.lang.Math.floor(..).
* <p>
* When n and s are "valid" arguments, the returned value is: Math.floor(n/s) * s;
- * <br/>
+ * <br>
* n and s are invalid if any of following conditions are true:
* <ul>
* <li>s is zero</li>
* Note: this function is different from java.lang.Math.ceil(..).
* <p>
* When n and s are "valid" arguments, the returned value is: Math.ceiling(n/s) * s;
- * <br/>
+ * <br>
* n and s are invalid if any of following conditions are true:
* <ul>
* <li>s is zero</li>
}
/**
- * <br/> for all n >= 1; factorial n = n * (n-1) * (n-2) * ... * 1
- * <br/> else if n == 0; factorial n = 1
- * <br/> else if n < 0; factorial n = Double.NaN
- * <br/> Loss of precision can occur if n is large enough.
+ * <br> for all n >= 1; factorial n = n * (n-1) * (n-2) * ... * 1
+ * <br> else if n == 0; factorial n = 1
+ * <br> else if n < 0; factorial n = Double.NaN
+ * <br> Loss of precision can occur if n is large enough.
* If n is large so that the resulting value would be greater
* than Double.MAX_VALUE; Double.POSITIVE_INFINITY is returned.
* If n < 0, Double.NaN is returned.
/**
* returns the remainder resulting from operation:
* n / d.
- * <br/> The result has the sign of the divisor.
- * <br/> Examples:
+ * <br> The result has the sign of the divisor.
+ * <br> Examples:
* <ul>
* <li>mod(3.4, 2) = 1.4</li>
* <li>mod(-3.4, 2) = 0.6</li>
import org.apache.poi.ss.formula.eval.ValueEval;
/**
- * <p>Implementation for Excel Oct2Dec() function.<p/>
+ * <p>Implementation for Excel Oct2Dec() function.<p>
* <p>
* Converts an octal number to decimal.
* </p>
* <p>
- * <b>Syntax</b>:<br/> <b>Oct2Dec </b>(<b>number</b> )
+ * <b>Syntax</b>:<br> <b>Oct2Dec </b>(<b>number</b> )
* </p>
- * <p/>
+ * <p>
* Number is the octal number you want to convert. Number may not contain more than 10 octal characters (30 bits).
* The most significant bit of number is the sign bit. The remaining 29 bits are magnitude bits.
* Negative numbers are represented using two's-complement notation..
- * <p/>
+ * <p>
* If number is not a valid octal number, OCT2DEC returns the #NUM! error value.
*
* @author cedric dot walter @ gmail dot com
import org.apache.poi.ss.formula.eval.RefEval;
import org.apache.poi.ss.formula.eval.ValueEval;
/**
- * Implementation for Excel function OFFSET()<p/>
+ * Implementation for Excel function OFFSET()<p>
*
* OFFSET returns an area reference that is a specified number of rows and columns from a
- * reference cell or area.<p/>
+ * reference cell or area.<p>
*
- * <b>Syntax</b>:<br/>
- * <b>OFFSET</b>(<b>reference</b>, <b>rows</b>, <b>cols</b>, height, width)<p/>
- * <b>reference</b> is the base reference.<br/>
- * <b>rows</b> is the number of rows up or down from the base reference.<br/>
- * <b>cols</b> is the number of columns left or right from the base reference.<br/>
- * <b>height</b> (default same height as base reference) is the row count for the returned area reference.<br/>
- * <b>width</b> (default same width as base reference) is the column count for the returned area reference.<br/>
+ * <b>Syntax</b>:<br>
+ * <b>OFFSET</b>(<b>reference</b>, <b>rows</b>, <b>cols</b>, height, width)<p>
+ * <b>reference</b> is the base reference.<br>
+ * <b>rows</b> is the number of rows up or down from the base reference.<br>
+ * <b>cols</b> is the number of columns left or right from the base reference.<br>
+ * <b>height</b> (default same height as base reference) is the row count for the returned area reference.<br>
+ * <b>width</b> (default same width as base reference) is the column count for the returned area reference.<br>
*
* @author Josh Micich
*/
return (short) (_offset + _length - 1);
}
/**
- * Moves the range by the specified translation amount.<p/>
+ * Moves the range by the specified translation amount.<p>
*
* This method also 'normalises' the range: Excel specifies that the width and height
* parameters (length field here) cannot be negative. However, OFFSET() does produce
- * sensible results in these cases. That behavior is replicated here. <p/>
+ * sensible results in these cases. That behavior is replicated here. <p>
*
* @param translationAmount may be zero negative or positive
*
import org.apache.poi.ss.formula.eval.*;
/**
- * <p>Implementation for Excel QUOTIENT () function.<p/>
+ * <p>Implementation for Excel QUOTIENT () function.<p>
+ * <p>
+ * <b>Syntax</b>:<br> <b>QUOTIENT</b>(<b>Numerator</b>,<b>Denominator</b>)<br>
* <p>
- * <b>Syntax</b>:<br/> <b>QUOTIENT</b>(<b>Numerator</b>,<b>Denominator</b>)<br/>
- * <p/>
* <p>
* Numerator is the dividend.
* Denominator is the divisor.
*
* Returns the integer portion of a division. Use this function when you want to discard the remainder of a division.
- * <p/>
+ * <p>
*
* If either enumerator/denominator is non numeric, QUOTIENT returns the #VALUE! error value.
* If denominator is equals to zero, QUOTIENT returns the #DIV/0! error value.
import org.apache.poi.ss.formula.eval.ValueEval;
/**
- * An implementation of the Excel REPLACE() function:<p/>
+ * An implementation of the Excel REPLACE() function:<p>
* Replaces part of a text string based on the number of characters
- * you specify, with another text string.<br/>
+ * you specify, with another text string.<br>
*
- * <b>Syntax</b>:<br/>
- * <b>REPLACE</b>(<b>oldText</b>, <b>startNum</b>, <b>numChars</b>, <b>newText</b>)<p/>
+ * <b>Syntax</b>:<br>
+ * <b>REPLACE</b>(<b>oldText</b>, <b>startNum</b>, <b>numChars</b>, <b>newText</b>)<p>
*
- * <b>oldText</b> The text string containing characters to replace<br/>
- * <b>startNum</b> The position of the first character to replace (1-based)<br/>
- * <b>numChars</b> The number of characters to replace<br/>
- * <b>newText</b> The new text value to replace the removed section<br/>
+ * <b>oldText</b> The text string containing characters to replace<br>
+ * <b>startNum</b> The position of the first character to replace (1-based)<br>
+ * <b>numChars</b> The number of characters to replace<br>
+ * <b>newText</b> The new text value to replace the removed section<br>
*
* @author Manda Wilson < wilson at c bio dot msk cc dot org >
*/
import org.apache.poi.ss.formula.eval.ValueEval;
/**
- * Implementation for Excel REPT () function.<p/>
- * <p/>
- * <b>Syntax</b>:<br/> <b>REPT </b>(<b>text</b>,<b>number_times</b> )<br/>
- * <p/>
+ * Implementation for Excel REPT () function.<p>
+ * <p>
+ * <b>Syntax</b>:<br> <b>REPT </b>(<b>text</b>,<b>number_times</b> )<br>
+ * <p>
* Repeats text a given number of times. Use REPT to fill a cell with a number of instances of a text string.
*
* text : text The text that you want to repeat.
import org.apache.poi.ss.formula.eval.ValueEval;
/**
- * Implementation for Excel WeekNum() function.<p/>
- * <p/>
- * <b>Syntax</b>:<br/> <b>WeekNum </b>(<b>Serial_num</b>,<b>Return_type</b>)<br/>
- * <p/>
+ * Implementation for Excel WeekNum() function.<p>
+ * <p>
+ * <b>Syntax</b>:<br> <b>WeekNum </b>(<b>Serial_num</b>,<b>Return_type</b>)<br>
+ * <p>
* Returns a number that indicates where the week falls numerically within a year.
- * <p/>
- * <p/>
+ * <p>
+ * <p>
* Serial_num is a date within the week. Dates should be entered by using the DATE function,
* or as results of other formulas or functions. For example, use DATE(2008,5,23)
* for the 23rd day of May, 2008. Problems can occur if dates are entered as text.
import org.apache.poi.ss.formula.functions.LinearRegressionFunction.FUNCTION;
/**
- * Implementation of Excel function SLOPE()<p/>
+ * Implementation of Excel function SLOPE()<p>
*
- * Calculates the SLOPE of the linear regression line that is used to predict y values from x values<br/>
+ * Calculates the SLOPE of the linear regression line that is used to predict y values from x values<br>
* (http://introcs.cs.princeton.edu/java/97data/LinearRegression.java.html)
- * <b>Syntax</b>:<br/>
- * <b>SLOPE</b>(<b>arrayX</b>, <b>arrayY</b>)<p/>
+ * <b>Syntax</b>:<br>
+ * <b>SLOPE</b>(<b>arrayX</b>, <b>arrayY</b>)<p>
*
*
* @author Johan Karlsteen
* returns the kth largest element in the array. Duplicates
* are considered as distinct values. Hence, eg.
* for array {1,2,4,3,3} & k=2, returned value is 3.
- * <br/>
+ * <br>
* k <= 0 & k >= v.length and null or empty arrays
* will result in return value Double.NaN
*/
* returns the kth smallest element in the array. Duplicates
* are considered as distinct values. Hence, eg.
* for array {1,1,2,4,3,3} & k=2, returned value is 1.
- * <br/>
+ * <br>
* k <= 0 & k >= v.length or null array or empty array
* will result in return value Double.NaN
* @param v
import org.apache.poi.ss.formula.eval.ValueEval;
/**
- * An implementation of the SUBSTITUTE function:<P/>
+ * An implementation of the SUBSTITUTE function:<p>
* Substitutes text in a text string with new text, some number of times.
* @author Manda Wilson < wilson at c bio dot msk cc dot org >
*/
/**
* Implementation for the Excel function SUBTOTAL<p>
*
- * <b>Syntax :</b> <br/>
- * SUBTOTAL ( <b>functionCode</b>, <b>ref1</b>, ref2 ... ) <br/>
+ * <b>Syntax :</b> <br>
+ * SUBTOTAL ( <b>functionCode</b>, <b>ref1</b>, ref2 ... ) <br>
* <table border="1" cellpadding="1" cellspacing="0" summary="Parameter descriptions">
* <tr><td><b>functionCode</b></td><td>(1-11) Selects the underlying aggregate function to be used (see table below)</td></tr>
* <tr><td><b>ref1</b>, ref2 ...</td><td>Arguments to be passed to the underlying aggregate function</td></tr>
- * </table><br/>
+ * </table><br>
* </p>
*
* <table border="1" cellpadding="1" cellspacing="0" summary="Parameter descriptions">
* <tr align='center'><td>10</td><td>VAR *</td></tr>
* <tr align='center'><td>11</td><td>VARP *</td></tr>
* <tr align='center'><td>101-111</td><td>*</td></tr>
- * </table><br/>
+ * </table><br>
* * Not implemented in POI yet. Functions 101-111 are the same as functions 1-11 but with
* the option 'ignore hidden values'.
- * <p/>
+ * <p>
*
* @author Paul Tomlin < pault at bulk sms dot com >
*/
/**
* Implementation for the Excel function SUMIF<p>
*
- * Syntax : <br/>
- * SUMIF ( <b>range</b>, <b>criteria</b>, sum_range ) <br/>
+ * Syntax : <br>
+ * SUMIF ( <b>range</b>, <b>criteria</b>, sum_range ) <br>
* <table border="0" cellpadding="1" cellspacing="0" summary="Parameter descriptions">
* <tr><th>range</th><td>The range over which criteria is applied. Also used for addend values when the third parameter is not present</td></tr>
* <tr><th>criteria</th><td>The value or expression used to filter rows from <b>range</b></td></tr>
* <tr><th>sum_range</th><td>Locates the top-left corner of the corresponding range of addends - values to be added (after being selected by the criteria)</td></tr>
- * </table><br/>
+ * </table><br>
* </p>
* @author Josh Micich
*/
/**
* Implementation for the Excel function SUMIFS<p>
*
- * Syntax : <br/>
+ * Syntax : <br>
* SUMIFS ( <b>sum_range</b>, <b>criteria_range1</b>, <b>criteria1</>,
- * [<b>criteria_range2</b>, <b>criteria2</b>], ...) <br/>
+ * [<b>criteria_range2</b>, <b>criteria2</b>], ...) <br>
* <ul>
* <li><b>sum_range</b> Required. One or more cells to sum, including numbers or names, ranges,
* or cell references that contain numbers. Blank and text values are ignored.</li>
/**
* Implementation for the Excel function SUMPRODUCT<p>
*
- * Syntax : <br/>
+ * Syntax : <br>
* SUMPRODUCT ( array1[, array2[, array3[, ...]]])
* <table border="0" cellpadding="1" cellspacing="0" summary="Parameter descriptions">
* <tr><th>array1, ... arrayN </th><td>typically area references,
* possibly cell references or scalar values</td></tr>
- * </table><br/>
+ * </table><br>
*
* Let A<b>n</b><sub>(<b>i</b>,<b>j</b>)</sub> represent the element in the <b>i</b>th row <b>j</b>th column
- * of the <b>n</b>th array<br/>
- * Assuming each array has the same dimensions (W, H), the result is defined as:<br/>
+ * of the <b>n</b>th array<br>
+ * Assuming each array has the same dimensions (W, H), the result is defined as:<br>
* SUMPRODUCT = Σ<sub><b>i</b>: 1..H</sub>
* ( Σ<sub><b>j</b>: 1..W</sub>
* ( Π<sub><b>n</b>: 1..N</sub>
* Determines a <code>double</code> value for the specified <code>ValueEval</code>.
* @param isScalarProduct <code>false</code> for SUMPRODUCTs over area refs.
* @throws EvaluationException if <code>ve</code> represents an error value.
- * <p/>
+ * <p>
* Note - string values and empty cells are interpreted differently depending on
* <code>isScalarProduct</code>. For scalar products, if any term is blank or a string, the
* error (#VALUE!) is raised. For area (sum)products, if any term is blank or a string, the
/**
- * Implementation of Excel function SUMX2MY2()<p/>
+ * Implementation of Excel function SUMX2MY2()<p>
*
- * Calculates the sum of differences of squares in two arrays of the same size.<br/>
- * <b>Syntax</b>:<br/>
- * <b>SUMX2MY2</b>(<b>arrayX</b>, <b>arrayY</b>)<p/>
+ * Calculates the sum of differences of squares in two arrays of the same size.<br>
+ * <b>Syntax</b>:<br>
+ * <b>SUMX2MY2</b>(<b>arrayX</b>, <b>arrayY</b>)<p>
*
* result = Σ<sub>i: 0..n</sub>(x<sub>i</sub><sup>2</sup>-y<sub>i</sub><sup>2</sup>)
*
/**
- * Implementation of Excel function SUMX2PY2()<p/>
+ * Implementation of Excel function SUMX2PY2()<p>
*
- * Calculates the sum of squares in two arrays of the same size.<br/>
- * <b>Syntax</b>:<br/>
- * <b>SUMX2PY2</b>(<b>arrayX</b>, <b>arrayY</b>)<p/>
+ * Calculates the sum of squares in two arrays of the same size.<br>
+ * <b>Syntax</b>:<br>
+ * <b>SUMX2PY2</b>(<b>arrayX</b>, <b>arrayY</b>)<p>
*
* result = Σ<sub>i: 0..n</sub>(x<sub>i</sub><sup>2</sup>+y<sub>i</sub><sup>2</sup>)
*
package org.apache.poi.ss.formula.functions;
/**
- * Implementation of Excel function SUMXMY2()<p/>
+ * Implementation of Excel function SUMXMY2()<p>
*
- * Calculates the sum of squares of differences between two arrays of the same size.<br/>
- * <b>Syntax</b>:<br/>
- * <b>SUMXMY2</b>(<b>arrayX</b>, <b>arrayY</b>)<p/>
+ * Calculates the sum of squares of differences between two arrays of the same size.<br>
+ * <b>Syntax</b>:<br>
+ * <b>SUMXMY2</b>(<b>arrayX</b>, <b>arrayY</b>)<p>
*
* result = Σ<sub>i: 0..n</sub>(x<sub>i</sub>-y<sub>i</sub>)<sup>2</sup>
*
/**
* Implementation of Excel T() function
- * <p/>
+ * <p>
* If the argument is a text or error value it is returned unmodified. All other argument types
* cause an empty string result. If the argument is an area, the first (top-left) cell is used
* (regardless of the coordinates of the evaluating formula cell).
};
/**
- * An implementation of the MID function<br/>
+ * An implementation of the MID function<br>
* MID returns a specific number of
- * characters from a text string, starting at the specified position.<p/>
+ * characters from a text string, starting at the specified position.<p>
*
- * <b>Syntax<b>:<br/> <b>MID</b>(<b>text</b>, <b>start_num</b>,
- * <b>num_chars</b>)<br/>
+ * <b>Syntax<b>:<br> <b>MID</b>(<b>text</b>, <b>start_num</b>,
+ * <b>num_chars</b>)<br>
*
* Author: Manda Wilson < wilson at c bio dot msk cc dot org >
*/
};
/**
- * An implementation of the TEXT function<br/>
+ * An implementation of the TEXT function<br>
* TEXT returns a number value formatted with the given number formatting string.
* This function is not a complete implementation of the Excel function, but
* handles most of the common cases. All work is passed down to
* {@link DataFormatter} to be done, as this works much the same as the
* display focused work that that does.
*
- * <b>Syntax<b>:<br/> <b>TEXT</b>(<b>value</b>, <b>format_text</b>)<br/>
+ * <b>Syntax<b>:<br> <b>TEXT</b>(<b>value</b>, <b>format_text</b>)<br>
*/
public static final Function TEXT = new Fixed2ArgFunction() {
}
}
/**
- * Implementation of the FIND() function.<p/>
+ * Implementation of the FIND() function.<p>
*
- * <b>Syntax</b>:<br/>
- * <b>FIND</b>(<b>find_text</b>, <b>within_text</b>, start_num)<p/>
+ * <b>Syntax</b>:<br>
+ * <b>FIND</b>(<b>find_text</b>, <b>within_text</b>, start_num)<p>
*
* FIND returns the character position of the first (case sensitive) occurrence of
* <tt>find_text</tt> inside <tt>within_text</tt>. The third parameter,
* <tt>start_num</tt>, is optional (default=1) and specifies where to start searching
- * from. Character positions are 1-based.<p/>
+ * from. Character positions are 1-based.<p>
*
* Author: Torstein Tauno Svendsen (torstei@officenet.no)
*/
public static final Function FIND = new SearchFind(true);
/**
- * Implementation of the FIND() function.<p/>
+ * Implementation of the FIND() function.<p>
*
- * <b>Syntax</b>:<br/>
- * <b>SEARCH</b>(<b>find_text</b>, <b>within_text</b>, start_num)<p/>
+ * <b>Syntax</b>:<br>
+ * <b>SEARCH</b>(<b>find_text</b>, <b>within_text</b>, start_num)<p>
*
* SEARCH is a case-insensitive version of FIND()
*/
import org.apache.poi.util.LocaleUtil;
/**
- * Implementation of Excel TODAY() Function<br/>
+ * Implementation of Excel TODAY() Function<br>
*/
public final class Today extends Fixed0ArgFunction {
public ValueEval evaluate(int srcRowIndex, int srcColumnIndex) {
import org.apache.poi.ss.formula.eval.ValueEval;
/**
- * Implementation for Excel VALUE() function.<p/>
+ * Implementation for Excel VALUE() function.<p>
*
- * <b>Syntax</b>:<br/> <b>VALUE</b>(<b>text</b>)<br/>
+ * <b>Syntax</b>:<br> <b>VALUE</b>(<b>text</b>)<br>
*
* Converts the text argument to a number. Leading and/or trailing whitespace is
* ignored. Currency symbols and thousands separators are stripped out.
import org.apache.poi.ss.formula.functions.LookupUtils.ValueVector;
import org.apache.poi.ss.formula.TwoDEval;
/**
- * Implementation of the VLOOKUP() function.<p/>
+ * Implementation of the VLOOKUP() function.<p>
*
- * VLOOKUP finds a row in a lookup table by the first column value and returns the value from another column.<br/>
+ * VLOOKUP finds a row in a lookup table by the first column value and returns the value from another column.<br>
*
- * <b>Syntax</b>:<br/>
- * <b>VLOOKUP</b>(<b>lookup_value</b>, <b>table_array</b>, <b>col_index_num</b>, range_lookup)<p/>
+ * <b>Syntax</b>:<br>
+ * <b>VLOOKUP</b>(<b>lookup_value</b>, <b>table_array</b>, <b>col_index_num</b>, range_lookup)<p>
*
- * <b>lookup_value</b> The value to be found in the first column of the table array.<br/>
- * <b>table_array</b> An area reference for the lookup data. <br/>
- * <b>col_index_num</b> a 1 based index specifying which column value of the lookup data will be returned.<br/>
+ * <b>lookup_value</b> The value to be found in the first column of the table array.<br>
+ * <b>table_array</b> An area reference for the lookup data. <br>
+ * <b>col_index_num</b> a 1 based index specifying which column value of the lookup data will be returned.<br>
* <b>range_lookup</b> If TRUE (default), VLOOKUP finds the largest value less than or equal to
- * the lookup_value. If FALSE, only exact matches will be considered<br/>
+ * the lookup_value. If FALSE, only exact matches will be considered<br>
*/
public final class Vlookup extends Var3or4ArgFunction {
private static final ValueEval DEFAULT_ARG3 = BoolEval.TRUE;
import org.apache.poi.util.LocaleUtil;
/**
- * Implementation for Excel WeekNum() function.<p/>
- * <p/>
- * <b>Syntax</b>:<br/> <b>WeekNum </b>(<b>Serial_num</b>,<b>Return_type</b>)<br/>
- * <p/>
+ * Implementation for Excel WeekNum() function.<p>
+ * <p>
+ * <b>Syntax</b>:<br> <b>WeekNum </b>(<b>Serial_num</b>,<b>Return_type</b>)<br>
+ * <p>
* Returns a number that indicates where the week falls numerically within a year.
- * <p/>
- * <p/>
+ * <p>
+ * <p>
* Serial_num is a date within the week. Dates should be entered by using the DATE function,
* or as results of other formulas or functions. For example, use DATE(2008,5,23)
* for the 23rd day of May, 2008. Problems can occur if dates are entered as text.
* '<b>p</b>arse <b>t</b>hin<b>g</b>'. Originally, the name referred to the single
* byte identifier at the start of the token, but in POI, <tt>Ptg</tt> encapsulates
* the whole formula token (initial byte + value data).
- * <p/>
+ * <p>
*
* <tt>Ptg</tt>s are logically arranged in a tree representing the structure of the
* parsed formula. However, in BIFF files <tt>Ptg</tt>s are written/read in
/**
* Writes the ptgs to the data buffer, starting at the specified offset.
*
- * <br/>
+ * <br>
* The 2 byte encode length field is <b>not</b> written by this method.
* @return number of bytes written
*/
/**
* Utility to identify built-in formats. The following is a list of the formats as
- * returned by this class.<p/>
- *<p/>
- * 0, "General"<br/>
- * 1, "0"<br/>
- * 2, "0.00"<br/>
- * 3, "#,##0"<br/>
- * 4, "#,##0.00"<br/>
- * 5, "$#,##0_);($#,##0)"<br/>
- * 6, "$#,##0_);[Red]($#,##0)"<br/>
- * 7, "$#,##0.00);($#,##0.00)"<br/>
- * 8, "$#,##0.00_);[Red]($#,##0.00)"<br/>
- * 9, "0%"<br/>
- * 0xa, "0.00%"<br/>
- * 0xb, "0.00E+00"<br/>
- * 0xc, "# ?/?"<br/>
- * 0xd, "# ??/??"<br/>
- * 0xe, "m/d/yy"<br/>
- * 0xf, "d-mmm-yy"<br/>
- * 0x10, "d-mmm"<br/>
- * 0x11, "mmm-yy"<br/>
- * 0x12, "h:mm AM/PM"<br/>
- * 0x13, "h:mm:ss AM/PM"<br/>
- * 0x14, "h:mm"<br/>
- * 0x15, "h:mm:ss"<br/>
- * 0x16, "m/d/yy h:mm"<br/>
- *<p/>
+ * returned by this class.<p>
+ *<p>
+ * 0, "General"<br>
+ * 1, "0"<br>
+ * 2, "0.00"<br>
+ * 3, "#,##0"<br>
+ * 4, "#,##0.00"<br>
+ * 5, "$#,##0_);($#,##0)"<br>
+ * 6, "$#,##0_);[Red]($#,##0)"<br>
+ * 7, "$#,##0.00);($#,##0.00)"<br>
+ * 8, "$#,##0.00_);[Red]($#,##0.00)"<br>
+ * 9, "0%"<br>
+ * 0xa, "0.00%"<br>
+ * 0xb, "0.00E+00"<br>
+ * 0xc, "# ?/?"<br>
+ * 0xd, "# ??/??"<br>
+ * 0xe, "m/d/yy"<br>
+ * 0xf, "d-mmm-yy"<br>
+ * 0x10, "d-mmm"<br>
+ * 0x11, "mmm-yy"<br>
+ * 0x12, "h:mm AM/PM"<br>
+ * 0x13, "h:mm:ss AM/PM"<br>
+ * 0x14, "h:mm"<br>
+ * 0x15, "h:mm:ss"<br>
+ * 0x16, "m/d/yy h:mm"<br>
+ *<p>
* // 0x17 - 0x24 reserved for international and undocumented
- * 0x25, "#,##0_);(#,##0)"<br/>
- * 0x26, "#,##0_);[Red](#,##0)"<br/>
- * 0x27, "#,##0.00_);(#,##0.00)"<br/>
- * 0x28, "#,##0.00_);[Red](#,##0.00)"<br/>
- * 0x29, "_(* #,##0_);_(* (#,##0);_(* \"-\"_);_(@_)"<br/>
- * 0x2a, "_($* #,##0_);_($* (#,##0);_($* \"-\"_);_(@_)"<br/>
- * 0x2b, "_(* #,##0.00_);_(* (#,##0.00);_(* \"-\"??_);_(@_)"<br/>
- * 0x2c, "_($* #,##0.00_);_($* (#,##0.00);_($* \"-\"??_);_(@_)"<br/>
- * 0x2d, "mm:ss"<br/>
- * 0x2e, "[h]:mm:ss"<br/>
- * 0x2f, "mm:ss.0"<br/>
- * 0x30, "##0.0E+0"<br/>
- * 0x31, "@" - This is text format.<br/>
- * 0x31 "text" - Alias for "@"<br/>
- * <p/>
+ * 0x25, "#,##0_);(#,##0)"<br>
+ * 0x26, "#,##0_);[Red](#,##0)"<br>
+ * 0x27, "#,##0.00_);(#,##0.00)"<br>
+ * 0x28, "#,##0.00_);[Red](#,##0.00)"<br>
+ * 0x29, "_(* #,##0_);_(* (#,##0);_(* \"-\"_);_(@_)"<br>
+ * 0x2a, "_($* #,##0_);_($* (#,##0);_($* \"-\"_);_(@_)"<br>
+ * 0x2b, "_(* #,##0.00_);_(* (#,##0.00);_(* \"-\"??_);_(@_)"<br>
+ * 0x2c, "_($* #,##0.00_);_($* (#,##0.00);_($* \"-\"??_);_(@_)"<br>
+ * 0x2d, "mm:ss"<br>
+ * 0x2e, "[h]:mm:ss"<br>
+ * 0x2f, "mm:ss.0"<br>
+ * 0x30, "##0.0E+0"<br>
+ * 0x31, "@" - This is text format.<br>
+ * 0x31 "text" - Alias for "@"<br>
+ * <p>
*/
public final class BuiltinFormats {
/**
}
/**
- * Get the format index that matches the given format string.<br/>
+ * Get the format index that matches the given format string.<br>
* Automatically converts "text" to excel's format string to represent text.
*
* @param pFmt string matching a built-in format
* Used primarily for XSSF conditions, which defines a multitude of additional "filter" types
* for conditional formatting. HSSF rules will always be null (not a filter type) or #FILTER.
* XSSF conditions will be null (not a filter type) or any value other than #FILTER.
- * <p/>
+ * <p>
* Instance names match the constants from <code>STCfType</code> for convenience.
*/
public enum ConditionFilterType {
/**
* This is null if
- * <p/>
+ * <p>
* <code>{@link #getConditionType()} != {@link ConditionType#FILTER}</code>
- * <p/>
+ * <p>
* This is always {@link ConditionFilterType#FILTER} for HSSF rules of type {@link ConditionType#FILTER}.
- * <p/>
+ * <p>
* For XSSF filter rules, this will indicate the specific type of filter.
*
* @return filter type for filter rules, or null if not a filter rule.
/**
* This is null if
- * <p/>
+ * <p>
* <code>{@link #getConditionFilterType()} == null</code>
- * <p/>
+ * <p>
* This means it is always null for HSSF, which does not define the extended condition types.
- * <p/>
+ * <p>
* This object contains the additional configuration information for XSSF filter conditions.
*
* @return the Filter Configuration Data, or null if there isn't any
/**
* The priority of the rule, if defined, otherwise 0.
- * <p/>
+ * <p>
* If priority is 0, just use definition order, as that's how older HSSF rules
* are evaluated.
- * <p/>
+ * <p>
* For XSSF, this should always be set. For HSSF, only newer style rules
* have this set, older ones will return 0.
- * <p/>
+ * <p>
* If a rule is created but not yet added to a sheet, this value may not be valid.
* @return rule priority
*/
\r
/**\r
* This is null if \r
- * <p/>\r
+ * <p>\r
* <code>{@link #getConditionType()} != {@link ConditionType#FILTER}</code>\r
- * <p/>\r
+ * <p>\r
* This is always {@link ConditionFilterType#FILTER} for HSSF rules of type {@link ConditionType#FILTER}.\r
- * <p/>\r
+ * <p>\r
* For XSSF filter rules, this will indicate the specific type of filter.\r
* \r
* @return filter type for filter rules, or null if not a filter rule.\r
\r
/**\r
* This is null if \r
- * <p/>\r
+ * <p>\r
* <code>{@link #getConditionFilterType()} == null</code>\r
- * <p/>\r
+ * <p>\r
* This means it is always null for HSSF, which does not define the extended condition types.\r
- * <p/>\r
+ * <p>\r
* This object contains the additional configuration information for XSSF filter conditions.\r
* \r
* @return\r
/**\r
* HSSF just returns 0, XSSF uses the value stored in the model if present, \r
* otherwise uses 0.\r
- * <p/>\r
+ * <p>\r
* If priority is 0, just use definition order, as that's how HSSF rules are evaluated.\r
- * <p/>\r
+ * <p>\r
* If a rule is created but not yet added to a sheet, this value may not be valid.\r
\r
* @return rule priority\r
* Returns the formatted value of an Excel date as a <tt>String</tt> based
* on the cell's <code>DataFormat</code>. i.e. "Thursday, January 02, 2003"
* , "01/02/2003" , "02-Jan" , etc.
- * <p/>
+ * <p>
* If any conditional format rules apply, the highest priority with a number format is used.
* If no rules contain a number format, or no rules apply, the cell's style format is used.
* If the style does not have a format, the default date format is applied.
* based on the cell's <code>DataFormat</code>. Supported formats include
* currency, percents, decimals, phone number, SSN, etc.:
* "61.54%", "$100.00", "(800) 555-1234".
- * <p/>
+ * <p>
* Format comes from either the highest priority conditional format rule with a
* specified format, or from the cell style.
*
import java.util.Map;
/**
- * Evaluates formula cells.<p/>
+ * Evaluates formula cells.<p>
*
* For performance reasons, this class keeps a cache of all previously calculated intermediate
* cell values. Be sure to call {@link #clearAllCachedResultValues()} if any workbook cells are changed between
* If the default font is changed the resized image can be streched vertically or horizontally.
* </p>
* <p>
- * <code>resize(1.0,1.0)</code> keeps the original size,<br/>
- * <code>resize(0.5,0.5)</code> resize to 50% of the original,<br/>
- * <code>resize(2.0,2.0)</code> resizes to 200% of the original.<br/>
+ * <code>resize(1.0,1.0)</code> keeps the original size,<br>
+ * <code>resize(0.5,0.5)</code> resize to 50% of the original,<br>
+ * <code>resize(2.0,2.0)</code> resizes to 200% of the original.<br>
* <code>resize({@link Double#MAX_VALUE},{@link Double#MAX_VALUE})</code> resizes to the dimension of the embedded image.
* </p>
*
* Ordered list of table style elements, for both data tables and pivot tables.
* Some elements only apply to pivot tables, but any style definition can omit any number,
* so having them in one list should not be a problem.
- * <p/>
+ * <p>
* The order is the specification order of application, with later elements overriding previous
* ones, if style properties conflict.
- * <p/>
+ * <p>
* Processing could iterate bottom-up if looking for specific properties, and stop when the
* first style is found defining a value for that property.
- * <p/>
+ * <p>
* Enum names match the OOXML spec values exactly, so {@link #valueOf(String)} will work.
*
* @since 3.17 beta 1
Name createName();
/**
- * Gets the defined name index by name<br/>
+ * Gets the defined name index by name<br>
* <i>Note:</i> Excel defined names are case-insensitive and
* this method performs a case-insensitive search.
*
/**
* Create an area ref from a string representation. Sheet names containing special characters should be
- * delimited and escaped as per normal syntax rules for formulas.<br/>
+ * delimited and escaped as per normal syntax rules for formulas.<br>
* The area reference must be contiguous (i.e. represent a single rectangle, not a union of rectangles)
*/
public AreaReference(String reference, SpreadsheetVersion version) {
/**
* Returns a text representation of this area reference.
- * <p/>
+ * <p>
* Example return values:
* <table border="0" cellpadding="1" cellspacing="0" summary="Example return values">
* <tr><th align='left'>Result</th><th align='left'>Comment</th></tr>
import org.apache.poi.util.LittleEndianOutput;
/**
- * See OOO documentation: excelfileformat.pdf sec 2.5.14 - 'Cell Range Address'<p/>
+ * See OOO documentation: excelfileformat.pdf sec 2.5.14 - 'Cell Range Address'<p>
*
* <p>In the Microsoft documentation, this is also known as a
* Ref8U - see page 831 of version 1.0 of the documentation.
/**
- * See OOO documentation: excelfileformat.pdf sec 2.5.14 - 'Cell Range Address'<p/>
+ * See OOO documentation: excelfileformat.pdf sec 2.5.14 - 'Cell Range Address'<p>
*
* Common superclass of 8-bit and 16-bit versions
*/
/**
* Determines if the given {@link CellReference} lies within the bounds
* of this range.
- * <p/>NOTE: It is up to the caller to ensure the reference is
+ * <p>NOTE: It is up to the caller to ensure the reference is
* for the correct sheet, since this instance doesn't have a sheet reference.
*
* @param ref the CellReference to check
/**
* Determines if the given {@link Cell} lies within the bounds
* of this range.
- * <p/>NOTE: It is up to the caller to ensure the reference is
+ * <p>NOTE: It is up to the caller to ensure the reference is
* for the correct sheet, since this instance doesn't have a sheet reference.
*
* @param cell the Cell to check
* Get the type of intersection between two cell ranges
*
* @param crB - the specified range
- * @return code which reflects how the specified range is related to this range.<br/>
+ * @return code which reflects how the specified range is related to this range.<br>
* Possible return codes are:
* <ul>
* <li>{@link #NO_INTERSECTION} - the specified range is outside of this range;</li>
}
/**
- * Do all possible cell merges between cells of the list so that:<br/>
+ * Do all possible cell merges between cells of the list so that:<br>
* <ul>
* <li>if a cell range is completely inside of another cell range, it gets removed from the list</li>
* <li>if two cells have a shared border, merge them into one bigger cell range</li>
* interpreted as a cell reference. Names of that form can be also used for sheets and/or
* named ranges, and in those circumstances, the question of whether the potential cell
* reference is valid (in range) becomes important.
- * <p/>
+ * <p>
* Note - that the maximum sheet size varies across Excel versions:
- * <p/>
+ * <p>
* <blockquote><table border="0" cellpadding="1" cellspacing="0"
* summary="Notable cases.">
* <tr><th>Version </th><th>File Format </th>
/**
* Returns a text representation of this cell reference.
- * <p/>
+ * <p>
* Example return values:
* <table border="0" cellpadding="1" cellspacing="0" summary="Example return values">
* <tr><th align='left'>Result</th><th align='left'>Comment</th></tr>
/**
* Represents a 64 bit IEEE double quantity expressed with both decimal and binary exponents
* Does not handle negative numbers or zero
- * <p/>
- * The value of a {@link ExpandedDouble} is given by<br/>
+ * <p>
+ * The value of a {@link ExpandedDouble} is given by<br>
* <tt> a × 2<sup>b</sup></tt>
- * <br/>
- * where:<br/>
+ * <br>
+ * where:<br>
*
- * <tt>a</tt> = <i>significand</i><br/>
- * <tt>b</tt> = <i>binaryExponent</i> - bitLength(significand) + 1<br/>
+ * <tt>a</tt> = <i>significand</i><br>
+ * <tt>b</tt> = <i>binaryExponent</i> - bitLength(significand) + 1<br>
*
* @author Josh Micich
*/
// TODO - what about values between (10<sup>14</sup>-0.5) and (10<sup>14</sup>-0.05) ?
/**
- * The minimum value in 'Base-10 normalised form'.<br/>
+ * The minimum value in 'Base-10 normalised form'.<br>
* When {@link #_binaryExponent} == 46 this is the the minimum {@link #_frac} value
* (10<sup>14</sup>-0.05) * 2^17
- * <br/>
+ * <br>
* Values between (10<sup>14</sup>-0.05) and 10<sup>14</sup> will be represented as '1'
* followed by 14 zeros.
* Values less than (10<sup>14</sup>-0.05) will get shifted by one more power of 10
*/
private static final BigInteger BI_MIN_BASE = new BigInteger("0B5E620F47FFFE666", 16);
/**
- * For 'Base-10 normalised form'<br/>
+ * For 'Base-10 normalised form'<br>
* The maximum {@link #_frac} value when {@link #_binaryExponent} == 49
* (10^15-0.5) * 2^14
*/
* <li>Conversions to text</li>
* </ol>
*
- * <p/>
+ * <p>
* This class does not handle negative numbers or zero.
- * <p/>
- * The value of a {@link NormalisedDecimal} is given by<br/>
+ * <p>
+ * The value of a {@link NormalisedDecimal} is given by<br>
* <tt> significand × 10<sup>decimalExponent</sup></tt>
- * <br/>
- * where:<br/>
+ * <br>
+ * where:<br>
*
- * <tt>significand</tt> = wholePart + fractionalPart / 2<sup>24</sup><br/>
+ * <tt>significand</tt> = wholePart + fractionalPart / 2<sup>24</sup><br>
*
* @author Josh Micich
*/
* mostly the same as those from {@link Double#compare(double, double)} but with some
* rounding. For numbers that are very close, this code converts to a format having 15
* decimal digits of precision and a decimal exponent, before completing the comparison.
- * <p/>
+ * <p>
* In Excel formula evaluation, expressions like "(0.06-0.01)=0.05" evaluate to "TRUE" even
* though the equivalent java expression is <code>false</code>. In examples like this,
* Excel achieves the effect by having additional logic for comparison operations.
- * <p/>
- * <p/>
+ * <p>
+ * <p>
* Note - Excel also gives special treatment to expressions like "0.06-0.01-0.05" which
* evaluates to "0" (in java, rounding anomalies give a result of 6.9E-18). The special
* behaviour here is for different reasons to the example above: If the last operator in a
* cell formula is '+' or '-' and the result is less than 2<sup>50</sup> times smaller than
* first operand, the result is rounded to zero.
* Needless to say, the two rules are not consistent and it is relatively easy to find
- * examples that satisfy<br/>
- * "A=B" is "TRUE" but "A-B" is not "0"<br/>
- * and<br/>
- * "A=B" is "FALSE" but "A-B" is "0"<br/>
- * <br/>
+ * examples that satisfy<br>
+ * "A=B" is "TRUE" but "A-B" is not "0"<br>
+ * and<br>
+ * "A=B" is "FALSE" but "A-B" is "0"<br>
+ * <br>
* This rule (for rounding the result of a final addition or subtraction), has not been
* implemented in POI (as of Jul-2009).
*
/**
* Converts the supplied <tt>value</tt> to the text representation that Excel would give if
- * the value were to appear in an unformatted cell, or as a literal number in a formula.<br/>
+ * the value were to appear in an unformatted cell, or as a literal number in a formula.<br>
* Note - the results from this method differ slightly from those of <tt>Double.toString()</tt>
* In some special cases Excel behaves quite differently. This function attempts to reproduce
* those results.
* cells), creates cells if either corresponding array value is not
* null or createEmptyCells property is true.
* The conversion is performed in the following way:
- * <p/>
+ * <p>
* <ul>
* <li>Numbers become numeric cells.</li>
* <li><code>java.util.Date</code> or <code>java.util.Calendar</code>
/**
* Return the cell, without taking account of merged regions.
- * <p/>
+ * <p>
* Use {@link #getCellWithMerges(Sheet, int, int)} if you want the top left
* cell from merged regions instead when the reference is a merged cell.
- * <p/>
+ * <p>
* Use this where you want to know if the given cell is explicitly defined
* or not.
*
package org.apache.poi.util;
/**
* Implementors of this interface allow client code to 'delay' writing to a certain section of a
- * data output stream.<br/>
+ * data output stream.<br>
* A typical application is for writing BIFF records when the size is not known until well after
* the header has been written. The client code can call {@link #createDelayedOutput(int)}
* to reserve two bytes of the output for the 'ushort size' header field. The delayed output can
/**
* executes:
- * <p/>
+ * <p>
* <code>
* data[offset] = (byte)value;
* </code>
import java.io.InputStream;
/**
- * Wraps an {@link InputStream} providing {@link LittleEndianInput}<p/>
+ * Wraps an {@link InputStream} providing {@link LittleEndianInput}<p>
*
* This class does not buffer any input, so the stream read position maintained
* by this class is consistent with that of the inner stream.
/**
* Replace occurrences of pattern in the input.<p>
*
- * If you want to normalize line endings DOS/MAC (\n\r | \r) to UNIX (\n), you can call the following:<br/>
+ * If you want to normalize line endings DOS/MAC (\n\r | \r) to UNIX (\n), you can call the following:<br>
* {@code new ReplacingInputStream(new ReplacingInputStream(is, "\n\r", "\n"), "\r", "\n")}
*
* @param in input
* <li>byte[]/char[] characterData</li>
* </ol>
* For this encoding, the is16BitFlag is always present even if nChars==0.
- * <br/>
+ * <br>
* This method should be used when the nChars field is <em>not</em> stored
* as a ushort immediately before the is16BitFlag. Otherwise, {@link
* #readUnicodeString(LittleEndianInput)} can be used.
* <li>byte[]/char[] characterData</li>
* </ol>
* For this encoding, the is16BitFlag is always present even if nChars==0.
- * <br/>
+ * <br>
* This method should be used when the nChars field is <em>not</em> stored
* as a ushort immediately before the is16BitFlag. Otherwise, {@link
* #writeUnicodeString(LittleEndianOutput, String)} can be used.
* Width of one "standard character" of the default font in pixels. Same for Calibri and Arial.
* "Standard character" defined as the widest digit character in the given font.
* Copied from XSSFWorkbook, since that isn't available here.
- * <p/>
+ * <p>
* Note this is only valid for workbooks using the default Excel font.
- * <p/>
+ * <p>
* Would be nice to eventually support arbitrary document default fonts.
*/
public static final float DEFAULT_CHARACTER_WIDTH = 7.0017f;
/**
* Converts the supplied date to its equivalent Excel numeric value and sets
* that into the cell.
- * <p/>
+ * <p>
* <b>Note</b> - There is actually no 'DATE' cell type in Excel. In many
* cases (when entering date values), Excel automatically adjusts the
* <i>cell style</i> to some date format, creating the illusion that the cell
/**
* OOXML spec says if this exists it must have all indexes.
- * <p/>
+ * <p>
* From the OOXML Spec, Part 1, section 18.8.27:
- * <p/><i>
+ * <p><i>
* This element contains a sequence of RGB color values that correspond to color indexes (zero-based). When
* using the default indexed color palette, the values are not written out, but instead are implied. When the color
* palette has been modified from default, then the entire color palette is written out.
* Only init once - thus the synchronized. Lazy, after creating instances,
* and only when a style is actually needed, to avoid overhead for uses
* that don't need the actual style definitions.
- * <p/>
+ * <p>
* Public so clients can initialize the map on startup rather than lazily
* during evaluation if desired.
*/
* Return the cell type. Tables in an array formula return
* {@link CellType#FORMULA} for all cells, even though the formula is only defined
* in the OOXML file for the top left cell of the array.
- * <p/>
+ * <p>
* NOTE: POI does not support data table formulas.
* Cells in a data table appear to POI as plain cells typed from their cached value.
*
}
/**
- * Chooses a new boolean value for the cell when its type is changing.<p/>
+ * Chooses a new boolean value for the cell when its type is changing.<p>
*
* Usually the caller is calling setCellType() with the intention of calling
* setCellValue(boolean) straight afterwards. This method only exists to give
/**
* Get the color to use for the bottom border
- * <br/>
+ * <br>
* Color is optional. When missing, IndexedColors.AUTOMATIC is implied.
* @return the index of the color definition, default value is {@link org.apache.poi.ss.usermodel.IndexedColors#AUTOMATIC}
* @see org.apache.poi.ss.usermodel.IndexedColors
* <p>
* Expressed in degrees. Values range from 0 to 180. The first letter of
* the text is considered the center-point of the arc.
- * <br/>
+ * <br>
* For 0 - 90, the value represents degrees above horizon. For 91-180 the degrees below the
* horizon is calculated as:
- * <br/>
+ * <br>
* <code>[degrees below horizon] = 90 - textRotation.</code>
* </p>
*
/**
* Set the foreground fill color represented as a {@link XSSFColor} value.
- * <br/>
+ * <br>
* <i>Note: Ensure Foreground color is set prior to background color.</i>
* @param color the color to use
* @see #setFillBackgroundColor(org.apache.poi.xssf.usermodel.XSSFColor) )
/**
* Set the foreground fill color as a indexed color value
- * <br/>
+ * <br>
* <i>Note: Ensure Foreground color is set prior to background color.</i>
* @param fg the color to use
* @see org.apache.poi.ss.usermodel.IndexedColors
* <p>
* Expressed in degrees. Values range from 0 to 180. The first letter of
* the text is considered the center-point of the arc.
- * <br/>
+ * <br>
* For 0 - 90, the value represents degrees above horizon. For 91-180 the degrees below the
* horizon is calculated as:
- * <br/>
+ * <br>
* <code>[degrees below horizon] = 90 - textRotation.</code>
* </p>
*
import org.apache.poi.ss.usermodel.CellValue;
/**
- * Evaluates formula cells.<p/>
+ * Evaluates formula cells.<p>
*
* For performance reasons, this class keeps a cache of all previously calculated intermediate
* cell values. Be sure to call {@link #clearAllCachedResultValues()} if any workbook cells are changed between
/**
* This class implements the Map element (Open Office XML Part 4:
* chapter 3.16.2)
- * <p/>
+ * <p>
* This element contains all of the properties related to the XML map,
* and the behaviors expected during data refresh operations.
*
* If the default font is changed the resized image can be streched vertically or horizontally.
* </p>
* <p>
- * <code>resize(1.0,1.0)</code> keeps the original size,<br/>
- * <code>resize(0.5,0.5)</code> resize to 50% of the original,<br/>
- * <code>resize(2.0,2.0)</code> resizes to 200% of the original.<br/>
+ * <code>resize(1.0,1.0)</code> keeps the original size,<br>
+ * <code>resize(0.5,0.5)</code> resize to 50% of the original,<br>
+ * <code>resize(2.0,2.0)</code> resizes to 200% of the original.<br>
* <code>resize({@link Double#MAX_VALUE},{@link Double#MAX_VALUE})</code> resizes to the dimension of the embedded image.
* </p>
*
* <p>
* Note, that this call might be expensive since all the picture data is copied into a temporary byte array.
* You can grab the picture data directly from the underlying package part as follows:
- * <br/>
+ * <br>
* <code>
* InputStream is = getPackagePart().getInputStream();
* </code>
* Character width is defined as the maximum digit width
* of the numbers <code>0, 1, 2, ... 9</code> as rendered
* using the default font (first font in the workbook).
- * <br/>
+ * <br>
* Unless you are using a very special font, the default character is '0' (zero),
* this is true for Arial (default font font in HSSF) and Calibri (default font in XSSF)
* </p>
/**
* A factory method allowing to create a conditional formatting rule
- * with a cell comparison operator<p/>
+ * with a cell comparison operator<p>
* TODO - formulas containing cell references are currently not parsed properly
*
* @param comparisonOperation - a constant value from
* The result is that they contain things like >br<, which breaks the XML parsing.
* This very sick InputStream wrapper attempts to spot these go past, and fix them.
*/
- doc = DocumentHelper.readDocument(new ReplacingInputStream(is, "<br>", "<br/>"));
+ doc = DocumentHelper.readDocument(new ReplacingInputStream(is, "<br>", "<br>"));
} catch (SAXException e) {
throw new XmlException(e.getMessage(), e);
}
}
/**
- * Removes sheet at the given index.<p/>
+ * Removes sheet at the given index.<p>
*
* Care must be taken if the removed sheet is the currently active or only selected sheet in
* the workbook. There are a few situations when Excel must have a selection and/or active
- * sheet. (For example when printing - see Bug 40414).<br/>
+ * sheet. (For example when printing - see Bug 40414).<br>
*
* This method makes sure that if the removed sheet was active, another sheet will become
* active in its place. Furthermore, if the removed sheet was the only selected sheet, another
}
/**
- * Specifies a boolean value that indicates whether structure of workbook is locked. <br/>
+ * Specifies a boolean value that indicates whether structure of workbook is locked. <br>
* A value true indicates the structure of the workbook is locked. Worksheets in the workbook can't be moved,
- * deleted, hidden, unhidden, or renamed, and new worksheets can't be inserted.<br/>
- * A value of false indicates the structure of the workbook is not locked.<br/>
+ * deleted, hidden, unhidden, or renamed, and new worksheets can't be inserted.<br>
+ * A value of false indicates the structure of the workbook is not locked.<br>
*
* @return true if structure of workbook is locked
*/
}
/**
- * Specifies a boolean value that indicates whether the windows that comprise the workbook are locked. <br/>
+ * Specifies a boolean value that indicates whether the windows that comprise the workbook are locked. <br>
* A value of true indicates the workbook windows are locked. Windows are the same size and position each time the
- * workbook is opened.<br/>
+ * workbook is opened.<br>
* A value of false indicates the workbook windows are not locked.
*
* @return true if windows that comprise the workbook are locked
/**
* Get the degree of rotation for the text in the cell
- * <p/>
+ * <p>
* Expressed in degrees. Values range from 0 to 180. The first letter of
* the text is considered the center-point of the arc.
- * <br/>
+ * <br>
* For 0 - 90, the value represents degrees above horizon. For 91-180 the degrees below the
* horizon is calculated as:
- * <br/>
+ * <br>
* <code>[degrees below horizon] = 90 - textRotation.</code>
* </p>
*
/**
* Set the degree of rotation for the text in the cell
- * <p/>
+ * <p>
* Expressed in degrees. Values range from 0 to 180. The first letter of
* the text is considered the center-point of the arc.
- * <br/>
+ * <br>
* For 0 - 90, the value represents degrees above horizon. For 91-180 the degrees below the
* horizon is calculated as:
- * <br/>
+ * <br>
* <code>[degrees below horizon] = 90 - textRotation.</code>
* </p>
*
/**
* Update sheet name in all formulas and named ranges.
* Called from {@link XSSFWorkbook#setSheetName(int, String)}
- * <p/>
+ * <p>
* <p>
* The idea is to parse every formula and render it back to string
* with the updated sheet name. This is done by parsing into Ptgs,
@Internal
public class EvilUnclosedBRFixingInputStream extends ReplacingInputStream {
public EvilUnclosedBRFixingInputStream(InputStream source) {
- super(source, "<br>", "<br/>");
+ super(source, "<br>", "<br>");
}
}
/**
* Experimental abstract class that is a base for XWPFSDT and XWPFSDTCell
- * <p/>
+ * <p>
* WARNING - APIs expected to change rapidly.
- * <p/>
+ * <p>
* These classes have so far been built only for read-only processing.
*/
public abstract class AbstractXWPFSDT implements ISDTContents {
* line in the WordprocessingML document, regardless of its position left to
* right or the presence of any floating objects which intersect with the
* line,
- * <p/>
+ * <p>
* This is the setting for a typical line break in a document.
*/
/**
* Interface for anything that can be at a table cell level:
* {@link XWPFTableCell}, {@link XWPFSDTCell}
- * <p/>
+ * <p>
* Schematically something like this:
* <tr><tc/><tc/><sdt><tc/></sdt></tr>
*/
/**
* Simple interface describing both {@link XWPFParagraph}
* and {@link XWPFSDT}
- * <p/>
+ * <p>
* TODO Should this be based on / extend {@link Paragraph}?
*/
public interface IRunBody {
* where a run (text with common stylings) can,
* eg {@link XWPFRun} or {@link XWPFSDT}.
* TODO More methods to follow shortly!
- * <p/>
+ * <p>
* TODO Make this based on {@link CharacterRun}
*/
public interface IRunElement {}
\ No newline at end of file
/**
* Experimental interface to offer rudimentary read-only processing of
* of the contentblock of an SDT/ContentControl.
- * <p/>
- * <p/>
- * <p/>
+ * <p>
+ * <p>
+ * <p>
* WARNING - APIs expected to change rapidly
*/
public interface ISDTContent {
/**
* <p>High(ish) level class for working with .docx files.</p>
- * <p/>
+ * <p>
* <p>This class tries to hide some of the complexity
* of the underlying file format, but as it's not a
* mature and stable API yet, certain parts of the
}
/**
- * Verifies that the documentProtection tag in settings.xml file <br/>
- * specifies that the protection is enforced (w:enforcement="1") <br/>
- * <br/>
+ * Verifies that the documentProtection tag in settings.xml file <br>
+ * specifies that the protection is enforced (w:enforcement="1") <br>
+ * <br>
* sample snippet from settings.xml
* <pre>
* <w:settings ... >
}
/**
- * Verifies that the documentProtection tag in settings.xml file <br/>
- * specifies that the protection is enforced (w:enforcement="1") <br/>
- * and that the kind of protection is readOnly (w:edit="readOnly")<br/>
- * <br/>
+ * Verifies that the documentProtection tag in settings.xml file <br>
+ * specifies that the protection is enforced (w:enforcement="1") <br>
+ * and that the kind of protection is readOnly (w:edit="readOnly")<br>
+ * <br>
* sample snippet from settings.xml
* <pre>
* <w:settings ... >
}
/**
- * Verifies that the documentProtection tag in settings.xml file <br/>
- * specifies that the protection is enforced (w:enforcement="1") <br/>
- * and that the kind of protection is forms (w:edit="forms")<br/>
- * <br/>
+ * Verifies that the documentProtection tag in settings.xml file <br>
+ * specifies that the protection is enforced (w:enforcement="1") <br>
+ * and that the kind of protection is forms (w:edit="forms")<br>
+ * <br>
* sample snippet from settings.xml
* <pre>
* <w:settings ... >
}
/**
- * Verifies that the documentProtection tag in settings.xml file <br/>
- * specifies that the protection is enforced (w:enforcement="1") <br/>
- * and that the kind of protection is comments (w:edit="comments")<br/>
- * <br/>
+ * Verifies that the documentProtection tag in settings.xml file <br>
+ * specifies that the protection is enforced (w:enforcement="1") <br>
+ * and that the kind of protection is comments (w:edit="comments")<br>
+ * <br>
* sample snippet from settings.xml
* <pre>
* <w:settings ... >
}
/**
- * Verifies that the documentProtection tag in settings.xml file <br/>
- * specifies that the protection is enforced (w:enforcement="1") <br/>
- * and that the kind of protection is trackedChanges (w:edit="trackedChanges")<br/>
- * <br/>
+ * Verifies that the documentProtection tag in settings.xml file <br>
+ * specifies that the protection is enforced (w:enforcement="1") <br>
+ * and that the kind of protection is trackedChanges (w:edit="trackedChanges")<br>
+ * <br>
* sample snippet from settings.xml
* <pre>
* <w:settings ... >
}
/**
- * Enforces the readOnly protection.<br/>
- * In the documentProtection tag inside settings.xml file, <br/>
- * it sets the value of enforcement to "1" (w:enforcement="1") <br/>
- * and the value of edit to readOnly (w:edit="readOnly")<br/>
- * <br/>
+ * Enforces the readOnly protection.<br>
+ * In the documentProtection tag inside settings.xml file, <br>
+ * it sets the value of enforcement to "1" (w:enforcement="1") <br>
+ * and the value of edit to readOnly (w:edit="readOnly")<br>
+ * <br>
* sample snippet from settings.xml
* <pre>
* <w:settings ... >
}
/**
- * Enforces the readOnly protection with a password.<br/>
- * <br/>
+ * Enforces the readOnly protection with a password.<br>
+ * <br>
* sample snippet from settings.xml
* <pre>
* <w:documentProtection w:edit="readOnly" w:enforcement="1"
}
/**
- * Enforce the Filling Forms protection.<br/>
- * In the documentProtection tag inside settings.xml file, <br/>
- * it sets the value of enforcement to "1" (w:enforcement="1") <br/>
- * and the value of edit to forms (w:edit="forms")<br/>
- * <br/>
+ * Enforce the Filling Forms protection.<br>
+ * In the documentProtection tag inside settings.xml file, <br>
+ * it sets the value of enforcement to "1" (w:enforcement="1") <br>
+ * and the value of edit to forms (w:edit="forms")<br>
+ * <br>
* sample snippet from settings.xml
* <pre>
* <w:settings ... >
}
/**
- * Enforce the Filling Forms protection.<br/>
- * <br/>
+ * Enforce the Filling Forms protection.<br>
+ * <br>
* sample snippet from settings.xml
* <pre>
* <w:documentProtection w:edit="forms" w:enforcement="1"
}
/**
- * Enforce the Comments protection.<br/>
- * In the documentProtection tag inside settings.xml file,<br/>
- * it sets the value of enforcement to "1" (w:enforcement="1") <br/>
- * and the value of edit to comments (w:edit="comments")<br/>
- * <br/>
+ * Enforce the Comments protection.<br>
+ * In the documentProtection tag inside settings.xml file,<br>
+ * it sets the value of enforcement to "1" (w:enforcement="1") <br>
+ * and the value of edit to comments (w:edit="comments")<br>
+ * <br>
* sample snippet from settings.xml
* <pre>
* <w:settings ... >
}
/**
- * Enforce the Comments protection.<br/>
- * <br/>
+ * Enforce the Comments protection.<br>
+ * <br>
* sample snippet from settings.xml
* <pre>
* <w:documentProtection w:edit="comments" w:enforcement="1"
}
/**
- * Enforce the Tracked Changes protection.<br/>
- * In the documentProtection tag inside settings.xml file, <br/>
- * it sets the value of enforcement to "1" (w:enforcement="1") <br/>
- * and the value of edit to trackedChanges (w:edit="trackedChanges")<br/>
- * <br/>
+ * Enforce the Tracked Changes protection.<br>
+ * In the documentProtection tag inside settings.xml file, <br>
+ * it sets the value of enforcement to "1" (w:enforcement="1") <br>
+ * and the value of edit to trackedChanges (w:edit="trackedChanges")<br>
+ * <br>
* sample snippet from settings.xml
* <pre>
* <w:settings ... >
}
/**
- * Enforce the Tracked Changes protection.<br/>
- * <br/>
+ * Enforce the Tracked Changes protection.<br>
+ * <br>
* sample snippet from settings.xml
* <pre>
* <w:documentProtection w:edit="trackedChanges" w:enforcement="1"
}
/**
- * Remove protection enforcement.<br/>
- * In the documentProtection tag inside settings.xml file <br/>
- * it sets the value of enforcement to "0" (w:enforcement="0") <br/>
+ * Remove protection enforcement.<br>
+ * In the documentProtection tag inside settings.xml file <br>
+ * it sets the value of enforcement to "0" (w:enforcement="0") <br>
*/
public void removeProtectionEnforcement() {
settings.removeEnforcement();
/**
* Enforces fields update on document open (in Word).
- * In the settings.xml file <br/>
+ * In the settings.xml file <br>
* sets the updateSettings value to true (w:updateSettings w:val="true")
- * <p/>
+ * <p>
* NOTICES:
* <ul>
* <li>Causing Word to ask on open: "This document contains fields that may refer to other files. Do you want to update the fields in this document?"
/**
* <p>A Paragraph within a Document, Table, Header etc.</p>
- * <p/>
+ * <p>
* <p>A paragraph has a lot of styling information, but the
* actual text (possibly along with more styling) is held on
* the child {@link XWPFRun}s.</p>
/**
* Returns the paragraph alignment which shall be applied to text in this
* paragraph.
- * <p/>
- * <p/>
+ * <p>
+ * <p>
* If this element is not set on a given paragraph, its value is determined
* by the setting previously set at any level of the style hierarchy (i.e.
* that previous setting remains unchanged). If this setting is never
/**
* Specifies the paragraph alignment which shall be applied to text in this
* paragraph.
- * <p/>
- * <p/>
+ * <p>
+ * <p>
* If this element is not set on a given paragraph, its value is determined
* by the setting previously set at any level of the style hierarchy (i.e.
* that previous setting remains unchanged). If this setting is never
/**
* Returns the text vertical alignment which shall be applied to text in
* this paragraph.
- * <p/>
+ * <p>
* If the line height (before any added spacing) is larger than one or more
* characters on the line, all characters will be aligned to each other as
* specified by this element.
* </p>
- * <p/>
+ * <p>
* If this element is omitted on a given paragraph, its value is determined
* by the setting previously set at any level of the style hierarchy (i.e.
* that previous setting remains unchanged). If this setting is never
/**
* Specifies the text vertical alignment which shall be applied to text in
* this paragraph.
- * <p/>
+ * <p>
* If the line height (before any added spacing) is larger than one or more
* characters on the line, all characters will be aligned to each other as
* specified by this element.
* </p>
- * <p/>
+ * <p>
* If this element is omitted on a given paragraph, its value is determined
* by the setting previously set at any level of the style hierarchy (i.e.
* that previous setting remains unchanged). If this setting is never
/**
* Specifies the border which shall be displayed above a set of paragraphs
* which have the same set of paragraph border settings.
- * <p/>
- * <p/>
+ * <p>
+ * <p>
* To determine if any two adjoining paragraphs shall have an individual top
* and bottom border or a between border, the set of borders on the two
* adjoining paragraphs are compared. If the border information on those two
* determines the space above the text (ignoring any spacing above) which
* should be left before this border is drawn, specified in points.
* </p>
- * <p/>
+ * <p>
* If this element is omitted on a given paragraph, its value is determined
* by the setting previously set at any level of the style hierarchy (i.e.
* that previous setting remains unchanged). If this setting is never
/**
* Specifies the border which shall be displayed below a set of paragraphs
* which have the same set of paragraph border settings.
- * <p/>
+ * <p>
* To determine if any two adjoining paragraphs shall have an individual top
* and bottom border or a between border, the set of borders on the two
* adjoining paragraphs are compared. If the border information on those two
* below) which should be left before this border is drawn, specified in
* points.
* </p>
- * <p/>
+ * <p>
* If this element is omitted on a given paragraph, its value is determined
* by the setting previously set at any level of the style hierarchy (i.e.
* that previous setting remains unchanged). If this setting is never
/**
* Specifies the border which shall be displayed on the left side of the
* page around the specified paragraph.
- * <p/>
+ * <p>
* To determine if any two adjoining paragraphs should have a left border
* which spans the full line height or not, the left border shall be drawn
* between the top border or between border at the top (whichever would be
* border at the bottom (whichever would be rendered for the current
* paragraph).
* </p>
- * <p/>
+ * <p>
* If this element is omitted on a given paragraph, its value is determined
* by the setting previously set at any level of the style hierarchy (i.e.
* that previous setting remains unchanged). If this setting is never
/**
* Specifies the border which shall be displayed on the right side of the
* page around the specified paragraph.
- * <p/>
+ * <p>
* To determine if any two adjoining paragraphs should have a right border
* which spans the full line height or not, the right border shall be drawn
* between the top border or between border at the top (whichever would be
* border at the bottom (whichever would be rendered for the current
* paragraph).
* </p>
- * <p/>
+ * <p>
* If this element is omitted on a given paragraph, its value is determined
* by the setting previously set at any level of the style hierarchy (i.e.
* that previous setting remains unchanged). If this setting is never
/**
* Specifies the border which shall be displayed between each paragraph in a
* set of paragraphs which have the same set of paragraph border settings.
- * <p/>
+ * <p>
* To determine if any two adjoining paragraphs should have a between border
* or an individual top and bottom border, the set of borders on the two
* adjoining paragraphs are compared. If the border information on those two
* bottom of each paragraph with an identical following paragraph, taking
* into account any space after the line pitch.
* </p>
- * <p/>
+ * <p>
* If this element is omitted on a given paragraph, its value is determined
* by the setting previously set at any level of the style hierarchy (i.e.
* that previous setting remains unchanged). If this setting is never
* Specifies that when rendering this document in a paginated
* view, the contents of this paragraph are rendered on the start of a new
* page in the document.
- * <p/>
+ * <p>
* If this element is omitted on a given paragraph,
* its value is determined by the setting previously set at any level of the
* style hierarchy (i.e. that previous setting remains unchanged). If this
* Specifies that when rendering this document in a paginated
* view, the contents of this paragraph are rendered on the start of a new
* page in the document.
- * <p/>
+ * <p>
* If this element is omitted on a given paragraph,
* its value is determined by the setting previously set at any level of the
* style hierarchy (i.e. that previous setting remains unchanged). If this
/**
* Specifies the spacing that should be added after the last line in this
* paragraph in the document in absolute units.
- * <p/>
+ * <p>
* If the afterLines attribute or the afterAutoSpacing attribute is also
* specified, then this attribute value is ignored.
* </p>
* <b>The value of this attribute is
* specified in one hundredths of a line.
* </b>
- * <p/>
+ * <p>
* If the afterAutoSpacing attribute
* is also specified, then this attribute value is ignored. If this setting
* is never specified in the style hierarchy, then its value shall be zero
/**
* Specifies the spacing that should be added above the first line in this
* paragraph in the document in absolute units.
- * <p/>
+ * <p>
* If the beforeLines attribute or the beforeAutoSpacing attribute is also
* specified, then this attribute value is ignored.
* </p>
* Specifies the spacing that should be added before the first line in this
* paragraph in the document in line units. <b> The value of this attribute
* is specified in one hundredths of a line. </b>
- * <p/>
+ * <p>
* If the beforeAutoSpacing attribute is also specified, then this attribute
* value is ignored. If this setting is never specified in the style
* hierarchy, then its value shall be zero.
* margin for this paragraph and the left edge of that paragraph's content
* in a left to right paragraph, and the right text margin and the right
* edge of that paragraph's text in a right to left paragraph
- * <p/>
+ * <p>
* If this attribute is omitted, its value shall be assumed to be zero.
* Negative values are defined such that the text is moved past the text margin,
* positive values move the text inside the text margin.
* margin for this paragraph and the left edge of that paragraph's content
* in a left to right paragraph, and the right text margin and the right
* edge of that paragraph's text in a right to left paragraph
- * <p/>
+ * <p>
* If this attribute is omitted, its value shall be assumed to be zero.
* Negative values are defined such that the text is moved past the text margin,
* positive values move the text inside the text margin.
* margin for this paragraph and the right edge of that paragraph's content
* in a left to right paragraph, and the right text margin and the right
* edge of that paragraph's text in a right to left paragraph
- * <p/>
+ * <p>
* If this attribute is omitted, its value shall be assumed to be zero.
* Negative values are defined such that the text is moved past the text margin,
* positive values move the text inside the text margin.
* margin for this paragraph and the right edge of that paragraph's content
* in a left to right paragraph, and the right text margin and the right
* edge of that paragraph's text in a right to left paragraph
- * <p/>
+ * <p>
* If this attribute is omitted, its value shall be assumed to be zero.
* Negative values are defined such that the text is moved past the text margin,
* positive values move the text inside the text margin.
* towards the beginning of the direction of text flow.
* This indentation is specified relative to the paragraph indentation which is specified for
* all other lines in the parent paragraph.
- * <p/>
+ * <p>
* The firstLine and hanging attributes are mutually exclusive, if both are specified, then the
* firstLine value is ignored.
* </p>
* <p>
* Note, that this call might be expensive since all the picture data is copied into a temporary byte array.
* You can grab the picture data directly from the underlying package part as follows:
- * <br/>
+ * <br>
* <code>
* InputStream is = getPackagePart().getInputStream();
* </code>
/**
* Whether the bold property shall be applied to all non-complex script
* characters in the contents of this run when displayed in a document
- * <p/>
- * <p/>
+ * <p>
+ * <p>
* This formatting property is a toggle property, which specifies that its
* behavior differs between its use within a style definition and its use as
* direct formatting. When used as part of a style definition, setting this
* direct formatting, setting this property to true or false shall set the
* absolute state of the resulting property.
* </p>
- * <p/>
+ * <p>
* If this element is not present, the default value is to leave the
* formatting applied at previous level in the style hierarchy. If this
* element is never applied in the style hierarchy, then bold shall not be
/**
* Specifies that the contents of this run should be displayed along with an
* underline appearing directly below the character heigh
- * <p/>
- * <p/>
+ * <p>
+ * <p>
* If this element is not present, the default value is to leave the
* formatting applied at previous level in the style hierarchy. If this
* element is never applied in the style hierarchy, then an underline shall
/**
* Specifies that the contents of this run shall be displayed with a single
* horizontal line through the center of the line.
- * <p/>
+ * <p>
* This formatting property is a toggle property, which specifies that its
* behaviour differs between its use within a style definition and its use as
* direct formatting. When used as part of a style definition, setting this
* formatting, setting this property to true or false shall set the absolute
* state of the resulting property.
* </p>
- * <p/>
+ * <p>
* If this element is not present, the default value is to leave the
* formatting applied at previous level in the style hierarchy. If this
* element is never applied in the style hierarchy, then strikethrough shall
* run in relation to the default appearance of the run's text. This allows
* the text to be repositioned as subscript or superscript without altering
* the font size of the run properties.
- * <p/>
+ * <p>
* If this element is not present, the default value is to leave the
* formatting applied at previous level in the style hierarchy. If this
* element is never applied in the style hierarchy, then the text shall not
* Specifies the fonts which shall be used to display the text contents of
* this run. Specifies a font which shall be used to format all characters
* in the ASCII range (0 - 127) within the parent run.
- * <p/>
+ * <p>
* Also sets the other font ranges, if they haven't been set before
*
* @param fontFamily
/**
* Specifies the font size which shall be applied to all non complex script
* characters in the contents of this run when displayed.
- * <p/>
+ * <p>
* If this element is not present, the default value is to leave the value
* applied at previous level in the style hierarchy. If this element is
* never applied in the style hierarchy, then any appropriate font size may
* lowered for this run in relation to the default baseline of the
* surrounding non-positioned text. This allows the text to be repositioned
* without altering the font size of the contents.
- * <p/>
+ * <p>
* If the val attribute is positive, then the parent run shall be raised
* above the baseline of the surrounding text by the specified number of
* half-points. If the val attribute is negative, then the parent run shall
* be lowered below the baseline of the surrounding text by the specified
* number of half-points.
* </p>
- * <p/>
+ * <p>
* If this element is not present, the default value is to leave the
* formatting applied at previous level in the style hierarchy. If this
* element is never applied in the style hierarchy, then the text shall not
/**
* Experimental class to offer rudimentary read-only processing of
* of StructuredDocumentTags/ContentControl
- * <p/>
+ * <p>
* WARNING - APIs expected to change rapidly
*/
public class XWPFSDT extends AbstractXWPFSDT
* Experimental class to offer rudimentary read-only processing of
* of StructuredDocumentTags/ContentControl that can appear
* in a table row as if a table cell.
- * <p/>
+ * <p>
* These can contain one or more cells or other SDTs within them.
- * <p/>
+ * <p>
* WARNING - APIs expected to change rapidly
*/
public class XWPFSDTCell extends AbstractXWPFSDT implements ICell {
/**
* Experimental class to offer rudimentary read-only processing of
* of the contentblock of an SDT/ContentControl.
- * <p/>
- * <p/>
- * <p/>
+ * <p>
+ * <p>
+ * <p>
* WARNING - APIs expected to change rapidly
*/
public class XWPFSDTContent implements ISDTContent {
/**
* Experimental class to offer rudimentary read-only processing of
* of the XWPFSDTCellContent.
- * <p/>
+ * <p>
* WARNING - APIs expected to change rapidly
*/
public class XWPFSDTContentCell implements ISDTContent {
}
/**
- * Set zoom.<br/>
- * In the zoom tag inside settings.xml file <br/>
+ * Set zoom.<br>
+ * In the zoom tag inside settings.xml file <br>
* it sets the value of zoom
- * <br/>
+ * <br>
* sample snippet from settings.xml
* <pre>
* <w:zoom w:percent="50" />
}
/**
- * Set zoom.<br/>
- * In the zoom tag inside settings.xml file <br/>
+ * Set zoom.<br>
+ * In the zoom tag inside settings.xml file <br>
* it sets the value of zoom
- * <br/>
+ * <br>
* sample snippet from settings.xml
* <pre>
* <w:zoom w:percent="50" />
}
/**
- * Verifies the documentProtection tag inside settings.xml file <br/>
- * if the protection is enforced (w:enforcement="1") <br/>
- * <p/>
- * <br/>
+ * Verifies the documentProtection tag inside settings.xml file <br>
+ * if the protection is enforced (w:enforcement="1") <br>
+ * <p>
+ * <br>
* sample snippet from settings.xml
* <pre>
* <w:settings ... >
}
/**
- * Verifies the documentProtection tag inside settings.xml file <br/>
- * if the protection is enforced (w:enforcement="1") <br/>
- * and if the kind of protection equals to passed (STDocProtect.Enum editValue) <br/>
- * <p/>
- * <br/>
+ * Verifies the documentProtection tag inside settings.xml file <br>
+ * if the protection is enforced (w:enforcement="1") <br>
+ * and if the kind of protection equals to passed (STDocProtect.Enum editValue) <br>
+ * <p>
+ * <br>
* sample snippet from settings.xml
* <pre>
* <w:settings ... >
}
/**
- * Enforces the protection with the option specified by passed editValue.<br/>
- * <br/>
- * In the documentProtection tag inside settings.xml file <br/>
- * it sets the value of enforcement to "1" (w:enforcement="1") <br/>
- * and the value of edit to the passed editValue (w:edit="[passed editValue]")<br/>
- * <br/>
+ * Enforces the protection with the option specified by passed editValue.<br>
+ * <br>
+ * In the documentProtection tag inside settings.xml file <br>
+ * it sets the value of enforcement to "1" (w:enforcement="1") <br>
+ * and the value of edit to the passed editValue (w:edit="[passed editValue]")<br>
+ * <br>
* sample snippet from settings.xml
* <pre>
* <w:settings ... >
}
/**
- * Enforces the protection with the option specified by passed editValue and password.<br/>
- * <br/>
+ * Enforces the protection with the option specified by passed editValue and password.<br>
+ * <br>
* sample snippet from settings.xml
* <pre>
* <w:documentProtection w:edit="[passed editValue]" w:enforcement="1"
}
/**
- * Removes protection enforcement.<br/>
- * In the documentProtection tag inside settings.xml file <br/>
- * it sets the value of enforcement to "0" (w:enforcement="0") <br/>
+ * Removes protection enforcement.<br>
+ * In the documentProtection tag inside settings.xml file <br>
+ * it sets the value of enforcement to "0" (w:enforcement="0") <br>
*/
public void removeEnforcement() {
safeGetDocumentProtection().setEnforcement(STOnOff.X_0);
/**
* Enforces fields update on document open (in Word).
- * In the settings.xml file <br/>
+ * In the settings.xml file <br>
* sets the updateSettings value to true (w:updateSettings w:val="true")
- * <p/>
+ * <p>
* NOTICES:
* <ul>
* <li>Causing Word to ask on open: "This document contains fields that may refer to other files. Do you want to update the fields in this document?"
* Convenience method to extract text in cells. This
* does not extract text recursively in cells, and it does not
* currently include text in SDT (form) components.
- * <p/>
+ * <p>
* To get all text within a table, see XWPFWordExtractor's appendTableText
* as an example.
*
public final class TestFileHelper {
/**
- * TODO - use simple JDK methods on {@link File} instead:<br/>
+ * TODO - use simple JDK methods on {@link File} instead:<br>
* {@link File#getParentFile()} instead of {@link FileHelper#getDirectory(File)
* {@link File#getName()} instead of {@link FileHelper#getFilename(File)
*/
} finally {
stream.close();
}
- Pattern p = Pattern.compile("<br/>");
+ Pattern p = Pattern.compile("<br>");
int count = 0;
for (XmlObject xo : vml.getItems()) {
String split[] = p.split(xo.toString());
static class EvilUnclosedBRFixingInputStream extends ReplacingInputStream {
public EvilUnclosedBRFixingInputStream(byte[] source) {
- super(new ByteArrayInputStream(source), "<br>", "<br/>");
+ super(new ByteArrayInputStream(source), "<br>", "<br>");
}
}
@Test
public void testProblem() throws IOException {
byte[] orig = getBytes("<p><div>Hello<br>There!</div> <div>Tags!</div></p>");
- byte[] fixed = getBytes("<p><div>Hello<br/>There!</div> <div>Tags!</div></p>");
+ byte[] fixed = getBytes("<p><div>Hello<br>There!</div> <div>Tags!</div></p>");
EvilUnclosedBRFixingInputStream inp = new EvilUnclosedBRFixingInputStream(orig);
@Test
public void testBufferSize() throws IOException {
byte[] orig = getBytes("<p><div>Hello<br> <br>There!</div> <div>Tags!<br><br></div></p>");
- byte[] fixed = getBytes("<p><div>Hello<br/> <br/>There!</div> <div>Tags!<br/><br/></div></p>");
+ byte[] fixed = getBytes("<p><div>Hello<br> <br>There!</div> <div>Tags!<br><br></div></p>");
// Vary the buffer size, so that we can end up with the br in the
// overflow or only part in the buffer
* submitted because even though the
* {@link PackageProperties#getKeywordsProperty()} had been present before, the
* {@link CoreProperties#getKeywords()} had been missing.
- * <p/>
+ * <p>
* The author of this has added {@link CoreProperties#getKeywords()} and
* {@link CoreProperties#setKeywords(String)} and this test is supposed to test
* them.
* submitted because even though the
* {@link PackageProperties#getKeywordsProperty()} had been present before, the
* {@link CoreProperties#getKeywords()} had been missing.
- * <p/>
+ * <p>
* The author of this has added {@link CoreProperties#getKeywords()} and
* {@link CoreProperties#setKeywords(String)} and this test is supposed to test
* them.
import org.apache.poi.util.LittleEndianConsts;
/**
- * A SlideShowSlideInfo Atom (type 1017).<br/>
- * <br/>
+ * A SlideShowSlideInfo Atom (type 1017).<br>
+ * <br>
*
* An atom record that specifies which transition effects to perform
- * during a slide show, and how to advance to the next presentation slide.<br/>
- * <br/>
+ * during a slide show, and how to advance to the next presentation slide.<br>
+ * <br>
*
* Combination of effectType and effectDirection:
* <table>
BI_BITCOUNT_3(0x0008),
/**
* Each pixel in the bitmap is represented by a 16-bit value.
- * <br/>
+ * <br>
* If the Compression field of the BitmapInfoHeader Object is BI_RGB, the Colors field of DIB
* is NULL. Each WORD in the bitmap array represents a single pixel. The relative intensities of
* red, green, and blue are represented with 5 bits for each color component. The value for blue
* bit is not used. The color table is used for optimizing colors on palette-based devices, and
* contains the number of entries specified by the ColorUsed field of the BitmapInfoHeader
* Object.
- * <br/>
+ * <br>
* If the Compression field of the BitmapInfoHeader Object is BI_BITFIELDS, the Colors field
* contains three DWORD color masks that specify the red, green, and blue components,
* respectively, of each pixel. Each WORD in the bitmap array represents a single pixel.
- * <br/>
+ * <br>
* When the Compression field is set to BI_BITFIELDS, bits set in each DWORD mask MUST be
* contiguous and SHOULD NOT overlap the bits of another mask.
*/
BI_BITCOUNT_5(0x0018),
/**
* The bitmap has a maximum of 2^24 colors.
- * <br/>
+ * <br>
* If the Compression field of the BitmapInfoHeader Object is set to BI_RGB, the Colors field
* of DIB is set to NULL. Each DWORD in the bitmap array represents the relative intensities of
* blue, green, and red, respectively, for a pixel. The high byte in each DWORD is not used. The
* Colors color table is used for optimizing colors used on palette-based devices, and MUST
* contain the number of entries specified by the ColorUsed field of the BitmapInfoHeader
* Object.
- * <br/>
+ * <br>
* If the Compression field of the BitmapInfoHeader Object is set to BI_BITFIELDS, the Colors
* field contains three DWORD color masks that specify the red, green, and blue components,
* respectively, of each pixel. Each DWORD in the bitmap array represents a single pixel.
- * <br/>
+ * <br>
* When the Compression field is set to BI_BITFIELDS, bits set in each DWORD mask must be
* contiguous and should not overlap the bits of another mask. All the bits in the pixel do not
* need to be used.
/**
* Writes a slideshow to a <tt>ByteArrayOutputStream</tt> and reads it back
- * from a <tt>ByteArrayInputStream</tt>.<p/>
+ * from a <tt>ByteArrayInputStream</tt>.<p>
* Useful for verifying that the serialisation round trip
*/
public static HSLFSlideShowImpl writeOutAndReadBack(HSLFSlideShowImpl original) {
/**
* Writes a slideshow to a <tt>ByteArrayOutputStream</tt> and reads it back
- * from a <tt>ByteArrayInputStream</tt>.<p/>
+ * from a <tt>ByteArrayInputStream</tt>.<p>
* Useful for verifying that the serialisation round trip
*/
public static HSLFSlideShow writeOutAndReadBack(HSLFSlideShow original) {
}
/**
* Writes a spreadsheet to a <tt>ByteArrayOutputStream</tt> and reads it back
- * from a <tt>ByteArrayInputStream</tt>.<p/>
+ * from a <tt>ByteArrayInputStream</tt>.<p>
* Useful for verifying that the serialisation round trip
*/
public static HWPFDocument writeOutAndReadBack(HWPFDocument original) {
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
/**
- * Root Test Suite for entire POI project. (Includes all sub-packages of org.apache.poi)<br/>
+ * Root Test Suite for entire POI project. (Includes all sub-packages of org.apache.poi)<br>
*/
@RunWith(Suite.class)
@Suite.SuiteClasses({
}
/**
* Writes a spreadsheet to a <tt>ByteArrayOutputStream</tt> and reads it back
- * from a <tt>ByteArrayInputStream</tt>.<p/>
+ * from a <tt>ByteArrayInputStream</tt>.<p>
* Useful for verifying that the serialisation round trip
*/
public static HSSFWorkbook writeOutAndReadBack(HSSFWorkbook original) {
import org.junit.runners.Suite;
/**
- * Test Suite for all sub-packages of org.apache.poi.hssf<br/>
+ * Test Suite for all sub-packages of org.apache.poi.hssf<br>
*/
@RunWith(Suite.class)
@Suite.SuiteClasses({
}
/**
- * Test for bug observable at svn revision 618865 (5-Feb-2008)<br/>
+ * Test for bug observable at svn revision 618865 (5-Feb-2008)<br>
* a formula consisting of a single no-arg function got rendered without the function braces
*/
@Test
}
/**
* Make sure that POI uses the right Func Ptg when encoding formulas. Functions with variable
- * number of args should get FuncVarPtg, functions with fixed args should get FuncPtg.<p/>
+ * number of args should get FuncVarPtg, functions with fixed args should get FuncPtg.<p>
*
* Prior to the fix for bug 44675 POI would encode FuncVarPtg for all functions. In many cases
* Excel tolerates the wrong Ptg and evaluates the formula OK (e.g. SIN), but in some cases
/**
* Zero is not a valid row number so cell references like 'A0' are not valid.
* Actually, they should be treated like defined names.
- * <br/>
+ * <br>
* In addition, leading zeros (on the row component) should be removed from cell
* references during parsing.
*/
/**
* The example file attached to bugzilla 45046 is a clear example of Name records being present
- * without an External Book (SupBook) record. Excel has no trouble reading this file.<br/>
+ * without an External Book (SupBook) record. Excel has no trouble reading this file.<br>
* TODO get OOO documentation updated to reflect this (that EXTERNALBOOK is optional).
*
* It's not clear what exact steps need to be taken in Excel to create such a workbook
}
/**
* Prior to bug 45066, POI would get the estimated sheet size wrong
- * when an <tt>UncalcedRecord</tt> was present.<p/>
+ * when an <tt>UncalcedRecord</tt> was present.<p>
*/
@Test
public void testUncalcSize_bug45066() {
/**
* Prior to bug 45145 <tt>RowRecordsAggregate</tt> and <tt>ValueRecordsAggregate</tt> could
* sometimes occur in reverse order. This test reproduces one of those situations and makes
- * sure that RRA comes before VRA.<br/>
+ * sure that RRA comes before VRA.<br>
*
* The code here represents a normal POI use case where a spreadsheet is created from scratch.
*/
/**
* Bugzilla 47479 was due to an apparent error in OOO which (as of version 3.0.1)
- * writes the <i>value</i> field of BOOLERR records as 2 bytes instead of 1.<br/>
+ * writes the <i>value</i> field of BOOLERR records as 2 bytes instead of 1.<br>
* Coincidentally, the extra byte written is zero, which is exactly the value
* required by the <i>isError</i> field. This probably why Excel seems to have
* no problem. OOO does not have the same bug for error values (which wouldn't
/**
* test read-constructor-then-serialize for a double-byte external reference 'UNC-Volume' style
* string
- * <p/>
+ * <p>
* @throws IOException
*/
public void testReadWriteDBExtRefUncVol() throws IOException
/**
* test read-constructor-then-serialize for a double-byte self-reference style string
- * <p/>
+ * <p>
* @throws IOException
*/
public void testReadWriteDBSelfRef() throws IOException
/**
* test read-constructor-then-serialize for a single-byte self-reference style string
- * <p/>
+ * <p>
* @throws IOException
*/
public void testReadWriteSBSelfRef() throws IOException
public void testVisioDrawing_bug46199() {
/**
- * taken from ftPictFmla sub-record in attachment 22860 (stream offset 0x768F).<br/>
+ * taken from ftPictFmla sub-record in attachment 22860 (stream offset 0x768F).<br>
* Note that the since the string length is zero, there is no unicode flag byte
*/
byte[] data46199 = hr(
public final class TestRecordInputStream extends TestCase {
/**
- * Data inspired by attachment 22626 of bug 45866<br/>
+ * Data inspired by attachment 22626 of bug 45866<br>
* A unicode string of 18 chars, with a continue record where the compression flag changes
*/
private static final String HED_DUMP1 = ""
* record 8224 bytes long instead of 70.
* (An aside: It seems more than a coincidence that this problem creates a record of exactly
* {@link RecordInputStream#MAX_RECORD_DATA_SIZE} but not enough is understood about
- * subrecords to explain this.)<br/>
+ * subrecords to explain this.)<br>
*
* Excel reads files with this excessive padding OK. It also truncates the over-sized
* ObjRecord back to the proper size. POI should do the same.
/**
* Sometimes a {@link StringRecord} appears after a {@link FormulaRecord} even though the
* formula has evaluated to a text value. This might be more likely to occur when the formula
- * <i>can</i> evaluate to a text value.<br/>
+ * <i>can</i> evaluate to a text value.<br>
* Bug 46213 attachment 22874 has such an extra {@link StringRecord} at stream offset 0x5765.
* This file seems to open in Excel (2007) with no trouble. When it is re-saved, Excel omits
* the extra record. POI should do the same.
* Prior to Aug 2008, POI would re-serialize spreadsheets with {@link ArrayRecord}s or
* {@link TableRecord}s with those records out of order. Similar to
* {@link SharedFormulaRecord}s, these records should appear immediately after the first
- * {@link FormulaRecord}s that they apply to (and only once).<br/>
+ * {@link FormulaRecord}s that they apply to (and only once).<br>
*/
@Test
public void testArraysAndTables() throws Exception {
/**
* This problem was noted as the overt symptom of bug 46280. The logic for skipping {@link
* UnknownRecord}s in the constructor {@link RowRecordsAggregate} did not allow for the
- * possibility of tailing {@link ContinueRecord}s.<br/>
+ * possibility of tailing {@link ContinueRecord}s.<br>
* The functionality change being tested here is actually not critical to the overall fix
* for bug 46280, since the fix involved making sure the that offending <i>PivotTable</i>
- * records do not get into {@link RowRecordsAggregate}.<br/>
+ * records do not get into {@link RowRecordsAggregate}.<br>
* This fix in {@link RowRecordsAggregate} was implemented anyway since any {@link
* UnknownRecord} has the potential of being 'continued'.
*/
* ranges. The first sheet has one row and one column shared formula ranges which intersect.
* The second sheet has two column shared formula ranges - one contained within the other.
* These shared formula ranges were created by fill-dragging a single cell formula across the
- * desired region. The larger shared formula ranges were placed first.<br/>
+ * desired region. The larger shared formula ranges were placed first.<br>
*
* There are probably many ways to produce similar effects, but it should be noted that Excel
* is quite temperamental in this regard. Slight variations in technique can cause the shared
* the bugs depended on the {@link SharedFormulaRecord}s being searched in a particular order.
* At the time of writing of the test, the order was being determined by the call to {@link
* Collection#toArray(Object[])} on {@link HashMap#values()} where the items in the map were
- * using default {@link Object#hashCode()}<br/>
+ * using default {@link Object#hashCode()}<br>
*/
private static final int MAX_ATTEMPTS=5;
/**
* This bug occurs for similar reasons to the bug in {@link #testPartiallyOverlappingRanges()}
- * but the symptoms are much uglier - serialization fails with {@link NullPointerException}.<br/>
+ * but the symptoms are much uglier - serialization fails with {@link NullPointerException}.<br>
*/
public void testCompletelyOverlappedRanges() {
Record[] records;
* records. Prior to this fix, POI would attempt to use the upper left corner of the
* shared formula range as the locator cell. The correct cell to use is the 'first cell'
* in the shared formula group which is not always the top left cell. This is possible
- * because shared formula groups may be sparse and may overlap.<br/>
+ * because shared formula groups may be sparse and may overlap.<br>
*
* Two existing sample files (15228.xls and ex45046-21984.xls) had similar issues.
* These were not explored fully, but seem to be fixed now.
* Sometimes the 'shared formula' flag (<tt>FormulaRecord.isSharedFormula()</tt>) is set when
* there is no corresponding SharedFormulaRecord available. SharedFormulaRecord definitions do
* not span multiple sheets. They are are only defined within a sheet, and thus they do not
- * have a sheet index field (only row and column range fields).<br/>
+ * have a sheet index field (only row and column range fields).<br>
* So it is important that the code which locates the SharedFormulaRecord for each
* FormulaRecord does not allow matches across sheets.</br>
*
* Prior to bugzilla 44449 (Feb 2008), POI <tt>ValueRecordsAggregate.construct(int, List)</tt>
* allowed <tt>SharedFormulaRecord</tt>s to be erroneously used across sheets. That incorrect
- * behaviour is shown by this test.<p/>
+ * behaviour is shown by this test.<p>
*
* <b>Notes on how to produce the test spreadsheet</b>:</p>
* The setup for this test (AbnormalSharedFormulaFlag.xls) is rather fragile, insomuchas
- * re-saving the file (either with Excel or POI) clears the flag.<br/>
+ * re-saving the file (either with Excel or POI) clears the flag.<br>
* <ol>
* <li>A new spreadsheet was created in Excel (File | New | Blank Workbook).</li>
* <li>Sheet3 was deleted.</li>
* <li>The spreadsheet was saved as AbnormalSharedFormulaFlag.xls.</li>
* </ol>
* Prior to the row delete action the spreadsheet has two <tt>SharedFormulaRecord</tt>s. One
- * for each sheet. To expose the bug, the shared formulas have been made to overlap.<br/>
+ * for each sheet. To expose the bug, the shared formulas have been made to overlap.<br>
* The row delete action (as described here) seems to to delete the
- * <tt>SharedFormulaRecord</tt> from Sheet1 (but not clear the 'shared formula' flags.<br/>
+ * <tt>SharedFormulaRecord</tt> from Sheet1 (but not clear the 'shared formula' flags.<br>
* There are other variations on this theme to create the same effect.
*
*/
/**
* When evaluating defined names, POI has to decide whether it is capable. Currently
- * (May2009) POI only supports simple cell and area refs.<br/>
+ * (May2009) POI only supports simple cell and area refs.<br>
* The sample spreadsheet (bugzilla attachment 23508) had a name flagged as 'complex'
* which contained a simple area ref. It is not clear what the 'complex' flag is used
* for but POI should look elsewhere to decide whether it can evaluate the name.
public final class TestHSSFName extends BaseTestNamedRange {
/**
- * For manipulating the internals of {@link HSSFName} during testing.<br/>
+ * For manipulating the internals of {@link HSSFName} during testing.<br>
* Some tests need a {@link NameRecord} with unusual state, not normally producible by POI.
* This method achieves the aims at low cost without augmenting the POI usermodel api.
* @return a reference to the wrapped {@link NameRecord}
import org.junit.Test;
/**
- * A Test case for a test utility class.<br/>
+ * A Test case for a test utility class.<br>
* Okay, this may seem strange but I need to test my test logic.
*
* @author Glen Stampoultzis (glens at apache.org)
import org.junit.runners.Suite;
/**
- * Tests for org.apache.poi.poifs.filesystem<br/>
+ * Tests for org.apache.poi.poifs.filesystem<br>
*/
@RunWith(Suite.class)
@Suite.SuiteClasses({
import org.junit.runners.Suite;
/**
- * Tests for org.apache.poi.poifs.property<br/>
+ * Tests for org.apache.poi.poifs.property<br>
*/
@RunWith(Suite.class)
@Suite.SuiteClasses({
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
/**
- * Tests for org.apache.poi.poifs.storage<br/>
+ * Tests for org.apache.poi.poifs.storage<br>
*/
@RunWith(Suite.class)
@Suite.SuiteClasses({
import org.apache.poi.util.IOUtils;
/**
- * Test utility class.<br/>
+ * Test utility class.<br>
*
* Creates raw <code>byte[]</code> data from hex-dump String arrays.
*
}
/**
- * Development time utility method.<br/>
+ * Development time utility method.<br>
* Transforms a byte array into hex-dump String lines in java source code format.
*/
public static void dumpData(byte[] data) {
}
/**
- * Development time utility method.<br/>
+ * Development time utility method.<br>
* Confirms that the specified byte array is equivalent to the hex-dump String lines.
*/
public static void confirmEqual(byte[] expected, String[] hexDataLines) {
* This class is a base class for spreadsheet-based tests, such as are used for
* cell formatting. This reads tests from the spreadsheet, as well as reading
* flags that can be used to paramterize these tests.
- * <p/>
+ * <p>
* Each test has four parts: The expected result (column A), the format string
* (column B), the value to format (column C), and a comma-separated list of
* categores that this test falls in. Normally all tests are run, but if the
import org.apache.poi.ss.formula.eval.ValueEval;
/**
- * Tests should extend this class if they need to track the internal working of the {@link WorkbookEvaluator}.<br/>
+ * Tests should extend this class if they need to track the internal working of the {@link WorkbookEvaluator}.<br>
*
* Default method implementations all do nothing
*
private static final EvalInstances EI = null;
/**
- * Test for bug observable at svn revision 692218 (Sep 2008)<br/>
+ * Test for bug observable at svn revision 692218 (Sep 2008)<br>
* The value from a 1x1 area should be taken immediately, regardless of srcRow and srcCol
*/
public void test1x1AreaOperand() {
* Bug 47198 involved a formula "-A1=0" where cell A1 was 0.0.
* Excel evaluates "-A1=0" to TRUE, not because it thinks -0.0==0.0
* but because "-A1" evaluated to +0.0
- * <p/>
+ * <p>
* Note - the original diagnosis of bug 47198 was that
* "Excel considers -0.0 to be equal to 0.0" which is NQR
* See {@link TestMinusZeroResult} for more specific tests regarding -0.0.
import static org.junit.Assert.fail;
/**
- * Miscellaneous tests for bugzilla entries.<p/> The test name contains the
+ * Miscellaneous tests for bugzilla entries.<p> The test name contains the
* bugzilla bug id.
*/
public final class TestFormulaBugs {
/**
- * Bug 27349 - VLOOKUP with reference to another sheet.<p/> This test was
+ * Bug 27349 - VLOOKUP with reference to another sheet.<p> This test was
* added <em>long</em> after the relevant functionality was fixed.
*/
@Test
}
/**
- * Bug 27405 - isnumber() formula always evaluates to false in if statement<p/>
+ * Bug 27405 - isnumber() formula always evaluates to false in if statement<p>
*
* seems to be a duplicate of 24925
*/
}
/**
- * Bug 42448 - Can't parse SUMPRODUCT(A!C7:A!C67, B8:B68) / B69 <p/>
+ * Bug 42448 - Can't parse SUMPRODUCT(A!C7:A!C67, B8:B68) / B69 <p>
*/
@Test
public void test42448() throws IOException {
import junit.framework.AssertionFailedError;
/**
- * Tests formulas and operators as loaded from a test data spreadsheet.<p/>
+ * Tests formulas and operators as loaded from a test data spreadsheet.<p>
* This class does not test implementors of <tt>Function</tt> and <tt>OperationEval</tt> in
* isolation. Much of the evaluation engine (i.e. <tt>HSSFFormulaEvaluator</tt>, ...) gets
* exercised as well. Tests for bug fixes and specific/tricky behaviour can be found in the
* Negative zero is not easy to observe in Excel, since it is usually converted to 0.0.
* (Note - the results of XLL add-in functions don't seem to be converted, so they are one
* reliable avenue to observe Excel's treatment of '-0.0' as an operand.)
- * <p/>
+ * <p>
* POI attempts to emulate Excel faithfully, so this class tests
* two aspects of '-0.0' in formula evaluation:
* <ol>
public final class TestUnaryPlusEval extends TestCase {
/**
- * Test for bug observable at svn revision 618865 (5-Feb-2008)<br/>
+ * Test for bug observable at svn revision 618865 (5-Feb-2008)<br>
* The code for handling column operands had been copy-pasted from the row handling code.
*/
public void testColumnOperand() {
* As of Sep 2009, the Forked evaluator can update values from existing cells (this is because
* the underlying 'master' cell is used as a key into the calculation cache. Prior to the fix
* for this bug, an attempt to update a missing cell would result in NPE. This junit tests for
- * a more meaningful error message.<br/>
+ * a more meaningful error message.<br>
*
* An alternate solution might involve allowing empty cells to be created as necessary. That
* was considered less desirable because so far, the underlying 'master' workbook is strictly
/**
* Invokes the specified function with the arguments.
- * <p/>
+ * <p>
* Assumes that the cell coordinate parameters of
* <code>Function.evaluate(args, srcCellRow, srcCellCol)</code>
* are not required.
- * <p/>
+ * <p>
* This method cannot be used for confirming error return codes. Any non-numeric evaluation
* result causes the current junit test to fail.
*/
}
/**
* Invokes the specified operator with the arguments.
- * <p/>
+ * <p>
* This method cannot be used for confirming error return codes. Any non-numeric evaluation
* result causes the current junit test to fail.
*/
import org.junit.runners.Parameterized.Parameters;
/**
- * Tests CODE() as loaded from a test data spreadsheet.<p/>
+ * Tests CODE() as loaded from a test data spreadsheet.<p>
*/
public class TestCodeFunctionsFromSpreadsheet extends BaseTestFunctionsFromSpreadsheet {
@Parameters(name="{0}")
import org.junit.runners.Parameterized.Parameters;
/**
- * Tests COMPLEX() as loaded from a test data spreadsheet.<p/>
+ * Tests COMPLEX() as loaded from a test data spreadsheet.<p>
*/
public class TestComplexFunctionsFromSpreadsheet extends BaseTestFunctionsFromSpreadsheet {
@Parameters(name="{0}")
import org.junit.runners.Parameterized.Parameters;
/**
- * Tests DELTA() as loaded from a test data spreadsheet.<p/>
+ * Tests DELTA() as loaded from a test data spreadsheet.<p>
*/
public class TestDeltaFunctionsFromSpreadsheet extends BaseTestFunctionsFromSpreadsheet {
@Parameters(name="{0}")
import org.junit.runners.Parameterized.Parameters;
/**
- * Tests FactDouble() as loaded from a test data spreadsheet.<p/>
+ * Tests FactDouble() as loaded from a test data spreadsheet.<p>
*/
public class TestFactDoubleFunctionsFromSpreadsheet extends BaseTestFunctionsFromSpreadsheet {
@Parameters(name="{0}")
import org.junit.runners.Parameterized.Parameters;
/**
- * Tests ImReal() as loaded from a test data spreadsheet.<p/>
+ * Tests ImReal() as loaded from a test data spreadsheet.<p>
*/
public class TestImRealFunctionsFromSpreadsheet extends BaseTestFunctionsFromSpreadsheet {
@Parameters(name="{0}")
import org.junit.runners.Parameterized.Parameters;
/**
- * Tests Imaginary() as loaded from a test data spreadsheet.<p/>
+ * Tests Imaginary() as loaded from a test data spreadsheet.<p>
*/
public class TestImaginaryFunctionsFromSpreadsheet extends BaseTestFunctionsFromSpreadsheet {
@Parameters(name="{0}")
* Tests for the INDEX() function.</p>
*
* This class contains just a few specific cases that directly invoke {@link Index},
- * with minimum overhead.<br/>
+ * with minimum overhead.<br>
* Another test: {@link TestIndexFunctionFromSpreadsheet} operates from a higher level
- * and has far greater coverage of input permutations.<br/>
+ * and has far greater coverage of input permutations.<br>
*
* @author Josh Micich
*/
}
/**
- * Tests expressions like "INDEX(A1:C1,,2)".<br/>
+ * Tests expressions like "INDEX(A1:C1,,2)".<br>
* This problem was found while fixing bug 47048 and is observable up to svn r773441.
*/
public void testMissingArg() {
import org.junit.runners.Parameterized.Parameters;
/**
- * Tests INDEX() as loaded from a test data spreadsheet.<p/>
+ * Tests INDEX() as loaded from a test data spreadsheet.<p>
*/
public final class TestIndexFunctionFromSpreadsheet extends BaseTestFunctionsFromSpreadsheet {
@Parameters(name="{0}")
import org.junit.runners.Parameterized.Parameters;
/**
- * Tests INDIRECT() as loaded from a test data spreadsheet.<p/>
+ * Tests INDIRECT() as loaded from a test data spreadsheet.<p>
*
* Tests for bug fixes and specific/tricky behaviour can be found in the corresponding test class
* (<tt>TestXxxx</tt>) of the target (<tt>Xxxx</tt>) implementor, where execution can be observed
import org.junit.runners.Parameterized.Parameters;
/**
- * Tests lookup functions (VLOOKUP, HLOOKUP, LOOKUP, MATCH) as loaded from a test data spreadsheet.<p/>
+ * Tests lookup functions (VLOOKUP, HLOOKUP, LOOKUP, MATCH) as loaded from a test data spreadsheet.<p>
* These tests have been separated from the common function and operator tests because the lookup
* functions have more complex test cases and test data setup.
*
/**
- * Ensures that the match_type argument can be an <tt>AreaEval</tt>.<br/>
+ * Ensures that the match_type argument can be an <tt>AreaEval</tt>.<br>
* Bugzilla 44421
*/
public void testMatchArgTypeArea() {
import org.junit.runners.Parameterized.Parameters;
/**
- * Tests Match functions as loaded from a test data spreadsheet.<p/>
+ * Tests Match functions as loaded from a test data spreadsheet.<p>
*
* Tests for bug fixes and specific/tricky behaviour can be found in the corresponding test class
* (<tt>TestXxxx</tt>) of the target (<tt>Xxxx</tt>) implementor, where execution can be observed
import org.junit.runners.Parameterized.Parameters;
/**
- * Tests QUOTIENT() as loaded from a test data spreadsheet.<p/>
+ * Tests QUOTIENT() as loaded from a test data spreadsheet.<p>
*/
public class TestQuotientFunctionsFromSpreadsheet extends BaseTestFunctionsFromSpreadsheet {
@Parameters(name="{0}")
import org.junit.runners.Parameterized.Parameters;
/**
- * Tests REPT() as loaded from a test data spreadsheet.<p/>
+ * Tests REPT() as loaded from a test data spreadsheet.<p>
*/
public class TestReptFunctionsFromSpreadsheet extends BaseTestFunctionsFromSpreadsheet {
@Parameters(name="{0}")
import org.junit.runners.Parameterized.Parameters;
/**
- * Tests Roman() as loaded from a test data spreadsheet.<p/>
+ * Tests Roman() as loaded from a test data spreadsheet.<p>
*/
public class TestRomanFunctionsFromSpreadsheet extends BaseTestFunctionsFromSpreadsheet {
@Parameters(name="{0}")
import org.junit.runners.Parameterized.Parameters;
/**
- * Tests WeekNum() as loaded from a test data spreadsheet.<p/>
+ * Tests WeekNum() as loaded from a test data spreadsheet.<p>
*/
public class TestWeekNumFunctionsFromSpreadsheet extends BaseTestFunctionsFromSpreadsheet {
@Parameters(name="{0}")
import org.junit.runners.Parameterized.Parameters;
/**
- * Tests WeekNum() as loaded from a test data 2013 excel spreadsheet.<p/>
+ * Tests WeekNum() as loaded from a test data 2013 excel spreadsheet.<p>
*/
public class TestWeekNumFunctionsFromSpreadsheet2013 extends BaseTestFunctionsFromSpreadsheet {
@Parameters(name="{0}")
* It is easy enough to re-create the the same data (by not setting the formula). Excel
* seems to gracefully remove this uninitialized name record. It would be nice if POI
* could do the same, but that would involve adjusting subsequent name indexes across
- * all formulas. <p/>
+ * all formulas. <p>
*
* For the moment, POI has been made to behave more sensibly with uninitialized name
* records.
import org.junit.Test;
/**
- * Common superclass for testing usermodel API for array formulas.<br/>
+ * Common superclass for testing usermodel API for array formulas.<br>
* Formula evaluation is not tested here.
*
* @author Yegor Kozlov
* In other places (e.g. {@link NumberRecord}, {@link NumberPtg}, array items (via {@link
* ConstantValueParser}), there seems to be no special NaN translation scheme. If a NaN bit
* pattern is somehow encoded into any of these places Excel actually attempts to render the
- * values as a plain number. That is the unusual functionality that this method is testing.<p/>
+ * values as a plain number. That is the unusual functionality that this method is testing.<p>
*
* There are multiple encodings (bit patterns) for NaN, and CPUs and applications can convert
* to a preferred NaN encoding (Java prefers <tt>0x7FF8000000000000L</tt>). Besides the
* Observed NaN behaviour on HotSpot/Windows:
* <tt>Double.longBitsToDouble()</tt> will set one bit 51 (the NaN signaling flag) if it isn't
* already. <tt>Double.doubleToLongBits()</tt> will return a double with bit pattern
- * <tt>0x7FF8000000000000L</tt> for any NaN bit pattern supplied.<br/>
- * Differences are likely to be observed with other architectures.<p/>
+ * <tt>0x7FF8000000000000L</tt> for any NaN bit pattern supplied.<br>
+ * Differences are likely to be observed with other architectures.<p>
*
- * <p/>
+ * <p>
* The few test case examples calling this method represent functionality which may not be
* important for POI to support.
*/
import org.junit.runners.Suite;
/**
- * Test suite for all sub-packages of org.apache.poi.util<br/>
+ * Test suite for all sub-packages of org.apache.poi.util<br>
*/
@RunWith(Suite.class)
@Suite.SuiteClasses({