From cab6be00e30eae8fe808af13e0b15961d0b64ac3 Mon Sep 17 00:00:00 2001 From: cxl Date: Sat, 30 Mar 2013 17:27:27 +0000 Subject: [PATCH] Report: Print removed center parameter git-svn-id: svn://ultimatepp.org/upp/trunk@5936 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/Report/Report.h | 2 +- uppsrc/Report/ReportDlg.cpp | 10 +++------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/uppsrc/Report/Report.h b/uppsrc/Report/Report.h index f671de546..12fa30aa5 100644 --- a/uppsrc/Report/Report.h +++ b/uppsrc/Report/Report.h @@ -144,7 +144,7 @@ public: }; String Pdf(Report& report, bool pdfa = false); -void Print(Report& r, PrinterJob& pd, bool center = true); +void Print(Report& r, PrinterJob& pd); bool DefaultPrint(Report& r, int i, const char *_name = t_("Report")); bool Print(Report& r, int i, const char *name = t_("Report")); bool Perform(Report& r, const char *name = t_("Report")); diff --git a/uppsrc/Report/ReportDlg.cpp b/uppsrc/Report/ReportDlg.cpp index 4498efb47..4c625d180 100644 --- a/uppsrc/Report/ReportDlg.cpp +++ b/uppsrc/Report/ReportDlg.cpp @@ -4,18 +4,14 @@ NAMESPACE_UPP #define LLOG(x) // LOG(x) -void Print(Report& r, PrinterJob& pd, bool center) +void Print(Report& r, PrinterJob& pd) { Draw& w = pd; Size sz = w.GetPageSize(); Point mg = r.GetMargins(); Size pgsz = r.GetPage(0).GetSize(); - int x = 0; - int y = 0; - if(center) { - x = Nvl(mg.x, (sz.cx - pgsz.cx) / 2); - y = Nvl(mg.y, (sz.cy - pgsz.cy) / 2); - } + int x = Nvl(mg.x, (sz.cx - pgsz.cx) / 2); + int y = Nvl(mg.y, (sz.cy - pgsz.cy) / 2); for(int i = 0; i < pd.GetPageCount(); i++) { Drawing iw = r.GetPage(pd[i]); Size sz = iw.GetSize();