import org.apache.fop.fo.FOText;
import org.apache.fop.fo.flow.Block;
import org.apache.fop.fo.flow.BlockContainer;
-import org.apache.fop.fo.flow.Character;
import org.apache.fop.fo.flow.Inline;
import org.apache.fop.fo.flow.PageNumber;
import org.apache.fop.fo.properties.ColorTypeProperty;
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.render.rtf.rtflib.rtfdoc.RtfAttributes;
import org.apache.fop.render.rtf.rtflib.rtfdoc.RtfColorTable;
import org.apache.fop.render.rtf.rtflib.rtfdoc.RtfFontManager;
attrFont(fobj.getCommonFont(), attrib);
attrFontColor(fobj.getColor(), attrib);
attrTextDecoration(fobj.getTextDecoration(), attrib);
+ attrBaseLineShift(fobj.getBaseLineShift(), attrib);
return attrib;
}
rtfAttr.set(RtfText.ATTR_BACKGROUND_COLOR, rtfColor);
}
+
+ private static void attrBaseLineShift(EnumLength baselineShift, RtfAttributes rtfAttr) {
+
+ String s = baselineShift.getString();
+
+ if (s=="SUPER") {
+ rtfAttr.set(RtfText.ATTR_SUPERSCRIPT);
+ } else if (s=="SUB") {
+ rtfAttr.set(RtfText.ATTR_SUBSCRIPT);
+ }
+ }
/**
* Converts a FOP ColorType to the integer pointing into the RTF color table
return RtfColorTable.getInstance().getColorNumber(redComponent,
greenComponent, blueComponent).intValue();
}
-
}
public static final String ATTR_FONT_COLOR = "cf";
/** constant for background color */
public static final String ATTR_BACKGROUND_COLOR = "chcbpat"; // Added by Boris on 06/25//02
+ /** constant for superscript */
+ public static final String ATTR_SUPERSCRIPT = "super";
+ /** constant for subscript */
+ public static final String ATTR_SUBSCRIPT = "sub";
/** RtfText attributes: alignment attributes */
/** constant for align center */