Migliorata gestione simboli speciali all'interno dei codici articolo (prima venivano filtrate solo le descrizioni)
git-svn-id: svn://10.65.10.50/branches/R_10_00@22897 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
5f9b272723
commit
4acae88bb6
@ -79,7 +79,10 @@
|
||||
const char* safe_string(const TString& str)
|
||||
{
|
||||
TString256 tmp = str;
|
||||
tmp.strip("@#$%");
|
||||
tmp.replace('#', '=');
|
||||
tmp.replace('$', 'S');
|
||||
tmp.replace('%', '/');
|
||||
tmp.replace('@', 'a');
|
||||
tmp.replace('&', 'e');
|
||||
if (tmp != str)
|
||||
return get_tmp_string() = tmp;
|
||||
@ -884,7 +887,7 @@ void TStampa_stat::set_descr(int& row)
|
||||
const int MAX_DESC_LEN = 27;
|
||||
TRectype& strec = current_cursor()->curr();
|
||||
TParagraph_string descr("",MAX_DESC_LEN); // Spezzatura manuale, per evitare righe accavallate
|
||||
TString r;
|
||||
TString r(255);
|
||||
const int lastlev = numlevels();
|
||||
const int level = strec.get_int(SVS_LIVELLO);
|
||||
int lencode = 0;
|
||||
@ -900,9 +903,9 @@ void TStampa_stat::set_descr(int& row)
|
||||
if (r.blank())
|
||||
r.cut(0);
|
||||
else
|
||||
r << " ";
|
||||
r << ' ';
|
||||
|
||||
r << strec.get(SVS_CODICE).mid(lencode);
|
||||
r << safe_string(strec.get(SVS_CODICE).mid(lencode));
|
||||
descr = safe_string(strec.get(SVS_DESCR));
|
||||
if (descr.full())
|
||||
r << "@23g" << descr.get(0);
|
||||
@ -974,10 +977,11 @@ void TStampa_stat::set_page(int file, int count)
|
||||
case LINEA_RAFFRONTI:
|
||||
if (printmask().get_bool(F_STRAFFRONTO))
|
||||
{
|
||||
if (_save_code != strec.get(SVS_CODICE))
|
||||
const TString& codice = strec.get(SVS_CODICE);
|
||||
if (_save_code != codice)
|
||||
{
|
||||
TRectype stempty(LF_SVSTAT);
|
||||
stempty.put(SVS_CODICE,strec.get(SVS_CODICE));
|
||||
stempty.put(SVS_CODICE, codice);
|
||||
stempty.put(SVS_LEVCODE,strec.get(SVS_LEVCODE));
|
||||
stempty.put(SVS_LIVELLO,strec.get(SVS_LIVELLO));
|
||||
stempty.put(SVS_TIPO,strec.get(SVS_TIPO));
|
||||
|
Loading…
x
Reference in New Issue
Block a user