* cases, because this function is not implemented
*/
public Property eval(Property[] args,
PropertyInfo pInfo) throws PropertyException {
FObj fo = pInfo.getPropertyList().getFObj();
/* obtain property Id for the property for which the function is being
* evaluated */
int propId = 0;
if (args.length == 0) {
propId = pInfo.getPropertyMaker().getPropId();
} else {
String propName = args[0].getString();
propId = FOPropertyMapping.getPropertyId(propName);
}
/* make sure we have a correct property id ... */
if (propId != -1) {
/* obtain column number for which the function is being evaluated: */
int columnNumber = -1;
int span = 0;
if (fo.getNameId() != Constants.FO_TABLE_CELL) {
// climb up to the nearest cell
do {
fo = (FObj) fo.getParent();
} while (fo.getNameId() != Constants.FO_TABLE_CELL
&& fo.getNameId() != Constants.FO_PAGE_SEQUENCE);
if (fo.getNameId() == Constants.FO_TABLE_CELL) {
//column-number is available on the cell
columnNumber = ((TableCell) fo).getColumnNumber();
span = ((TableCell) fo).getNumberColumnsSpanned();
} else {
//means no table-cell was found...