Patch level : 10.0

Files correlati     : ve1.exe
Ricompilazione Demo : [ ]
Commento            :
Migliorata generazione di grandi quantita' di file PDF


git-svn-id: svn://10.65.10.50/trunk@19036 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2009-06-16 14:36:09 +00:00
parent f4c9155fcc
commit 16a2016858
4 changed files with 28 additions and 37 deletions

View File

@ -329,15 +329,11 @@ TApplication::~TApplication()
} }
bool TApplication::create() bool TApplication::create()
{ { return true; }
return TRUE;
}
bool TApplication::destroy() bool TApplication::destroy()
{ { return true; }
return TRUE;
}
void TApplication::terminate() void TApplication::terminate()
{ {
@ -363,14 +359,14 @@ void TApplication::terminate()
customize_controls(FALSE); // Rilascio eventuali DLL customize_controls(FALSE); // Rilascio eventuali DLL
} }
const char* TApplication::get_module_name() const const char* TApplication::get_module_name() const
{ {
TString& module = ((TApplication*)this)->_module_name; // Fool the compiler TString& module = ((TApplication*)this)->_module_name; // Fool the compiler
if (module.empty()) if (module.empty())
{ {
const word aut = dongle().module_name2code(_name.left(2)); const TDongle& d = dongle();
module = dongle().module_code2desc(aut); const word aut = d.module_name2code(_name.left(2));
module = d.module_code2desc(aut);
bool ok = module.full(); bool ok = module.full();
if (ok && check_autorization()) if (ok && check_autorization())
ok = has_module(aut); ok = has_module(aut);
@ -386,15 +382,16 @@ const char* TApplication::get_module_name() const
{ {
FOR_EACH_TOKEN(em, cod) FOR_EACH_TOKEN(em, cod)
{ {
if (has_module(atoi(cod))) const word alt = d.module_name2code(cod);
if (has_module(alt))
{ {
ok = TRUE; ok = true;
break; break;
} }
} }
} }
else else
ok = TRUE; ok = true;
} }
if (!ok) if (!ok)
{ {
@ -470,17 +467,22 @@ void TApplication::check_parameters(
bool TApplication::test_assistance_year() const bool TApplication::test_assistance_year() const
{ {
bool ok = true;
#ifndef _DEMO_ #ifndef _DEMO_
const int dongle_year = dongle().year_assist(); const int dongle_year = dongle().year_assist();
int app_year, dum1, dum2, dum3; int app_year, dum1, dum2, dum3;
bool ok = TApplication::get_version_info(app_year, dum1, dum2, dum3); ok = TApplication::get_version_info(app_year, dum1, dum2, dum3);
if (ok) if (ok)
{
ok = app_year <= dongle_year; ok = app_year <= dongle_year;
return ok; if (ok)
#else {
return TRUE; const int solar_year = (app_year/1000)*1000 + (app_year%100)/10;
ok = TDate(TODAY).year() <= solar_year+2;
}
}
#endif // _DEMO_ #endif // _DEMO_
return ok;
} }
// @doc EXTERNAL // @doc EXTERNAL
@ -493,7 +495,7 @@ void TApplication::run(
// @comm E' in questa fase che si controlla se esiste la chiave e' attaccata // @comm E' in questa fase che si controlla se esiste la chiave e' attaccata
{ {
CHECK(_application == NULL, "Sorry, multitasking not implemented"); CHECK(_application == NULL, "Sorry, multitasking not implemented yet");
// Devo metterla qui per far funzionare la TDongle::network_login // Devo metterla qui per far funzionare la TDongle::network_login
_application = this; _application = this;

View File

@ -132,8 +132,7 @@ public:
// @cmember Ritorna la <c TToken_string> con la lista dei moduli cui appartiene il programma // @cmember Ritorna la <c TToken_string> con la lista dei moduli cui appartiene il programma
virtual const char * extra_modules() const { return ""; } virtual const char * extra_modules() const { return ""; }
// @cmember Abilita la verifica del modulo cui appartiene il programma // @cmember Abilita la verifica del modulo cui appartiene il programma
virtual bool check_autorization() const virtual bool check_autorization() const { return true; }
{return true;}
// @cmember Forza la chiusura dell'applicazione // @cmember Forza la chiusura dell'applicazione
void stop_run(); void stop_run();

View File

@ -1959,10 +1959,13 @@ bool TBook::export_pdf(TFilename& filename, bool signature)
if (ok) if (ok)
{ {
_pdf_file = filename; _pdf_file = filename;
_pdf_file.fremove();
_pagefrom = 1; _pagefrom = 1;
_pageto = 0; _pageto = 0;
_copies = 1; _copies = 1;
ok = xvt_print_start_thread(main_loop_callback, (long)this) != 0; ok = xvt_print_start_thread(main_loop_callback, (long)this) != 0;
if (ok)
ok = fsize(_pdf_file) > 0;
if (ok && signature && main_app().has_module(FDAUT)) // Controllo paranoico dei permessi if (ok && signature && main_app().has_module(FDAUT)) // Controllo paranoico dei permessi
{ {
char outfile[_MAX_PATH] = ""; char outfile[_MAX_PATH] = "";

View File

@ -122,22 +122,15 @@ void TVariable_field::zero()
TVariable_rectype::TVariable_rectype(int logicnum) TVariable_rectype::TVariable_rectype(int logicnum)
: TRectype(logicnum), _memo_fld_to_load(false) : TRectype(logicnum), _memo_fld_to_load(false)
{}
{
}
TVariable_rectype::TVariable_rectype(const TBaseisamfile* i) TVariable_rectype::TVariable_rectype(const TBaseisamfile* i)
: TRectype(i), _memo_fld_to_load(false) : TRectype(i), _memo_fld_to_load(false)
{}
{
}
TVariable_rectype::TVariable_rectype(const TRectype& r) TVariable_rectype::TVariable_rectype(const TRectype& r)
: TRectype(r), _memo_fld_to_load(false) : TRectype(r), _memo_fld_to_load(false)
{ {}
}
TVariable_rectype::TVariable_rectype(const TVariable_rectype& r) TVariable_rectype::TVariable_rectype(const TVariable_rectype& r)
: TRectype((const TRectype &) r), _memo_fld_to_load(false) : TRectype((const TRectype &) r), _memo_fld_to_load(false)
@ -308,7 +301,6 @@ void TVariable_rectype::put_str(const char* fieldname, const char* val)
} }
void TVariable_rectype::zero(const char* fieldname) void TVariable_rectype::zero(const char* fieldname)
{ {
TVariable_field * f = (TVariable_field *) _virtual_fields.objptr(fieldname); TVariable_field * f = (TVariable_field *) _virtual_fields.objptr(fieldname);
if (f) if (f)
@ -317,7 +309,6 @@ void TVariable_rectype::zero(const char* fieldname)
TRectype::zero(fieldname); TRectype::zero(fieldname);
} }
HIDDEN void zero_virtual_field(const TObject & o) HIDDEN void zero_virtual_field(const TObject & o)
{ {
TVariable_field & v = (TVariable_field &) o; TVariable_field & v = (TVariable_field &) o;
@ -330,10 +321,8 @@ void TVariable_rectype::zero(char c)
_virtual_fields.for_each(zero_virtual_field); _virtual_fields.for_each(zero_virtual_field);
} }
// Certified 99% // Certified 99%
TVariable_rectype & TVariable_rectype::operator =(const TVariable_rectype & rec) TVariable_rectype & TVariable_rectype::operator =(const TVariable_rectype & rec)
{ {
TRectype::operator =(rec); TRectype::operator =(rec);
_virtual_fields = rec._virtual_fields; _virtual_fields = rec._virtual_fields;
@ -345,7 +334,6 @@ TVariable_rectype & TVariable_rectype::operator =(const TVariable_rectype & rec)
// Certified 99% // Certified 99%
TRectype & TVariable_rectype::operator =(const TRectype & rec) TRectype & TVariable_rectype::operator =(const TRectype & rec)
{ {
TRectype::operator =(rec); TRectype::operator =(rec);
_virtual_fields.for_each(zero_virtual_field); _virtual_fields.for_each(zero_virtual_field);
@ -365,11 +353,10 @@ TRectype & TVariable_rectype::operator =(const char* rec)
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
TExtrectype::TExtrectype(const TTrec& r) : TVariable_rectype(r.num()) TExtrectype::TExtrectype(const TTrec& r) : TVariable_rectype(r.num())
{ {
delete _rec; delete _rec;
_length = r.len(); _length = r.len();
_rec = new char [ _length ]; _rec = new char [_length];
_rd = r.rec(); _rd = r.rec();
if(has_memo()) if(has_memo())
init_memo(RECORD_NON_FISICO ); init_memo(RECORD_NON_FISICO );