From ec209eafbe8eebd50294a2200f378297e11e68f2 Mon Sep 17 00:00:00 2001 From: guy Date: Wed, 16 Sep 2009 15:03:02 +0000 Subject: [PATCH] Patch level : 10.0 Files correlati : bacnv Ricompilazione Demo : [ ] Commento : Corretta conversione profili documenti in modo da gestire corretamente nomi di file maiuscoli e/o minuscoli git-svn-id: svn://10.65.10.50/trunk@19292 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- ba/bacnv.cpp | 45 ++++++++++++++++++++++----------------------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/ba/bacnv.cpp b/ba/bacnv.cpp index a8bc6e482..3b0ea3878 100755 --- a/ba/bacnv.cpp +++ b/ba/bacnv.cpp @@ -3,7 +3,6 @@ #include #include #include -#include #include #include #include @@ -19,10 +18,7 @@ #include "..\cg\cglib02.h" - -#define usage "Errore - uso : bacnv [1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22] ditta" -#define usage1 "Errore - uso : bacnv 23 profilo" - +/* /////////////////////////////////////////////////////////////////////////////////////////////////////// // Applicazione di conversione archivi XBase, valida per tutti e 4 i tipi di DLL /////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -131,6 +127,7 @@ void TConversione_xbase::update() set_autoload_new_files(TRUE); end_wait(); } +*/ ///////////////////////////////////////////////////////////////////////////////////////// // Applicazione di conversione archivi @@ -1939,7 +1936,7 @@ bool TConversione_archivi::backup_text_file(TFilename& name, TLog_report& log) c log.log_error(TR("Il file non esiste!")); return false; } - + name.lower(); if (name.find("custom") < 0) { log.log_error(TR("Il file non e' in una cartella custom!")); @@ -1976,6 +1973,10 @@ bool TConversione_archivi::rinumera_paragrafo(const TFilename& ininame, const ch return ok; } + val = TR("Conversione paragrafo"); + val << " [" << paragrafo << ']'; + log.log(0, val); + TString4 str; for (int i = 1; i <= ncols; i++) { @@ -2087,9 +2088,11 @@ bool TConversione_archivi::rinumera_maschera(const TFilename& mskname, TLog_repo bool TConversione_archivi::to_be_converted(TFilename& name) const { - if (!name.custom_path() || name.find("custom") < 0) + if (!name.custom_path()) // Non esiste return false; name.lower(); + if (name.find("custom") < 0) // Non e' in "CUSTOM" + return false; if (name.ends_with(".ini")) { @@ -2109,8 +2112,8 @@ bool TConversione_archivi::to_be_converted(TFilename& name) const void TConversione_archivi::convert_profile(const char* profile_name) { - TArray_sheet elenco(-1, -1, -4, -4, - TR("Profili da convertire"), TR("@1|Profilo@60"), 0x08); + TArray_sheet elenco(-1, -1, -4, -6, + TR("Profili documento da convertire"), HR("@1|Profilo@60"), 0x08); TFilename name; TToken_string row; @@ -2185,23 +2188,19 @@ void TConversione_archivi::convert_profile(const char* profile_name) int main(int argc,char** argv) { const int r = (argc > 1) ? abs(atoi(argv[1])) : 0; - - if (r < 0 || r > 23) + +/* + if (r==0) { - error_box(usage); - return 100; + TConversione_xbase a; + a.run(argc,argv, TR("Conversione archivi di xBase")); } else - if (r==0) - { - TConversione_xbase a; - a.run(argc,argv, TR("Conversione archivi di xBase")); - } - else - { - TConversione_archivi a ; - a.run(argc, argv, TR("Conversione archivi")); - } +*/ + { + TConversione_archivi a ; + a.run(argc, argv, TR("Conversione archivi")); + } return 0; }