cvs commit: xml-fop/src/java/org/apache/fop/fo FOPropertyMapping.java
jeremias2005/03/11 05:33:32 Modified:src/java/org/apache/fop/fo FOPropertyMapping.java Added: src/java/org/apache/fop/fo/properties SpacePropertyMaker.java Log: SpacePropertyMaker to handle conditionality as defined by the spec: "The .conditionality component of any space-before or space-after determined from a margin property is set to "retain"." Revision ChangesPath 1.1 xml-fop/src/java/org/apache/fop/fo/properties/SpacePropertyMaker.java Index: SpacePropertyMaker.java === /* * Copyright 2005 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* $Id: SpacePropertyMaker.java,v 1.1 2005/03/11 13:33:32 jeremias Exp $ */ package org.apache.fop.fo.properties; import org.apache.fop.fo.Constants; import org.apache.fop.fo.PropertyList; import org.apache.fop.fo.expr.PropertyException; /** * Special CorrespondingPropertyMaker that sets the conditionality subproperty * correctly for space-* properties. */ public class SpacePropertyMaker extends CorrespondingPropertyMaker { /** * @param baseMaker base property maker */ public SpacePropertyMaker(PropertyMaker baseMaker) { super(baseMaker); } /** * @see org.apache.fop.fo.properties.CorrespondingPropertyMaker#compute(org.apache.fop.fo.PropertyList) */ public Property compute(PropertyList propertyList) throws PropertyException { Property prop = super.compute(propertyList); if (prop != null && prop instanceof SpaceProperty) { ((SpaceProperty)prop).setConditionality( new EnumProperty(Constants.EN_RETAIN, "RETAIN"), false); } return prop; } } 1.43 +9 -5 xml-fop/src/java/org/apache/fop/fo/FOPropertyMapping.java Index: FOPropertyMapping.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/FOPropertyMapping.java,v retrieving revision 1.42 retrieving revision 1.43 diff -u -r1.42 -r1.43 --- FOPropertyMapping.java7 Feb 2005 16:26:13 - 1.42 +++ FOPropertyMapping.java11 Mar 2005 13:33:32 - 1.43 @@ -45,6 +45,7 @@ import org.apache.fop.fo.properties.Property; import org.apache.fop.fo.properties.PropertyMaker; import org.apache.fop.fo.properties.SpaceProperty; +import org.apache.fop.fo.properties.SpacePropertyMaker; import org.apache.fop.fo.properties.SpacingPropertyMaker; import org.apache.fop.fo.properties.StringProperty; import org.apache.fop.fo.properties.TextDecorationProperty; @@ -52,7 +53,9 @@ /** * This class creates and returns an array of Property.Maker instances - * indexed by the PR_* propId from Constants.java. + * indexed by the PR_* propId from Constants.java. + * + * @todo Check multi-threading safety of the statics below */ public class FOPropertyMapping implements Constants { private static Map s_htPropNames = new HashMap(); @@ -383,8 +386,9 @@ } /** - * Return a (possible cached) enum property based in the enum value. + * Return a (possibly cached) enum property based in the enum value. * @param enum A enum value from Constants.java. + * @param text the text value by which this enum property is known * @return An EnumProperty instance. */ private Property getEnumProperty(int enumValue, String text) { @@ -1216,7 +1220,7 @@ // space-before m = new SpaceProperty.Maker(PR_SPACE_BEFORE); m.useGeneric(genericSpace); -corr = new CorrespondingPropertyMaker(m); +corr = new SpacePropertyMaker(m); corr.setCorresponding(PR_MARGIN_TOP, PR_MARGIN_TOP, PR_MARGIN_RIGHT); corr.setUseParent(true); corr.setRelative(true); @@ -1225,7 +1229,7 @@ // space-after m = new SpaceProperty.Maker(PR_SPACE_AFTER); m.useGeneric(genericSpace); -corr = new CorrespondingPropertyMaker(m); +corr = new SpacePropertyMaker(m); corr.setCorresponding(PR_MARGIN_BOTTOM, PR_MARGIN_BOTTOM, PR_MARGIN_LEFT); corr.setUseParent(true); corr.setRelative(true);
cvs commit: xml-fop/src/java/org/apache/fop/fo FOPropertyMapping.java
jeremias2005/01/24 01:14:37 Modified:src/java/org/apache/fop/fo FOPropertyMapping.java Log: Missing aliases for background-position-*. Missing percent base for height. Revision ChangesPath 1.40 +10 -1 xml-fop/src/java/org/apache/fop/fo/FOPropertyMapping.java Index: FOPropertyMapping.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/FOPropertyMapping.java,v retrieving revision 1.39 retrieving revision 1.40 diff -u -r1.39 -r1.40 --- FOPropertyMapping.java11 Jan 2005 00:07:52 - 1.39 +++ FOPropertyMapping.java24 Jan 2005 09:14:36 - 1.40 @@ -704,12 +704,20 @@ m = new LengthProperty.Maker(PR_BACKGROUND_POSITION_HORIZONTAL); m.setInherited(false); m.setDefault("0%"); +m.addKeyword("left", "0%"); +m.addKeyword("center", "50%"); +m.addKeyword("right", "100%"); +m.setPercentBase(LengthBase.CONTAINING_BOX); addPropertyMaker("background-position-horizontal", m); // background-position-vertical m = new LengthProperty.Maker(PR_BACKGROUND_POSITION_VERTICAL); m.setInherited(false); m.setDefault("0%"); +m.addKeyword("top", "0%"); +m.addKeyword("center", "50%"); +m.addKeyword("bottom", "100%"); +m.setPercentBase(LengthBase.CONTAINING_BOX); addPropertyMaker("background-position-vertical", m); // border-before-color @@ -1434,6 +1442,7 @@ l = new LengthProperty.Maker(PR_HEIGHT); l.setInherited(false); l.addEnum("auto", getEnumProperty(EN_AUTO, "AUTO")); +l.setPercentBase(LengthBase.BLOCK_HEIGHT); l.setDefault("auto"); addPropertyMaker("height", l); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/fo FOPropertyMapping.java
bckfnn 2004/10/29 05:36:50 Modified:src/java/org/apache/fop/fo FOPropertyMapping.java Log: Moved white-space-treatment from shorthands to "block and line related". Revision ChangesPath 1.36 +12 -12xml-fop/src/java/org/apache/fop/fo/FOPropertyMapping.java Index: FOPropertyMapping.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/FOPropertyMapping.java,v retrieving revision 1.35 retrieving revision 1.36 diff -u -r1.35 -r1.36 --- FOPropertyMapping.java29 Oct 2004 11:19:35 - 1.35 +++ FOPropertyMapping.java29 Oct 2004 12:36:50 - 1.36 @@ -1582,6 +1582,17 @@ m.setDefault("treat-as-space"); addPropertyMaker("linefeed-treatment", m); +// white-space-treatment +m = new EnumProperty.Maker(PR_WHITE_SPACE_TREATMENT); +m.setInherited(true); +m.addEnum("ignore", makeEnumProperty(IGNORE, "IGNORE")); +m.addEnum("preserve", makeEnumProperty(PRESERVE, "PRESERVE")); +m.addEnum("ignore-if-before-linefeed", makeEnumProperty(IGNORE_IF_BEFORE_LINEFEED, "IGNORE_IF_BEFORE_LINEFEED")); +m.addEnum("ignore-if-after-linefeed", makeEnumProperty(IGNORE_IF_AFTER_LINEFEED, "IGNORE_IF_AFTER_LINEFEED")); +m.addEnum("ignore-if-surrounding-linefeed", makeEnumProperty(IGNORE_IF_SURROUNDING_LINEFEED, "IGNORE_IF_SURROUNDING_LINEFEED")); +m.setDefault("ignore-if-surrounding-linefeed"); +addPropertyMaker("white-space-treatment", m); + // text-align TODO: make it a StringProperty with enums. m = new EnumProperty.Maker(PR_TEXT_ALIGN); m.setInherited(true); @@ -2660,17 +2671,6 @@ m.addEnum("bottom", makeEnumProperty(BOTTOM, "BOTTOM")); m.setDefault("baseline"); addPropertyMaker("vertical-align", m); - -// white-space-treatment -m = new EnumProperty.Maker(PR_WHITE_SPACE_TREATMENT); -m.setInherited(true); -m.addEnum("ignore", makeEnumProperty(IGNORE, "IGNORE")); -m.addEnum("preserve", makeEnumProperty(PRESERVE, "PRESERVE")); -m.addEnum("ignore-if-before-linefeed", makeEnumProperty(IGNORE_IF_BEFORE_LINEFEED, "IGNORE_IF_BEFORE_LINEFEED")); -m.addEnum("ignore-if-after-linefeed", makeEnumProperty(IGNORE_IF_AFTER_LINEFEED, "IGNORE_IF_AFTER_LINEFEED")); -m.addEnum("ignore-if-surrounding-linefeed", makeEnumProperty(IGNORE_IF_SURROUNDING_LINEFEED, "IGNORE_IF_SURROUNDING_LINEFEED")); -m.setDefault("ignore-if-surrounding-linefeed"); -addPropertyMaker("white-space-treatment", m); // xml:lang m = new ToBeImplementedProperty.Maker(PR_XML_LANG); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/fo FOPropertyMapping.java Constants.java
bckfnn 2004/10/29 03:35:03 Modified:src/java/org/apache/fop/fo FOPropertyMapping.java Constants.java Log: The 'space-treatment' property has long ago been renamed to 'white-space-treatment'. Revision ChangesPath 1.34 +1 -7 xml-fop/src/java/org/apache/fop/fo/FOPropertyMapping.java Index: FOPropertyMapping.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/FOPropertyMapping.java,v retrieving revision 1.33 retrieving revision 1.34 diff -u -r1.33 -r1.34 --- FOPropertyMapping.java29 Oct 2004 10:12:34 - 1.33 +++ FOPropertyMapping.java29 Oct 2004 10:35:03 - 1.34 @@ -1578,12 +1578,6 @@ m.setDefault("treat-as-space"); addPropertyMaker("linefeed-treatment", m); -// space-treatment -m = new ToBeImplementedProperty.Maker(PR_SPACE_TREATMENT); -m.setInherited(true); -m.setDefault("preserve"); -addPropertyMaker("space-treatment", m); - // text-align TODO: make it a StringProperty with enums. m = new EnumProperty.Maker(PR_TEXT_ALIGN); m.setInherited(true); 1.17 +2 -2 xml-fop/src/java/org/apache/fop/fo/Constants.java Index: Constants.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/Constants.java,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- Constants.java29 Oct 2004 09:17:34 - 1.16 +++ Constants.java29 Oct 2004 10:35:03 - 1.17 @@ -326,7 +326,7 @@ int PR_SPACE_BEFORE = 201; int PR_SPACE_END = 202; int PR_SPACE_START = 203; -int PR_SPACE_TREATMENT = 204; +// space-treatment was removed. TODO: re-number properties. int PR_SPAN = 205; int PR_SPEAK = 206; int PR_SPEAK_HEADER = 207; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/fo FOPropertyMapping.java
bckfnn 2004/10/29 03:12:34 Modified:src/java/org/apache/fop/fo FOPropertyMapping.java Log: Style fix. Revision ChangesPath 1.33 +3 -2 xml-fop/src/java/org/apache/fop/fo/FOPropertyMapping.java Index: FOPropertyMapping.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/FOPropertyMapping.java,v retrieving revision 1.32 retrieving revision 1.33 diff -u -r1.32 -r1.33 --- FOPropertyMapping.java29 Oct 2004 09:17:34 - 1.32 +++ FOPropertyMapping.java29 Oct 2004 10:12:34 - 1.33 @@ -1081,7 +1081,8 @@ m.addEnum("semi-expanded", makeEnumProperty(SEMI_EXPANDED, "SEMI_EXPANDED")); m.addEnum("expanded", makeEnumProperty(EXPANDED, "EXPANDED")); m.addEnum("extra-expanded", makeEnumProperty(EXTRA_EXPANDED, "EXTRA_EXPANDED")); -m.addEnum("ultra-expanded", makeEnumProperty(ULTRA_EXPANDED, "ULTRA_EXPANDED"));m.setDefault("normal"); +m.addEnum("ultra-expanded", makeEnumProperty(ULTRA_EXPANDED, "ULTRA_EXPANDED")); +m.setDefault("normal"); addPropertyMaker("font-stretch", m); // font-size-adjust - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/fo FOPropertyMapping.java
bckfnn 2004/10/20 06:17:03 Modified:src/java/org/apache/fop/fo FOPropertyMapping.java Log: Fourth phase of performance improvement. - Set a better base for leader-length percentages. PR: 31699 Revision ChangesPath 1.29 +4 -4 xml-fop/src/java/org/apache/fop/fo/FOPropertyMapping.java Index: FOPropertyMapping.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/FOPropertyMapping.java,v retrieving revision 1.28 retrieving revision 1.29 diff -u -r1.28 -r1.29 --- FOPropertyMapping.java19 Oct 2004 18:42:43 - 1.28 +++ FOPropertyMapping.java20 Oct 2004 13:17:03 - 1.29 @@ -1822,19 +1822,19 @@ sub = new LengthProperty.Maker(CP_MINIMUM); sub.setDefault("0pt"); -sub.setPercentBase(LengthBase.CONTAINING_BOX); +sub.setPercentBase(LengthBase.BLOCK_WIDTH); sub.setByShorthand(true); m.addSubpropMaker(sub); sub = new LengthProperty.Maker(CP_OPTIMUM); sub.setDefault("12.0pt"); -sub.setPercentBase(LengthBase.CONTAINING_BOX); +sub.setPercentBase(LengthBase.BLOCK_WIDTH); sub.setByShorthand(true); m.addSubpropMaker(sub); sub = new LengthProperty.Maker(CP_MAXIMUM); sub.setDefault("100%", true); -sub.setPercentBase(LengthBase.CONTAINING_BOX); +sub.setPercentBase(LengthBase.BLOCK_WIDTH); sub.setByShorthand(true); m.addSubpropMaker(sub); addPropertyMaker("leader-length", m); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/fo FOPropertyMapping.java
bckfnn 2004/10/19 11:42:43 Modified:src/java/org/apache/fop/fo/properties LineHeightPropertyMaker.java src/java/org/apache/fop/fo FOPropertyMapping.java Log: Third phase of performance improvement. - Make line-height a SpaceProperty instead of a LengthProperty. PR: 31699 Revision ChangesPath 1.6 +21 -3 xml-fop/src/java/org/apache/fop/fo/properties/LineHeightPropertyMaker.java Index: LineHeightPropertyMaker.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/properties/LineHeightPropertyMaker.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- LineHeightPropertyMaker.java 27 Feb 2004 17:45:45 - 1.5 +++ LineHeightPropertyMaker.java 19 Oct 2004 18:42:43 - 1.6 @@ -19,8 +19,10 @@ package org.apache.fop.fo.properties; import org.apache.fop.apps.FOPException; +import org.apache.fop.datatypes.Numeric; import org.apache.fop.fo.FObj; import org.apache.fop.fo.PropertyList; +import org.apache.fop.fo.expr.PropertyException; /** * A maker which calculates the line-height property. @@ -31,7 +33,7 @@ * the nearest specified is used to recalculate the line-height. */ -public class LineHeightPropertyMaker extends LengthProperty.Maker { +public class LineHeightPropertyMaker extends SpaceProperty.Maker { /** * Create a maker for line-height. * @param propId the is for linehight. @@ -76,7 +78,22 @@ } return null; } - + +public Property convertProperty(Property p, +PropertyList propertyList, +FObj fo) throws FOPException { +Numeric numval = p.getNumeric(); +if (numval != null && numval.getDimension() == 0) { +try { +p = new PercentLength(numval.getNumericValue(), getPercentBase(fo,propertyList)); +} catch (PropertyException exc) { +// log.error("exception", exc); +} +} +return super.convertProperty(p, propertyList, fo); +} + +/* protected Property convertPropertyDatatype(Property p, PropertyList propertyList, FObj fo) { @@ -86,4 +103,5 @@ } return super.convertPropertyDatatype(p, propertyList, fo); } +*/ } 1.28 +2 -1 xml-fop/src/java/org/apache/fop/fo/FOPropertyMapping.java Index: FOPropertyMapping.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/FOPropertyMapping.java,v retrieving revision 1.27 retrieving revision 1.28 diff -u -r1.27 -r1.28 --- FOPropertyMapping.java10 Oct 2004 21:12:06 - 1.27 +++ FOPropertyMapping.java19 Oct 2004 18:42:43 - 1.28 @@ -1481,6 +1481,7 @@ // line-height m = new LineHeightPropertyMaker(PR_LINE_HEIGHT); +m.useGeneric(genericSpace); m.setInherited(true); m.setDefault("normal", true); m.addKeyword("normal", "1.2em"); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/fo FOPropertyMapping.java
bckfnn 2004/10/10 14:12:06 Modified:src/java/org/apache/fop/fo FOPropertyMapping.java Log: Calculations of indents must use the writing-mode of the parent. See 4.2.3: """ For purposes of this definition, the content-rectangle of an area uses the inline-progression-direction and block-progression-direction of that area; but the border-rectangle, padding-rectangle, and allocation-rectangle use the directions of its parent area. """ Revision ChangesPath 1.27 +3 -1 xml-fop/src/java/org/apache/fop/fo/FOPropertyMapping.java Index: FOPropertyMapping.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/FOPropertyMapping.java,v retrieving revision 1.26 retrieving revision 1.27 diff -u -r1.26 -r1.27 --- FOPropertyMapping.java28 Sep 2004 19:43:39 - 1.26 +++ FOPropertyMapping.java10 Oct 2004 21:12:06 - 1.27 @@ -1211,6 +1211,7 @@ m.setDefault("0pt"); IndentPropertyMaker sCorr = new IndentPropertyMaker(m); sCorr.setCorresponding(PR_MARGIN_LEFT, PR_MARGIN_RIGHT, PR_MARGIN_TOP); +sCorr.setUseParent(true); sCorr.setRelative(true); sCorr.setPaddingCorresponding(new int[] { PR_PADDING_LEFT, PR_PADDING_RIGHT, PR_PADDING_TOP @@ -1226,6 +1227,7 @@ m.setDefault("0pt"); IndentPropertyMaker eCorr = new IndentPropertyMaker(m); eCorr.setCorresponding(PR_MARGIN_RIGHT, PR_MARGIN_LEFT, PR_MARGIN_BOTTOM); +eCorr.setUseParent(true); eCorr.setRelative(true); eCorr.setPaddingCorresponding(new int[] { PR_PADDING_RIGHT, PR_PADDING_LEFT, PR_PADDING_BOTTOM - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/fo FOPropertyMapping.java
spepping2004/09/28 12:43:39 Modified:src/java/org/apache/fop/fo FOPropertyMapping.java Log: Make text-indent inherited Revision ChangesPath 1.26 +2 -2 xml-fop/src/java/org/apache/fop/fo/FOPropertyMapping.java Index: FOPropertyMapping.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/FOPropertyMapping.java,v retrieving revision 1.25 retrieving revision 1.26 diff -u -r1.25 -r1.26 --- FOPropertyMapping.java22 Sep 2004 19:24:07 - 1.25 +++ FOPropertyMapping.java28 Sep 2004 19:43:39 - 1.26 @@ -1561,7 +1561,7 @@ // text-indent m = new LengthProperty.Maker(PR_TEXT_INDENT); -m.setInherited(false); +m.setInherited(true); m.setDefault("0pt"); m.setPercentBase(LengthBase.BLOCK_WIDTH); addPropertyMaker("text-indent", m); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/fo FOPropertyMapping.java
bckfnn 2004/09/22 12:24:07 Modified:src/java/org/apache/fop/fo FOPropertyMapping.java Log: Use the correct default (medium) for border-[top|bottom|left|right]-width. Revision ChangesPath 1.25 +2 -3 xml-fop/src/java/org/apache/fop/fo/FOPropertyMapping.java Index: FOPropertyMapping.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/FOPropertyMapping.java,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- FOPropertyMapping.java13 Sep 2004 08:05:34 - 1.24 +++ FOPropertyMapping.java22 Sep 2004 19:24:07 - 1.25 @@ -303,8 +303,7 @@ genericBorderWidth.addKeyword("thin", "0.5pt"); genericBorderWidth.addKeyword("medium", "1pt"); genericBorderWidth.addKeyword("thick", "2pt"); -// TODO: bckfnn reenable -genericBorderWidth.setDefault("0pt"); +genericBorderWidth.setDefault("medium"); // GenericBorderStyle genericBorderStyle = new EnumProperty.Maker(0); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/fo FOPropertyMapping.java
bckfnn 2004/09/07 07:33:47 Modified:src/java/org/apache/fop/fo FOPropertyMapping.java Log: Support for line-stacking-strategy. Revision ChangesPath 1.21 +6 -3 xml-fop/src/java/org/apache/fop/fo/FOPropertyMapping.java Index: FOPropertyMapping.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/FOPropertyMapping.java,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- FOPropertyMapping.java7 Sep 2004 13:13:26 - 1.20 +++ FOPropertyMapping.java7 Sep 2004 14:33:47 - 1.21 @@ -1494,9 +1494,12 @@ addPropertyMaker("line-height-shift-adjustment", m); // line-stacking-strategy -m = new ToBeImplementedProperty.Maker(PR_LINE_STACKING_STRATEGY); +m = new EnumProperty.Maker(PR_LINE_STACKING_STRATEGY); m.setInherited(true); -m.setDefault("line-height"); +m.addEnum("line-height", makeEnumProperty(LINE_HEIGHT, "LINE_HEIGHT")); +m.addEnum("font-height", makeEnumProperty(FONT_HEIGHT, "FONT_HEIGHT")); +m.addEnum("max-height", makeEnumProperty(MAX_HEIGHT, "MAX_HEIGHT")); +m.setDefault("max-height"); addPropertyMaker("line-stacking-strategy", m); // linefeed-treatment - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/fo FOPropertyMapping.java
bckfnn 2004/09/07 06:13:26 Modified:src/java/org/apache/fop/fo FOPropertyMapping.java Log: Style: removed tab. Revision ChangesPath 1.20 +2 -2 xml-fop/src/java/org/apache/fop/fo/FOPropertyMapping.java Index: FOPropertyMapping.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/FOPropertyMapping.java,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- FOPropertyMapping.java7 Sep 2004 12:42:03 - 1.19 +++ FOPropertyMapping.java7 Sep 2004 13:13:26 - 1.20 @@ -1260,7 +1260,7 @@ m.setInherited(false); m.setDefault("static"); m.addShorthand(s_generics[PR_POSITION]); - addPropertyMaker("relative-position", m); +addPropertyMaker("relative-position", m); } private void createAreaAlignmentProperties() { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/fo FOPropertyMapping.java
bckfnn 2004/09/07 05:42:03 Modified:src/java/org/apache/fop/fo FOPropertyMapping.java Log: Use the position shorthand for [absolute|relative]-position. Revision ChangesPath 1.19 +6 -2 xml-fop/src/java/org/apache/fop/fo/FOPropertyMapping.java Index: FOPropertyMapping.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/FOPropertyMapping.java,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- FOPropertyMapping.java7 Sep 2004 12:23:34 - 1.18 +++ FOPropertyMapping.java7 Sep 2004 12:42:03 - 1.19 @@ -39,6 +39,7 @@ import org.apache.fop.fo.properties.LineHeightPropertyMaker; import org.apache.fop.fo.properties.ListProperty; import org.apache.fop.fo.properties.NumberProperty; +import org.apache.fop.fo.properties.PositionShorthandParser; import org.apache.fop.fo.properties.Property; import org.apache.fop.fo.properties.PropertyMaker; import org.apache.fop.fo.properties.ShorthandParser; @@ -511,6 +512,7 @@ m.addEnum("fixed", makeEnumProperty(FIXED, "FIXED")); m.addEnum("absolute", makeEnumProperty(ABSOLUTE, "ABSOLUTE")); m.setDefault("auto"); +m.addShorthand(s_generics[PR_POSITION]); addPropertyMaker("absolute-position", m); // top @@ -1257,7 +1259,8 @@ m = new ToBeImplementedProperty.Maker(PR_RELATIVE_POSITION); m.setInherited(false); m.setDefault("static"); -addPropertyMaker("relative-position", m); +m.addShorthand(s_generics[PR_POSITION]); + addPropertyMaker("relative-position", m); } private void createAreaAlignmentProperties() { @@ -2503,6 +2506,7 @@ m.addEnum("absolute", makeEnumProperty(ABSOLUTE, "ABSOLUTE")); m.addEnum("fixed", makeEnumProperty(FIXED, "FIXED")); m.setDefault("static"); +m.setDatatypeParser(new PositionShorthandParser()); addPropertyMaker("position", m); // size - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/fo FOPropertyMapping.java
bckfnn 2004/09/07 05:23:34 Modified:src/java/org/apache/fop/fo FOPropertyMapping.java Log: Removed the shorthand from genericBorder[Width|Style]. The shorthands are assigned (in the right order) for the properties of border-[top|bottom|left|right]-[width|style]. Revision ChangesPath 1.18 +1 -3 xml-fop/src/java/org/apache/fop/fo/FOPropertyMapping.java Index: FOPropertyMapping.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/FOPropertyMapping.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- FOPropertyMapping.java7 Sep 2004 12:17:07 - 1.17 +++ FOPropertyMapping.java7 Sep 2004 12:23:34 - 1.18 @@ -305,7 +305,6 @@ genericBorderWidth.addKeyword("thick", "2pt"); // TODO: bckfnn reenable genericBorderWidth.setDefault("0pt"); -genericBorderWidth.addShorthand(s_generics[PR_BORDER_WIDTH]); // GenericBorderStyle genericBorderStyle = new EnumProperty.Maker(0); @@ -321,7 +320,6 @@ genericBorderStyle.addEnum("inset", makeEnumProperty(INSET, "INSET")); genericBorderStyle.addEnum("outset", makeEnumProperty(OUTSET, "OUTSET")); genericBorderStyle.setDefault("none"); -genericBorderWidth.addShorthand(s_generics[PR_BORDER_STYLE]); // GenericBreak genericBreak = new EnumProperty.Maker(0); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/fo FOPropertyMapping.java
bckfnn 2004/09/07 05:17:08 Modified:src/java/org/apache/fop/fo FOPropertyMapping.java Log: Default for border-[before|after]-width.conditionality set to discard as per spec 7.7.9. Revision ChangesPath 1.17 +3 -3 xml-fop/src/java/org/apache/fop/fo/FOPropertyMapping.java Index: FOPropertyMapping.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/FOPropertyMapping.java,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- FOPropertyMapping.java7 Sep 2004 10:26:35 - 1.16 +++ FOPropertyMapping.java7 Sep 2004 12:17:07 - 1.17 @@ -734,7 +734,7 @@ // border-before-width m = new CondLengthProperty.Maker(PR_BORDER_BEFORE_WIDTH); m.useGeneric(genericCondBorderWidth); -m.getSubpropMaker(CP_CONDITIONALITY).setDefault("retain"); +m.getSubpropMaker(CP_CONDITIONALITY).setDefault("discard"); corr = new CorrespondingPropertyMaker(m); corr.setCorresponding(PR_BORDER_TOP_WIDTH, PR_BORDER_TOP_WIDTH, PR_BORDER_RIGHT_WIDTH); @@ -764,7 +764,7 @@ // border-after-width m = new CondLengthProperty.Maker(PR_BORDER_AFTER_WIDTH); m.useGeneric(genericCondBorderWidth); -m.getSubpropMaker(CP_CONDITIONALITY).setDefault("retain"); +m.getSubpropMaker(CP_CONDITIONALITY).setDefault("discard"); corr = new CorrespondingPropertyMaker(m); corr.setCorresponding(PR_BORDER_BOTTOM_WIDTH, PR_BORDER_BOTTOM_WIDTH, PR_BORDER_LEFT_WIDTH); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/fo FOPropertyMapping.java
bckfnn 2004/09/07 03:26:36 Modified:src/java/org/apache/fop/fo FOPropertyMapping.java Log: Support debug string values for enum properties. Revision ChangesPath 1.16 +177 -177 xml-fop/src/java/org/apache/fop/fo/FOPropertyMapping.java Index: FOPropertyMapping.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/FOPropertyMapping.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- FOPropertyMapping.java6 Sep 2004 21:13:50 - 1.15 +++ FOPropertyMapping.java7 Sep 2004 10:26:35 - 1.16 @@ -232,28 +232,28 @@ // GenericBoolean genericBoolean = new EnumProperty.Maker(0); -genericBoolean.addEnum("true", makeEnumProperty(TRUE)); -genericBoolean.addEnum("false", makeEnumProperty(FALSE)); +genericBoolean.addEnum("true", makeEnumProperty(TRUE, "TRUE")); +genericBoolean.addEnum("false", makeEnumProperty(FALSE, "FALSE")); // GenericKeep genericKeep = new KeepProperty.Maker(0); sub = new NumberProperty.Maker(CP_WITHIN_PAGE); sub.setByShorthand(true); sub.setDefault("auto"); -sub.addEnum("auto", makeEnumProperty(AUTO)); -sub.addEnum("always", makeEnumProperty(ALWAYS)); +sub.addEnum("auto", makeEnumProperty(AUTO, "AUTO")); +sub.addEnum("always", makeEnumProperty(ALWAYS, "ALWAYS")); genericKeep.addSubpropMaker(sub); sub = new NumberProperty.Maker(CP_WITHIN_LINE); sub.setByShorthand(true); sub.setDefault("auto"); -sub.addEnum("auto", makeEnumProperty(AUTO)); -sub.addEnum("always", makeEnumProperty(ALWAYS)); +sub.addEnum("auto", makeEnumProperty(AUTO, "AUTO")); +sub.addEnum("always", makeEnumProperty(ALWAYS, "ALWAYS")); genericKeep.addSubpropMaker(sub); sub = new NumberProperty.Maker(CP_WITHIN_COLUMN); sub.setByShorthand(true); sub.setDefault("auto"); -sub.addEnum("auto", makeEnumProperty(AUTO)); -sub.addEnum("always", makeEnumProperty(ALWAYS)); +sub.addEnum("auto", makeEnumProperty(AUTO, "AUTO")); +sub.addEnum("always", makeEnumProperty(ALWAYS, "ALWAYS")); genericKeep.addSubpropMaker(sub); // GenericCondLength @@ -262,8 +262,8 @@ sub.setByShorthand(true); genericCondLength.addSubpropMaker(sub); sub = new EnumProperty.Maker(CP_CONDITIONALITY); -sub.addEnum("discard", makeEnumProperty(DISCARD)); -sub.addEnum("retain", makeEnumProperty(RETAIN)); +sub.addEnum("discard", makeEnumProperty(DISCARD, "DISCARD")); +sub.addEnum("retain", makeEnumProperty(RETAIN, "RETAIN")); genericCondLength.addSubpropMaker(sub); // GenericCondPadding @@ -293,8 +293,8 @@ sub.setDefault("medium"); genericCondBorderWidth.addSubpropMaker(sub); sub = new EnumProperty.Maker(CP_CONDITIONALITY); -sub.addEnum("discard", makeEnumProperty(DISCARD)); -sub.addEnum("retain", makeEnumProperty(RETAIN)); +sub.addEnum("discard", makeEnumProperty(DISCARD, "DISCARD")); +sub.addEnum("retain", makeEnumProperty(RETAIN, "RETAIN")); genericCondBorderWidth.addSubpropMaker(sub); // GenericBorderWidth @@ -310,27 +310,27 @@ // GenericBorderStyle genericBorderStyle = new EnumProperty.Maker(0); genericBorderStyle.setInherited(false); -genericBorderStyle.addEnum("none", makeEnumProperty(NONE)); -genericBorderStyle.addEnum("hidden", makeEnumProperty(HIDDEN)); -genericBorderStyle.addEnum("dotted", makeEnumProperty(DOTTED)); -genericBorderStyle.addEnum("dashed", makeEnumProperty(DASHED)); -genericBorderStyle.addEnum("solid", makeEnumProperty(SOLID)); -genericBorderStyle.addEnum("double", makeEnumProperty(DOUBLE)); -genericBorderStyle.addEnum("groove", makeEnumProperty(GROOVE)); -genericBorderStyle.addEnum("ridge", makeEnumProperty(RIDGE)); -genericBorderStyle.addEnum("inset", makeEnumProperty(INSET)); -genericBorderStyle.addEnum("outset", makeEnumProperty(OUTSET)); +genericBorderStyle.addEnum("none", makeEnumProperty(NONE, "NONE")); +genericBorderStyle.addEnum("hidden", makeEnumProperty(HIDDEN, "HIDDEN")); +genericBorderStyle.addEnum("dotted", makeEnumProperty(DOTTED, "DOTTED")); +genericBorderStyle.addEnum("dashed", makeEnumProperty(DASHED, "DASHED")); +genericBorderStyle.addEnum("solid", makeEnumProperty(SOLID, "SOLID")); +genericBorderStyle.addEnum("double", makeEnumProperty(DOUBLE, "DOUBLE")); +genericBorderStyle.a
cvs commit: xml-fop/src/java/org/apache/fop/fo FOPropertyMapping.java PropertyManager.java
bckfnn 2004/08/13 02:05:15 Modified:src/java/org/apache/fop/fo/properties CompoundPropertyMaker.java src/java/org/apache/fop/fo FOPropertyMapping.java PropertyManager.java Added: src/java/org/apache/fop/fo/properties SpacingPropertyMaker.java Log: Support for [letter|word]-spacing properties with a value of 'normal'. The value returned will be an Constants.NORMAL enum. Revision ChangesPath 1.6 +12 -4 xml-fop/src/java/org/apache/fop/fo/properties/CompoundPropertyMaker.java Index: CompoundPropertyMaker.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/properties/CompoundPropertyMaker.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- CompoundPropertyMaker.java18 Jun 2004 17:58:35 - 1.5 +++ CompoundPropertyMaker.java13 Aug 2004 09:05:15 - 1.6 @@ -122,10 +122,14 @@ * input value */ protected Property checkEnumValues(String value) { +Property result = null; if (shorthandMaker != null) { -return shorthandMaker.checkEnumValues(value); +result = shorthandMaker.checkEnumValues(value); } -return null; +if (result == null) { +result = super.checkEnumValues(value); +} +return result; } /** @@ -190,7 +194,11 @@ * @throws FOPException for invalid or inconsisten FO input */ public Property make(PropertyList propertyList) throws FOPException { -return makeCompound(propertyList, propertyList.getParentFObj()); +if (defaultValue != null) { +return make(propertyList, defaultValue, propertyList.getParentFObj()); +} else { +return makeCompound(propertyList, propertyList.getParentFObj()); +} } /** 1.1 xml-fop/src/java/org/apache/fop/fo/properties/SpacingPropertyMaker.java Index: SpacingPropertyMaker.java === /* * Copyright 1999-2004 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* $Id: SpacingPropertyMaker.java,v 1.1 2004/08/13 09:05:15 bckfnn Exp $ */ package org.apache.fop.fo.properties; import org.apache.fop.apps.FOPException; import org.apache.fop.fo.Constants; import org.apache.fop.fo.FObj; import org.apache.fop.fo.PropertyList; /** * A maker which creates 'letter-spacing' and 'word-spacing' properties. * These two properties properties are standard space properties with * additinal support for the 'normal' enum value. */ public class SpacingPropertyMaker extends SpaceProperty.Maker { /** * Create a maker for [letter|word]-spacing. * @param propId the id for property. */ public SpacingPropertyMaker(int propId) { super(propId); } /** * Support for the 'normal' value. */ public Property convertProperty(Property p, PropertyList propertyList, FObj fo) throws FOPException { if (p.getEnum() == Constants.NORMAL) { return p; } return super.convertProperty(p, propertyList, fo); } } 1.13 +10 -4 xml-fop/src/java/org/apache/fop/fo/FOPropertyMapping.java Index: FOPropertyMapping.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/FOPropertyMapping.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- FOPropertyMapping.java27 Feb 2004 17:57:40 - 1.12 +++ FOPropertyMapping.java13 Aug 2004 09:05:15 - 1.13 @@ -40,6 +40,7 @@ import org.apache.fop.fo.properties.Property; import org.apache.fop.fo.properties.PropertyMaker; import org.apache.fop.fo.properties.SpaceProperty; +import org.apache.fop.fo.properties.SpacingPropertyMaker; import org.apache.fop.fo.properties.StringProperty; import org.apache.fop.fo.properties.ToBeImplementedProperty; @@ -1586,9 +1587,13 @@