Patch level : 12.0 1056

Files correlati     :  ve0.exe

corretta la disabilitazione dell' unità di misura nell'immissione documenti.
This commit is contained in:
Alessandro Bonazzi 2021-04-16 21:26:15 +02:00
parent 61a4903f6c
commit c6864ae524
9 changed files with 58 additions and 4 deletions

View File

@ -2810,6 +2810,17 @@ KEY TMask::check_mask()
return stop_run(K_ENTER) ? K_ENTER : K_ESC;
}
// @cmember ritorna la posizione del primo campo di una cella di uno sheet
int TMask::first_cell_fldpos(int & cid)
{
return id2pos(cid = first_cell_id(cid));
}
// @cmember ritorna la posizione del campo successivo di una cella di uno sheet
int TMask::next_cell_fldpos(int & cid)
{ return id2pos(cid = next_cell_id(cid)); }
// @doc INTERNAL
// @mfunc costruttore di copia

View File

@ -508,8 +508,12 @@ public:
{ return _toolwin; }
WINDOW toolbar() const
{ return _toolbar; }
// @cmember verifica la mascher senza eseguirla
// @cmember verifica la maschera senza eseguirla
KEY check_mask();
// @cmember ritorna la posizione del primo campo di una cella di uno sheet
int first_cell_fldpos(int & cid);
// @cmember ritorna la posizione del campo successivo di una cella di uno sheet
int next_cell_fldpos(int & cid);
};
// @doc EXTERNAL

View File

@ -581,7 +581,17 @@ void TMask_field::show(
const int nrow = s->selected();
if (nrow >= 0 && nrow < s->items() && s->exist_column(dlg()))
{
int id = dlg();
for (int pos = mask().first_cell_fldpos(id); pos >= 0; pos = mask().next_cell_fldpos(id))
if (mask().fld(pos).shown())
{
on = true;
break;
}
s->enable_cell(nrow, dlg(), on);
}
}
}
#ifdef DBG

View File

@ -23,6 +23,17 @@ int cid2index(short cid)
return xvtil_cid2index(cid);
}
int first_cell_id(const int cid)
{
return xvtil_first_cell_id(cid);
}
int next_cell_id(const int cid)
{
return xvtil_next_cell_id(cid);
}
class TCell_property : public TObject
{
COLOR _back, _fore;
@ -2201,7 +2212,7 @@ void TSpreadsheet::enable_cell(
{
if (column >= FIRST_FIELD)
column = cid2index(column);
TRow_property* prop = get_property(row);
if (prop == NULL)
{
@ -3453,6 +3464,9 @@ bool TSheet_field::cell_enabled(int row, int column) const
void TSheet_field::show_column(int col, bool on) const
{
TSpreadsheet* s = (TSpreadsheet*)_ctl;
if (col >= FIRST_FIELD)
col = cid2index(col);
s->show_column(col, on);
}

View File

@ -37,6 +37,9 @@ typedef bool (*SPREADSHEET_NOTIFY)(TSheet_field& s, int r, KEY k);
typedef void (*SHEET_USERGETPUT)(TSheet_field &fld_righe, int item);
int cid2index(short cid);
int first_cell_id(const int cid);
int next_cell_id(const int cid);
// @doc EXTERNAL
// @class TSheet_field | Classe per la gestione dei campi di uno spreadsheet

View File

@ -243,7 +243,6 @@ bool TString::full() const
if (!is_space(*s))
return true;
return false;
}
TString& TString::strip_spaces()

View File

@ -851,4 +851,3 @@ bool TString_tree::get_description(TString& str) const
str.cut(0);
return obj != NULL;
}

View File

@ -848,3 +848,15 @@ int xvtil_cid2index(const int cid)
CHECKD(cid >= FIRST_FIELD, "Bad column id ", cid);
return (cid % 100) - 1;
}
int xvtil_first_cell_id(const int cid)
{
CHECKD(cid >= FIRST_FIELD, "Bad column id ", cid);
return (cid % 100) + 100;
}
int xvtil_next_cell_id(const int cid)
{
CHECKD(cid >= FIRST_FIELD, "Bad column id ", cid);
return cid + 100;
}

View File

@ -46,6 +46,8 @@ bool xvtil_popup_error(const char* msg);
bool xvtil_system_error(unsigned long lasterror, ...);
int xvtil_cid2index(const int cid);
int xvtil_first_cell_id(const int cid);
int xvtil_next_cell_id(const int cid);
void beep(int severity = 0);
void do_events();