diff --git a/include/array.cpp b/include/array.cpp index 6bdf6eb8b..6edca6ba8 100755 --- a/include/array.cpp +++ b/include/array.cpp @@ -544,11 +544,11 @@ TBit_array::TBit_array(long size) : _bit(NULL), _size(0) // @doc EXTERNAL -// @mfunc Copia nell'array l'elemento passato come parametro +// @mfunc Copia l'array passato come parametro void TBit_array::copy( - const TBit_array& ba) // @parm Oggetto da copiare nell'array + const TBit_array& ba) // @parm Array da copiare - // @comm Sostituisce all'elemento corrente dell'array l'elemento passato come parametro. + // @comm Copia il contenuto dell'array passato come parametro. { if (_bit) { diff --git a/include/form.cpp b/include/form.cpp index 79fc78d68..4b3f3916f 100755 --- a/include/form.cpp +++ b/include/form.cpp @@ -2386,6 +2386,21 @@ void TPrint_section::repos_fields(const char* name, int size) xvt_print_start_thread (wpr, (long)&prm); xvt_print_close(); + if (ps.form().edit_level() > 1) + { + TMask rm("Rapporto tra i caratteri", 1, 30, 4); + rm.add_number(DLG_USER, 0, "Rapporto ", 1, 1, 8, "", 4); + rm.add_button(DLG_OK, 0, "Conferma", -12, -1, 10, 2); + rm.add_button(DLG_CANCEL, 0, "Annulla", -22, -1, 10, 2); + real ratio = prm.ratio; + rm.set(DLG_USER, ratio); + if (rm.run() == K_ENTER) + { + ratio = rm.get_real(DLG_USER); + prm.ratio = (double)ratio; + } + } + const char sechar[4] = { 'B', 'F', 'G', 'H' }; for (int sn = 0; sn < 4 ; sn++) { diff --git a/include/isam.cpp b/include/isam.cpp index e0d51b0c7..662787eed 100755 --- a/include/isam.cpp +++ b/include/isam.cpp @@ -516,7 +516,7 @@ public: virtual ~TExtrectype() {} }; -TExtrectype::TExtrectype(const TTrec& r) : TRectype(6) +TExtrectype::TExtrectype(const TTrec& r) : TRectype(r.num()) { delete _rec; @@ -909,7 +909,8 @@ int TBaseisamfile::readat(TRecnotype nrec, word lockop) NOT_OPEN(); curr().setdirty(); _lasterr=DB_go(_isamfile->fhnd,nrec); - if (_lasterr != NOERR) _lasterr = get_error(_lasterr); + if (_lasterr != NOERR) + _lasterr = get_error(_lasterr); else memcpy(curr().string(),DB_getrecord(_isamfile->fhnd),DB_reclen(_isamfile->fhnd)); _recno = _isamfile->RecNo = DB_recno(_isamfile->fhnd); @@ -2293,15 +2294,16 @@ int TSystemisamfile::dump( { FILE* f = fopen(to, "w"); - int err = ferror(f); - if (withdeleted) nkey = 0; if (f == NULL) { - clearerr(f); - setstatus(err); - return err; + setstatus(2); + return 2; } + + if (withdeleted) nkey = 0; + int err = ferror(f); + open(); TString s(512); bool fixedlen = (fs == '\0'); diff --git a/include/maskfld.cpp b/include/maskfld.cpp index 4986059dc..3bda28b39 100755 --- a/include/maskfld.cpp +++ b/include/maskfld.cpp @@ -486,33 +486,13 @@ bool TMask_field::on_hit() } -// Certified 90% +// Certified 100% bool TMask_field::on_key(KEY key) { - switch(key) - { - case K_F11: - { - TString msg(80); - msg = "State utilizzando il campo "; - msg << dlg() << " della maschera " << mask().source_file(); - if (field() != NULL) - msg << "\ncorrispondente al campo su record " << *field(); - message_box(msg); - } - break; - case K_F2: -// reset(); - set(""); - set_dirty(); - break; - default: #ifdef DBG - if (key > K_CTRL) - error_box("Tasto ignorato %d", key); + if (key > K_CTRL) + return error_box("Tasto ignorato %d", key); #endif - break; - } return TRUE; } @@ -703,18 +683,24 @@ void TOperable_field::enable(bool on) bool TOperable_field::on_key( KEY key) // @parm Tasto notificato { - if (key == K_CTRL + K_TAB) - { - mask().notify_focus_field(dlg()); - return TRUE; - } - - if (key == K_ENTER) - { - const bool ok = handler(K_ENTER); - return ok; + switch(key) + { + case K_F11: + { + TString msg(80); + msg = "State utilizzando il campo "; + msg << dlg() << " della maschera " << mask().source_file(); + if (field() != NULL) + msg << "\ncorrispondente al campo su record " << *field(); + message_box(msg); + } + break; + case K_CTRL + K_TAB: + mask().notify_focus_field(dlg()); + return handler(key); + default: + return handler(key); } - return TMask_field::on_key(key); } @@ -2765,7 +2751,7 @@ bool TEdit_field::on_key(KEY key) { case K_CTRL+K_TAB: set_focusdirty(FALSE); - break; + break; case K_TAB: if (vf >= 0 && (vf == AUTOEXIT_FUNC || vf == NUMCALC_FUNC || vf == STRCALC_FUNC)) set_focusdirty(); // Forza validate @@ -2857,6 +2843,9 @@ bool TEdit_field::on_key(KEY key) } } break; + case K_F2: + set(""); + break; case K_F9: if (check_enabled()) { @@ -2894,7 +2883,7 @@ bool TEdit_field::on_key(KEY key) } else if (_browse == NULL && has_button()) - handler(K_F9); + return handler(K_F9); break; case K_CTRL+K_SPACE: set_dirty(TRUE); diff --git a/include/msksheet.cpp b/include/msksheet.cpp index 2c3477a6d..00f7f8727 100755 --- a/include/msksheet.cpp +++ b/include/msksheet.cpp @@ -206,13 +206,14 @@ public: // @cmember Ritorna il valore della variabile active bool active() const { return _active; } + // @cmember Ritorna se e' possibile lasciare il focus dallo spreadsheet (TRUE se e' possibile) bool test_focus_change(); // @cmember Setta il membro

on il valore

void set_notify(SPREADSHEET_NOTIFY n) { _notify = n; } - + // @cmember Costruttore TSpreadsheet(WINDOW parent, short dlg, short x, short y, short dx, short dy, const char* maskname, int maskno, const char* head, TSheet_field* owner); // @cmember Distruttore @@ -738,6 +739,12 @@ bool TSpreadsheet::off_cell_handler(XI_OBJ *cell) mask2str(_cur_rec); // Update sheet row } return ok; +} + +bool TSpreadsheet::test_focus_change() +{ + bool ok = xi_move_focus(get_interface()) ? TRUE : FALSE; + return ok; } // Certified 75% @@ -1844,7 +1851,7 @@ bool TSheet_field::on_key(KEY k) if (focusdirty()) { TSpreadsheet* s = (TSpreadsheet*)_ctl; - if (!s->off_cell_handler()) + if (!s->test_focus_change()) return FALSE; } else diff --git a/include/sheet.cpp b/include/sheet.cpp index 9dde5ddd0..f8ca31c1e 100755 --- a/include/sheet.cpp +++ b/include/sheet.cpp @@ -396,7 +396,7 @@ void TSheet_control::check( _checked.set(tot); // Forza le dimensioni del bit array _checked.set(); // Setta tutti i bit - // Elimina bit in eccesso alla fine dell'array + // Elimina i bit in eccesso alla fine dell'array for (long i = _checked.items()-1; i > tot; i--) _checked.reset(i); @@ -410,13 +410,15 @@ void TSheet_control::check( else _checked.reset(); + // Aggiorna tutta la prima colonna XI_OBJ* column = xi_get_obj(_obj, FIRST_FIELD+1000); xi_cell_request(column); } else { if (!_disabled[n]) - _checked.set(n, on); + _checked.set(n, on); + // Aggiorna la riga XI_OBJ cell; XI_MAKE_CELL(&cell, _obj, rec2row(n), 1); xi_cell_request(&cell); } diff --git a/include/xvtility.cpp b/include/xvtility.cpp index 950de031d..57b70e53d 100755 --- a/include/xvtility.cpp +++ b/include/xvtility.cpp @@ -193,7 +193,10 @@ BOOL deny_another_instance() BOOL allow_another_instance() { - +#ifdef __NOMUNGE__ + return FALSE; +#endif + if ( npHookLoadModule ) return TRUE;