Patch level :2.0 426
Files correlati :tutte le printapp in giro Ricompilazione Demo : [ ] Commento : CM600047 Se dall'impostazione stampante vengono richieste due copie, non avviene il salto pagina dopo la prima copia ma le fa tutte e due di seguito. git-svn-id: svn://10.65.10.50/trunk@10930 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
6782ae3578
commit
5f61f8a92d
@ -3,20 +3,7 @@
|
||||
#define MSK_TYPE 101
|
||||
#define MSK_FILENAME 102
|
||||
#define MSK_PRINTERS 103
|
||||
// #define MSK_CODES 111
|
||||
// IMPORTANTE! lasciare il numero 111,
|
||||
// in modo che la maschera sia compatibile
|
||||
// con i metodi di ba2300, usati anche
|
||||
// da printer
|
||||
#define MSK_ISGRAPHICS 334
|
||||
#define MSK_SIZE 335
|
||||
#define MSK_LINES 336
|
||||
#define MSK_NPAGES 337
|
||||
#define MSK_FONT 338
|
||||
|
||||
/*
|
||||
#define MSK_PRINTERFILE prn.epf
|
||||
#define MSK_NAMESFILE nms.epf
|
||||
#define PRINTERSFILE "prn.epf"
|
||||
#define NAMESFILE "nms.epf"
|
||||
*/
|
@ -73,13 +73,7 @@ BEGIN
|
||||
ITEM "9|9"
|
||||
ITEM "10|10"
|
||||
HELP "Numero di linee per pollice"
|
||||
END
|
||||
|
||||
NUMBER MSK_NPAGES 3
|
||||
BEGIN
|
||||
PROMPT 54 8 "N.o copie "
|
||||
HELP "Numero di copie da fare"
|
||||
END
|
||||
END
|
||||
|
||||
BOOLEAN MSK_ISGRAPHICS
|
||||
BEGIN
|
||||
|
@ -1047,60 +1047,48 @@ void TPrint_application::print()
|
||||
// only external apps can change it
|
||||
_repeat_print = FALSE;
|
||||
|
||||
// never print multiple copies if printer is viswin
|
||||
// only application may repeat printing by setting _repeat_print
|
||||
int nc = printer().printtype() == screenvis ? 1 : printer().n_copies();
|
||||
|
||||
|
||||
// NULL cursor passed only prints once
|
||||
// pre and post process do everything
|
||||
|
||||
if (_cur == NULL)
|
||||
{
|
||||
//************************************************
|
||||
while (nc--)
|
||||
{
|
||||
int cnt = 0;
|
||||
bool ok = TRUE;
|
||||
do {
|
||||
if (preprocess_print (0, cnt))
|
||||
{
|
||||
int cnt2 = 0;
|
||||
do {
|
||||
if (preprocess_page (0, cnt2))
|
||||
{
|
||||
set_page (0, cnt2);
|
||||
ok = print_one (0);
|
||||
}
|
||||
int cnt = 0;
|
||||
bool ok = TRUE;
|
||||
do {
|
||||
if (preprocess_print (0, cnt))
|
||||
{
|
||||
int cnt2 = 0;
|
||||
do {
|
||||
if (preprocess_page (0, cnt2))
|
||||
{
|
||||
set_page (0, cnt2);
|
||||
ok = print_one (0);
|
||||
}
|
||||
while (ok && postprocess_page (0, cnt2++) == REPEAT_PAGE);
|
||||
}
|
||||
while (ok && postprocess_page (0, cnt2++) == REPEAT_PAGE);
|
||||
}
|
||||
while (ok && postprocess_print (0, cnt++) == REPEAT_PAGE);
|
||||
// *****************************************************
|
||||
}
|
||||
while (ok && postprocess_print (0, cnt++) == REPEAT_PAGE);
|
||||
// *****************************************************
|
||||
}
|
||||
else
|
||||
{
|
||||
// cursor exists *********************************************
|
||||
while (nc--)
|
||||
(*_cur) = 0l;
|
||||
_cur->freeze (TRUE);
|
||||
|
||||
if (_cur->items () >= _wthr &&
|
||||
(_force_progind || printer ().printtype () != screenvis))
|
||||
_prind = new TProgind (_cur->items (), _wmess, _wcancel, _wbar, 35);
|
||||
print_tree (_pr_tree);
|
||||
_cur->freeze (FALSE);
|
||||
|
||||
if (_prind)
|
||||
{
|
||||
(*_cur) = 0l;
|
||||
_cur->freeze (TRUE);
|
||||
|
||||
if (_cur->items () >= _wthr &&
|
||||
(_force_progind || printer ().printtype () != screenvis))
|
||||
_prind = new TProgind (_cur->items (), _wmess, _wcancel, _wbar, 35);
|
||||
print_tree (_pr_tree);
|
||||
_cur->freeze (FALSE);
|
||||
|
||||
if (_prind)
|
||||
{
|
||||
delete _prind;
|
||||
_prind = NULL;
|
||||
}
|
||||
|
||||
if (nc)
|
||||
printer().formfeed(); // Salta pagina tra una copia e l'altra di una stampa
|
||||
delete _prind;
|
||||
_prind = NULL;
|
||||
}
|
||||
// ****************************************************************
|
||||
}
|
||||
|
@ -972,7 +972,7 @@ HIDDEN bool font_handler(TMask_field& f, KEY key)
|
||||
|
||||
TPrinter::TPrinter()
|
||||
: _date (TODAY), _multiple_link (FALSE), _frozen (FALSE), _isgraphics (TRUE),
|
||||
_lines_per_inch (6), _ch_size (12), _ncopies(1), _export_header(FALSE),
|
||||
_lines_per_inch (6), _ch_size (12), _export_header(FALSE),
|
||||
_export_header_len(0), _vf(NULL), _l_offset(0), _c_offset(0), _appendfile(FALSE),
|
||||
_print_rcd(NULL)
|
||||
|
||||
@ -992,7 +992,6 @@ TPrinter::TPrinter()
|
||||
_headersize = 0;
|
||||
_footersize = 0;
|
||||
_isopen = FALSE;
|
||||
_multiple_copies = main_app().class_id() == CLASS_PRINT_APPLICATION;
|
||||
|
||||
os_get_default_printer(_defPrinter);
|
||||
|
||||
@ -1527,13 +1526,10 @@ bool TPrinter::set()
|
||||
TMask mask("bagn001a");
|
||||
|
||||
mask.set(MSK_FILENAME, _printerfile);
|
||||
mask.set(MSK_NPAGES, _ncopies);
|
||||
|
||||
const bool can_save = _config == "Printer";
|
||||
mask.enable(DLG_OK, can_save);
|
||||
|
||||
// mask.enable(DLG_SAVEREC, can_save);
|
||||
|
||||
TToken_string pn2; os_get_printer_names(pn2);
|
||||
|
||||
TList_field& plst = (TList_field&)mask.field (MSK_PRINTERS);
|
||||
@ -1552,8 +1548,8 @@ bool TPrinter::set()
|
||||
mask.set_handler(MSK_PRINTERS, set_windows_print_device);
|
||||
mask.set_handler(MSK_FONT, font_handler);
|
||||
|
||||
if (!_multiple_copies)
|
||||
mask.hide(MSK_NPAGES);
|
||||
// if (!_multiple_copies)
|
||||
// mask.hide(MSK_NPAGES);
|
||||
|
||||
if (_printertype == fileprinter)
|
||||
mask.set (MSK_TYPE, "1");
|
||||
@ -1608,7 +1604,6 @@ bool TPrinter::set()
|
||||
}
|
||||
|
||||
_prname = mask.get(MSK_PRINTERS);
|
||||
_ncopies = atoi (mask.get (MSK_NPAGES));
|
||||
|
||||
switch (atoi (mask.get (MSK_TYPE)))
|
||||
{
|
||||
|
@ -259,8 +259,6 @@ class TPrinter : public TObject
|
||||
bool _isgraphics;
|
||||
// @cmember:(INTERNAL) Indica se la stampante e' stata momentaneamente interrotta
|
||||
bool _frozen;
|
||||
// @cmember:(INTERNAL) Numero di copie da fare
|
||||
int _ncopies;
|
||||
// @cmember:(INTERNAL) Descrizione completa dello stato della stampante
|
||||
PRINT_RCD* _print_rcd;
|
||||
// @cmember:(INTERNAL) Dimensione del record per la descrizione completa dello stato della stampante
|
||||
@ -280,8 +278,6 @@ class TPrinter : public TObject
|
||||
|
||||
// @cmember:(INTERNAL) Setta <p t> con il profilo della stampante
|
||||
void _get_windows_printer_names(TToken_string& t);
|
||||
// @cmember:(INTERNAL) Indica se si tratta di copia multipla
|
||||
bool _multiple_copies;
|
||||
// @cmember:(INTERNAL) Indica se occorre esportare l'header di stampa
|
||||
bool _export_header;
|
||||
// @cmember:(INTERNAL) Lunghezza dell'header di stampa da esportare
|
||||
@ -422,11 +418,6 @@ public:
|
||||
// @cmember Setta l'interruzione momentanea della stampante
|
||||
void freeze(bool b = TRUE)
|
||||
{ _frozen = b; }
|
||||
// @cmember Ritorna il numero delle copie da stampare
|
||||
int n_copies() { return _ncopies; }
|
||||
// @cmember Abilita/disabilita la copia multipla!!!
|
||||
void enable_multiple_copies(bool b = TRUE)
|
||||
{ _multiple_copies = b; }
|
||||
|
||||
// @cmember Ritorna il testo da stampare
|
||||
TTextfile& get_txt()
|
||||
|
Loading…
x
Reference in New Issue
Block a user