bckfnn 2004/10/28 08:21:54 Modified: src/java/org/apache/fop/datatypes Length.java Numeric.java src/java/org/apache/fop/fo FOPropertyMapping.java src/java/org/apache/fop/fo/expr NumericProperty.java RelativeNumericProperty.java src/java/org/apache/fop/fo/pagination PageSequence.java src/java/org/apache/fop/fo/properties CompoundPropertyMaker.java LengthProperty.java NumberProperty.java PropertyMaker.java src/java/org/apache/fop/layoutmgr BlockContainerLayoutManager.java ExternalGraphicLayoutManager.java InstreamForeignObjectLM.java src/java/org/apache/fop/render/rtf TableAttributesConverter.java TextAttributesConverter.java Added: src/java/org/apache/fop/fo/properties EnumLength.java EnumNumber.java Removed: src/java/org/apache/fop/fo/properties AutoLength.java Log: Removed special case handling of "auto" enum for length properties. Added general support for "auto" and other enums on Length and Numeric properties. Revision Changes Path 1.6 +0 -6 xml-fop/src/java/org/apache/fop/datatypes/Length.java Index: Length.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/datatypes/Length.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- Length.java 27 Feb 2004 17:42:28 -0000 1.5 +++ Length.java 28 Oct 2004 15:21:53 -0000 1.6 @@ -27,10 +27,4 @@ * @return the length in millipoints */ public int getValue(); - - /** - * Return true if the length has the "auto" value. - * @return true when length is auto. - */ - public boolean isAuto(); } 1.5 +6 -1 xml-fop/src/java/org/apache/fop/datatypes/Numeric.java Index: Numeric.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/datatypes/Numeric.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- Numeric.java 18 Oct 2004 20:11:16 -0000 1.4 +++ Numeric.java 28 Oct 2004 15:21:53 -0000 1.5 @@ -70,4 +70,9 @@ * @throws PropertyException */ //Numeric getResolved() throws PropertyException; + + /** + * Return the enum value that is stored in this numeric. + */ + public int getEnum(); } 1.31 +18 -18 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.30 retrieving revision 1.31 diff -u -r1.30 -r1.31 --- FOPropertyMapping.java 28 Oct 2004 10:00:19 -0000 1.30 +++ FOPropertyMapping.java 28 Oct 2004 15:21:54 -0000 1.31 @@ -517,28 +517,28 @@ // top l = new LengthProperty.Maker(PR_TOP); l.setInherited(false); - l.setAutoOk(true); + l.addEnum("auto", makeEnumProperty(AUTO, "AUTO")); l.setDefault("auto"); addPropertyMaker("top", l); // right l = new LengthProperty.Maker(PR_RIGHT); l.setInherited(false); - l.setAutoOk(true); + l.addEnum("auto", makeEnumProperty(AUTO, "AUTO")); l.setDefault("auto"); addPropertyMaker("right", l); // bottom l = new LengthProperty.Maker(PR_BOTTOM); l.setInherited(false); - l.setAutoOk(true); + l.addEnum("auto", makeEnumProperty(AUTO, "AUTO")); l.setDefault("auto"); addPropertyMaker("bottom", l); // left l = new LengthProperty.Maker(PR_LEFT); l.setInherited(false); - l.setAutoOk(true); + l.addEnum("auto", makeEnumProperty(AUTO, "AUTO")); l.setDefault("auto"); addPropertyMaker("left", l); } @@ -1326,20 +1326,20 @@ l = new LengthProperty.Maker(CP_MINIMUM); l.setDefault("auto"); - l.setAutoOk(true); + l.addEnum("auto", makeEnumProperty(AUTO, "AUTO")); l.setPercentBase(LengthBase.CONTAINING_BOX); l.setByShorthand(true); m.addSubpropMaker(l); l = new LengthProperty.Maker(CP_OPTIMUM); l.setDefault("auto"); - l.setAutoOk(true); + l.addEnum("auto", makeEnumProperty(AUTO, "AUTO")); l.setPercentBase(LengthBase.CONTAINING_BOX); l.setByShorthand(true); m.addSubpropMaker(l); l = new LengthProperty.Maker(CP_MAXIMUM); - l.setAutoOk(true); + l.addEnum("auto", makeEnumProperty(AUTO, "AUTO")); l.setDefault("auto"); l.setPercentBase(LengthBase.CONTAINING_BOX); l.setByShorthand(true); @@ -1358,21 +1358,21 @@ // content-height l = new LengthProperty.Maker(PR_CONTENT_HEIGHT); l.setInherited(false); - l.setAutoOk(true); + l.addEnum("auto", makeEnumProperty(AUTO, "AUTO")); l.setDefault("auto"); addPropertyMaker("content-height", l); // content-width l = new LengthProperty.Maker(PR_CONTENT_WIDTH); l.setInherited(false); - l.setAutoOk(true); + l.addEnum("auto", makeEnumProperty(AUTO, "AUTO")); l.setDefault("auto"); addPropertyMaker("content-width", l); // height l = new LengthProperty.Maker(PR_HEIGHT); l.setInherited(false); - l.setAutoOk(true); + l.addEnum("auto", makeEnumProperty(AUTO, "AUTO")); l.setDefault("auto"); addPropertyMaker("height", l); @@ -1383,20 +1383,20 @@ l = new LengthProperty.Maker(CP_MINIMUM); l.setDefault("auto"); - l.setAutoOk(true); + l.addEnum("auto", makeEnumProperty(AUTO, "AUTO")); l.setPercentBase(LengthBase.CONTAINING_BOX); l.setByShorthand(true); m.addSubpropMaker(l); l = new LengthProperty.Maker(CP_OPTIMUM); l.setDefault("auto"); - l.setAutoOk(true); + l.addEnum("auto", makeEnumProperty(AUTO, "AUTO")); l.setPercentBase(LengthBase.CONTAINING_BOX); l.setByShorthand(true); m.addSubpropMaker(l); l = new LengthProperty.Maker(CP_MAXIMUM); - l.setAutoOk(true); + l.addEnum("auto", makeEnumProperty(AUTO, "AUTO")); l.setDefault("auto"); l.setPercentBase(LengthBase.CONTAINING_BOX); l.setByShorthand(true); @@ -1453,7 +1453,7 @@ // width l = new LengthProperty.Maker(PR_WIDTH); l.setInherited(false); - l.setAutoOk(true); + l.addEnum("auto", makeEnumProperty(AUTO, "AUTO")); l.setPercentBase(LengthBase.BLOCK_WIDTH); l.setDefault("auto"); addPropertyMaker("width", l); @@ -2036,7 +2036,7 @@ // column-gap l = new LengthProperty.Maker(PR_COLUMN_GAP); l.setInherited(false); - l.setAutoOk(true); + l.addEnum("auto", makeEnumProperty(AUTO, "AUTO")); l.setDefault("0.25in"); addPropertyMaker("column-gap", l); @@ -2110,7 +2110,7 @@ // page-height l = new LengthProperty.Maker(PR_PAGE_HEIGHT); l.setInherited(false); - l.setAutoOk(true); + l.addEnum("auto", makeEnumProperty(AUTO, "AUTO")); l.setDefault("11in"); addPropertyMaker("page-height", l); @@ -2127,7 +2127,7 @@ // page-width l = new LengthProperty.Maker(PR_PAGE_WIDTH); l.setInherited(false); - l.setAutoOk(true); + l.addEnum("auto", makeEnumProperty(AUTO, "AUTO")); l.setDefault("8in"); addPropertyMaker("page-width", l); 1.9 +0 -7 xml-fop/src/java/org/apache/fop/fo/expr/NumericProperty.java Index: NumericProperty.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/expr/NumericProperty.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- NumericProperty.java 28 Oct 2004 10:00:20 -0000 1.8 +++ NumericProperty.java 28 Oct 2004 15:21:54 -0000 1.9 @@ -90,13 +90,6 @@ } /** - * Return false since a numeric can not have the enum value of 'auto'. - */ - public boolean isAuto() { - return false; - } - - /** * Cast this as a length. That is only possible when the dimension is * one. */ 1.4 +1 -8 xml-fop/src/java/org/apache/fop/fo/expr/RelativeNumericProperty.java Index: RelativeNumericProperty.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/expr/RelativeNumericProperty.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- RelativeNumericProperty.java 28 Oct 2004 10:00:20 -0000 1.3 +++ RelativeNumericProperty.java 28 Oct 2004 15:21:54 -0000 1.4 @@ -175,13 +175,6 @@ } /** - * Return false, since a numeric is never the "auto" enum. - */ - public boolean isAuto() { - return false; - } - - /** * Return a string represention of the expression. Only used for debugging. */ public String toString() { 1.52 +4 -4 xml-fop/src/java/org/apache/fop/fo/pagination/PageSequence.java Index: PageSequence.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/pagination/PageSequence.java,v retrieving revision 1.51 retrieving revision 1.52 diff -u -r1.51 -r1.52 --- PageSequence.java 28 Oct 2004 10:00:23 -0000 1.51 +++ PageSequence.java 28 Oct 2004 15:21:54 -0000 1.52 @@ -24,11 +24,11 @@ import org.xml.sax.Locator; import org.apache.fop.apps.FOPException; +import org.apache.fop.datatypes.Numeric; import org.apache.fop.fo.FONode; import org.apache.fop.fo.FObj; import org.apache.fop.fo.PropertyList; import org.apache.fop.fo.ValidationException; -import org.apache.fop.fo.properties.Property; /** * This provides pagination of flows onto pages. Much of the @@ -44,7 +44,7 @@ private char groupingSeparator; private int groupingSize; private String id; - private Property initialPageNumber; + private Numeric initialPageNumber; private int forcePageCount; private String masterReference; // End of property values @@ -142,7 +142,7 @@ groupingSeparator = pList.get(PR_GROUPING_SEPARATOR).getCharacter(); groupingSize = pList.get(PR_GROUPING_SIZE).getNumber().intValue(); id = pList.get(PR_ID).getString(); - initialPageNumber = pList.get(PR_INITIAL_PAGE_NUMBER); + initialPageNumber = pList.get(PR_INITIAL_PAGE_NUMBER).getNumeric(); forcePageCount = pList.get(PR_FORCE_PAGE_COUNT).getEnum(); masterReference = pList.get(PR_MASTER_REFERENCE).getString(); } @@ -163,7 +163,7 @@ pageNumberType = initialPageNumber.getEnum(); } else { pageNumberType = EXPLICIT; - int pageStart = initialPageNumber.getNumber().intValue(); + int pageStart = initialPageNumber.getValue(); this.explicitFirstNumber = (pageStart > 0) ? pageStart : 1; } 1.8 +3 -5 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.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- CompoundPropertyMaker.java 28 Oct 2004 10:00:24 -0000 1.7 +++ CompoundPropertyMaker.java 28 Oct 2004 15:21:54 -0000 1.8 @@ -168,10 +168,8 @@ protected Property convertProperty(Property p, PropertyList propertyList, FObj fo) throws PropertyException { - if (!EnumProperty.class.isAssignableFrom(p.getClass())) { - // delegate to the subprop maker to do conversions - p = shorthandMaker.convertProperty(p, propertyList, fo); - } + // delegate to the subprop maker to do conversions + p = shorthandMaker.convertProperty(p, propertyList, fo); if (p != null) { Property prop = makeCompound(propertyList, fo); 1.6 +3 -38 xml-fop/src/java/org/apache/fop/fo/properties/LengthProperty.java Index: LengthProperty.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/properties/LengthProperty.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- LengthProperty.java 28 Oct 2004 10:00:24 -0000 1.5 +++ LengthProperty.java 28 Oct 2004 15:21:54 -0000 1.6 @@ -44,30 +44,6 @@ } /** - * protected Property checkPropertyKeywords(String value) { - * if (isAutoLengthAllowed() && value.equals("auto")) { - * return new LengthProperty(Length.AUTO); - * } - * return null; - * } - */ - - /** - * @return false (auto-length is not allowed for Length values) - */ - protected boolean isAutoLengthAllowed() { - return autoOk; - } - - /** - * Set the auto length flag. - * @param inherited - */ - public void setAutoOk(boolean autoOk) { - this.autoOk = autoOk; - } - - /** * @see PropertyMaker#convertProperty */ public Property convertProperty(Property p, @@ -77,11 +53,8 @@ if (prop != null) { return prop; } - if (isAutoLengthAllowed()) { - String pval = p.getString(); - if (pval != null && pval.equals("auto")) { - return new AutoLength(); - } + if (p instanceof EnumProperty) { + return new EnumLength(p); } if (p instanceof LengthProperty) { return p; @@ -93,14 +66,6 @@ return convertPropertyDatatype(p, propertyList, fo); } - } - - /** - * Indicates if the length has the "auto" value. - * @return True if the length is set to "auto" - */ - public boolean isAuto() { - return false; } /** 1.6 +4 -1 xml-fop/src/java/org/apache/fop/fo/properties/NumberProperty.java Index: NumberProperty.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/properties/NumberProperty.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- NumberProperty.java 18 Oct 2004 20:11:16 -0000 1.5 +++ NumberProperty.java 28 Oct 2004 15:21:54 -0000 1.6 @@ -48,6 +48,9 @@ if (p instanceof NumberProperty) { return p; } + if (p instanceof EnumProperty) { + return new EnumNumber(p); + } Number val = p.getNumber(); if (val != null) { return new NumberProperty(val); 1.11 +5 -3 xml-fop/src/java/org/apache/fop/fo/properties/PropertyMaker.java Index: PropertyMaker.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/properties/PropertyMaker.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- PropertyMaker.java 28 Oct 2004 10:00:24 -0000 1.10 +++ PropertyMaker.java 28 Oct 2004 15:21:54 -0000 1.11 @@ -406,10 +406,12 @@ // Check for keyword shorthand values to be substituted. pvalue = checkValueKeywords(value); // Override parsePropertyValue in each subclass of Property.Maker - Property p = PropertyParser.parse(pvalue, + newProp = PropertyParser.parse(pvalue, new PropertyInfo(this, propertyList, fo)); - newProp = convertProperty(p, propertyList, fo); + } + if (newProp != null) { + newProp = convertProperty(newProp, propertyList, fo); } if (newProp == null) { throw new org.apache.fop.fo.expr.PropertyException("No conversion defined " + pvalue); 1.1 xml-fop/src/java/org/apache/fop/fo/properties/EnumLength.java Index: EnumLength.java =================================================================== /* * Copyright 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: EnumLength.java,v 1.1 2004/10/28 15:21:54 bckfnn Exp $ */ package org.apache.fop.fo.properties; /** * A length quantity in XSL which is specified as an enum, such as "auto" */ public class EnumLength extends LengthProperty { private Property enum; public EnumLength(Property enum) { this.enum = enum; } /** * @see org.apache.fop.datatypes.Numeric#getEnum() */ public int getEnum() { return enum.getEnum(); } public boolean isAbsolute() { return false; } /** * Returns the length in 1/1000ths of a point (millipoints) * @return the length in millipoints */ public int getValue() { log.error("getValue() called on " + enum + " length"); return 0; } /** * Returns the value as numeric. * @return the length in millipoints */ public double getNumericValue() { log.error("getNumericValue() called on " + enum + " number"); return 0; } /** * @see org.apache.fop.fo.properties.Property#getString() */ public String getString() { return enum.toString(); } /** * @see org.apache.fop.fo.properties.Property#getString() */ public Object getObject() { return enum.getObject(); } } 1.1 xml-fop/src/java/org/apache/fop/fo/properties/EnumNumber.java Index: EnumNumber.java =================================================================== /* * Copyright 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: EnumNumber.java,v 1.1 2004/10/28 15:21:54 bckfnn Exp $ */ package org.apache.fop.fo.properties; /** * A number quantity in XSL which is specified as an enum, such as "no-limit". */ public class EnumNumber extends NumberProperty { private Property enum; public EnumNumber(Property enum) { super(null); this.enum = enum; } public int getEnum() { return enum.getEnum(); } /** * Returns the length in 1/1000ths of a point (millipoints) * @return the length in millipoints */ public int getValue() { log.error("getValue() called on " + enum + " number"); return 0; } /** * Returns the value as numeric. * @return the length in millipoints */ public double getNumericValue() { log.error("getNumericValue() called on " + enum + " number"); return 0; } /** * @see org.apache.fop.fo.properties.Property#getString() */ public String getString() { return enum.toString(); } /** * @see org.apache.fop.fo.properties.Property#getString() */ public Object getObject() { return enum.getObject(); } } 1.26 +5 -5 xml-fop/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java Index: BlockContainerLayoutManager.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java,v retrieving revision 1.25 retrieving revision 1.26 diff -u -r1.25 -r1.26 --- BlockContainerLayoutManager.java 19 Oct 2004 21:47:15 -0000 1.25 +++ BlockContainerLayoutManager.java 28 Oct 2004 15:21:54 -0000 1.26 @@ -91,10 +91,10 @@ int ipd = context.getRefIPD(); int bpd = context.getStackLimit().opt; - if (!width.isAuto()) { + if (width.getEnum() != AUTO) { ipd = width.getValue(); } - if (!height.isAuto()) { + if (height.getEnum() != AUTO) { bpd = height.getValue(); } Rectangle2D rect = new Rectangle2D.Double(0, 0, ipd, bpd); @@ -111,7 +111,7 @@ relDims.ipd = context.getRefIPD(); } stackLimit = new MinOptMax(relDims.ipd); - if (width.isAuto()) { + if (width.getEnum() == AUTO) { relDims.bpd = context.getStackLimit().opt; } absoluteCTM = new CTM(vals[0], vals[1], vals[2], vals[3], 0, 0); @@ -301,7 +301,7 @@ // need to set bpd to actual size for rotation // and stacking viewportBlockArea.setIPD(relDims.ipd); - if (!height.isAuto()) { + if (height.getEnum() != AUTO) { viewportBlockArea.setBPD(relDims.bpd); autoHeight = false; } @@ -309,7 +309,7 @@ viewportBlockArea.setClip(clip); } else { viewportBlockArea.setIPD(relDims.ipd); - if (!height.isAuto()) { + if (height.getEnum() != AUTO) { viewportBlockArea.setBPD(relDims.bpd); autoHeight = false; } 1.12 +7 -7 xml-fop/src/java/org/apache/fop/layoutmgr/ExternalGraphicLayoutManager.java Index: ExternalGraphicLayoutManager.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/ExternalGraphicLayoutManager.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- ExternalGraphicLayoutManager.java 20 Oct 2004 17:51:11 -0000 1.11 +++ ExternalGraphicLayoutManager.java 28 Oct 2004 15:21:54 -0000 1.12 @@ -74,20 +74,20 @@ // assume lr-tb for now and just use the .optimum value of the range Length ipd = fobj.getInlineProgressionDimension().getOptimum().getLength(); - if (!ipd.isAuto()) { + if (ipd.getEnum() != AUTO) { viewWidth = ipd.getValue(); } else { ipd = fobj.getWidth(); - if (!ipd.isAuto()) { + if (ipd.getEnum() != AUTO) { viewWidth = ipd.getValue(); } } Length bpd = fobj.getBlockProgressionDimension().getOptimum().getLength(); - if (!bpd.isAuto()) { + if (bpd.getEnum() != AUTO) { viewHeight = bpd.getValue(); } else { bpd = fobj.getHeight(); - if (!bpd.isAuto()) { + if (bpd.getEnum() != AUTO) { viewHeight = bpd.getValue(); } } @@ -98,7 +98,7 @@ int cwidth = -1; int cheight = -1; Length ch = fobj.getContentHeight(); - if (!ch.isAuto()) { + if (ch.getEnum() != AUTO) { /*if (ch.scaleToFit()) { if (viewHeight != -1) { cheight = viewHeight; @@ -107,7 +107,7 @@ cheight = ch.getValue(); } Length cw = fobj.getContentWidth(); - if (!cw.isAuto()) { + if (cw.getEnum() != AUTO) { /*if (cw.scaleToFit()) { if (viewWidth != -1) { cwidth = viewWidth; 1.9 +7 -7 xml-fop/src/java/org/apache/fop/layoutmgr/InstreamForeignObjectLM.java Index: InstreamForeignObjectLM.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/InstreamForeignObjectLM.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- InstreamForeignObjectLM.java 20 Oct 2004 13:37:48 -0000 1.8 +++ InstreamForeignObjectLM.java 28 Oct 2004 15:21:54 -0000 1.9 @@ -77,22 +77,22 @@ // isn't the block-progression-dimension always in the same // direction as the line height? len = fobj.getBlockProgressionDimension().getOptimum().getLength(); - if (!len.isAuto()) { + if (len.getEnum() != AUTO) { bpd = len.getValue(); } else { len = fobj.getHeight(); - if (!len.isAuto()) { + if (len.getEnum() != AUTO) { bpd = len.getValue(); } } } len = fobj.getInlineProgressionDimension().getOptimum().getLength(); - if (!len.isAuto()) { + if (len.getEnum() != AUTO) { ipd = len.getValue(); } else { len = fobj.getWidth(); - if (!len.isAuto()) { + if (len.getEnum() != AUTO) { ipd = len.getValue(); } } @@ -102,7 +102,7 @@ int cwidth = -1; int cheight = -1; len = fobj.getContentWidth(); - if (!len.isAuto()) { + if (len.getEnum() != AUTO) { /*if(len.scaleToFit()) { if(ipd != -1) { cwidth = ipd; @@ -111,7 +111,7 @@ cwidth = len.getValue(); } len = fobj.getContentHeight(); - if (!len.isAuto()) { + if (len.getEnum() != AUTO) { /*if(len.scaleToFit()) { if(bpd != -1) { cwidth = bpd; 1.21 +2 -2 xml-fop/src/java/org/apache/fop/render/rtf/TableAttributesConverter.java Index: TableAttributesConverter.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/render/rtf/TableAttributesConverter.java,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- TableAttributesConverter.java 20 Oct 2004 17:53:35 -0000 1.20 +++ TableAttributesConverter.java 28 Oct 2004 15:21:54 -0000 1.21 @@ -191,7 +191,7 @@ } //Check for height row attribute. - if (!fobj.getHeight().isAuto()) { + if (fobj.getHeight().getEnum() != Constants.AUTO) { attrib.set(ITableAttributes.ROW_HEIGHT, fobj.getHeight().getValue() / (1000 / 20)); } 1.19 +3 -3 xml-fop/src/java/org/apache/fop/render/rtf/TextAttributesConverter.java Index: TextAttributesConverter.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/render/rtf/TextAttributesConverter.java,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- TextAttributesConverter.java 20 Oct 2004 17:53:35 -0000 1.18 +++ TextAttributesConverter.java 28 Oct 2004 15:21:54 -0000 1.19 @@ -186,11 +186,11 @@ /* private static void attrBlockDimension(FObj fobj, FOPRtfAttributes rtfAttr) { Length ipd = fobj.getProperty(Constants.PR_INLINE_PROGRESSION_DIMENSION).getLengthRange().getOptimum().getLength(); - if (!ipd.isAuto()) { + if (ipd.getEnum() != Constants.AUTO) { rtfAttr.set(RtfText.FRAME_WIDTH, ipd); } Length bpd = fobj.getProperty(Constants.PR_BLOCK_PROGRESSION_DIMENSION).getLengthRange().getOptimum().getLength(); - if (!bpd.isAuto()) { + if (bpd.getEnum() != Constants.AUTO) { rtfAttr.set(RtfText.FRAME_HEIGHT, bpd); } }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]