diff --git a/ci/ci1200b.rep b/ci/ci1200b.rep index 53e815973..29e405517 100755 --- a/ci/ci1200b.rep +++ b/ci/ci1200b.rep @@ -185,7 +185,7 @@ THEN #340-#330 - MON + #330 @ 0 E; IF #350 @ diff --git a/ic/ic0200p.rep b/ic/ic0200p.rep index 81578251f..b3b8744f4 100644 --- a/ic/ic0200p.rep +++ b/ic/ic0200p.rep @@ -89,7 +89,6 @@
-
USE IVADIFF SELECT (BETWEEN(DATAREGP,#DAL,#AL))(TIPOIVA==#TIPOIVA)(TIPODIFF==#TIPODIFF)(NUMPRO>0)((CHIUSA=#CHIUSA)||(#CHIUSA="T")) BY NUMREG DATAREGP NUMREGP JOIN MOV INTO NUMREG==NUMREG diff --git a/pa/pa0100.cpp b/pa/pa0100.cpp index 70055502b..99a2befcb 100644 --- a/pa/pa0100.cpp +++ b/pa/pa0100.cpp @@ -111,6 +111,7 @@ protected: public: void set(const char* key, const char* value); + const TString& get(const char* key) const; void save(); TJava_profile(const char* path); ~TJava_profile() { if (_dirty) save(); } @@ -129,6 +130,24 @@ const TString& TJava_profile::path2prop(const char* path) const return get_tmp_string() = percorso; } +const TString& TJava_profile::get(const char* key) const +{ + FOR_EACH_ARRAY_ROW(_row, r, line) + { + if (line->starts_with(key, true)) + { + const int equal = line->find('='); + if (equal > 0) + { + TString& value = get_tmp_string(); + value = line->mid(equal+1); + value.trim(); + return value; + } + } + } + return EMPTY_STRING; +} void TJava_profile::set(const char* key, const char* value) { @@ -1534,7 +1553,8 @@ bool TDoc2Paf::genera_xml() if (tmp.exist()) { TJava_profile prop(tmp); - prop.set("percorso", _dbname.path()); + if (prop.get("percorso").blank()) + prop.set("percorso", _dbname.path()); prop.set("nomePAF", _dbname); } else diff --git a/sl/sl0100.cpp b/sl/sl0100.cpp index 2ca18be82..69c89fb79 100644 --- a/sl/sl0100.cpp +++ b/sl/sl0100.cpp @@ -400,15 +400,11 @@ TSAL_tree& TSAL_emsk::tree(bool reset) return *_tree; } -static bool set_and_check(TMask_field& f, const TRectype& rec) +static bool rec2field(TMask_field& f, const TRectype& rec) { const TFieldref* fr = f.field(); if (fr == NULL) - { - if (f.ghost()) - return f.on_hit(); return false; - } if (fr->name() == RDOC_DESCR) { @@ -420,21 +416,35 @@ static bool set_and_check(TMask_field& f, const TRectype& rec) } else { - f.set(fr->read(rec)); + const TString& val = fr->read(rec); + f.set(val); if (!f.empty() && f.is_edit() && f.shown()) { const TBrowse* b = ((TEdit_field&)f).browse(); if (b != NULL) { - const TFixed_string of = b->get_output_fields(); - if (of.find('|') > 0) // C'è un pipe nell'output, per cui ci sono almeno due campi di output + const TFixed_string inf = b->get_input_fields(); + const TFixed_string outf = b->get_output_fields(); + if (outf.find('|') > 0) // C'è un pipe nell'output, per cui ci sono almeno due campi di output + { f.check(STARTING_CHECK); + } } } } return true; } +static bool chk_field(TMask_field& f) +{ + const TFieldref* fr = f.field(); + if (fr == NULL) + { + if (f.ghost()) + return f.on_hit(); + } + return true; +} // Riempie gli sheet di articoli e misure della distinta selezionata bool TSAL_emsk::set_dist(const TString& idd) @@ -461,8 +471,10 @@ bool TSAL_emsk::set_dist(const TString& idd) { const TRectype& rec = *t.curr_row(); TMask& m = s.sheet_row_mask(n); - FOR_EACH_MASK_FIELD(m, i, f) - set_and_check(*f, rec); + FOR_EACH_MASK_FIELD(m, i, f) if (f->field()) + rec2field(*f, rec); + FOR_EACH_MASK_FIELD(m, i, c) if (c->is_edit()) + chk_field(*c); s.update_row(n++); } _locked = false; @@ -519,8 +531,10 @@ bool TSAL_emsk::set_fase(const TString& idfase) { const TRectype& rec = *t.curr_row(); TMask& m = d.sheet_row_mask(n); - FOR_EACH_MASK_FIELD(m, i, f) - set_and_check(*f, rec); + FOR_EACH_MASK_FIELD(m, i, f) if (f->field()) + rec2field(*f, rec); + FOR_EACH_MASK_FIELD(m, i, c) if (c->is_edit()) + chk_field(*c); d.update_row(n++); } while (t.goto_rbrother()); } diff --git a/xvaga/xvaga.cpp b/xvaga/xvaga.cpp index f498b3f36..fa5eb7866 100755 --- a/xvaga/xvaga.cpp +++ b/xvaga/xvaga.cpp @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -1813,12 +1814,21 @@ SLIST xvt_fsys_list_files(const char *type, const char *pat, BOOLEAN dirs) } else //normale list_files { + wxString ext; + if (flags == wxFILE) + wxSplitPath(pat, NULL, NULL, &ext); + wxString f = ::wxFindFirstFile(pat, flags); while (!f.IsEmpty()) { if (f.StartsWith(".\\") || f.StartsWith("./")) f = f.Mid(2); - xvt_slist_add_at_elt(list, NULL, f, 0L); + + bool bGood = true; + if (flags == wxFILE && ext.Len() >= 3) + bGood = wxStricmp(ext, f.AfterLast('.')) == 0; + if (bGood) + xvt_slist_add_at_elt(list, NULL, f, 0L); f = ::wxFindNextFile(); } }