[gnumeric] Fix printing of borders when formulae are shown. [#655389]



commit ad23fdd1065350a43a5e4189702dfd2342474a19
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date:   Wed Jul 27 07:47:07 2011 -0600

    Fix printing of borders when formulae are shown. [#655389]
    
    2011-07-27 Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* src/style-border.c (gnm_style_borders_row_print_gtk): account for
    	column width change when formulae are shown.

 ChangeLog          |    5 +++++
 NEWS               |    3 ++-
 src/style-border.c |    3 ++-
 3 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 4a3e399..5a36f8b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2011-07-27 Andreas J. Guelzow <aguelzow pyrshep ca>
 
+	* src/style-border.c (gnm_style_borders_row_print_gtk): account for
+	column width change when formulae are shown.
+
+2011-07-27 Andreas J. Guelzow <aguelzow pyrshep ca>
+
 	* src/print.c (print_page_col_headers): adjust for column widths when
 	formulae are shown
 
diff --git a/NEWS b/NEWS
index 4951d24..bf1c3ce 100644
--- a/NEWS
+++ b/NEWS
@@ -15,7 +15,8 @@ Andreas:
 	abscissae/ordinates. [#654538]
 	* Export defined names to xlsx. [#655010]
 	* Implement printing of errors as blanks.
-	* Fix printing of column headers when formulae are shown. Part of [#655389]
+	* Fix printing of column headers and borders when formulae are shown. 
+	[#655389]
 
 Morten:
 	* Fix --with-gnome compilation:  [#652802]
diff --git a/src/style-border.c b/src/style-border.c
index 192caf3..a0ce3c5 100644
--- a/src/style-border.c
+++ b/src/style-border.c
@@ -706,6 +706,7 @@ gnm_style_borders_row_print_gtk (GnmBorder const * const * prev_vert,
 	int o[2][2], col;
 	double next_x = x;
 	GnmBorder const *border;
+	double const hscale = sheet->display_formulas ? 2 : 1;
 
 	cairo_save (context);
 
@@ -716,7 +717,7 @@ gnm_style_borders_row_print_gtk (GnmBorder const * const * prev_vert,
 		ColRowInfo const *cri = sheet_col_get_info (sheet, col);
 		if (!cri->visible)
 			continue;
-		next_x = x + dir * cri->size_pts;
+		next_x = x + dir * cri->size_pts * hscale;
 
 		border = sr->top [col];
 



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