mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-21 06:45:39 -06:00
Report: Print removed center parameter
git-svn-id: svn://ultimatepp.org/upp/trunk@5936 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
a6d2838c5f
commit
cab6be00e3
2 changed files with 4 additions and 8 deletions
|
|
@ -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"));
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue