From ed54bd62762adb73b24225e79b1979725b3cb0e8 Mon Sep 17 00:00:00 2001 From: bonazzi Date: Fri, 2 Sep 2016 08:47:44 +0000 Subject: [PATCH] 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 --- include/report.cpp | 42 ++++++++++++++++++++++++++++++++++++++++-- include/report.h | 15 ++++++++++++++- 2 files changed, 54 insertions(+), 3 deletions(-) diff --git a/include/report.cpp b/include/report.cpp index 510cdf3e3..d1c9f73ad 100755 --- a/include/report.cpp +++ b/include/report.cpp @@ -1,4 +1,5 @@ #include +#include #include #include #include @@ -1588,7 +1589,6 @@ void TReport_field::print(TBook& book) const switch (_type) { case 'B': - /* if (is_power_reseller()) { const TReport_rct& rctout = get_draw_rect(); @@ -1608,7 +1608,6 @@ void TReport_field::print(TBook& book) const } } else - */ { print_rect(book); const TString& str = formatted_text(); @@ -2495,6 +2494,45 @@ bool TReport::get_report_field(const TString& name, TVariant& var) const const char* str = name; 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.")) { str += 8; diff --git a/include/report.h b/include/report.h index 0b6947a26..cc12b56cb 100755 --- a/include/report.h +++ b/include/report.h @@ -674,4 +674,17 @@ public: virtual ~TReport(); }; -#endif \ No newline at end of file +/////////////////////////////////////////////////////////// +// Report senza maschera +/////////////////////////////////////////////////////////// + +class TProgram_report : public TReport +{ +protected: + virtual bool use_mask() { return false; } + +public: + TProgram_report() {} +}; + +#endif