Tentativo numero n di sistemare i problemi della Fralc Consultores (burros)
(in relazione all' offset) git-svn-id: svn://10.65.10.50/trunk@5267 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
64d0a83a57
commit
31523472bd
@ -217,23 +217,22 @@ void TPrintwin::paint_row(long j)
|
||||
set_font(printer().fontname(), XVT_FS_NONE, _char_size);
|
||||
#if XVT_OS == XVT_OS_WIN || XVT_OS == XVT_OS_WIN32
|
||||
// Questa e' la patch per TTY.DRV.
|
||||
//const TString s(_txt.line(j - _frlc));
|
||||
if (j > 0 && (j % _realformlen) == 0 || _blank_lines_to_print > 0)
|
||||
|
||||
if (j > 0 && (j % _realformlen) == 0)
|
||||
{
|
||||
/*
|
||||
TString s(516);
|
||||
s << '\r' << _txt.line(j-1) << "\n\r";
|
||||
s << _txt.line(j);
|
||||
xvt_dwin_draw_text(win(), 0, y, (char*)(const char*)s, -1);
|
||||
*/
|
||||
xvt_dwin_draw_text(win(), 0, y , "", -1);
|
||||
_frlc++;
|
||||
if (_blank_lines_to_print > 0)
|
||||
_blank_lines_to_print--;
|
||||
xvt_dwin_draw_text(win(), 0, y , "", -1);
|
||||
}
|
||||
else
|
||||
if (_blank_lines_to_print > 0)
|
||||
{
|
||||
_frlc++;
|
||||
xvt_dwin_draw_text(win(), 0, y , "", -1);
|
||||
_blank_lines_to_print--;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
xvt_dwin_draw_text(win(), 0, y /* + _frlc_cnst */, (char*)(const char*)_txt.line(j - _frlc), -1);
|
||||
xvt_dwin_draw_text(win(), 0, y /* + _frlc_cnst */, (char*)(const char*)_txt.line(j - _frlc), -1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -264,49 +263,27 @@ bool TPrintwin::print_band(
|
||||
if (offset < 0)
|
||||
_frlc += offset;
|
||||
else
|
||||
{
|
||||
if ((j + k) / _pagelen > 0)
|
||||
_frlc -= offset;
|
||||
_blank_lines_to_print += offset;
|
||||
}
|
||||
}
|
||||
if ((j+k) < _txt.lines() + _frlc && k < _formlen || _blank_lines_to_print > 0)
|
||||
paint_row(j+k);
|
||||
else
|
||||
break;
|
||||
if (generic && offset < 0 && (j + k + 1) % _pagelen == 0)
|
||||
_blank_lines_to_print += abs(offset);
|
||||
/*
|
||||
{
|
||||
int last = offset + _pagelen;
|
||||
for (i=_pagelen;i<= last; i++)
|
||||
{
|
||||
if (_chary == 1 && (i % _realformlen) == 0) // se, sfortunatamente e' una generica, applica
|
||||
{
|
||||
_frlc++;
|
||||
last++;
|
||||
xvt_dwin_draw_text(win(), 0, i, "", -1);
|
||||
}
|
||||
else
|
||||
xvt_dwin_draw_text(win(), 0, i, " ", -1);
|
||||
if (generic && offset < 0 && (j + k + 1) % _pagelen == 0)
|
||||
{
|
||||
if (k + 1 < _realformlen)
|
||||
_blank_lines_to_print += abs(offset);
|
||||
else
|
||||
break;
|
||||
}
|
||||
*/
|
||||
}
|
||||
if (generic && offset < 0 && (j + k + 1) % _pagelen == 0)
|
||||
_blank_lines_to_print += abs(offset);
|
||||
const bool cont = (j+k < _txt.lines() + _frlc) || _blank_lines_to_print > 0;
|
||||
// Se l'offset impostato era negativo (id est: sposta in alto la stampa)
|
||||
/*
|
||||
{
|
||||
int last = offset + _pagelen;
|
||||
for (i=_pagelen;i<= last ;i++)
|
||||
if (_chary == 1 && (i % _realformlen) == 0) // se, sfortunatamente e' una generica, applica
|
||||
{
|
||||
_frlc++;
|
||||
last++;
|
||||
xvt_dwin_draw_text(win(), 0, i, "", -1);
|
||||
}
|
||||
else
|
||||
xvt_dwin_draw_text(win(), 0, i, " ", -1);
|
||||
}
|
||||
*/
|
||||
|
||||
return cont;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user