summaryrefslogtreecommitdiff
path: root/riscos
diff options
context:
space:
mode:
Diffstat (limited to 'riscos')
-rw-r--r--riscos/print.c10
-rw-r--r--riscos/save_draw.c6
2 files changed, 6 insertions, 10 deletions
diff --git a/riscos/print.c b/riscos/print.c
index 0e4eef004..f136fe100 100644
--- a/riscos/print.c
+++ b/riscos/print.c
@@ -471,7 +471,6 @@ bool print_document(struct gui_window *g, const char *filename)
int left, right, top, bottom, width, height;
int saved_width;
int yscroll = 0, sheets = print_max_sheets;
- struct box *box = 0;
struct content *c = g->bw->current_content;
const char *error_message;
pdriver_features features;
@@ -484,9 +483,6 @@ bool print_document(struct gui_window *g, const char *filename)
return false;
}
- if (c->type == CONTENT_HTML)
- box = c->data.html.layout;
-
/* read printer driver features */
error = xpdriver_info(0, 0, 0, &features, 0, 0, 0, 0);
if (error) {
@@ -511,7 +507,7 @@ bool print_document(struct gui_window *g, const char *filename)
/* layout the document to the correct width */
saved_width = c->width;
if (c->type == CONTENT_HTML)
- layout_document(box, width, c->data.html.box_pool);
+ layout_document(c, width);
/* open printer file */
error = xosfind_openoutw(osfind_NO_PATH | osfind_ERROR_IF_DIR |
@@ -648,7 +644,7 @@ bool print_document(struct gui_window *g, const char *filename)
/* restore document layout */
if (c->type == CONTENT_HTML)
- layout_document(box, saved_width, c->data.html.box_pool);
+ layout_document(c, saved_width);
return true;
@@ -666,7 +662,7 @@ error:
/* restore document layout */
if (c->type == CONTENT_HTML)
- layout_document(box, saved_width, c->data.html.box_pool);
+ layout_document(c, saved_width);
return false;
}
diff --git a/riscos/save_draw.c b/riscos/save_draw.c
index 896f5cacd..05ef8defb 100644
--- a/riscos/save_draw.c
+++ b/riscos/save_draw.c
@@ -146,7 +146,7 @@ bool save_as_draw(struct content *c, const char *path)
memcpy(diagram->source, "NetSurf ", 12);
/* recalculate box widths for an A4 page */
- if (!layout_document(box, A4PAGEWIDTH, c->data.html.box_pool)) {
+ if (!layout_document(c, A4PAGEWIDTH)) {
warn_user("NoMemory", 0);
goto draw_save_error;
}
@@ -183,7 +183,7 @@ bool save_as_draw(struct content *c, const char *path)
drawbuf_free();
/* reset layout to current window width */
- if (!layout_document(box, current_width, c->data.html.box_pool)) {
+ if (!layout_document(c, current_width)) {
warn_user("NoMemory", 0);
return false;
}
@@ -193,7 +193,7 @@ bool save_as_draw(struct content *c, const char *path)
draw_save_error:
drawbuf_free();
/* attempt to reflow back on failure */
- (void)layout_document(box, current_width, c->data.html.box_pool);
+ (void)layout_document(c, current_width);
return false;
}