table: Make table cells have exactly one piece of content again.
[pspp] / src / output / render.c
index 23ef9927275be3f119077075d46e98efcc078dff..61b03f0285cc4f86605596b65b0ffae7984eb24c 100644 (file)
@@ -952,7 +952,7 @@ render_rule (const struct render_page *page, const int ofs[TABLE_N_AXES],
 
       bb[H][0] = ofs[H] + page->cp[H][d[H]];
       bb[H][1] = ofs[H] + page->cp[H][d[H] + 1];
-      if (render_direction_rtl ())
+      if (page->params->rtl)
        {
          int temp = bb[H][0];
          bb[H][0] = render_page_get_size (page, H) - bb[H][1];
@@ -974,7 +974,7 @@ render_cell (const struct render_page *page, const int ofs[TABLE_N_AXES],
 
   bb[H][0] = clip[H][0] = ofs[H] + page->cp[H][cell->d[H][0] * 2 + 1];
   bb[H][1] = clip[H][1] = ofs[H] + page->cp[H][cell->d[H][1] * 2];
-  if (render_direction_rtl ())
+  if (page->params->rtl)
     {
       int temp = bb[H][0];
       bb[H][0] = clip[H][0] = render_page_get_size (page, H) - bb[H][1];
@@ -983,9 +983,7 @@ render_cell (const struct render_page *page, const int ofs[TABLE_N_AXES],
   bb[V][0] = clip[V][0] = ofs[V] + page->cp[V][cell->d[V][0] * 2 + 1];
   bb[V][1] = clip[V][1] = ofs[V] + page->cp[V][cell->d[V][1] * 2];
 
-  int valign = (cell->n_contents
-                ? cell->contents->options & TAB_VALIGN
-                : TAB_TOP);
+  int valign = cell->options & TAB_VALIGN;
   if (valign != TAB_TOP)
     {
       int height = page->params->measure_cell_height (