From df77178ce1ff725df25c319204f2a064379fc8b5 Mon Sep 17 00:00:00 2001 From: guy Date: Wed, 1 Oct 2003 14:31:28 +0000 Subject: [PATCH] Patch level : 2.0 586 Files correlati : ve0.exe Ricompilazione Demo : [ ] Commento : GF20103 Sui documenti interattivi di vendita non legge il .ini nel direttorio CUSTOM git-svn-id: svn://10.65.10.50/trunk@11458 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- ve/ve1200.cpp | 2 +- ve/velib.h | 3 ++- ve/velib02.cpp | 3 +-- ve/velib03a.cpp | 25 +++++++++++++------------ ve/velib06a.cpp | 3 +-- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/ve/ve1200.cpp b/ve/ve1200.cpp index 9c50ee609..4502cde9e 100755 --- a/ve/ve1200.cpp +++ b/ve/ve1200.cpp @@ -80,7 +80,7 @@ bool TScoperto_msk::fill_sheet() { const TString8 td = codnum.tipo_doc(t); const TTipo_documento& tpd = TDocumento::tipo(td); - TFilename prof = tpd.profile_name(); prof.ext("ini"); + TFilename prof; tpd.profile_name(prof); TConfig ini(prof, "MAIN"); if (ini.get("TIPOCF") == "F") tipi.add(td); diff --git a/ve/velib.h b/ve/velib.h index 7ac80f886..e36921069 100755 --- a/ve/velib.h +++ b/ve/velib.h @@ -256,7 +256,8 @@ public: TObject* dup() const { return new TTipo_documento(codice()); } public: - const TString& profile_name() const { return get("S4"); } +// const TString& profile_name() const { return get("S4"); } + const TFilename& profile_name(TFilename& name) const; // Funzioni che effettuano la cache di importanti valori contenuti nel profilo const char tipocf(); diff --git a/ve/velib02.cpp b/ve/velib02.cpp index ec25544c4..81a700125 100755 --- a/ve/velib02.cpp +++ b/ve/velib02.cpp @@ -104,7 +104,7 @@ void TTipo_riga_documento::read_formule() _formule = profile.get("CAMPICALC"); - const TString & calcoli = profile.get("CALCOLI"); + const TString& calcoli = profile.get("CALCOLI"); if (calcoli == "*") { TTable frr("%FRR"); @@ -714,7 +714,6 @@ void TRiga_documento::dirty_fields(bool dirty_document) } bool TRiga_documento::doc_dependent() const - { if (tipo_valido()) { diff --git a/ve/velib03a.cpp b/ve/velib03a.cpp index 46a15f215..a0e0722b1 100755 --- a/ve/velib03a.cpp +++ b/ve/velib03a.cpp @@ -41,12 +41,18 @@ int TTipo_documento::read(const char* tipodoc) return err; } +const TFilename& TTipo_documento::profile_name(TFilename& profile) const +{ + profile = get("S4"); + profile.ext("ini"); + return profile; +} + const char TTipo_documento::tipocf() { if (_tipocf == '\0') { - TFilename pn = profile_name(); - pn.ext("ini"); + TFilename pn; profile_name(pn); TConfig prof(pn); _tipocf = prof.get_char("TIPOCF", "MAIN"); } @@ -93,8 +99,7 @@ const TString_array& TTipo_documento::keys_descrs() if (_keys_descrs.items() == 0) { TString16 var, tiporiga; - TFilename pn(profile_name()); - pn.ext("ini"); + TFilename pn; profile_name(pn); TConfig prof(pn); const int numtr = prof.get_int( "NTIPIRIGA", "RIGHE" ); TTipo_riga_documento tr; @@ -134,8 +139,7 @@ const TString_array& TTipo_documento::sheet_columns() if (_sheet_columns.items() == 0) { TString16 col; - TFilename pn(profile_name()); - pn.ext("ini"); + TFilename pn; profile_name(pn); TConfig prof(pn, "SHEET"); int ncols = prof.get_int( "NCOLS", "SHEET" ); for (int i = 1; i <= ncols; i++) @@ -153,8 +157,7 @@ const TString_array& TTipo_documento::handlers() if (_handlers.items() == 0) { TString16 chiave; - TFilename pn = profile_name(); - pn.ext("ini"); + TFilename pn; profile_name(pn); TConfig prof(pn); int numhandler = prof.get_int( "NHANDLER", "HANDLERS" ); // prof @@ -175,8 +178,7 @@ void TTipo_documento::set_defaults(TMask& m) if (items == 0) // Carica lo string_array con i defaults { TString16 chiave; - TFilename pn(profile_name()); - pn.ext("ini"); + TFilename pn; profile_name(pn); TConfig prof(pn, "DEFAULT"); const int ndefaults = prof.get_int("NDEFAULTS"); for(int i = 1; i <= ndefaults; i++) @@ -209,8 +211,7 @@ void TTipo_documento::add_formula_if_needed(TConfig& profile, TString& variable, void TTipo_documento::read_formule() { - TFilename profile(profile_name()); - profile.ext("ini"); + TFilename profile; profile_name(profile); TConfig prof(profile, "MAIN"); prof.write_protect(); // Altrimenti non si distrugge!!! diff --git a/ve/velib06a.cpp b/ve/velib06a.cpp index 1b4c2f4aa..4e8fec2d1 100755 --- a/ve/velib06a.cpp +++ b/ve/velib06a.cpp @@ -1142,8 +1142,7 @@ bool causmag_handler( TMask_field& f, KEY key ) static int copy_defmagc = -883; if (copy_defmagc < 0) { - TFilename fname = mask.doc().tipo().profile_name(); - fname.ext("ini"); + TFilename fname; mask.doc().tipo().profile_name(fname); TConfig c_tipo_documento(fname,"MAIN"); copy_defmagc = c_tipo_documento.get_bool("DEFMAGXCOLL"); }