Patch level : 10.0 no patch

Files correlati     : 
Ricompilazione Demo : [ ]
Commento            :

Aggiunta la classe TProgram_report che non usa maschere.

git-svn-id: svn://10.65.10.50/branches/R_10_00@23213 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
bonazzi 2016-09-02 08:47:44 +00:00
parent 69cf9a5d3b
commit ed54bd6276
2 changed files with 54 additions and 3 deletions

View File

@ -1,4 +1,5 @@
#include <colors.h> #include <colors.h>
#include <config.h>
#include <defmask.h> #include <defmask.h>
#include <expr.h> #include <expr.h>
#include <mask.h> #include <mask.h>
@ -1588,7 +1589,6 @@ void TReport_field::print(TBook& book) const
switch (_type) switch (_type)
{ {
case 'B': case 'B':
/*
if (is_power_reseller()) if (is_power_reseller())
{ {
const TReport_rct& rctout = get_draw_rect(); const TReport_rct& rctout = get_draw_rect();
@ -1608,7 +1608,6 @@ void TReport_field::print(TBook& book) const
} }
} }
else else
*/
{ {
print_rect(book); print_rect(book);
const TString& str = formatted_text(); const TString& str = formatted_text();
@ -2495,6 +2494,45 @@ bool TReport::get_report_field(const TString& name, TVariant& var) const
const char* str = name; const char* str = name;
if (name[0] == '#') if (name[0] == '#')
{ {
if (name.starts_with("#CONFIG"))
{
TString field(str+8);
TString para;
int cfg = 0;
if (field.starts_with("DITTA."))
{
field.ltrim(6);
cfg = CONFIG_DITTA;
}
else
if (field.starts_with("STUDIO."))
{
field.ltrim(7);
cfg = CONFIG_STUDIO;
}
if (cfg > 0)
{
int p = field.find('.');
if (p >= 0)
{
para = field.left(p);
field.ltrim(p + 1);
}
p = field.find('.');
if (p > 0)
{
int idx = atoi(field.smid(p + 1));
field.cut(p);
var = ini_get_string(cfg, para, field, "", idx);
}
else
var = ini_get_string(cfg, para, field);
return true;
}
}
if (name.starts_with("#REPORT.")) if (name.starts_with("#REPORT."))
{ {
str += 8; str += 8;

View File

@ -674,4 +674,17 @@ public:
virtual ~TReport(); virtual ~TReport();
}; };
#endif ///////////////////////////////////////////////////////////
// Report senza maschera
///////////////////////////////////////////////////////////
class TProgram_report : public TReport
{
protected:
virtual bool use_mask() { return false; }
public:
TProgram_report() {}
};
#endif