From f7042030d7c3d44595949092c4557af77eec2845 Mon Sep 17 00:00:00 2001 From: cris Date: Tue, 2 Feb 1999 14:40:54 +0000 Subject: [PATCH] Patch level : Files correlati : Ricompilazione Demo : [ ] Commento : Corretto stampa localita git-svn-id: svn://10.65.10.50/trunk@7738 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- at/at1300.cpp | 23 +++++++++++------------ at/at1400.cpp | 14 ++++---------- at/at2200.cpp | 20 +++++++------------- at/at2400.cpp | 13 ++++--------- at/at2800.cpp | 14 ++++---------- 5 files changed, 30 insertions(+), 54 deletions(-) diff --git a/at/at1300.cpp b/at/at1300.cpp index 95179844e..5c40783fd 100755 --- a/at/at1300.cpp +++ b/at/at1300.cpp @@ -11,8 +11,9 @@ #include "at1.h" #include "at1300a.h" -#define ALIAS_BNZ 600 +#define CAMPO_BENEM 10 // campo benemerenza in form per lettera +#define ALIAS_BNZ 600 #define ALIAS_LCPRES 101 // localita' postale di residenza #define ALIAS_LCPDOM 100 // localita' postale di domicilio #define ALIAS_COMRES 502 // comune di residenza @@ -20,6 +21,7 @@ #define ALIAS_COMNAS 500 // comune di nascita #define ETI_COGNOME 3 // numero campo cognome e nome in etichetta (deve essere sempre cosi') per famiglie +#define LET_BENEM 10 // campo benemerenza in form per lettera enum ts { undefined=0, sintetico=1, completo=2, etichette=3, lettere=4 }; @@ -154,6 +156,10 @@ void TStampaBenemerenze::set_page(int file, int cnt) case lettere: { TPrint_section& corpo = _form_let->get_body(); + TForm_item& item_benem = corpo.find_field(LET_BENEM); + TString80 benem = current_cursor()->curr(-ALIAS_BNZ).get("S0"); + int new_x = (80-benem.len())/2; + item_benem.set_x(new_x); corpo.update(); for (word i = 0; i < corpo.height(); i++) { @@ -197,23 +203,16 @@ bool TStampaBenemerenze::preprocess_page(int file, int counter) nome << current_cursor()->curr(LF_SOGGETTI).get(SOG_NOME); _cognome_nome = nome; TString256 localita = ""; - localita << current_cursor()->curr(-ALIAS_LCPDOM).get("S6"); - if (localita.not_empty() && localita.ok()) + localita = current_cursor()->curr(LF_SOGGETTI).get(SOG_DOM_CAP); + localita << " "; + if (current_cursor()->curr(LF_SOGGETTI).get(SOG_DOM_CODLOC).not_empty()) { - localita << " "; localita << current_cursor()->curr(-ALIAS_LCPDOM).get("S0"); localita << " - "; - } - else - { - //localita = current_cursor()->curr(-ALIAS_COMDOM).get(COM_CAPCOM); - localita = current_cursor()->curr(LF_SOGGETTI).get(SOG_DOM_CAP); - localita << " "; - } + } localita << current_cursor()->curr(-ALIAS_COMDOM).get(COM_DENCOM); localita.trim(); _dencom = localita; - // salto pagina se cambio punto di rottura const TString16 tiponew = current_cursor()->curr().get(BEN_TIPOBEN); TString16 codsez, codsot; diff --git a/at/at1400.cpp b/at/at1400.cpp index 54025f7a4..c4a6f5993 100755 --- a/at/at1400.cpp +++ b/at/at1400.cpp @@ -180,22 +180,16 @@ bool TStampaBenxGAz::preprocess_page(int file, int counter) nome << current_cursor()->curr(LF_SOGGETTI).get(SOG_NOME); _cognome_nome = nome; TString256 localita = ""; - localita << current_cursor()->curr(-ALIAS_LCPDOM).get("S6"); - if (localita.not_empty() && localita.ok()) + localita = current_cursor()->curr(LF_SOGGETTI).get(SOG_DOM_CAP); + localita << " "; + if (current_cursor()->curr(LF_SOGGETTI).get(SOG_DOM_CODLOC).not_empty()) { - localita << " "; localita << current_cursor()->curr(-ALIAS_LCPDOM).get("S0"); localita << " - "; - } - else - { - localita = current_cursor()->curr(-ALIAS_COMDOM).get(COM_CAPCOM); - localita << " "; - } + } localita << current_cursor()->curr(-ALIAS_COMDOM).get(COM_DENCOM); localita.trim(); _dencom = localita; - // salto pagina se cambio punto di rottura TString16 grupponew; if (app()._tiposta == 'S') diff --git a/at/at2200.cpp b/at/at2200.cpp index 57be2b18c..7fccbc3f5 100755 --- a/at/at2200.cpp +++ b/at/at2200.cpp @@ -184,13 +184,13 @@ void TStampaPerEta::header_sezione(const TString16 codsez, const TString16 codso TString intestazione(132); intestazione = "Sezione: "; intestazione << codsez; - intestazione << "/"; + intestazione << '/'; intestazione << codsot; - intestazione << " "; + intestazione << ' '; intestazione << densez; if ((densot.ok())&& (densot.not_empty())) { - intestazione << "/"; + intestazione << '/'; intestazione << densot; } if (_stampa80) @@ -207,26 +207,20 @@ bool TStampaPerEta::preprocess_page(int file, int counter) { TRectype recsog = current_cursor()->curr(); TString80 nome = recsog.get(SOG_COGNOME); - nome << " "; + nome << ' '; nome << recsog.get(SOG_NOME); _cognome_nome = nome; TString256 localita = ""; - localita << current_cursor()->curr(-ALIAS_LCP).get("S6"); - if (localita.not_empty() && localita.ok()) + localita = recsog.get(SOG_DOM_CAP); + localita << ' '; + if (recsog.get(SOG_DOM_CODLOC).not_empty()) { - localita << " "; localita << current_cursor()->curr(-ALIAS_LCP).get("S0"); localita << " - "; } - else - { - localita = current_cursor()->curr(LF_COMUNI).get(COM_CAPCOM); - localita << " "; - } localita << current_cursor()->curr(LF_COMUNI).get(COM_DENCOM); localita.trim(); _dencom = localita; - // salto pagina se cambio sezione const TString16 codsez = recsog.get(SOG_CODSEZ); const TString16 codsot = recsog.get(SOG_CODSOT); diff --git a/at/at2400.cpp b/at/at2400.cpp index fd3901b53..41973eb96 100755 --- a/at/at2400.cpp +++ b/at/at2400.cpp @@ -171,19 +171,14 @@ bool TStampaModificati::preprocess_page(int file, int counter) nome << recsog.get(SOG_NOME); _cognome_nome = nome; TString256 localita = ""; - localita << current_cursor()->curr(-ALIAS_LCPDOM).get("S6"); - if (localita.not_empty() && localita.ok()) + localita = recsog.get(SOG_DOM_CAP); + localita << ' '; + if (recsog.get(SOG_DOM_CODLOC).not_empty()) { - localita << " "; localita << current_cursor()->curr(-ALIAS_LCPDOM).get("S0"); localita << " - "; } - else - { - localita = current_cursor()->curr(-ALIAS_COMDOM).get(COM_CAPCOM); - localita << " "; - } - localita << current_cursor()->curr(-ALIAS_COMDOM).get(COM_DENCOM); + localita << current_cursor()->curr(LF_COMUNI).get(COM_DENCOM); localita.trim(); _dencom = localita; // salto pagina se cambio sezione diff --git a/at/at2800.cpp b/at/at2800.cpp index f3def1adc..bfc36f734 100755 --- a/at/at2800.cpp +++ b/at/at2800.cpp @@ -232,19 +232,14 @@ bool TStampaNonDon::preprocess_page(int file, int counter) nome << " "; nome << recsog.get(SOG_NOME); _cognome_nome = nome; - TString256 localita = ""; - localita << current_cursor()->curr(-ALIAS_LCP).get("S6"); - if (localita.not_empty() && localita.ok()) + TString256 localita = ""; + localita = recsog.get(SOG_DOM_CAP); + localita << ' '; + if (recsog.get(SOG_DOM_CODLOC).not_empty()) { - localita << " "; localita << current_cursor()->curr(-ALIAS_LCP).get("S0"); localita << " - "; } - else - { - localita = current_cursor()->curr(LF_COMUNI).get(COM_CAPCOM); - localita << " "; - } localita << current_cursor()->curr(LF_COMUNI).get(COM_DENCOM); localita.trim(); _dencom = localita; @@ -255,7 +250,6 @@ bool TStampaNonDon::preprocess_page(int file, int counter) if ((_codsez!=codsez)||(_codsot!=codsot)) { if (_codsez != "**") - //printer().formfeed(); footer_sezione(); _codsez = codsez; _codsot = codsot;