From 9b78daf135d7fa555990454c219649e4d54157d2 Mon Sep 17 00:00:00 2001 From: James Bursa Date: Sat, 2 Jul 2005 18:17:51 +0000 Subject: [project @ 2005-07-02 18:17:51 by bursa] Rewrite calculation of box minimum and maximum widths to improve layout of many pages. Move calculation of column types and border collapsing to box tree normalising stage, since they are layout independent. Add window height parameter to layout and make and at least window height. svn path=/import/netsurf/; revision=1777 --- riscos/print.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'riscos/print.c') diff --git a/riscos/print.c b/riscos/print.c index 94f067783..29663f259 100644 --- a/riscos/print.c +++ b/riscos/print.c @@ -469,7 +469,7 @@ void print_cleanup(void) bool print_document(struct gui_window *g, const char *filename) { int left, right, top, bottom, width, height; - int saved_width; + int saved_width, saved_height; int yscroll = 0, sheets = print_max_sheets; struct content *c = g->bw->current_content; const char *error_message; @@ -506,8 +506,9 @@ bool print_document(struct gui_window *g, const char *filename) /* layout the document to the correct width */ saved_width = c->width; + saved_height = c->height; if (c->type == CONTENT_HTML) - layout_document(c, width); + layout_document(c, width, height); /* open printer file */ error = xosfind_openoutw(osfind_NO_PATH | osfind_ERROR_IF_DIR | @@ -645,7 +646,7 @@ bool print_document(struct gui_window *g, const char *filename) /* restore document layout */ if (c->type == CONTENT_HTML) - layout_document(c, saved_width); + layout_document(c, saved_width, saved_height); return true; @@ -663,7 +664,7 @@ error: /* restore document layout */ if (c->type == CONTENT_HTML) - layout_document(c, saved_width); + layout_document(c, saved_width, saved_height); return false; } -- cgit v1.2.3