aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/java/org/apache/fop/fo/FOText.java6
-rw-r--r--src/java/org/apache/fop/render/rtf/TextAttributesConverter.java12
2 files changed, 9 insertions, 9 deletions
diff --git a/src/java/org/apache/fop/fo/FOText.java b/src/java/org/apache/fop/fo/FOText.java
index 8ac076678..865efb0a5 100644
--- a/src/java/org/apache/fop/fo/FOText.java
+++ b/src/java/org/apache/fop/fo/FOText.java
@@ -85,7 +85,7 @@ public class FOText extends FONode {
private int textTransform;
private Property wordSpacing;
private int wrapOption;
- private EnumLength baselineShift;
+ private Length baselineShift;
// End of property values
/**
@@ -164,7 +164,7 @@ public class FOText extends FONode {
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 @@ public class FOText extends FONode {
return sb.toString();
}
- public EnumLength getBaseLineShift() {
+ public Length getBaseLineShift() {
return baselineShift;
}
diff --git a/src/java/org/apache/fop/render/rtf/TextAttributesConverter.java b/src/java/org/apache/fop/render/rtf/TextAttributesConverter.java
index f0b8120ac..7de406c15 100644
--- a/src/java/org/apache/fop/render/rtf/TextAttributesConverter.java
+++ b/src/java/org/apache/fop/render/rtf/TextAttributesConverter.java
@@ -24,6 +24,7 @@ import org.apache.commons.logging.Log;
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.flow.PageNumber;
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 @@ class TextAttributesConverter {
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);
}
}