Patch level : 2.2
Files correlati : Ricompilazione Demo : [ ] Commento : Modifiche necessarie per le nuove livbrerie di contabilita' analitica: maschere dinamiche git-svn-id: svn://10.65.10.50/trunk@12603 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
92c85172a4
commit
145b33aa8b
@ -670,7 +670,7 @@ HIDDEN int cisread(int fhnd, int knum, TRectype& record, int mode, TRecnotype& c
|
||||
TString256 keystr;
|
||||
char* key = keystr.get_buffer();
|
||||
|
||||
int err = NOERR ;
|
||||
int err = NOERR;
|
||||
do
|
||||
{
|
||||
if (rmode>=_isequal && rmode<=_isgteq)
|
||||
@ -2967,6 +2967,7 @@ int TRectype::compare_key(
|
||||
|
||||
// @xref <mf TRectype::build_key>
|
||||
{
|
||||
/* Vecchio modo con molte operazioni su stringhe e molte chiamate a rec_des()!
|
||||
TString256 key1 = build_key(key);
|
||||
TString256 key2 = rec.build_key(key);
|
||||
if (skip_last > 0)
|
||||
@ -2984,6 +2985,27 @@ int TRectype::compare_key(
|
||||
}
|
||||
}
|
||||
const int res = strcmp(key1, key2);
|
||||
*/
|
||||
const char* key1 = build_key(key);
|
||||
const char* key2 = rec.build_key(key);
|
||||
int res = 0;
|
||||
if (skip_last > 0)
|
||||
{
|
||||
int maxlen = 0;
|
||||
const RecDes& rd = *rec_des();
|
||||
const KeyDes& kd = rd.Ky[key-1];
|
||||
const int last = kd.NkFields-skip_last;
|
||||
for (int l = 0; l < last; l++)
|
||||
{
|
||||
const int nf = kd.FieldSeq[l] % MaxFields;
|
||||
const RecFieldDes& rf = rd.Fd[nf];
|
||||
maxlen += rf.Len;
|
||||
}
|
||||
res = strncmp(key1, key2, maxlen);
|
||||
}
|
||||
else
|
||||
res = strcmp(key1, key2);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@ -137,6 +137,8 @@ protected:
|
||||
bool check_current_field() const;
|
||||
// @cmember Mostra la prossima/precedente pagina
|
||||
virtual void next_page(int p);
|
||||
// @cmember Cambia arbitrariamente il nome del file (uso molto raro)
|
||||
void set_source_file(const char* name) { _source_file = name; }
|
||||
|
||||
// @access Public Member
|
||||
public:
|
||||
|
@ -2503,7 +2503,7 @@ KEY TBrowse::run()
|
||||
|
||||
for (const char* i = _inp_id.get(0); i; i = _inp_id.get())
|
||||
{
|
||||
if (*i != '"' && strchr(i, '@') == NULL)
|
||||
if (*i != '\0' && *i != '"' && strchr(i, '@') == NULL)
|
||||
{
|
||||
const short id = field().atodlg(i);
|
||||
const TEditable_field& f = field(id);
|
||||
|
@ -165,7 +165,7 @@ protected:
|
||||
// (ricerca, inserimento, modifica) avviene sempre in due tempi: <mf TRelation_application::changing_mask> e
|
||||
// <mf TRelation_application::get_mask>. Cio' serve per gestire correttamente le applicazioni
|
||||
// con maschere multiple.
|
||||
virtual bool changing_mask(int mode) pure;
|
||||
virtual bool changing_mask(int mode) { return false; }
|
||||
// @cmember Richiede la maschera da usare
|
||||
virtual TMask* get_mask(int mode) pure;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user