Descrizione da ripristinare per commit rifatto
git-svn-id: svn://10.65.10.50/trunk@4306 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
9649685092
commit
bbb94e2cbd
@ -165,9 +165,7 @@ public:
|
||||
int add(TToken_string* s)
|
||||
{ return _str.add(s); }
|
||||
// @cmember Inserisce un record in una posizione stabilita
|
||||
int insert(int rec);
|
||||
// @cmember Inserisce un record (da prgramma) in una posizione stabilita
|
||||
int _insert(int rec, bool update_sheet = TRUE);
|
||||
int insert(int rec, bool update_sheet, bool call_notify);
|
||||
// @cmember Elimina il record <p rec>
|
||||
bool destroy(int rec = -1, bool update_sheet = TRUE);
|
||||
// @cmember Ritorna l'array di tutte le stringhe delle righe
|
||||
@ -674,7 +672,9 @@ void TSpreadsheet::set_focus_cell(int riga, int colonna)
|
||||
// @rdesc Ritorna la posizione nella quale e' stato inserito il record. Se non riesce ad inserirlo
|
||||
// ritorna -1.
|
||||
int TSpreadsheet::insert(
|
||||
int rec) // @parm Numero del record da inserire nello spreadsheet
|
||||
int rec, // @parm Numero del record da inserire nello spreadsheet
|
||||
bool update_sheet, // @parm Chiama cell request
|
||||
bool call_notify) // @parm Chiama funzione di notify
|
||||
|
||||
// @comm Non e' possibile inserire un nuovo record nel caso nello spreadsheet vi siano
|
||||
// almeno 999 righe oppure se lo spreadsheet non e' attivo.
|
||||
@ -696,17 +696,21 @@ int TSpreadsheet::insert(
|
||||
ininsert = TRUE;
|
||||
int r = rec < 0 ? items() : rec;
|
||||
|
||||
const bool ok = notify(r, K_INS);
|
||||
const bool ok = call_notify ? notify(r, K_INS) : TRUE;
|
||||
if (ok)
|
||||
{
|
||||
r = _str.insert(new TToken_string(80), rec);
|
||||
_property.insert(NULL, r);
|
||||
|
||||
// Notifica che l'inserimento h terminato
|
||||
// Notifica che l'inserimento e' terminato
|
||||
xi_insert_row(_obj, INT_MAX);
|
||||
owner().post_insert(r);
|
||||
notify(r, K_CTRL + K_INS);
|
||||
xi_cell_request(_obj);
|
||||
owner().post_insert(r);
|
||||
|
||||
if (call_notify)
|
||||
notify(r, K_CTRL + K_INS);
|
||||
|
||||
if (update_sheet)
|
||||
xi_cell_request(_obj);
|
||||
}
|
||||
else
|
||||
r = -1;
|
||||
@ -716,33 +720,6 @@ int TSpreadsheet::insert(
|
||||
|
||||
// @doc INTERNAL
|
||||
|
||||
// @mfunc Inserisce un record (da programma) in una posizione stabilita
|
||||
//
|
||||
// @rdesc Ritorna la posizione nella quale e' stato inserito il record. Se non riesce ad inserirlo
|
||||
// ritorna -1.
|
||||
int TSpreadsheet::_insert(
|
||||
int rec, // @parm Numero del record da inserire nello spreadsheet
|
||||
bool update_sheet) // @parm Aggiornamento visuale dell sheet
|
||||
|
||||
// @comm Non e' possibile inserire un nuovo record nel caso nello spreadsheet vi siano
|
||||
// almeno 999 righe oppure se lo spreadsheet non e' attivo.
|
||||
{
|
||||
if (items() >= 999)
|
||||
return -1;
|
||||
|
||||
int r = _str.insert(new TToken_string(80), rec);
|
||||
|
||||
_property.insert(NULL, r);
|
||||
owner().post_insert(r);
|
||||
xi_insert_row(_obj, INT_MAX);
|
||||
|
||||
if (update_sheet)
|
||||
xi_cell_request(_obj);
|
||||
return r;
|
||||
}
|
||||
|
||||
// @doc INTERNAL
|
||||
|
||||
// @mfunc Elimina una riga
|
||||
//
|
||||
// @rdesc Ritorna il risultato dell'operazione:
|
||||
@ -1016,7 +993,7 @@ bool TSpreadsheet::event_handler(XI_OBJ* itf, XI_EVENT *xiev)
|
||||
if (xiev->v.xi_obj->type == XIT_LIST)
|
||||
{
|
||||
owner().mask().notify_focus_field(owner().dlg());
|
||||
insert(-1);
|
||||
insert(-1, TRUE, TRUE);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -1302,7 +1279,7 @@ bool TSpreadsheet::event_handler(XI_OBJ* itf, XI_EVENT *xiev)
|
||||
break;
|
||||
case K_CTRL + '+':
|
||||
owner().mask().notify_focus_field(owner().dlg());
|
||||
insert(-1);
|
||||
insert(-1, TRUE, TRUE);
|
||||
refused = TRUE;
|
||||
break;
|
||||
case K_CTRL + 'A':
|
||||
@ -2076,9 +2053,9 @@ void TSheet_field::destroy(int r, bool update_sheet)
|
||||
}
|
||||
|
||||
// Certified 100%
|
||||
int TSheet_field::insert(int r, bool update_sheet)
|
||||
int TSheet_field::insert(int r, bool update_sheet, bool call_notify)
|
||||
{
|
||||
return ((TSpreadsheet*)_ctl)->_insert(r, update_sheet);
|
||||
return ((TSpreadsheet*)_ctl)->insert(r, update_sheet, call_notify);
|
||||
}
|
||||
|
||||
void TSheet_field::parse_head(TScanner& scanner)
|
||||
|
Loading…
x
Reference in New Issue
Block a user