1 17 18 19 20 package org.apache.fop.fo.properties; 21 22 import org.apache.fop.fo.Constants; 23 import org.apache.fop.fo.PropertyList; 24 import org.apache.fop.fo.expr.PropertyException; 25 26 32 public class WhiteSpaceShorthandParser implements ShorthandParser { 33 34 37 public Property getValueForProperty(int propId, Property property, 38 PropertyMaker maker, PropertyList propertyList) 39 throws PropertyException { 40 switch (property.getEnum()) { 41 case Constants.EN_PRE: 42 switch (propId) { 43 case Constants.PR_LINEFEED_TREATMENT: 44 case Constants.PR_WHITE_SPACE_TREATMENT: 45 return EnumProperty.getInstance(Constants.EN_PRESERVE, "PRESERVE"); 46 case Constants.PR_WHITE_SPACE_COLLAPSE: 47 return EnumProperty.getInstance(Constants.EN_FALSE, "FALSE"); 48 case Constants.PR_WRAP_OPTION: 49 return EnumProperty.getInstance(Constants.EN_NO_WRAP, "NO_WRAP"); 50 default: 51 } 53 case Constants.EN_NO_WRAP: 54 if (propId == Constants.PR_WRAP_OPTION) { 55 return EnumProperty.getInstance(Constants.EN_NO_WRAP, "NO_WRAP"); 56 } 57 case Constants.EN_NORMAL: 58 default: 59 } 61 return null; 62 } 63 64 } 65 | Popular Tags |