From 3459429d3a4c39c5a20ab5ae310d22950709627a Mon Sep 17 00:00:00 2001 From: luca Date: Thu, 24 Jan 2008 16:25:46 +0000 Subject: [PATCH] Patch level : Files correlati : Ricompilazione Demo : [ ] Commento : git-svn-id: svn://10.65.10.50/trunk@16042 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- ps/ps0017100.cpp | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/ps/ps0017100.cpp b/ps/ps0017100.cpp index ed8acbc37..60b77cec3 100755 --- a/ps/ps0017100.cpp +++ b/ps/ps0017100.cpp @@ -35,6 +35,7 @@ protected: bool on_sheet_event(TOperable_field& o, TField_event e, long jolly); int insert_anal_fields(TMask& m, int page, int lf, int& y, short& dlg, short& dlgd, bool required); void insert_anal_page(); + const TString& get_anal_field(const int lf) const; public: bool calc_residual(const TRiga_scadenze& scad, real& impres, real& imppag, @@ -309,6 +310,21 @@ void TPE_mask::sort_sheet() } } +const TString& TPE_mask::get_anal_field(const int lf) const +{ + TString80 stringona; + TString80 workstring; + for (short id = _start[lf]; id <= _end[lf]; id++) + { + const TEdit_field& f = efield(id); + workstring = f.get(); + workstring.rpad(f.size()); + stringona << workstring; + } + stringona.rtrim(); + return get_tmp_string() = stringona; +} + bool TPE_mask::fill_rate() { const long ndist = get_long(F_DIST); @@ -318,7 +334,6 @@ bool TPE_mask::fill_rate() TSheet_field& sheet = sfield(F_SHEET); sheet.destroy(); - TString commessa; TString cdc; TString fase; @@ -334,14 +349,10 @@ bool TPE_mask::fill_rate() TCursor partite(&rel, filtro, 1, &filter, &filter); TLocalisamfile mov(LF_MOV); TLocalisamfile doc(LF_DOC); - short id; - for (id = _start[LF_COMMESSE]; id <= _end[LF_COMMESSE]; id++) - commessa << get(id); - for (id = _start[LF_CDC]; id <= _end[LF_CDC]; id++) - cdc << get(id); - for (id = _start[LF_FASI]; id <= _end[LF_FASI]; id++) - fase << get(id); + commessa = get_anal_field(LF_COMMESSE); + cdc = get_anal_field(LF_CDC); + fase = get_anal_field(LF_FASI); const long items = partite.items(); partite.freeze();