diff options
author | Finn Bock <bckfnn@apache.org> | 2005-08-25 18:58:43 +0000 |
---|---|---|
committer | Finn Bock <bckfnn@apache.org> | 2005-08-25 18:58:43 +0000 |
commit | 2e3466e723a43462a4899357184f40518a988511 (patch) | |
tree | a7ea7e4928ff05d3b60d7ce7b775ee9f2d3e89cd /src/java/org | |
parent | 73aef5739f02e0d4fcaebe2d0b2d99d81bbb332a (diff) | |
download | xmlgraphics-fop-2e3466e723a43462a4899357184f40518a988511.tar.gz xmlgraphics-fop-2e3466e723a43462a4899357184f40518a988511.zip |
Fix a bug where the specified value was inherite for percentages on
line-height. It is only for numbers that the specified is inherited.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@240118 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org')
-rw-r--r-- | src/java/org/apache/fop/fo/FOPropertyMapping.java | 2 | ||||
-rw-r--r-- | src/java/org/apache/fop/fo/properties/LineHeightPropertyMaker.java | 14 |
2 files changed, 4 insertions, 12 deletions
diff --git a/src/java/org/apache/fop/fo/FOPropertyMapping.java b/src/java/org/apache/fop/fo/FOPropertyMapping.java index 5cf6d2bdc..4b0d50bc6 100644 --- a/src/java/org/apache/fop/fo/FOPropertyMapping.java +++ b/src/java/org/apache/fop/fo/FOPropertyMapping.java @@ -1587,7 +1587,7 @@ public class FOPropertyMapping implements Constants { m.useGeneric(genericSpace); m.setInherited(true); m.setDefault("normal", true); - m.addKeyword("normal", "1.2em"); + m.addKeyword("normal", "1.2"); m.setPercentBase(LengthBase.FONTSIZE); addPropertyMaker("line-height", m); diff --git a/src/java/org/apache/fop/fo/properties/LineHeightPropertyMaker.java b/src/java/org/apache/fop/fo/properties/LineHeightPropertyMaker.java index 6c2da7dc3..e1fa1215a 100644 --- a/src/java/org/apache/fop/fo/properties/LineHeightPropertyMaker.java +++ b/src/java/org/apache/fop/fo/properties/LineHeightPropertyMaker.java @@ -42,17 +42,6 @@ public class LineHeightPropertyMaker extends SpaceProperty.Maker { } /** - * Make a property as normal, and save the specified value. - * @see PropertyMaker#make(PropertyList, String, FObj) - */ - public Property make(PropertyList propertyList, String value, - FObj fo) throws PropertyException { - Property p = super.make(propertyList, value, fo); - p.setSpecifiedValue(checkValueKeywords(value)); - return p; - } - - /** * Recalculate the line-height value based on the nearest specified * value. * @see PropertyMaker#compute(PropertyList) @@ -77,6 +66,9 @@ public class LineHeightPropertyMaker extends SpaceProperty.Maker { Numeric numval = p.getNumeric(); if (numval != null && numval.getDimension() == 0) { p = new PercentLength(numval.getNumericValue(), getPercentBase(fo,propertyList)); + Property spaceProp = super.convertProperty(p, propertyList, fo); + spaceProp.setSpecifiedValue(String.valueOf(numval.getNumericValue())); + return spaceProp; } return super.convertProperty(p, propertyList, fo); } |