Riportate modifiche per accodare dati in caso di stampa su file
git-svn-id: svn://10.65.10.50/trunk@5303 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
55c6755ddb
commit
c6943590d1
@ -1103,8 +1103,8 @@ HIDDEN char defPrinter[80];
|
||||
TPrinter::TPrinter()
|
||||
: _date (TODAY), _multiple_link (FALSE), _frozen (FALSE), _isgraphics (TRUE),
|
||||
_lines_per_inch (6), _ch_size (12), _ncopies(1), _export_header(FALSE),
|
||||
_export_header_len(0), _vf(NULL), _l_offset(0), _c_offset(0)
|
||||
#if XVT_OS == XVT_OS_WIN || XVT_OS == XVT_OS_WIN32
|
||||
_export_header_len(0), _vf(NULL), _l_offset(0), _c_offset(0), _appendfile(FALSE)
|
||||
#if XVT_OS == XVT_OS_WIN || XVT_OS == XVT_OS_NT
|
||||
, _print_rcd(NULL)
|
||||
#endif
|
||||
|
||||
@ -2123,7 +2123,7 @@ void TPrinter::close ()
|
||||
}
|
||||
else if (_printertype == fileprinter)
|
||||
{
|
||||
FILE* fp = fopen(_printerfile, "w");
|
||||
FILE* fp = fopen(_printerfile, _appendfile ? "a" : "w");
|
||||
if (fp == NULL)
|
||||
{
|
||||
error_box("Impossibile aprire il file %s", (const char*)_printerfile);
|
||||
|
@ -350,9 +350,11 @@ class TPrinter : public TObject
|
||||
// @cmember:(INTERNAL) Caratteri per fincatura
|
||||
char _fink[11];
|
||||
|
||||
// @cmember:(INTERNAL) Flag per aggiungere ad una stampa su file gia' esistente (TRUE aggiunge in coda, FALSE sovrascrive)
|
||||
bool _appendfile;
|
||||
|
||||
// @cmember:(INTERNAL) Tipo di fincatura (TRUE grafica, FALSE testo)
|
||||
bool _fink_mode;
|
||||
|
||||
// @cmember:(INTERNAL) Fincatore per modo testo
|
||||
TPrint_intersector* _finker;
|
||||
|
||||
@ -607,6 +609,9 @@ public:
|
||||
// @cmember Setta il nome del file per la stampa su disco
|
||||
void set_printerfile(const char * ffile)
|
||||
{ _printerfile=ffile; }
|
||||
// @cmember Setta il flag per la stampa in coda al file su disco
|
||||
void set_append(const bool append = TRUE)
|
||||
{ _appendfile = append; }
|
||||
// @cmember Ritorna il numero della pagina logica da stampare
|
||||
word getcurrentpage() const
|
||||
{ return _currentpage; }
|
||||
|
Loading…
x
Reference in New Issue
Block a user