X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Foutput%2Fhtml.c;h=05fc08eb62f55dbfe407140a634d82fd4c8748f7;hb=a7a300e7d9963ce9a26fd87e4db922ed74111731;hp=959519e46e1b4e2a961dfbe9236b98a618b0c4fa;hpb=e6bb779b866f297b736a7f93a0c8aa741131726f;p=pspp diff --git a/src/output/html.c b/src/output/html.c index 959519e46e..05fc08eb62 100644 --- a/src/output/html.c +++ b/src/output/html.c @@ -501,15 +501,23 @@ html_output_table (struct html_driver *html, const struct table_item *item) tag = is_header ? "TH" : "TD"; fprintf (html->file, " <%s", tag); - int halign = cell.options & TAB_HALIGN; - if (halign != TAB_LEFT) - fprintf (html->file, " ALIGN=\"%s\"", - halign == TAB_RIGHT ? "RIGHT" : "CENTER"); + enum table_halign halign = table_halign_interpret ( + cell.style->cell_style.halign, cell.options & TAB_NUMERIC); + if (halign != TABLE_HALIGN_LEFT) + { + fprintf (html->file, " ALIGN=\"%s\"", + (halign == TABLE_HALIGN_RIGHT ? "RIGHT" + : halign == TABLE_HALIGN_CENTER ? "CENTER" + : "CHAR")); + if (cell.style->cell_style.decimal_char) + fprintf (html->file, " CHAR=\"%c\"", + cell.style->cell_style.decimal_char); + } - int valign = cell.options & TAB_VALIGN; - if (valign != TAB_TOP) + if (cell.style->cell_style.valign != TABLE_VALIGN_TOP) fprintf (html->file, " ALIGN=\"%s\"", - valign == TAB_BOTTOM ? "BOTTOM" : "MIDDLE"); + (cell.style->cell_style.valign == TABLE_VALIGN_BOTTOM + ? "BOTTOM" : "MIDDLE")); colspan = table_cell_colspan (&cell); if (colspan > 1)