Patch level :
Files correlati : Ricompilazione Demo : [ ] Commento : Aggiunta possibilta' di colorare testi da macro nei report git-svn-id: svn://10.65.10.50/trunk@20485 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
f1c5a81588
commit
4019b6617e
@ -2642,7 +2642,7 @@ size_t TReport::get_usr_words(TString_array& words) const
|
|||||||
"GET_ID", "GET_ID_NEXT", "GET_ID_PREV",
|
"GET_ID", "GET_ID_NEXT", "GET_ID_PREV",
|
||||||
"GET_POS", "GET_SIZE", "HIDE", "ISAM_READ",
|
"GET_POS", "GET_SIZE", "HIDE", "ISAM_READ",
|
||||||
"RUN_FORM", "SET_BACK_COLOR", "SET_FORE_COLOR",
|
"RUN_FORM", "SET_BACK_COLOR", "SET_FORE_COLOR",
|
||||||
"SET_POS", "SET_SIZE", "SHOW", "TABLE_READ", "GET_FIRM_DATA", NULL
|
"SET_POS", "SET_SIZE", "SET_TEXT_COLOR", "SHOW", "TABLE_READ", "GET_FIRM_DATA", NULL
|
||||||
};
|
};
|
||||||
size_t i;
|
size_t i;
|
||||||
for (i = 0; name[i] != NULL; i++)
|
for (i = 0; name[i] != NULL; i++)
|
||||||
@ -2674,6 +2674,9 @@ static void do_set_back_color(TReport_field& rf, void* jolly)
|
|||||||
static void do_set_fore_color(TReport_field& rf, void* jolly)
|
static void do_set_fore_color(TReport_field& rf, void* jolly)
|
||||||
{ rf.set_fore_color((COLOR)jolly); }
|
{ rf.set_fore_color((COLOR)jolly); }
|
||||||
|
|
||||||
|
static void do_set_text_color(TReport_field& rf, void* jolly)
|
||||||
|
{ rf.set_text_color((COLOR)jolly); }
|
||||||
|
|
||||||
bool TReport::do_message(const TVariant& var, FLDMSG_FUNC msg, void* jolly)
|
bool TReport::do_message(const TVariant& var, FLDMSG_FUNC msg, void* jolly)
|
||||||
{
|
{
|
||||||
char type;
|
char type;
|
||||||
@ -2723,6 +2726,7 @@ bool TReport::do_message(const TVariant& var, FLDMSG_FUNC msg, void* jolly)
|
|||||||
void TReport::report2mask(TMask & m) const
|
void TReport::report2mask(TMask & m) const
|
||||||
{
|
{
|
||||||
TVariant var;
|
TVariant var;
|
||||||
|
TString name;
|
||||||
|
|
||||||
for (int i = m.fields()-1; i >= 0; i--)
|
for (int i = m.fields()-1; i >= 0; i--)
|
||||||
{
|
{
|
||||||
@ -2731,7 +2735,7 @@ void TReport::report2mask(TMask & m) const
|
|||||||
if (ref != NULL)
|
if (ref != NULL)
|
||||||
{
|
{
|
||||||
const bool is_final = f.in_group(2);
|
const bool is_final = f.in_group(2);
|
||||||
TString name = ref->name();
|
name = ref->name();
|
||||||
if (name[0] != '#')
|
if (name[0] != '#')
|
||||||
name.insert("#");
|
name.insert("#");
|
||||||
if (get_usr_val(name, var))
|
if (get_usr_val(name, var))
|
||||||
@ -2799,6 +2803,7 @@ TVariant & string2var(TVariant & v, const TFieldref * r, const TString & val)
|
|||||||
void TReport::mask2report(const TMask & m)
|
void TReport::mask2report(const TMask & m)
|
||||||
{
|
{
|
||||||
TVariant var;
|
TVariant var;
|
||||||
|
TString name;
|
||||||
TRecordset* rset = recordset();
|
TRecordset* rset = recordset();
|
||||||
|
|
||||||
//test incoerente con la forzatura del valore (non comparivano i valori..
|
//test incoerente con la forzatura del valore (non comparivano i valori..
|
||||||
@ -2814,7 +2819,7 @@ void TReport::mask2report(const TMask & m)
|
|||||||
if (ref != NULL)
|
if (ref != NULL)
|
||||||
{
|
{
|
||||||
const bool is_final = f.in_group(2);
|
const bool is_final = f.in_group(2);
|
||||||
TString name = ref->name();
|
name = ref->name();
|
||||||
|
|
||||||
if (name[0] != '#')
|
if (name[0] != '#')
|
||||||
name.insert("#");
|
name.insert("#");
|
||||||
@ -3297,13 +3302,20 @@ bool TReport::execute_usr_word(unsigned int opcode, TVariant_stack& stack)
|
|||||||
do_message(fld, do_set_size, (void*)&sz);
|
do_message(fld, do_set_size, (void*)&sz);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 16: // SHOW
|
case 16: // SET_TEXT_COLOR
|
||||||
|
{
|
||||||
|
const TVariant& fld = stack.pop();
|
||||||
|
const COLOR rgb = stack.pop().as_color();
|
||||||
|
do_message(fld, do_set_text_color, (void*)rgb);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 17: // SHOW
|
||||||
do_message(stack.pop(), do_show, (void*)1);
|
do_message(stack.pop(), do_show, (void*)1);
|
||||||
break;
|
break;
|
||||||
case 17: // TABLE_READ
|
case 18: // TABLE_READ
|
||||||
msg_table_read(stack);
|
msg_table_read(stack);
|
||||||
break;
|
break;
|
||||||
case 18: // GET_FIRM_DATA
|
case 19: // GET_FIRM_DATA
|
||||||
msg_firm(stack);
|
msg_firm(stack);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user