From 6aacb7e366d9a0bd31dfd9d198c0b3dc94deeaa5 Mon Sep 17 00:00:00 2001 From: guy Date: Wed, 2 Jul 1997 12:54:03 +0000 Subject: [PATCH] date.h Corretto errore di ortografia hlprot.c Cambiamento stilistico ma non semantico msksheet.cpp Aggiunto _cell_dirty = TRUE prememdo F2 msksheet.h Tolta riga vuota relapp.cpp Reso piu' chiaro mesaggio di debug di chiave incompleta git-svn-id: svn://10.65.10.50/trunk@4796 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- include/date.h | 2 +- include/hlprot.c | 4 ++-- include/maskfld.cpp | 3 ++- include/msksheet.cpp | 8 +++++--- include/msksheet.h | 1 - include/relapp.cpp | 23 ++++++++++++++++++++--- 6 files changed, 30 insertions(+), 11 deletions(-) diff --git a/include/date.h b/include/date.h index 56f99f891..7dd6cc0cd 100755 --- a/include/date.h +++ b/include/date.h @@ -72,7 +72,7 @@ public: char* string(TDate_mgafmt year = full, char sep = '-', TDate_mgafmt day = full, TDate_mgafmt month = full, TDate_order ord = gma_date) const ; // @cmember Trasforma la data da formato data a numero giuliano long date2julian() const; - // @cmember Trasforma la data da numero giulizno a fomato data + // @cmember Trasforma la data da numero giuliano a fomato data long julian2date(long julian) const; // @cmember Ritorna il giorno diff --git a/include/hlprot.c b/include/hlprot.c index 3c893e1f1..2560ead49 100755 --- a/include/hlprot.c +++ b/include/hlprot.c @@ -116,10 +116,10 @@ Word getser() if (Val[0] == 0xFAE8) { SerNo = Val[1]; - return(Val[1]); + return SerNo; } else - return(0); + return 0; } else /* @(!) 2.3.01.176 */ diff --git a/include/maskfld.cpp b/include/maskfld.cpp index c6c9b1ed8..c029a51f2 100755 --- a/include/maskfld.cpp +++ b/include/maskfld.cpp @@ -2216,7 +2216,8 @@ bool TBrowse::do_link(bool insert) if (mail.check()) { TMessage* rcv = mail.next_s(insert ? MSG_AI : MSG_LN); - if (rcv != NULL) _rec = atoi(rcv->body()); + if (rcv != NULL) + _rec = atol(rcv->body()); if (_rec > 0) { _cursor->file().readat(_rec); diff --git a/include/msksheet.cpp b/include/msksheet.cpp index 92b20ac9d..197f7e4bc 100755 --- a/include/msksheet.cpp +++ b/include/msksheet.cpp @@ -1231,6 +1231,8 @@ bool TSpreadsheet::event_handler(XI_OBJ* itf, XI_EVENT *xiev) const KEY k = xiev_to_key(xiev); switch(k) { + case K_F2: + _cell_dirty = TRUE; case K_F8: case K_F9: if (_edit_field != NULL) @@ -1238,7 +1240,6 @@ bool TSpreadsheet::event_handler(XI_OBJ* itf, XI_EVENT *xiev) notify_change(); copy_cell2field(); } - case K_F2: case K_F11: if (_check_enabled && active()) { @@ -1290,8 +1291,9 @@ bool TSpreadsheet::event_handler(XI_OBJ* itf, XI_EVENT *xiev) break; case K_CTRL + '-': // ********* delete line { - //if (owner().mask().id2pos(DLG_DELREC)>=0 && notify(_cur_rec, K_DEL)) - if (sheet_mask().id2pos(DLG_DELREC)>=0 && sheet_mask().field(DLG_DELREC).enabled() && notify(_cur_rec, K_DEL)) + if (sheet_mask().id2pos(DLG_DELREC)>=0 && + sheet_mask().field(DLG_DELREC).enabled() && + notify(_cur_rec, K_DEL)) { int rec = _cur_rec; _row_dirty = FALSE; diff --git a/include/msksheet.h b/include/msksheet.h index 69a7c6f43..92081e536 100755 --- a/include/msksheet.h +++ b/include/msksheet.h @@ -221,7 +221,6 @@ public: // @cmember Esegue Tutti i check iniziali sulla riga

void check_row(int n); - // @cmember Costruttore TSheet_field(TMask* m); // @cmember Distruttore diff --git a/include/relapp.cpp b/include/relapp.cpp index 6d9d1fe7a..d5b3c2b65 100755 --- a/include/relapp.cpp +++ b/include/relapp.cpp @@ -490,7 +490,12 @@ int TRelation_application::delete_mode() } cur->freeze(FALSE); if (skipped > 0) - warning_box("%ld documenti non sono stati cancellati in quanto protetti."); + { + if (skipped == 1) + warning_box("Un documento non e' stato cancellato in quanto protetto."); + else + warning_box("%ld documenti non sono stati cancellati in quanto protetti."); + } } } } @@ -523,8 +528,20 @@ bool TRelation_application::test_key( if (e->empty()) { if (err) - { - error_box("Manca un valore indispensabile per la ricerca"); + { + TString msg(80); + msg = "Manca un valore indispensabile per la ricerca."; +#ifdef DBG + msg << "\nChiave " << int(k) << " - Campo " << e->dlg(); + const TFieldref* fr = e->field(); + if (fr != NULL) + { + msg << " - " << fr->name(); + if (fr->to() > 0) + msg << '[' << fr->from() << ',' << fr->to() << ']'; + } +#endif + error_box(msg); _mask->first_focus(-e->dlg()); } return FALSE;