Inibita stampa sotto WIndows se non ci sono righe da stampare
git-svn-id: svn://10.65.10.50/trunk@613 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
ac126ba3c0
commit
03ab8b79c0
@ -1382,18 +1382,16 @@ void TPrinter::close ()
|
|||||||
|
|
||||||
if (_printertype == screenvis)
|
if (_printertype == screenvis)
|
||||||
{
|
{
|
||||||
CHECK (_vf, "VF!");
|
_vf->close_print();
|
||||||
_vf->close_print ();
|
|
||||||
_vf->run ();
|
_vf->run ();
|
||||||
if (_vf->is_open ())
|
if (_vf->is_open ()) _vf->close_modal ();
|
||||||
_vf->close_modal ();
|
|
||||||
delete _vf;
|
delete _vf;
|
||||||
freeze (FALSE);
|
freeze (FALSE);
|
||||||
_vf = NULL;
|
_vf = NULL;
|
||||||
}
|
}
|
||||||
else if (_printertype == export)
|
else if (_printertype == export)
|
||||||
{
|
{
|
||||||
if (!_exportfile.empty())
|
if (!_exportfile.empty() && _txt.lines() > 0L)
|
||||||
{
|
{
|
||||||
ofstream txt((const char*)_exportfile);
|
ofstream txt((const char*)_exportfile);
|
||||||
for (long i = 0; i < _txt.lines(); i++)
|
for (long i = 0; i < _txt.lines(); i++)
|
||||||
@ -1404,7 +1402,7 @@ void TPrinter::close ()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if XVT_OS == XVT_OS_WIN
|
#if XVT_OS == XVT_OS_WIN
|
||||||
else if (_printertype == winprinter)
|
else if (_printertype == winprinter && _txt.lines() > 0L)
|
||||||
{
|
{
|
||||||
PrintWhat._prcd = _print_rcd;
|
PrintWhat._prcd = _print_rcd;
|
||||||
PrintWhat._txt = &_txt;
|
PrintWhat._txt = &_txt;
|
||||||
|
@ -128,6 +128,7 @@ public:
|
|||||||
void close_print();
|
void close_print();
|
||||||
bool frozen() { return _frozen; }
|
bool frozen() { return _frozen; }
|
||||||
void abort_print();
|
void abort_print();
|
||||||
|
long lines() { return _txt.lines(); }
|
||||||
|
|
||||||
void add_line(const char* l);
|
void add_line(const char* l);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user