text-item: Merge "title" and "subtitle" items into a new "page title".
[pspp] / src / output / html.c
index f9d45736ef0fe866537e97a9a068b5664acd68aa..d75b13190948ee1896ede47bd0851f6e4490df4f 100644 (file)
@@ -261,12 +261,7 @@ html_submit (struct output_driver *driver,
 
       switch (text_item_get_type (text_item))
         {
-        case TEXT_ITEM_TITLE:
-          print_title_tag (html->file, "H1", s);
-          break;
-
-        case TEXT_ITEM_SUBTITLE:
-          print_title_tag (html->file, "H2", s);
+        case TEXT_ITEM_PAGE_TITLE:
           break;
 
         case TEXT_ITEM_COMMAND_OPEN:
@@ -480,10 +475,16 @@ html_output_table (struct html_driver *html, const struct table_item *item)
   fputs ("<TBODY VALIGN=\"TOP\">\n", html->file);
 
   const struct table_item_text *title = table_item_get_title (item);
-  if (title)
+  const struct table_item_text *layers = table_item_get_layers (item);
+  if (title || layers)
     {
       fputs ("  <CAPTION>", html->file);
-      html_put_table_item_text (html, title);
+      if (title)
+        html_put_table_item_text (html, title);
+      if (title && layers)
+        fputs ("<BR>\n", html->file);
+      if (layers)
+        html_put_table_item_text (html, layers);
       fputs ("</CAPTION>\n", html->file);
     }
 
@@ -540,21 +541,24 @@ html_output_table (struct html_driver *html, const struct table_item *item)
              /* Cell borders. */
              int n_borders = 0;
 
-             top = table_get_rule (t, TABLE_VERT, x, y);
+              struct cell_color color;
+             top = table_get_rule (t, TABLE_VERT, x, y, &color);
               put_border (html->file, &n_borders, top, "top");
 
              if (y + rowspan == table_nr (t))
                {
-                 bottom = table_get_rule (t, TABLE_VERT, x, y + rowspan);
+                 bottom = table_get_rule (t, TABLE_VERT, x, y + rowspan,
+                                           &color);
                   put_border (html->file, &n_borders, bottom, "bottom");
                }
 
-             left = table_get_rule (t, TABLE_HORZ, x, y);
+             left = table_get_rule (t, TABLE_HORZ, x, y, &color);
               put_border (html->file, &n_borders, left, "left");
 
              if (x + colspan == table_nc (t))
                {
-                 right = table_get_rule (t, TABLE_HORZ, x + colspan, y);
+                 right = table_get_rule (t, TABLE_HORZ, x + colspan, y,
+                                          &color);
                   put_border (html->file, &n_borders, right, "right");
                }