Aggiustata merge_export_file
git-svn-id: svn://10.65.10.50/trunk@710 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
3195e247e2
commit
4bfb702751
@ -1,4 +1,4 @@
|
||||
// $Id: printapp.cpp,v 1.15 1994-11-11 11:23:16 villa Exp $
|
||||
// $Id: printapp.cpp,v 1.16 1994-12-02 10:48:30 villa Exp $
|
||||
#include <ctype.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
@ -469,6 +469,19 @@ void TPrint_application::fill_page (int from)
|
||||
}
|
||||
}
|
||||
|
||||
void TPrint_application::merge_export_file(const char* file, bool header, bool direct)
|
||||
{
|
||||
if (direct) printer().merge_export_file(file, header);
|
||||
else
|
||||
{
|
||||
set_row(_currow+1,"");
|
||||
TTextfile txt(file);
|
||||
for (long i = 0l; i < txt.lines(); i++)
|
||||
set_row(_currow+(int)i+1 + (i == 0l ? 1 : 0), txt.line_formatted(i));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void TPrint_application::set_row (int r, const char *frmt,...)
|
||||
{
|
||||
CHECK (r >= 1, "Print rows start at 1");
|
||||
|
@ -462,8 +462,9 @@ public:
|
||||
// infila un file di export fatto da un'altra printer (con formati e tutto, ignora
|
||||
// gli header supponendo che siano gia' presenti nel file)
|
||||
// se header == TRUE gli header stanno nel file e non vengono stampati
|
||||
void merge_export_file(const char* file, bool header = TRUE)
|
||||
{ printer().merge_export_file(file,header); }
|
||||
// se direct == FALSE le rigne vengono aggiunte con set_row da printapp, altrimenti
|
||||
// si usa printer::merge_export_file
|
||||
void merge_export_file(const char* file, bool header = TRUE, bool direct = FALSE);
|
||||
|
||||
|
||||
void set_n_copies(int n) { _ncopies = n; }
|
||||
|
@ -1330,13 +1330,11 @@ void TPrinter::set()
|
||||
_printertype = winprinter;
|
||||
break;
|
||||
case 1: // file
|
||||
|
||||
_printertype = fileprinter;
|
||||
_printerfile = mask.get (MSK_1_FILENAME);
|
||||
_curcode = atoi (mask.get (MSK_1_CODES));
|
||||
break;
|
||||
case 2: // video
|
||||
|
||||
_printertype = screenvis;
|
||||
_curcode = 0;
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user