GNOME Bugzilla – Bug 500017
incorrect graph printing
Last modified: 2007-11-28 09:21:23 UTC
new workbook delete all but 1 sheet (just to make sure we really know which sheet we are seeing) insert a rectangle and set its background to red. pagesetup: switch on gridlines and row/column headers okay check the printpreview: you should see the rectangle nicely on a sheet with gridlines and headers insert a graph (no data needed) check the print preview. Now only the graph is on the sheet but there is a second page without grid or headers but only the rectangle. now push the graph to the back. check the print preview. Everything is fine (except that the ordering of the objects is reversed, but that is bug 499913 ) A similar situation occurs with 2 graphs only. It seems that printing a graph closes the page so that all following sheet objects, whether graphs or not are pushed onto a new page. that's why I assigned this to charting rather than printing.
> It seems that printing a graph closes the page so that all following sheet > objects, whether graphs or not are > pushed onto a new page. You're right, there's a call to cairo_show_page in gog_renderer_render_to_cairo used for printing, needed when we were using earlier versions of cairo. This bug is fixed in the recent cairo versions, but I don't remember if it's in the 1.2 or the 1.4 serie. I'll have a look to see if we can safely remove the cairo_show_page call.
I fail to see how it could have ever been correct calling cairo_show_page inside the drawing code for a single graph.
gog_render_to_cairo was only used for graph export until the switch to GtkPrint. In this case, an extra call to cairo_show_page didn't hurt. And as I said, it was mandatory when using earlier versions of cairo if you want to something else than a blank page in the exported file.
Fixed. Thanks.