From 780a6674a7d8f88b52d9260ccfc9f84ce9597d17 Mon Sep 17 00:00:00 2001 From: Andrea Zagli Date: Tue, 7 Sep 2010 15:33:16 +0200 Subject: [PATCH] Bugfix on footer positioning. --- src/rptreport.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/rptreport.c b/src/rptreport.c index 9e492e8..a4ea626 100644 --- a/src/rptreport.c +++ b/src/rptreport.c @@ -1241,15 +1241,15 @@ xmlDoc { if (row == 0 || priv->body->new_page_after || - (priv->page_footer != NULL && (cur_y + priv->body->height > priv->page->size->height - priv->page->margin_top - priv->page->margin_bottom - (priv->page_footer != NULL ? priv->page_footer->height: 0.0))) || - cur_y > (priv->page->size->height - priv->page->margin_top - priv->page->margin_bottom)) + (priv->page_footer != NULL && (cur_y + priv->body->height > priv->page->size->height - priv->page->margin_bottom - priv->page_footer->height)) || + cur_y > (priv->page->size->height - priv->page->margin_bottom)) { if (priv->cur_page > 0 && priv->page_footer != NULL) { if ((priv->cur_page == 1 && priv->page_footer->first_page) || priv->cur_page > 1) { - cur_y = priv->page->size->height - priv->page->margin_top - priv->page->margin_bottom - priv->page_footer->height; + cur_y = priv->page->size->height - priv->page->margin_bottom - priv->page_footer->height; rpt_report_rptprint_section (rpt_report, xpage, &cur_y, RPTREPORT_SECTION_PAGE_FOOTER, row - 1); } } @@ -1281,12 +1281,12 @@ xmlDoc if (priv->cur_page > 0 && priv->report_footer != NULL) { - if ((cur_y + priv->report_footer->height > priv->page->size->height - priv->page->margin_top - priv->page->margin_bottom - (priv->page_footer != NULL ? priv->page_footer->height : 0.0)) || + if ((cur_y + priv->report_footer->height > priv->page->size->height - priv->page->margin_bottom - (priv->page_footer != NULL ? priv->page_footer->height : 0.0)) || priv->report_footer->new_page_before) { if (priv->cur_page > 0 && priv->page_footer != NULL) { - cur_y = priv->page->size->height - priv->page->margin_top - priv->page->margin_bottom - priv->page_footer->height; + cur_y = priv->page->size->height - priv->page->margin_bottom - priv->page_footer->height; rpt_report_rptprint_section (rpt_report, xpage, &cur_y, RPTREPORT_SECTION_PAGE_FOOTER, row - 1); } @@ -1302,7 +1302,7 @@ xmlDoc } if (priv->cur_page > 0 && priv->page_footer != NULL && priv->page_footer->last_page) { - cur_y = priv->page->size->height - priv->page->margin_top - priv->page->margin_bottom - priv->page_footer->height; + cur_y = priv->page->size->height - priv->page->margin_bottom - priv->page_footer->height; rpt_report_rptprint_section (rpt_report, xpage, &cur_y, RPTREPORT_SECTION_PAGE_FOOTER, row - 1); } @@ -1332,7 +1332,7 @@ xmlDoc } if (priv->page_footer != NULL) { - cur_y = priv->page->size->height - priv->page->margin_top - priv->page->margin_bottom - priv->page_footer->height; + cur_y = priv->page->size->height - priv->page->margin_bottom - priv->page_footer->height; rpt_report_rptprint_section (rpt_report, xpage, &cur_y, RPTREPORT_SECTION_PAGE_FOOTER, -1); } } -- 2.49.0