[gnumeric] Fix borders of merged cells in LaTeX export. [#100372]



commit 8cf9338fdbe0f2bb285f96f7f4f036cc52f433c9
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date:   Wed Apr 24 22:50:59 2013 -0600

    Fix borders of merged cells in LaTeX export. [#100372]
    
    2013-04-22  Andreas J. Guelzow <aguelzow pyrshep ca>
    
        * latex.c (latex2e_find_hhlines): do not complete partial borders
        above a merged cell. We are not doing this in Gnumeric proper.

 NEWS                   |    1 +
 plugins/html/ChangeLog |    5 +++++
 plugins/html/latex.c   |   30 +++++++++++++++++-------------
 3 files changed, 23 insertions(+), 13 deletions(-)
---
diff --git a/NEWS b/NEWS
index 80eb2fa..6e1a732 100644
--- a/NEWS
+++ b/NEWS
@@ -11,6 +11,7 @@ Andreas:
        * Fix border handling in html4 export. [#635217]
        * Support ODF's title tag in headers and footers.
        * Rename some items in the Statistics menu.
+       * Fix borders of merged cells in LaTeX export. [#100372]
 
 Dominique Leuenberger:
        * Fix locale directory.
diff --git a/plugins/html/ChangeLog b/plugins/html/ChangeLog
index 2bfd7b4..805bcb8 100644
--- a/plugins/html/ChangeLog
+++ b/plugins/html/ChangeLog
@@ -1,5 +1,10 @@
 2013-04-22  Andreas J. Guelzow <aguelzow pyrshep ca>
 
+       * latex.c (latex2e_find_hhlines): do not complete partial borders
+       above a merged cell. We are not doing this in Gnumeric proper.
+
+2013-04-22  Andreas J. Guelzow <aguelzow pyrshep ca>
+
        * html.c (html_write_border_style_40_for_merged_cell): new
        (write_cell): call html_write_border_style_40_for_merged_cell
        as appropriate. [#635217]
diff --git a/plugins/html/latex.c b/plugins/html/latex.c
index 4e30cdf..64ee72e 100644
--- a/plugins/html/latex.c
+++ b/plugins/html/latex.c
@@ -744,7 +744,7 @@ latex2e_find_vline (int col, int row, Sheet *sheet, GnmStyleElement which_border
 static void
 latex2e_print_vert_border (GsfOutput *output, GnmStyleBorderType style)
 {
-       g_return_if_fail (style >= 0 && style < G_N_ELEMENTS (border_styles));
+       g_return_if_fail (/* style >= 0 && */ style < G_N_ELEMENTS (border_styles));
 
        gsf_output_printf (output, "%s", border_styles[style].vertical);
 }
@@ -1131,29 +1131,33 @@ latex2e_write_multicolumn_cell (GsfOutput *output, GnmCell *cell, int start_col,
  */
 
 static gboolean
-latex2e_find_hhlines (GnmStyleBorderType *clines, int length, int col, int row,
+latex2e_find_hhlines (GnmStyleBorderType *clines, G_GNUC_UNUSED int length, int col, int row,
                      Sheet *sheet, GnmStyleElement type)
 {
        GnmStyle const  *style;
        GnmBorder const *border;
-       GnmRange const  *merge_range;
-       GnmCellPos pos;
+       /* GnmRange const       *merge_range; */
+       /* GnmCellPos pos; */
 
        style = sheet_style_get (sheet, col, row);
        border = gnm_style_get_border (style, type);
        if (gnm_style_border_is_blank (border))
                return FALSE;
        clines[0] = border->line_type;
-       pos.col = col;
-       pos.row = row;
-       merge_range = gnm_sheet_merge_is_corner (sheet, &pos);
-       if (merge_range != NULL) {
-               int i;
 
-               for (i = 1; i < MIN (merge_range->end.col - merge_range->start.col + 1,
-                                   length); i++)
-                            clines[i] = border->line_type;
-       }
+       /* The following code completes the border above a merged cell. As long as we allow partial */
+       /* borders above & below merged cells in Gnumeric we should not enable this.                */ 
+       /* pos.col = col; */
+       /* pos.row = row; */
+       /* merge_range = gnm_sheet_merge_is_corner (sheet, &pos); */
+       /* if (merge_range != NULL) { */
+       /*      int i; */
+
+       /*      for (i = 1; i < MIN (merge_range->end.col - merge_range->start.col + 1, */
+       /*                          length); i++) */
+       /*                   clines[i] = border->line_type; */
+       /* } */
+
        return TRUE;
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]