private final String formula2;
private final OperatorEnum operator;
private final ConditionType type;
- // cached for performance, to avoid reading the XMLBean every time a conditinally formatted cell is rendered
+ // cached for performance, to avoid reading the XMLBean every time a conditionally formatted cell is rendered
private final ExcelNumberFormat numberFormat;
/**
* Double.NaN. Else returns the value that occurs most times and if there is
* a tie, returns the first such value.
*
- * @param v
+ * @param v An array of values on which the mode is computed.
*/
public static double evaluate(double[] v) throws EvaluationException {
if (v.length < 2) {
* A regex to find locale patterns like [$$-1009] and [$?-452].
* Note that we don't currently process these into locales
*/
- private static final Pattern localePatternGroup = Pattern.compile("(\\[\\$[^-\\]]*-[0-9A-Z]+\\])");
+ private static final Pattern localePatternGroup = Pattern.compile("(\\[\\$[^-\\]]*-[0-9A-Z]+])");
/**
* A regex to match the colour formattings rules.
*/
public CellStyle getColumnStyle(int column);
- /**
+ /*
* Sets the CellStyle that applies to the given
* (0 based) column.
*/
/**
* Removes the page break at the indicated row
- * @param row
+ * @param row The 0-based index of the row.
*/
void removeRowBreak(int row);
/**
* Removes a page break at the indicated column
- * @param column
+ * @param column The 0-based index of the column.
*/
void removeColumnBreak(int column);
/**
* Get a Hyperlink in this sheet anchored at row, column
*
- * @param row
- * @param column
+ * @param row The 0-based index of the row to look at.
+ * @param column The 0-based index of the column to look at.
* @return hyperlink if there is a hyperlink anchored at row, column; otherwise returns null
*/
public Hyperlink getHyperlink(int row, int column);
* If both numbers are subnormal, Excel seems to use standard comparison rules
*/
private static int compareSubnormalNumbers(long fracA, long fracB, boolean isNegative) {
- int cmp = Long.compare(fracA, fracB);
-
- return isNegative ? -cmp : cmp;
+ if(isNegative) {
+ return Long.compare(fracB, fracA);
+ } else {
+ return Long.compare(fracA, fracB);
+ }
}
-
-
/**
* Usually any normal number is greater (in magnitude) than any subnormal number.
* However there are some anomalous cases around the threshold where Excel produces screwy results
return isNegative ? -1 : +1;
}
-
-
/**
* for formatting double values in error messages
*/
protected CommandDefinition[] commandDefinitions;
/** The command+value pairs we hold */
private Command[] commands;
- /** The blocks (if any) we hold */
+ /* The blocks (if any) we hold */
//private Block[] blocks
/** The name of the chunk, as found from the commandDefinitions */
private String name;
public CommandDefinition getDefinition() { return definition; }
public Object getValue() { return value; }
}
- /**
+ /*
* A special kind of command that is an artificat of how we
* process CommandDefinitions, and so doesn't actually exist
* in the chunk
{
int offset = wordDocumentStream.size();
- int len = _sections.size();
+ //int len = _sections.size();
PlexOfCps plex = new PlexOfCps(SED_SIZE);
for (SEPX sepx : _sections) {