[gnumeric] Fix printing and preview of graph only sheets. [#616475]
- From: Andreas J. Guelzow <guelzow src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Fix printing and preview of graph only sheets. [#616475]
- Date: Thu, 22 Apr 2010 05:04:16 +0000 (UTC)
commit 9278f56fd580ab100adb765b66bac54de00eb4eb
Author: Andreas J. Guelzow <aguelzow pyrshep ca>
Date: Wed Apr 21 23:03:50 2010 -0600
Fix printing and preview of graph only sheets. [#616475]
2010-04-21 Andreas J. Guelzow <aguelzow pyrshep ca>
* gnumeric.doap: add e-mail address
* src/print.c (print_page): graphs on graph sheets always take
the whole space, no need to center
ChangeLog | 6 ++++++
NEWS | 1 +
gnumeric.doap | 1 +
src/print.c | 27 +++++++++++++++------------
4 files changed, 23 insertions(+), 12 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 5b914d1..5398de5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-04-21 Andreas J. Guelzow <aguelzow pyrshep ca>
+
+ * gnumeric.doap: add e-mail address
+ * src/print.c (print_page): graphs on graph sheets always take
+ the whole space, no need to center
+
2010-04-21 Morten Welinder <terra gnome org>
* src/xml-sax-read.c (xml_sax_cell_content): Handle empty strings.
diff --git a/NEWS b/NEWS
index 8418bd2..7dd4a9e 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,7 @@ Gnumeric 1.10.3
Andreas:
* Fix CHITEST for rectangular ranges. [#615920]
+ * Fix printing and preview of graph only sheets. [#616475]
Jean
* Implement graph only sheets. [#158170]
diff --git a/gnumeric.doap b/gnumeric.doap
index aa64449..47743d5 100644
--- a/gnumeric.doap
+++ b/gnumeric.doap
@@ -30,6 +30,7 @@
<maintainer>
<foaf:Person>
<foaf:name>Andreas J. Guelzow</foaf:name>
+ <foaf:mbox rdf:resource="mailto:aguelzow pyrshep.ca" />
<gnome:userid>guelzow</gnome:userid>
</foaf:Person>
</maintainer>
diff --git a/src/print.c b/src/print.c
index f90ca66..19fb457 100644
--- a/src/print.c
+++ b/src/print.c
@@ -496,24 +496,27 @@ print_page (GtkPrintOperation *operation,
/* setting up content area */
cairo_save (cr);
cairo_translate (cr, sheet->text_is_rtl ? width : 0, edge_to_below_header - header);
- if (pinfo->center_horizontally == 1 || pinfo->center_vertically == 1) {
- double shift_x = 0;
- double shift_y = 0;
-
- if (pinfo->center_horizontally == 1)
- shift_x = (width - print_width * px)/2;
- if (pinfo->center_vertically == 1)
- shift_y = (height - print_height * py)/2;
- cairo_translate (cr, dir * shift_x, shift_y);
- }
- cairo_scale (cr, px, py);
if (sheet->sheet_type == GNM_SHEET_OBJECT) {
SheetObject *so = (SheetObject *) sheet->sheet_objects->data;
- if (so)
+ if (so) {
+ cairo_scale (cr, px, py);
sheet_object_draw_cairo_sized (so, cr, width, height);
+ }
} else {
+ if (pinfo->center_horizontally == 1 || pinfo->center_vertically == 1) {
+ double shift_x = 0;
+ double shift_y = 0;
+
+ if (pinfo->center_horizontally == 1)
+ shift_x = (width - print_width * px)/2;
+ if (pinfo->center_vertically == 1)
+ shift_y = (height - print_height * py)/2;
+ cairo_translate (cr, dir * shift_x, shift_y);
+ }
+ cairo_scale (cr, px, py);
+
/* printing column and row headers */
if (sheet->print_info->print_titles) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]