*/
public Property get(int subpropId, PropertyList propertyList,
boolean tryInherit, boolean tryDefault)
throws PropertyException {
Property p = super.get(0, propertyList, tryInherit, tryDefault);
TableFObj fo = (TableFObj) propertyList.getFObj();
TableFObj parent = (TableFObj) propertyList.getParentFObj();
if (p != null) {
int columnIndex = p.getNumeric().getValue();
if (columnIndex <= 0) {
fo.getLogger().warn("Specified negative or zero value for "
+ "column-number on " + fo.getName() + ": "
+ columnIndex + " forced to "
+ parent.getCurrentColumnIndex());
return new NumberProperty(parent.getCurrentColumnIndex());
}
double tmpIndex = p.getNumeric().getNumericValue();
if (tmpIndex - columnIndex > 0.0) {
columnIndex = (int) Math.round(tmpIndex);
fo.getLogger().warn("Rounding specified column-number of "
+ tmpIndex + " to " + columnIndex);
return new NumberProperty(columnIndex);
}
/* if column-number was explicitly specified, force the
* parent's current column index to the specified value,
* so that the updated index will be the correct initial
* value for the next cell/column (see Rec 7.26.8)
*/
if (propertyList.getExplicit(Constants.PR_COLUMN_NUMBER) != null) {
parent.setCurrentColumnIndex(p.getNumeric().getValue());
}
}
return p;
}