// Cell background color
ColorType color = fobj.getCommonBorderPaddingBackground().backgroundColor;
- if (color.getAlpha() != 0
- || color.getRed() != 0
- || color.getGreen() != 0
- || color.getBlue() != 0) {
+ if ((color != null)
+ && (color.getAlpha() != 0
+ || color.getRed() != 0
+ || color.getGreen() != 0
+ || color.getBlue() != 0)) {
attrib.set(ITableAttributes.CELL_COLOR_BACKGROUND, color);
}
private static void attrFont(CommonFont font, FOPRtfAttributes rtfAttr) {
rtfAttr.set(RtfText.ATTR_FONT_FAMILY,
RtfFontManager.getInstance().getFontNumber(font.fontFamily));
- rtfAttr.set("fs", font.fontSize);
+ rtfAttr.set(RtfText.ATTR_FONT_SIZE, font.fontSize);
if (font.fontWeight.equals("bold") || font.fontWeight.equals("700")) {
rtfAttr.set("b", 1);
default here. Changing FOP's default to "white" causes problems in
PDF output, so we will look for the default here & change it to
"auto". */
- if ((fopValue.getRed() == 0)
+ if ((fopValue == null)
+ || ((fopValue.getRed() == 0)
&& (fopValue.getGreen() == 0)
&& (fopValue.getBlue() == 0)
- && (fopValue.getAlpha() == 0)) {
+ && (fopValue.getAlpha() == 0))) {
return;
} else {
rtfColor = convertFOPColorToRTF(fopValue);
}
}
- if (parentTable.isHighestRow(id)) {
+ if ((parentTable != null) && (parentTable.isHighestRow(id))) {
if (!cell.getRtfAttributes().isSet(ITableAttributes.CELL_BORDER_BOTTOM)) {
cell.getRtfAttributes().set(ITableAttributes.CELL_BORDER_BOTTOM,
(String)attrib.getValue(ITableAttributes.ROW_BORDER_BOTTOM));