Esempio n. 1
0
void DocReport::StartPage() {
	Create(pgsz.cx, pgsz.cy);
	size = pgsz;
	ylim = size.cy;
	bool artf = dortf;
	dortf = false;
	if(qtffooter.IsEmpty()) {
		if(footer) {
			Size sz = footer.GetSize();
			DrawDrawing(0, pgsz.cy - sz.cy, sz.cx, sz.cy, footer);
			size.cy -= sz.cy;
		}
	}
	else {
		ypos = 0;
		Qtf(HFormat(qtffooter));
		Drawing h = GetResult();
		Create(pgsz.cx, pgsz.cy);
		DrawDrawing(0, pgsz.cy - ypos, pgsz.cx, pgsz.cy, h);
		size.cy -= ypos;
	}
	ylim = size.cy;
	ypos = 0;
	if(qtfheader.IsEmpty()) {
		if(header) {
			Size sz = header.GetSize();
			DrawDrawing(0, 0, sz.cx, sz.cy, header);
			ypos = max(0, sz.cy);
		}
	}
	else
		Qtf(HFormat(qtfheader));
	size.cy -= ypos;
	if(pgnformat)
		DrawText(pgnx, pgny >= 0 ? pgny : pgsz.cy - pgny,
		         Format(pgnformat, pageno), pgnfont);
	dortf = artf;
}
Esempio n. 2
0
Document::Document(const char *qtf) {
	Qtf(qtf);
}
Esempio n. 3
0
Document& Document::operator=(const char *s) {
	Clear();
	Qtf(s);
	return *this;
}