Correzioni all'editor dei form
git-svn-id: svn://10.65.10.50/trunk@2651 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
1fe163e2b4
commit
10b377cf0a
@ -519,6 +519,7 @@ bool TForm_item::read_from(const TRectype& prof)
|
||||
}
|
||||
|
||||
TToken_string special(prof.get("SPECIAL"),'\n');
|
||||
special.rtrim();
|
||||
const int sp_items = special.items();
|
||||
for (i = 0; i < sp_items; i++)
|
||||
{
|
||||
@ -577,6 +578,7 @@ void TForm_item::print_on(TRectype& prof)
|
||||
special.add(sp);
|
||||
}
|
||||
}
|
||||
special.rtrim();
|
||||
prof.put("SPECIAL", special);
|
||||
}
|
||||
}
|
||||
@ -2568,6 +2570,8 @@ bool TPrint_section::edit(
|
||||
{
|
||||
const bool is_ba_editor = TString(_form->section_mask()).left(2) == "ba";
|
||||
bool nstd_dirty = FALSE;
|
||||
bool font_found = FALSE;
|
||||
|
||||
_cur_form = _form;
|
||||
_cur_sect = this;
|
||||
|
||||
@ -2638,7 +2642,6 @@ bool TPrint_section::edit(
|
||||
const int MAX_FAMILIES = 128;
|
||||
char* family[MAX_FAMILIES];
|
||||
const int num_families = (int)xvt_fmap_get_families(printer().get_printrcd(), family, MAX_FAMILIES);
|
||||
bool font_found = FALSE;
|
||||
TToken_string pn1(256), pn2(256);
|
||||
|
||||
for (int i = 0; i < num_families; i++)
|
||||
@ -2650,8 +2653,13 @@ bool TPrint_section::edit(
|
||||
xvt_mem_free(family[i]);
|
||||
}
|
||||
TList_field& lst = (TList_field&)m.field(F_FONT);
|
||||
if (!font_found)
|
||||
{
|
||||
warning_box("Il font %s non esiste per la stampante di default.",(const char*) form().fontname());
|
||||
pn1.add(form().fontname());
|
||||
pn2.add(form().fontname());
|
||||
}
|
||||
lst.replace_items(pn1, pn2);
|
||||
if (!font_found) warning_box("Il font %s non esiste per la stampante di default.",(const char*) form().fontname());
|
||||
lst.set(form().fontname());
|
||||
printer().set_char_size(form().fontsize());
|
||||
m.set_handler(F_FONT,font_handler);
|
||||
@ -2725,6 +2733,8 @@ bool TPrint_section::edit(
|
||||
{
|
||||
if (!form().dirty()) form().set_dirty();
|
||||
_dirty = TRUE;
|
||||
if (font_found && yesno_box("E' stato cambiato il font o la dimensione del carattere\ndevo aggiornale le coordinate dei campi"))
|
||||
{
|
||||
s_data prm;
|
||||
prm.size_1=form().fontsize();
|
||||
strcpy(prm.name_1,form().fontname());
|
||||
@ -2736,8 +2746,6 @@ bool TPrint_section::edit(
|
||||
xvt_print_start_thread (wpr, (long)&prm);
|
||||
xvt_print_close();
|
||||
|
||||
form().fontname() = name;
|
||||
form().fontsize() = size;
|
||||
const char sechar[4] = { 'B', 'F', 'G', 'H' };
|
||||
for (int sn = 0; sn < 4 ; sn++)
|
||||
{
|
||||
@ -2765,6 +2773,9 @@ bool TPrint_section::edit(
|
||||
}
|
||||
}
|
||||
}
|
||||
form().fontname() = name;
|
||||
form().fontsize() = size;
|
||||
}
|
||||
} else // controlli se l'editor non e' quello base
|
||||
nstd_dirty = _form->post_edit_checks(m,_cur_sect);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user