// text-align-last
m = new EnumProperty.Maker(PR_TEXT_ALIGN_LAST) {
public Property get(int subpropId, PropertyList propertyList,
boolean bTryInherit, boolean bTryDefault) throws PropertyException {
Property p = super.get(subpropId, propertyList, bTryInherit, bTryDefault);
if (p != null && p.getEnum() == EN_RELATIVE) {
//The default may have been returned, so check inherited value
p = propertyList.getNearestSpecified(PR_TEXT_ALIGN_LAST);
if (p.getEnum() == EN_RELATIVE) {
return calcRelative(propertyList);
}
}
return p;
}
private Property calcRelative(PropertyList propertyList) throws PropertyException {
Property corresponding = propertyList.get(PR_TEXT_ALIGN);
if (corresponding == null) {
return null;
}
int correspondingValue = corresponding.getEnum();
if (correspondingValue == EN_JUSTIFY) {
return getEnumProperty(EN_START, "START");
} else if (correspondingValue == EN_END) {
return getEnumProperty(EN_END, "END");
} else if (correspondingValue == EN_START) {