}
public static int getPropertyId(String name) {
- Integer i = (Integer) s_htPropNames.get(name);
- if (i == null)
- return -1;
- return i.intValue();
+ // check to see if base.compound or just base property
+ int sepchar = name.indexOf('.');
+
+ if (sepchar > -1) {
+ Integer baseId = (Integer) s_htPropNames.get(name.substring(0, sepchar));
+ if (baseId == null) {
+ return -1;
+ } else {
+ int cmpdId = getSubPropertyId(name.substring(sepchar + 1));
+ if (cmpdId == -1) {
+ return -1;
+ } else {
+ return baseId.intValue() + cmpdId;
+ }
+ }
+ } else {
+ Integer baseId = (Integer) s_htPropNames.get(name);
+ if (baseId == null)
+ return -1;
+ return baseId.intValue();
+ }
}
public static int getSubPropertyId(String name) {
import org.apache.fop.fo.properties.CommonBorderAndPadding;
import org.apache.fop.fo.properties.CommonMarginInline;
import org.apache.fop.fo.properties.CommonRelativePosition;
-//import org.apache.fop.fo.properties.FOPropertyMapping;
+import org.apache.fop.fo.properties.FOPropertyMapping;
import org.apache.fop.fo.properties.LeaderPattern;
import org.apache.fop.fonts.Font;
public int getLength(String prop, int dim) {
int length;
-// int propId = FOPropertyMapping.getPropertyId(prop);
-// System.out.println("prop/propID = " + prop + " " + propId);
- Length maxlength = propertyList.get(prop).getLength();
+ int propId = FOPropertyMapping.getPropertyId(prop);
+ Length maxlength = propertyList.get(propId).getLength();
if (maxlength instanceof PercentLength) {
length = (int)(((PercentLength)maxlength).value()
* dim);