From 33eceba57c9cd747460f525435a83f1f8a7d09ce Mon Sep 17 00:00:00 2001 From: guy Date: Mon, 10 Mar 2003 16:53:20 +0000 Subject: [PATCH] Patch level : 2.0 nopatch Files correlati : tutte le stampe Ricompilazione Demo : [ ] Commento : Supportate anche le stampe piu' lunghe di una pagina git-svn-id: svn://10.65.10.50/trunk@10894 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- include/printwin.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/include/printwin.cpp b/include/printwin.cpp index 06a50d2dc..23dae4ab8 100755 --- a/include/printwin.cpp +++ b/include/printwin.cpp @@ -343,25 +343,25 @@ bool TPrintwin::do_print() _frlc = 0; _blank_lines_to_print = 0; - int page = 0; - bool ok = TRUE; - while (ok && !_aborted) + bool finished = FALSE; + for (int page = 0; !finished && !_aborted; page++) { _aborted = xvt_print_open_page(_printrcd) == 0; - while (!_aborted && ok) + if (!_aborted) { - const RCT* rct = xvt_print_get_next_band(); - ok = rct != NULL; - if (ok) + for (const RCT* rct = xvt_print_get_next_band(); rct != NULL; rct = xvt_print_get_next_band()) { set_font(XVT_FFN_SYSTEM, XVT_FS_NONE, _char_size); // ??? set_font(printer().fontname(), XVT_FS_NONE, _char_size); LEN_SPACES(win(), -1); // Resetta bene le dimensioni font - ok = print_band(page, *rct); + if (!print_band(page, *rct)) + { + finished = TRUE; + break; + } } + _aborted = xvt_print_close_page(_printrcd) == 0; } - _aborted |= (xvt_print_close_page(_printrcd) == 0); - page++; } return !_aborted;