defmask.h Tolta sdefinizione di min e max

expr.cpp    Cambiato in yesnofatal un fatal
form.cpp    Io non cio' colpa
maskfld.cpp Cambiata gestione K_TAB per validate degli edit field
relapp.cpp  Io non cio' colpa
sheet.cpp   Aggiunte righe multiple
uml.h	    Sdefiniti min e max


git-svn-id: svn://10.65.10.50/trunk@4678 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 1997-06-16 12:52:23 +00:00
parent 37455c490a
commit 2487f8653a
7 changed files with 3233 additions and 3214 deletions

View File

@ -305,7 +305,7 @@ void TExpression::setvar(int varnum, const char* val)
bool TExpression::print_error(const char* msg) const
{
return fatal_box("%s", msg);
return yesnofatal_box("%s", msg);
}
void TExpression::eval()

View File

@ -3879,12 +3879,12 @@ bool TPrint_section::update_and_print(bool show_fields, bool new_page)
} else
{
TForm_subsection & ss=(TForm_subsection & )field(i);
int last_hpos=min(field(i).y()-1, (word)height());
int last_hpos=min(word(field(i).y()-1), height());
// found a subsection:print preceeding rows
// preceeding rows are all section rows which have Y coord <= than subsection's Y
if (show_fields && pr.current_row() > pr.headersize()+1)
{
if (last_hpos+ss.height() > pr.rows_left())
if (word(last_hpos+ss.height()) > pr.rows_left())
pr.formfeed();
}
for (word j = last_printed_row; show_fields && j < (word)last_hpos ;j++)

View File

@ -2889,7 +2889,6 @@ bool TEdit_field::default_error_box() const
bool TEdit_field::on_key(KEY key)
{
const int vf = validate_func();
static bool search_in_progress = FALSE;
switch(key)
{
@ -2897,8 +2896,11 @@ bool TEdit_field::on_key(KEY key)
set_focusdirty(FALSE);
break;
case K_TAB:
/*
if (vf >= 0 && (vf == AUTOEXIT_FUNC || vf == NUMCALC_FUNC || vf == STRCALC_FUNC))
set_focusdirty(); // Forza validate
*/
if (to_check(K_TAB, TRUE))
{
if (class_id() == CLASS_EDIT_FIELD) // Altrimenti l'ha gia' fatto
@ -3088,7 +3090,8 @@ bool TEdit_field::check(CheckTime t)
void TEdit_field::set_query_button(TBrowse_button * brw)
{
if (_browse) delete _browse;
if (_browse)
delete _browse;
_browse=brw;
}
@ -3217,6 +3220,10 @@ const char* TDate_field::win2raw(
{
g += 2;
} else
if (s == "ALTROIERI")
{
g -= 2;
} else
if (s == "PRIMO")
{
g.set_month(1);
@ -3907,7 +3914,7 @@ bool TList_field::on_key(KEY key)
current(0);
break;
default:
if (to_check(key, TRUE))
if (to_check(key, TRUE) || key == K_ENTER)
{
bool ok = TRUE;
if (validate_func() >= 0)

View File

@ -707,13 +707,13 @@ int TRelation_application::read(TMask& m)
const int max = m.fields();
for (int i = 0; i < max; i++)
{
if (m.fld(i).is_sheet()) {
if (m.fld(i).is_sheet())
{
TSheet_field& f = (TSheet_field&)m.fld(i);
if (f.record() && !f.external_record()) {
if (f.record() && !f.external_record())
f.record()->read(*f.putkey(r));
}
}
}
m.autoload(r);
return NOERR;
}

View File

@ -107,6 +107,7 @@ TSheet_control::TSheet_control(
short v_width[MAX_COL];
short m_width[MAX_COL];
int fixed_columns = 1; // Number of fixed columns
int lines_in_cell = 1;
_sheet = (TSheet*)xvt_vobj_get_data(parent);
@ -153,11 +154,15 @@ TSheet_control::TSheet_control(
v = max(at, v);
}
v++;
m_width[i] = v; // v = memory width of column
if (v > 64) v = 64;
v_width[i] = v;
if (v_width[i] > max_width) max_width = v_width[i];
if (v > 64)
{
lines_in_cell = (v-1) / 64 + 1;
v = 64;
}
m_width[i] = v*lines_in_cell + 1;
v_width[i] = v+1;
if (v > max_width)
max_width = v;
new_header.add(testa);
}
@ -184,6 +189,7 @@ TSheet_control::TSheet_control(
XI_LIST_DEF* l = listdef->v.list;
l->min_heading_height = xi_button_calc_height_font_id(xvt_default_font());
l->max_lines_in_cell = lines_in_cell;
l->sizable_columns = TRUE;
l->movable_columns = TRUE;
l->fixed_columns = fixed_columns;
@ -214,6 +220,8 @@ TSheet_control::TSheet_control(
coldef->app_data = (long)this;
coldef->v.column->heading_platform = TRUE;
coldef->v.column->center_heading = TRUE;
if (m_width[i] > 64)
coldef->v.column->wrap_text = TRUE;
if (i == 0 && _type[i] == 'C')
{
@ -913,7 +921,7 @@ TSheet::TSheet(short x, short y, short dx, short dy,
_parked(-1), _sheet(NULL), _select_row(-1)
{
TQuery_field* qf = new TQuery_field(this);
qf->construct(30883, head, 1, sht_y, -3, win(), "", -1);
qf->construct(30883, head, 1, sht_y, sht_y == 0 ? -3 : -2, win(), "", -1);
fields_array().add(qf);
_sheet = qf->sheet();
@ -1474,13 +1482,15 @@ TBrowse_sheet::TBrowse_sheet(TCursor* cursor, const char* fields,
if (c.uppercase()) flags << 'U';
if (c.zerofilled()) flags << 'Z';
const int csize = c.size();
switch (c.class_id())
{
case CLASS_EDIT_FIELD:
e = &add_string(c.dlg(), 0, p, 1, y++, c.size(), flags, c.size() > 50 ? 50 : c.size() );
e = &add_string(c.dlg(), 0, p, 1, y++, csize, flags, csize > 50 ? 50 : csize);
break;
case CLASS_REAL_FIELD:
e = &add_number(c.dlg(), 0, p, 1, y++, c.size(), flags);
e = &add_number(c.dlg(), 0, p, 1, y++, csize, flags);
break;
case CLASS_DATE_FIELD:
e = &add_date (c.dlg(), 0, p, 1, y++, flags);

View File

@ -6,6 +6,8 @@
#define FALSE 0
#define TRUE 1
#undef min
#undef max