pherweg 2004/01/18 13:21:41 Modified: src/java/org/apache/fop/render/rtf TableAttributesConverter.java TextAttributesConverter.java Log: replaced string constants with int constants Revision Changes Path 1.8 +10 -10 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.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- TableAttributesConverter.java 5 Jan 2004 00:44:59 -0000 1.7 +++ TableAttributesConverter.java 18 Jan 2004 21:21:41 -0000 1.8 @@ -229,25 +229,25 @@ isBorderPresent=true; */ } - ep = (EnumProperty)props.get("border-top-style"); + ep = (EnumProperty)props.get(Constants.PR_BORDER_TOP_STYLE); if (ep != null && ep.getEnum() != Constants.NONE) { attrib.set(ITableAttributes.CELL_BORDER_TOP, "\\" + convertAttributetoRtf(ep.getEnum())); isBorderPresent = true; } - ep = (EnumProperty)props.get("border-bottom-style"); + ep = (EnumProperty)props.get(Constants.PR_BORDER_BOTTOM_STYLE); if (ep != null && ep.getEnum() != Constants.NONE) { attrib.set(ITableAttributes.CELL_BORDER_BOTTOM, "\\" + convertAttributetoRtf(ep.getEnum())); isBorderPresent = true; } - ep = (EnumProperty)props.get("border-left-style"); + ep = (EnumProperty)props.get(Constants.PR_BORDER_LEFT_STYLE); if (ep != null && ep.getEnum() != Constants.NONE) { attrib.set(ITableAttributes.CELL_BORDER_LEFT, "\\" + convertAttributetoRtf(ep.getEnum())); isBorderPresent = true; } - ep = (EnumProperty)props.get("border-right-style"); + ep = (EnumProperty)props.get(Constants.PR_BORDER_RIGHT_STYLE); if (ep != null && ep.getEnum() != Constants.NONE) { attrib.set(ITableAttributes.CELL_BORDER_RIGHT, "\\" + convertAttributetoRtf(ep.getEnum())); @@ -272,7 +272,7 @@ // Column spanning : - NumberProperty n = (NumberProperty)props.get("number-columns-spanned"); + NumberProperty n = (NumberProperty)props.get(Constants.PR_NUMBER_COLUMNS_SPANNED); if (n != null && n.getNumber().intValue() > 1) { attrib.set(ITableAttributes.COLUMN_SPAN, n.getNumber().intValue()); } @@ -371,7 +371,7 @@ isBorderPresent=true; */ } - ep = (EnumProperty)props.get("border-top-style"); + ep = (EnumProperty)props.get(Constants.PR_BORDER_TOP_STYLE); if (ep != null && ep.getEnum() != Constants.NONE) { attrib.set(ITableAttributes.ROW_BORDER_TOP, "\\" + convertAttributetoRtf(ep.getEnum())); @@ -379,7 +379,7 @@ + convertAttributetoRtf(ep.getEnum())); isBorderPresent = true; } - ep = (EnumProperty)props.get("border-bottom-style"); + ep = (EnumProperty)props.get(Constants.PR_BORDER_BOTTOM_STYLE); if (ep != null && ep.getEnum() != Constants.NONE) { attrib.set(ITableAttributes.ROW_BORDER_BOTTOM, "\\" + convertAttributetoRtf(ep.getEnum())); @@ -387,7 +387,7 @@ + convertAttributetoRtf(ep.getEnum())); isBorderPresent = true; } - ep = (EnumProperty)props.get("border-left-style"); + ep = (EnumProperty)props.get(Constants.PR_BORDER_LEFT_STYLE); if (ep != null && ep.getEnum() != Constants.NONE) { attrib.set(ITableAttributes.ROW_BORDER_LEFT, "\\" + convertAttributetoRtf(ep.getEnum())); @@ -395,7 +395,7 @@ + convertAttributetoRtf(ep.getEnum())); isBorderPresent = true; } - ep = (EnumProperty)props.get("border-right-style"); + ep = (EnumProperty)props.get(Constants.PR_BORDER_RIGHT_STYLE); if (ep != null && ep.getEnum() != Constants.NONE) { attrib.set(ITableAttributes.ROW_BORDER_RIGHT, "\\" + convertAttributetoRtf(ep.getEnum())); 1.8 +4 -4 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.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- TextAttributesConverter.java 29 Dec 2003 23:28:47 -0000 1.7 +++ TextAttributesConverter.java 18 Jan 2004 21:21:41 -0000 1.8 @@ -155,7 +155,7 @@ private static void attrBlockFontColor(PropertyList propertyList, RtfAttributes rtfAttr) { // Cell background color - ColorTypeProperty colorTypeProp = (ColorTypeProperty)propertyList.get("color"); + ColorTypeProperty colorTypeProp = (ColorTypeProperty)propertyList.get(Constants.PR_COLOR); if (colorTypeProp != null) { ColorType colorType = colorTypeProp.getColorType(); if (colorType != null) { @@ -222,7 +222,7 @@ } //space-after - spaceProp = (SpaceProperty)propertyList.get("space-after"); + spaceProp = (SpaceProperty)propertyList.get(Constants.PR_SPACE_AFTER); if (spaceProp != null) { Float f = new Float( spaceProp.getLengthRange().getOptimum().getLength().getValue() / 1000f); @@ -243,7 +243,7 @@ LengthProperty lengthProp = null; // margin-left - lengthProp = (LengthProperty)propertyList.get("margin-left"); + lengthProp = (LengthProperty)propertyList.get(Constants.PR_MARGIN_LEFT); if (lengthProp != null) { Float f = new Float(lengthProp.getLength().getValue() / 1000f); String sValue = f.toString() + "pt"; @@ -256,7 +256,7 @@ } // margin-right - lengthProp = (LengthProperty)propertyList.get("margin-right"); + lengthProp = (LengthProperty)propertyList.get(Constants.PR_MARGIN_RIGHT); if (lengthProp != null) { Float f = new Float(lengthProp.getLength().getValue() / 1000f); String sValue = f.toString() + "pt";
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]