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()));
// 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());
}
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()));
+ 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()));
+ 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()));
+ 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()));
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) {
}
//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);
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";
}
// 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";