You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by bc...@apache.org on 2005/08/31 01:03:24 UTC

svn commit: r264890 - in /xmlgraphics/fop/trunk/src/java/org/apache/fop: fo/FOText.java render/rtf/TextAttributesConverter.java

Author: bckfnn
Date: Tue Aug 30 16:03:19 2005
New Revision: 264890

URL: http://svn.apache.org/viewcvs?rev=264890&view=rev
Log:
Fixed the use of Length property for baseline-shift.


Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FOText.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/TextAttributesConverter.java

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FOText.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FOText.java?rev=264890&r1=264889&r2=264890&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FOText.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FOText.java Tue Aug 30 16:03:19 2005
@@ -85,7 +85,7 @@
     private int textTransform;
     private Property wordSpacing;
     private int wrapOption;
-    private EnumLength baselineShift;
+    private Length baselineShift;
     // End of property values
 
     /**
@@ -164,7 +164,7 @@
         wordSpacing = pList.get(Constants.PR_WORD_SPACING);
         wrapOption = pList.get(Constants.PR_WRAP_OPTION).getEnum();
         textDecoration = pList.getTextDecorationProps();
-        baselineShift = (EnumLength) pList.get(Constants.PR_BASELINE_SHIFT);
+        baselineShift = pList.get(Constants.PR_BASELINE_SHIFT).getLength();
     }
 
     /** @see org.apache.fop.fo.FONode#endOfNode() */
@@ -604,7 +604,7 @@
         return sb.toString();
     }
  
-    public EnumLength getBaseLineShift() {
+    public Length getBaseLineShift() {
         return baselineShift;
     }
     

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/TextAttributesConverter.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/TextAttributesConverter.java?rev=264890&r1=264889&r2=264890&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/TextAttributesConverter.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/TextAttributesConverter.java Tue Aug 30 16:03:19 2005
@@ -24,6 +24,7 @@
 import org.apache.commons.logging.impl.SimpleLog;
 import org.apache.fop.apps.FOPException;
 import org.apache.fop.datatypes.ColorType;
+import org.apache.fop.datatypes.Length;
 import org.apache.fop.fo.Constants;
 import org.apache.fop.fo.FOText;
 import org.apache.fop.fo.flow.Block;
@@ -33,9 +34,8 @@
 import org.apache.fop.fo.properties.ColorTypeProperty;
 import org.apache.fop.fo.properties.CommonBorderPaddingBackground;
 import org.apache.fop.fo.properties.CommonFont;
-import org.apache.fop.fo.properties.CommonTextDecoration;
 import org.apache.fop.fo.properties.CommonMarginBlock;
-import org.apache.fop.fo.properties.EnumLength;
+import org.apache.fop.fo.properties.CommonTextDecoration;
 import org.apache.fop.render.rtf.rtflib.rtfdoc.RtfAttributes;
 import org.apache.fop.render.rtf.rtflib.rtfdoc.RtfColorTable;
 import org.apache.fop.render.rtf.rtflib.rtfdoc.RtfFontManager;
@@ -254,13 +254,13 @@
         rtfAttr.set(RtfText.ATTR_BACKGROUND_COLOR, rtfColor);
    }
     
-   private static void attrBaseLineShift(EnumLength baselineShift, RtfAttributes rtfAttr) {
+   private static void attrBaseLineShift(Length baselineShift, RtfAttributes rtfAttr) {
        
-       String s = baselineShift.getString();
+       int s = baselineShift.getEnum();
        
-       if (s=="SUPER") {
+       if (s==Constants.EN_SUPER) {
            rtfAttr.set(RtfText.ATTR_SUPERSCRIPT);
-       } else if (s=="SUB") {
+       } else if (s==Constants.EN_SUB) {
            rtfAttr.set(RtfText.ATTR_SUBSCRIPT);
        }
    }



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org