Added support for display-align for table-cell in RTF output. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@492769 13f79535-47bb-0310-9956-ffa450edef68tags/fop-0_94
@@ -204,6 +204,19 @@ public final class TableAttributesConverter { | |||
if (n > 1) { | |||
attrib.set(ITableAttributes.COLUMN_SPAN, n); | |||
} | |||
switch (fobj.getDisplayAlign()) { | |||
case Constants.EN_BEFORE: | |||
attrib.set(ITableAttributes.ATTR_CELL_VERT_ALIGN_TOP); | |||
break; | |||
case Constants.EN_CENTER: | |||
attrib.set(ITableAttributes.ATTR_CELL_VERT_ALIGN_CENTER); | |||
break; | |||
case Constants.EN_AFTER: | |||
attrib.set(ITableAttributes.ATTR_CELL_VERT_ALIGN_BOTTOM); | |||
break; | |||
default: //nop | |||
} | |||
return attrib; | |||
} |
@@ -115,6 +115,14 @@ public interface ITableAttributes { | |||
/** cell border, right */ | |||
String CELL_BORDER_RIGHT = "clbrdrr"; | |||
// for vertical alignment in cells | |||
/** cell alignment, top */ | |||
String ATTR_CELL_VERT_ALIGN_TOP = "clvertalt"; | |||
/** cell alignment, center */ | |||
String ATTR_CELL_VERT_ALIGN_CENTER = "clvertalc"; | |||
/** cell alignment, bottom */ | |||
String ATTR_CELL_VERT_ALIGN_BOTTOM = "clvertalb"; | |||
//Table row border attributes | |||
/** row border, top */ | |||
String ROW_BORDER_TOP = "trbrdrt"; | |||
@@ -191,4 +199,12 @@ public interface ITableAttributes { | |||
String[] CELL_COLOR = { | |||
CELL_SHADE, CELL_COLOR_BACKGROUND, CELL_COLOR_FOREGROUND | |||
}; | |||
/** | |||
* List of ALL vertical alignment attributes, used to select them when writing | |||
* attributes | |||
*/ | |||
String[] CELL_VERT_ALIGN = { | |||
ATTR_CELL_VERT_ALIGN_TOP, ATTR_CELL_VERT_ALIGN_CENTER, ATTR_CELL_VERT_ALIGN_BOTTOM}; | |||
} |
@@ -263,6 +263,7 @@ public class RtfTableCell | |||
} else { | |||
writeControlWord("ql"); | |||
} | |||
writeAttributes (attrib, ITableAttributes.CELL_VERT_ALIGN); | |||
writeControlWord("cellx" + xPos); | |||
@@ -28,6 +28,9 @@ | |||
<changes> | |||
<release version="FOP Trunk"> | |||
<action context="Code" dev="JM" type="add" fixes-bug="40930"> | |||
Added support for display-align for table-cell in RTF output. | |||
</action> | |||
<action context="Code" dev="MM" type="add"> | |||
Added support for UAX#14 type line breaking. Support does not extend across nested fo:inline elements. | |||
</action> |