Patch level :
Files correlati : Ricompilazione Demo : [ ] Commento : applicat.cpp Gestione utente GUEST array.h Aggiunto int (era sottinteso) alla COMPARE_FUNCTION array.cpp Tolti [] automask.cpp Gestite meglio maschere all'interno degli spreadsheet ccustio.c Tolti due spazi git-svn-id: svn://10.65.10.50/trunk@6850 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
41d3f8ab37
commit
f7c645eac7
@ -490,18 +490,25 @@ void TApplication::set_perms()
|
||||
}
|
||||
else
|
||||
{
|
||||
int err = _iskeynotfound;
|
||||
if (use_files())
|
||||
{
|
||||
TLocalisamfile users(LF_USER);
|
||||
users.zero();
|
||||
users.put("USERNAME", utente);
|
||||
if (users.read() == NOERR)
|
||||
err = users.read();
|
||||
if (err == NOERR)
|
||||
{
|
||||
const TString& aut = users.get("AUTSTR");
|
||||
for (int i = aut.len()-1; i > 0; i--)
|
||||
_user_aut.set(i, aut[i] == 'X');
|
||||
}
|
||||
}
|
||||
if (err != NOERR && utente == "GUEST")
|
||||
{
|
||||
for (int i = 1 ; i < ENDAUT; i++)
|
||||
_user_aut.set(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -527,6 +534,8 @@ void TApplication::check_parameters(
|
||||
argc--;
|
||||
}
|
||||
}
|
||||
if (user().empty())
|
||||
user() = "GUEST";
|
||||
}
|
||||
|
||||
// @doc EXTERNAL
|
||||
@ -639,7 +648,7 @@ void TApplication::about() const
|
||||
void TApplication::print()
|
||||
{
|
||||
#ifdef DBG
|
||||
error_box("Non saprei bene cosa stampare!");
|
||||
NFCHECK("Non saprei bene cosa stampare!");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -138,7 +138,7 @@ void TArray::resize(
|
||||
if (_data != NULL)
|
||||
memcpy(newdata, _data, _size*sizeof(TObject*));
|
||||
|
||||
if (_data != NULL) delete [] _data;
|
||||
if (_data != NULL) delete _data;
|
||||
|
||||
_size = arraysize;
|
||||
_data = newdata;
|
||||
@ -231,7 +231,7 @@ TArray::~TArray()
|
||||
if (ok())
|
||||
{
|
||||
destroy();
|
||||
delete [] _data;
|
||||
delete _data;
|
||||
}
|
||||
}
|
||||
|
||||
@ -341,29 +341,26 @@ int TArray::add(
|
||||
newsize = INT_MAX;
|
||||
resize((int)newsize);
|
||||
}
|
||||
if (_data[index] != NULL)
|
||||
{
|
||||
#ifdef DBG
|
||||
if (object == _data[index])
|
||||
{
|
||||
error_box("Iu ar traing tu overrait en arrei obgiect: %d", index);
|
||||
return index;
|
||||
}
|
||||
#endif
|
||||
delete _data[index];
|
||||
_items--;
|
||||
}
|
||||
|
||||
_data[index] = object;
|
||||
if (object != NULL)
|
||||
if (object != _data[index]) // Evita ricopiatura su se stesso
|
||||
{
|
||||
_items++;
|
||||
_next = index+1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (index < _next)
|
||||
_next = index;
|
||||
if (_data[index] != NULL)
|
||||
{
|
||||
delete _data[index];
|
||||
_items--;
|
||||
}
|
||||
|
||||
_data[index] = object;
|
||||
if (object != NULL)
|
||||
{
|
||||
_items++;
|
||||
_next = index+1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (index < _next)
|
||||
_next = index;
|
||||
}
|
||||
}
|
||||
return index;
|
||||
}
|
||||
@ -678,7 +675,7 @@ TBit_array& TBit_array::operator=(const TBit_array& ba)
|
||||
TBit_array::~TBit_array()
|
||||
{
|
||||
if (_bit)
|
||||
delete [] _bit;
|
||||
delete _bit;
|
||||
}
|
||||
|
||||
// Certified 100%
|
||||
@ -715,7 +712,7 @@ void TBit_array::resize(
|
||||
if (oldsize)
|
||||
{
|
||||
memcpy(_bit, oldbit, oldsize);
|
||||
delete [] oldbit;
|
||||
delete oldbit;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
//
|
||||
// @type COMPARE_FUNCTION | Prototipo funzione di confronto tra elementi della
|
||||
// classe <c TObject> da passare al metodo sort dei <c TArray>
|
||||
typedef (*COMPARE_FUNCTION)(const TObject**, const TObject**);
|
||||
typedef int (*COMPARE_FUNCTION)(const TObject**, const TObject**);
|
||||
|
||||
// @doc EXTERNAL
|
||||
|
||||
|
@ -29,15 +29,31 @@ TField_event TAutomask::key2event(TMask_field& f, KEY key) const
|
||||
switch (key)
|
||||
{
|
||||
case K_TAB:
|
||||
if (f.is_edit())
|
||||
{
|
||||
const TMask& wm = f.mask();
|
||||
if (wm.is_running() || wm.get_sheet() != NULL)
|
||||
if (wm.get_sheet())
|
||||
{
|
||||
if (f.focusdirty() && f.is_edit())
|
||||
fe = fe_modify;
|
||||
if (wm.is_running())
|
||||
{
|
||||
if (f.focusdirty())
|
||||
fe = fe_modify;
|
||||
}
|
||||
else
|
||||
{
|
||||
fe = f.focusdirty() ? fe_modify : fe_init;
|
||||
}
|
||||
}
|
||||
else
|
||||
fe = fe_init;
|
||||
{
|
||||
if (wm.is_running())
|
||||
{
|
||||
if (f.focusdirty())
|
||||
fe = fe_modify;
|
||||
}
|
||||
else
|
||||
fe = fe_init;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case K_SPACE:
|
||||
|
@ -429,7 +429,7 @@ void CRead(S, RecBuf, Rec, LockMode)
|
||||
}
|
||||
else
|
||||
#endif
|
||||
if (seeklk(S, fpos, setlock(LockMode), LockMode, Rec) == -1) return ;
|
||||
if (seeklk(S, fpos, setlock(LockMode), LockMode, Rec) == -1) return ;
|
||||
if (read(S->F, RecBuf, (unsigned) S->LenRec) == -1)
|
||||
{
|
||||
S->IOR = CIOResult();
|
||||
|
Loading…
x
Reference in New Issue
Block a user