[gnumeric] Fix printing of column headers when formulae are shown. Part of [#655389]
- From: Andreas J. Guelzow <guelzow src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Fix printing of column headers when formulae are shown. Part of [#655389]
- Date: Wed, 27 Jul 2011 08:43:34 +0000 (UTC)
commit 6048c3720a1a83885bc51f9047a6787a366d8977
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date: Wed Jul 27 02:42:50 2011 -0600
Fix printing of column headers when formulae are shown. Part of [#655389]
2011-07-27 Andreas J. Guelzow <aguelzow pyrshep ca>
* src/print.c (print_page_col_headers): adjust for column widths when
formulae are shown
ChangeLog | 5 +++++
NEWS | 1 +
src/print.c | 8 +++++---
3 files changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 6169336..4a3e399 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2011-07-27 Andreas J. Guelzow <aguelzow pyrshep ca>
+ * src/print.c (print_page_col_headers): adjust for column widths when
+ formulae are shown
+
+2011-07-27 Andreas J. Guelzow <aguelzow pyrshep ca>
+
* src/print-cell.c (print_cell_gtk): only replace errors by blanks if the
error wopuld in fact be shown, i.e. not if it is the result of a formula
and formulae are shown.
diff --git a/NEWS b/NEWS
index 42d43ea..4951d24 100644
--- a/NEWS
+++ b/NEWS
@@ -15,6 +15,7 @@ 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]
Morten:
* Fix --with-gnome compilation: [#652802]
diff --git a/src/print.c b/src/print.c
index 2bde8d1..f3629de 100644
--- a/src/print.c
+++ b/src/print.c
@@ -249,11 +249,13 @@ print_page_col_headers (GtkPrintContext *context,
int col;
double x;
PangoFontDescription *desc;
+ double hscale;
g_return_if_fail (IS_SHEET (sheet));
g_return_if_fail (range != NULL);
g_return_if_fail (range->start.col <= range->end.col);
+ hscale = sheet->display_formulas ? 2 : 1;
desc = pango_font_description_from_string ("sans 12");
start_col = range->start.col;
@@ -266,16 +268,16 @@ print_page_col_headers (GtkPrintContext *context,
if (ci->visible) {
if (sheet->text_is_rtl)
- x -= ci->size_pts;
+ x -= ci->size_pts * hscale;
print_header_gtk (context, cr,
x + 0.5, 0,
- ci->size_pts - 1,
+ ci->size_pts * hscale - 1,
col_header_height - 0.5,
col_name (col), desc);
if (!sheet->text_is_rtl)
- x += ci->size_pts;
+ x += ci->size_pts * hscale;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]