Riportata la versione 98.01.01pl000 sul main trunk
git-svn-id: svn://10.65.10.50/trunk@6152 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
e3e9298d28
commit
ba17e909b2
@ -1,6 +1,7 @@
|
|||||||
#include <filetext.h>
|
#include <filetext.h>
|
||||||
|
|
||||||
#include <utility.h>
|
#include <utility.h>
|
||||||
|
#include <tabutil.h>
|
||||||
|
|
||||||
//////////////////////////////////////// TTracciato_Campo ////////////////////////////////////////
|
//////////////////////////////////////// TTracciato_Campo ////////////////////////////////////////
|
||||||
TTracciato_campo::TTracciato_campo(int position, int length, int decimal, const char align, const char filler)
|
TTracciato_campo::TTracciato_campo(int position, int length, int decimal, const char align, const char filler)
|
||||||
@ -149,14 +150,22 @@ TTracciato_record* TFile_text::t_rec(const char* type) const
|
|||||||
return (TTracciato_record*)_tracciati_record.objptr(type);
|
return (TTracciato_record*)_tracciati_record.objptr(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
TTracciato_record* TFile_text::t_rec(int mainfile) const
|
TTracciato_record* TFile_text::t_rec(int mainfile, const char * tabname) const
|
||||||
{
|
{
|
||||||
|
if (tabname)
|
||||||
|
mainfile=(tabname[0] != '%') ? LF_TAB: LF_TABCOM;
|
||||||
TTracciato_record *trrd;
|
TTracciato_record *trrd;
|
||||||
TAssoc_array &tr= ((TFile_text *)this)->_tracciati_record;
|
TAssoc_array &tr= ((TFile_text *)this)->_tracciati_record;
|
||||||
tr.restart();
|
tr.restart();
|
||||||
while (trrd=(TTracciato_record *)tr.get())
|
while (trrd=(TTracciato_record *)tr.get())
|
||||||
{
|
{
|
||||||
if (trrd->relation() && trrd->relation()->lfile().num()==mainfile)
|
if (trrd->relation() && trrd->relation()->lfile().num()==mainfile)
|
||||||
|
if (tabname)
|
||||||
|
{
|
||||||
|
TTable & tab=(TTable & )trrd->relation()->lfile();
|
||||||
|
if (tabname == tab.name() )
|
||||||
|
break;
|
||||||
|
} else
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return trrd;
|
return trrd;
|
||||||
@ -561,6 +570,23 @@ bool TFile_text::autoload(TRecord_text& rec, int mainfile)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Carica tutti i dati del tracciato record (anche header o footer)
|
||||||
|
// nel record_text
|
||||||
|
bool TFile_text::autoload(TRecord_text& rec, const char * tabname)
|
||||||
|
{
|
||||||
|
TTracciato_record* tr = t_rec(tabname);
|
||||||
|
if (tr)
|
||||||
|
{
|
||||||
|
// esiste il tracciato e posso fare l'autoload
|
||||||
|
TCursor cur(tr->relation());
|
||||||
|
rec.set_type(tr->type());
|
||||||
|
return _autoload(rec,cur,*tr);
|
||||||
|
}
|
||||||
|
//CHECK (FALSE,"Il tracciato record non esiste");
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//Carica tutti i dati nel tracciato record (valido anche per header e footer) nel record_text
|
//Carica tutti i dati nel tracciato record (valido anche per header e footer) nel record_text
|
||||||
bool TFile_text::autoload(TRecord_text& rec, TCursor& cur , const TString* tipo)
|
bool TFile_text::autoload(TRecord_text& rec, TCursor& cur , const TString* tipo)
|
||||||
{
|
{
|
||||||
|
@ -214,7 +214,7 @@ public:
|
|||||||
TTracciato_record* t_rec(const char* type) const ;
|
TTracciato_record* t_rec(const char* type) const ;
|
||||||
// @cmember ritorna il tracciato record relativo alla relazione del file passato
|
// @cmember ritorna il tracciato record relativo alla relazione del file passato
|
||||||
// NB: si assume che ogni tracciato sia relativo ad una relazione diversa
|
// NB: si assume che ogni tracciato sia relativo ad una relazione diversa
|
||||||
TTracciato_record* t_rec(int mainfile) const ;
|
TTracciato_record* t_rec(int mainfile, const char* tab=NULL) const ;
|
||||||
const int items_tr() const {return _tracciati_record.items();}//ritorna il numero di tracciati record nel file
|
const int items_tr() const {return _tracciati_record.items();}//ritorna il numero di tracciati record nel file
|
||||||
TAssoc_array& tracciati() {return _tracciati_record;}//ritorna un riferimento all'assoc_array dei tracciati record
|
TAssoc_array& tracciati() {return _tracciati_record;}//ritorna un riferimento all'assoc_array dei tracciati record
|
||||||
// @cmember caricamento automatico del record_text dalla relazione
|
// @cmember caricamento automatico del record_text dalla relazione
|
||||||
@ -223,6 +223,8 @@ public:
|
|||||||
bool autoload(TCursor& cur, const TString* tipo = NULL) ;
|
bool autoload(TCursor& cur, const TString* tipo = NULL) ;
|
||||||
// @cmember caricamento automatico del record_text passato dalla relazione di file principale mainfile definita sul tracciato
|
// @cmember caricamento automatico del record_text passato dalla relazione di file principale mainfile definita sul tracciato
|
||||||
bool autoload(TRecord_text& rec, int mainfile);
|
bool autoload(TRecord_text& rec, int mainfile);
|
||||||
|
// @cmember caricamento automatico del record_text passato dalla relazione
|
||||||
|
bool autoload(TRecord_text& rec, const char * tabname);
|
||||||
// @cmember caricamento automatico del record_text corrente dalla relazione di file principale mainfile definita sul tracciato
|
// @cmember caricamento automatico del record_text corrente dalla relazione di file principale mainfile definita sul tracciato
|
||||||
void autoload(int mainfile) {autoload(*_current, mainfile);}
|
void autoload(int mainfile) {autoload(*_current, mainfile);}
|
||||||
int write(TRecord_text & rec);//scrive su file di testo il record
|
int write(TRecord_text & rec);//scrive su file di testo il record
|
||||||
|
@ -2180,7 +2180,9 @@ int TSystemisamfile::update(
|
|||||||
dir.eox() = 0L;
|
dir.eox() = 0L;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (toconvert && dir.eox() > 0L)
|
TFilename fname(filename());
|
||||||
|
|
||||||
|
if (toconvert && (dir.eox() > 0L || fexist(fname)))
|
||||||
{
|
{
|
||||||
TRecnotype ni = 0L;
|
TRecnotype ni = 0L;
|
||||||
isfdptr i0;
|
isfdptr i0;
|
||||||
@ -2196,7 +2198,6 @@ int TSystemisamfile::update(
|
|||||||
}
|
}
|
||||||
i0->fhnd=DB_open((const char*)tmpfname,0, TRUE);
|
i0->fhnd=DB_open((const char*)tmpfname,0, TRUE);
|
||||||
if (i0->fhnd < 0 ) err=get_error(i0->fhnd);
|
if (i0->fhnd < 0 ) err=get_error(i0->fhnd);
|
||||||
TFilename fname(filename());
|
|
||||||
TString s(80), fld_name, fld_val;
|
TString s(80), fld_name, fld_val;
|
||||||
s.format("Aggiornamento archivio %s", (const char*) fname);
|
s.format("Aggiornamento archivio %s", (const char*) fname);
|
||||||
TProgind p(nitems ? nitems : 1, s, TRUE, TRUE, 70);
|
TProgind p(nitems ? nitems : 1, s, TRUE, TRUE, 70);
|
||||||
|
@ -700,6 +700,7 @@ void TPrint_application::set_row (
|
|||||||
int size = 0, dec = 0, strind = 0;
|
int size = 0, dec = 0, strind = 0;
|
||||||
char ch, align = 'l';
|
char ch, align = 'l';
|
||||||
|
|
||||||
|
CHECK (strlen(frmt) <120, "Te c'hai grossa crisi: la stringa di formato non può essere più lunga di 120 chars");
|
||||||
// let the poor programmer use format() at will
|
// let the poor programmer use format() at will
|
||||||
strcpy (fmt, frmt);
|
strcpy (fmt, frmt);
|
||||||
_print_defined = TRUE;
|
_print_defined = TRUE;
|
||||||
@ -1456,7 +1457,8 @@ bool TPrint_application::print_one (
|
|||||||
if (!(printer().print(*pr)))
|
if (!(printer().print(*pr)))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (_auto_ff && last /* _maxrox */ < printer().formlen ())
|
//if (_auto_ff && last /* _maxrox */ < printer().formlen ())
|
||||||
|
if (_auto_ff && printer().rows_left() > 0)
|
||||||
printer().formfeed ();
|
printer().formfeed ();
|
||||||
delete pos;
|
delete pos;
|
||||||
|
|
||||||
|
@ -197,7 +197,7 @@ TSheet_control::TSheet_control(
|
|||||||
rct.top, rct.left, rct.bottom-rct.top,
|
rct.top, rct.left, rct.bottom-rct.top,
|
||||||
XI_ATR_ENABLED | XI_ATR_VISIBLE,
|
XI_ATR_ENABLED | XI_ATR_VISIBLE,
|
||||||
NORMAL_COLOR, NORMAL_BACK_COLOR, // normal
|
NORMAL_COLOR, NORMAL_BACK_COLOR, // normal
|
||||||
DISABLED_COLOR, DISABLED_BACK_COLOR, // disabled
|
NORMAL_COLOR, DISABLED_BACK_COLOR, // disabled
|
||||||
FOCUS_COLOR, // active
|
FOCUS_COLOR, // active
|
||||||
0);
|
0);
|
||||||
|
|
||||||
@ -743,7 +743,7 @@ bool TSheet_control::event_handler(XI_OBJ* itf, XI_EVENT *xiev)
|
|||||||
|
|
||||||
if (_disabled[rec])
|
if (_disabled[rec])
|
||||||
{
|
{
|
||||||
// xiev->v.cell_request.color = DISABLED_COLOR; // Uniforme coi TField_control
|
xiev->v.cell_request.color = NORMAL_COLOR;
|
||||||
xiev->v.cell_request.back_color = DISABLED_BACK_COLOR;
|
xiev->v.cell_request.back_color = DISABLED_BACK_COLOR;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -167,12 +167,14 @@ void init_global_vars()
|
|||||||
// @func Dealloca le variabili globali
|
// @func Dealloca le variabili globali
|
||||||
void free_global_vars()
|
void free_global_vars()
|
||||||
{
|
{
|
||||||
|
#ifndef _DEMO_
|
||||||
#if XVT_OS == XVT_OS_WIN || XVT_OS == XVT_OS_WIN32
|
#if XVT_OS == XVT_OS_WIN || XVT_OS == XVT_OS_WIN32
|
||||||
if (_login_status == 2)
|
if (_login_status == 2)
|
||||||
rpc_UserLogout();
|
rpc_UserLogout();
|
||||||
else
|
else
|
||||||
HL_LOGOUT();
|
HL_LOGOUT();
|
||||||
#endif
|
#endif
|
||||||
|
#endif // _DEMO_
|
||||||
|
|
||||||
if (openf != NULL)
|
if (openf != NULL)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user