Commit f0f97e34 authored by Andreas J. Guelzow's avatar Andreas J. Guelzow Committed by Andreas J. Guelzow

include styles specs for HTML4.0

2002-04-09  Andreas J. Guelzow <aguelzow@taliesin.ca>

	* html.c (write_cell) : include styles specs for HTML4.0
parent 54e4b9c5
......@@ -12,6 +12,7 @@ Andreas:
* Make Random Generator Tool undoable.
* Fix and improve row-height dialog.
* Fix hide/show detail and group/ungroup dialog.
* Include more info in HTML 4.0 files.
Jody:
* Add password dialog to support encrypted input.
......
2002-04-09 Andreas J. Guelzow <aguelzow@taliesin.ca>
* html.c (write_cell) : include styles specs for HTML4.0
2002-04-02 Jody Goldberg <jody@gnome.org>
* latex.c (latex2e_write_multicolumn_cell) : Cell::col_info is
......
......@@ -248,7 +248,23 @@ write_cell (FILE *fp, Sheet *sheet, gint row, gint col, html_version_t version)
}
}
if (version == HTML40) {
if (mstyle != NULL) {
fprintf (fp, " style=\"");
html_get_color (mstyle, MSTYLE_COLOR_BACK, &r, &g, &b);
if (r < 255 || g < 255 || b < 255) {
fprintf (fp, "background:#%02X%02X%02X;", r, g, b);
}
if (cell != NULL) {
gint size = (int) (mstyle_get_font_size (mstyle) + 0.5);
fprintf (fp, " font-size:%ipt;", size);
html_get_text_color (cell, mstyle, &r, &g, &b);
if (r > 0 || g > 0 || b > 0)
fprintf (fp, " color:#%02X%02X%02X;", r, g, b);
}
fprintf (fp, "\"");
}
}
fprintf (fp, ">");
html_write_cell_content (fp, cell, mstyle, version);
fputs ("</TD>\n", fp);
......
......@@ -248,7 +248,23 @@ write_cell (FILE *fp, Sheet *sheet, gint row, gint col, html_version_t version)
}
}
if (version == HTML40) {
if (mstyle != NULL) {
fprintf (fp, " style=\"");
html_get_color (mstyle, MSTYLE_COLOR_BACK, &r, &g, &b);
if (r < 255 || g < 255 || b < 255) {
fprintf (fp, "background:#%02X%02X%02X;", r, g, b);
}
if (cell != NULL) {
gint size = (int) (mstyle_get_font_size (mstyle) + 0.5);
fprintf (fp, " font-size:%ipt;", size);
html_get_text_color (cell, mstyle, &r, &g, &b);
if (r > 0 || g > 0 || b > 0)
fprintf (fp, " color:#%02X%02X%02X;", r, g, b);
}
fprintf (fp, "\"");
}
}
fprintf (fp, ">");
html_write_cell_content (fp, cell, mstyle, version);
fputs ("</TD>\n", fp);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment