Patch level : 10.0 366
Files correlati : sc2.exe Ricompilazione Demo : [ ] Commento Bug 0001334 La stampa deve prevedere l'ordinamento per valuta ed un totale a rottura di valuta. git-svn-id: svn://10.65.10.50/trunk@19105 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
a08bb6b87f
commit
2fb1f2ec9f
@ -1045,7 +1045,10 @@ void TPrint_application::print()
|
|||||||
|
|
||||||
// NULL cursor passed only prints once
|
// NULL cursor passed only prints once
|
||||||
// pre and post process do everything
|
// pre and post process do everything
|
||||||
|
bool some_printed = false;
|
||||||
|
|
||||||
|
if (open_print())
|
||||||
|
{
|
||||||
if (_cur == NULL)
|
if (_cur == NULL)
|
||||||
{
|
{
|
||||||
//************************************************
|
//************************************************
|
||||||
@ -1060,6 +1063,7 @@ void TPrint_application::print()
|
|||||||
{
|
{
|
||||||
set_page (0, cnt2);
|
set_page (0, cnt2);
|
||||||
ok = print_one (0);
|
ok = print_one (0);
|
||||||
|
if (ok) some_printed = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
while (ok && postprocess_page (0, cnt2++) == REPEAT_PAGE);
|
while (ok && postprocess_page (0, cnt2++) == REPEAT_PAGE);
|
||||||
@ -1073,10 +1077,12 @@ void TPrint_application::print()
|
|||||||
// cursor exists *********************************************
|
// cursor exists *********************************************
|
||||||
(*_cur) = 0l;
|
(*_cur) = 0l;
|
||||||
_cur->freeze (TRUE);
|
_cur->freeze (TRUE);
|
||||||
|
const long items =_cur->items();
|
||||||
|
|
||||||
if (_cur->items () >= _wthr &&
|
some_printed = items > 0L;
|
||||||
|
if (items >= _wthr &&
|
||||||
(_force_progind || printer ().printtype () != screenvis))
|
(_force_progind || printer ().printtype () != screenvis))
|
||||||
_prind = new TProgind (_cur->items (), TR("Stampa in corso..."), _wcancel, _wbar);
|
_prind = new TProgind (items, TR("Stampa in corso..."), _wcancel, _wbar);
|
||||||
print_tree (_pr_tree);
|
print_tree (_pr_tree);
|
||||||
_cur->freeze (FALSE);
|
_cur->freeze (FALSE);
|
||||||
|
|
||||||
@ -1087,6 +1093,8 @@ void TPrint_application::print()
|
|||||||
}
|
}
|
||||||
// ****************************************************************
|
// ****************************************************************
|
||||||
}
|
}
|
||||||
|
close_print();
|
||||||
|
}
|
||||||
if (!_repeat_print)
|
if (!_repeat_print)
|
||||||
{
|
{
|
||||||
if (printer().isopen ())
|
if (printer().isopen ())
|
||||||
@ -1098,6 +1106,7 @@ void TPrint_application::print()
|
|||||||
postclose_print ();
|
postclose_print ();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
if (some_printed)
|
||||||
printer().formfeed();
|
printer().formfeed();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -249,6 +249,9 @@ protected:
|
|||||||
virtual bool preprocess_page(int file, int counter)
|
virtual bool preprocess_page(int file, int counter)
|
||||||
{ return TRUE; }
|
{ return TRUE; }
|
||||||
|
|
||||||
|
// @cmember Permette di eseguire qualcosa prima dell'inizio della stampa
|
||||||
|
virtual bool open_print() { return true ;}
|
||||||
|
|
||||||
// @cmember Permette di eseguire qualcosa prima della richiesta di un processo di stampa
|
// @cmember Permette di eseguire qualcosa prima della richiesta di un processo di stampa
|
||||||
// (es. per inizializzare i contatori).
|
// (es. per inizializzare i contatori).
|
||||||
// <nl> Ritornando FALSE cencella la richeista di stampa o i sottoalberi
|
// <nl> Ritornando FALSE cencella la richeista di stampa o i sottoalberi
|
||||||
@ -266,6 +269,9 @@ protected:
|
|||||||
virtual print_action postprocess_print(int file, int counter)
|
virtual print_action postprocess_print(int file, int counter)
|
||||||
{ return NEXT_PAGE; }
|
{ return NEXT_PAGE; }
|
||||||
|
|
||||||
|
// @cmember Permette di eseguire qualcosa alla fine della stampa
|
||||||
|
virtual void close_print() { }
|
||||||
|
|
||||||
// @cmember Viene eseguita dopo che tutti i lavori di stampa sono stati completati
|
// @cmember Viene eseguita dopo che tutti i lavori di stampa sono stati completati
|
||||||
virtual void postclose_print()
|
virtual void postclose_print()
|
||||||
{}
|
{}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user