private Property evalAddition(Numeric op1, Numeric op2) { if (op1 == null || op2 == null) { throw new PropertyException("Non numeric operand in addition"); } return(new NumericProperty(op1.add(op2))); }
public override Property Eval(Property[] args, PropertyInfo pInfo) { Numeric distance = pInfo.getPropertyList().GetProperty("provisional-distance-between-starts").GetNumeric(); FObj item = pInfo.getFO(); while (item != null && !(item is ListItem)) { item = item.getParent(); } if (item == null) { throw new PropertyException("body-start() called from outside an fo:list-item"); } Numeric startIndent = item.properties.GetProperty("start-indent").GetNumeric(); return(new NumericProperty(distance.add(startIndent))); }
private Property evalAddition(Numeric op1, Numeric op2) { if (op1 == null || op2 == null) { throw new PropertyException("Non numeric operand in addition"); } return new NumericProperty(op1.add(op2)); }