X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Foutput%2Fhtml.c;h=9cc9a5c2b8f594d16de8c617b977e5618343d2a1;hb=214ed115df21d414f1a785a090d74e8b2525108a;hp=55bcb6daa09d95064e87a6d600c3e83047f8d644;hpb=68dffb1e4a3a8f706b61265e1fd81dfe0b5a74d6;p=pspp diff --git a/src/output/html.c b/src/output/html.c index 55bcb6daa0..9cc9a5c2b8 100644 --- a/src/output/html.c +++ b/src/output/html.c @@ -466,7 +466,7 @@ html_output_table (struct html_driver *html, const struct table_item *item) struct table_cell cell; const char *tag; bool is_header; - int alignment, colspan, rowspan; + int colspan, rowspan; int top, left, right, bottom, n_borders; table_get_cell (t, x, y, &cell); @@ -481,12 +481,19 @@ html_output_table (struct html_driver *html, const struct table_item *item) tag = is_header ? "TH" : "TD"; fprintf (html->file, " <%s", tag); - alignment = (cell.n_contents > 0 - ? cell.contents[0].options & TAB_ALIGNMENT - : TAB_LEFT); - if (alignment != TAB_LEFT) + int halign = (cell.n_contents > 0 + ? cell.contents[0].options & TAB_HALIGN + : TAB_LEFT); + if (halign != TAB_LEFT) fprintf (html->file, " ALIGN=\"%s\"", - alignment == TAB_RIGHT ? "RIGHT" : "CENTER"); + halign == TAB_RIGHT ? "RIGHT" : "CENTER"); + + int valign = (cell.n_contents > 0 + ? cell.contents[0].options & TAB_VALIGN + : TAB_LEFT); + if (valign != TAB_TOP) + fprintf (html->file, " ALIGN=\"%s\"", + valign == TAB_BOTTOM ? "BOTTOM" : "MIDDLE"); colspan = table_cell_colspan (&cell); if (colspan > 1)