Migliorata esportazione Excel da TPrintapp
git-svn-id: svn://10.65.10.50/branches/R_10_00@23005 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
a6899f1fb2
commit
dc133a5ec1
@ -97,6 +97,7 @@
|
||||
#define DOC_MODPAG "MODPAG"
|
||||
#define DOC_CONTRATTO "CONTRATTO"
|
||||
#define DOC_PAF "PAF"
|
||||
#define DOC_MANDATO "MANDATO"
|
||||
|
||||
// Virtuali
|
||||
|
||||
|
@ -12,7 +12,6 @@
|
||||
#define EFF_CODVAL "CODVAL"
|
||||
#define EFF_DATACAMBIO "DATACAMBIO"
|
||||
#define EFF_CAMBIO "CAMBIO"
|
||||
//#define EFF_CONTROEURO "CONTROEURO" 06/02/2012
|
||||
#define EFF_CODABI "CODABI"
|
||||
#define EFF_CODCAB "CODCAB"
|
||||
#define EFF_IBAN "IBAN"
|
||||
@ -40,5 +39,6 @@
|
||||
#define EFF_CUP "CUP"
|
||||
#define EFF_CIG "CIG"
|
||||
#define EFF_CONTSEP "CONTSEP"
|
||||
#define EFF_MANDATO "MANDATO"
|
||||
|
||||
#endif
|
||||
|
@ -338,7 +338,9 @@ public:
|
||||
void add(const char* name, const TValue& val = nulltvalue);
|
||||
// @cmember Ritorna il nome della variabile di posto varnum
|
||||
const char* varname(int varnum) const
|
||||
{ return find(varnum)->getname();}
|
||||
{ return find(varnum)->getname(); }
|
||||
bool exist(const char* name) const
|
||||
{ return find(name) != NULL; }
|
||||
|
||||
// @cmember Setta l'oggetto TVararray con il nome e il valore della variabile
|
||||
void set(const char* varname, const real& val);
|
||||
@ -480,6 +482,9 @@ public:
|
||||
// @cmember Ritorna l'array di variabili
|
||||
const TVararray& vars() const
|
||||
{ return _var; }
|
||||
// @cmember controlla l'esistenza di una variabile
|
||||
bool exist(const char* name) const
|
||||
{ return _var.exist(name); }
|
||||
|
||||
// @cmember Setta la variabile con nome e numero
|
||||
void setvar(const char* varname, const real& val);
|
||||
@ -507,8 +512,7 @@ public:
|
||||
// @cmember Costruttore di copia
|
||||
TExpression(const TExpression & expr);
|
||||
// @cmember Distruttore
|
||||
virtual ~TExpression()
|
||||
{}
|
||||
virtual ~TExpression() {}
|
||||
};
|
||||
|
||||
bool is_real_discount(const TString& exp);
|
||||
|
@ -701,7 +701,7 @@ bool TFile_text::_autoload(TRecord_text& rec, TCursor& cur , TTracciato_record&
|
||||
campo = field.read(rel);
|
||||
|
||||
const TString& message = tc.message();
|
||||
if (!message.empty())
|
||||
if (message.full())
|
||||
{
|
||||
TToken_string msg (message, ',');
|
||||
if (!msg.blank())
|
||||
|
@ -536,7 +536,9 @@ TForm_item& TForm_item::find_field(const TString& id) const
|
||||
pos_id=freccia+2;
|
||||
id_num=atoi(id.mid(pos_id));
|
||||
se = id[0];
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
id_num=0;
|
||||
se = section().section_type();
|
||||
pos_id=0;
|
||||
@ -545,7 +547,9 @@ TForm_item& TForm_item::find_field(const TString& id) const
|
||||
{
|
||||
TForm_item& des = form().find_field(se, pt, id_num);
|
||||
return des;
|
||||
} else { // id stringa : campo sezione
|
||||
}
|
||||
else
|
||||
{ // id stringa : campo sezione
|
||||
TForm_item& des = form().find_field(se, pt, id.mid(pos_id));
|
||||
return des;
|
||||
}
|
||||
@ -3707,10 +3711,8 @@ bool TForm::print(
|
||||
|
||||
if ((_char_to_pos != '\0' || ((_ipx +_ipy+_fpx) != 0)) && // Se i parametri di posizionamento sono settati e
|
||||
(_x != 0 || _y != 0)) // cosi' pure gli offset genera un errore.
|
||||
{
|
||||
return error_box(TR("Non e' possibile settare contemporaneamente gli offset"
|
||||
" e i parametri di posizionamento del modulo."));
|
||||
}
|
||||
return error_box(TR("Impossibile impostare contemporaneamente offset e posizionamento modulo."));
|
||||
|
||||
TPrinter& pr = printer();
|
||||
if (_frompage) pr.set_from_page(_frompage);
|
||||
if (_topage) pr.set_to_page(_topage);
|
||||
|
@ -38,7 +38,7 @@ bool goto_url(const char* url)
|
||||
|
||||
TConfig link(CONFIG_USER, "Link");
|
||||
app = link.get(ext);
|
||||
if (app.not_empty())
|
||||
if (app.full())
|
||||
{
|
||||
app << " \"" << url << '"';
|
||||
long error = xvt_sys_execute(app, false, false); //verificare
|
||||
|
@ -1829,12 +1829,12 @@ bool TCursor::scan(CURSOR_SCAN_FUNC func, void* pJolly, const char* msg)
|
||||
bool ok = true;
|
||||
if (tot > 0)
|
||||
{
|
||||
TProgind* pi = NULL;
|
||||
TProgress_monitor* pi = NULL;
|
||||
if (tot > 1)
|
||||
{
|
||||
if (msg == NULL || *msg == '\0')
|
||||
msg = TR("Elaborazione in corso...");
|
||||
pi = new TProgind(tot, msg, true, true);
|
||||
pi = new TProgress_monitor(tot, msg, true);
|
||||
}
|
||||
|
||||
freeze(true);
|
||||
@ -1845,7 +1845,7 @@ bool TCursor::scan(CURSOR_SCAN_FUNC func, void* pJolly, const char* msg)
|
||||
ok = false;
|
||||
break;
|
||||
}
|
||||
if (pi != NULL && !pi->addstatus(1))
|
||||
if (pi != NULL && !pi->add_status())
|
||||
{
|
||||
ok = false;
|
||||
break;
|
||||
|
@ -456,7 +456,8 @@ public:
|
||||
bool scan(CURSOR_SCAN_FUNC func, void* pJolly = NULL, const char* msg = "");
|
||||
|
||||
// @cmember Costruttore
|
||||
TCursor(TRelation* f, const char* filter = "", int key = 1, const TRectype* from = NULL, const TRectype* to = NULL, int tilde = 0x0);
|
||||
TCursor(TRelation* f, const char* filter = "", int key = 1,
|
||||
const TRectype* from = NULL, const TRectype* to = NULL, int tilde = 0x0);
|
||||
// @cmember Distruttore
|
||||
virtual ~TCursor();
|
||||
};
|
||||
|
@ -870,16 +870,16 @@ static bool is_text_line(TString& str)
|
||||
|
||||
bool TTextfile::write_xls(const TFilename& xls)
|
||||
{
|
||||
int headerlen = printer().headersize();
|
||||
const int footerlen = printer().footersize();
|
||||
const int pagelen = printer().formlen();
|
||||
const TPrinter& pr = printer();
|
||||
int headerlen = pr.headersize();
|
||||
const int footerlen = pr.footersize();
|
||||
const int pagelen = pr.formlen();
|
||||
TString str;
|
||||
|
||||
int tabstart = 1;
|
||||
int tabstop = pagelen - footerlen;
|
||||
if (_lines < tabstop) tabstop = _lines;
|
||||
|
||||
|
||||
int header_end = 12;
|
||||
if (headerlen > 3)
|
||||
header_end = headerlen;
|
||||
@ -924,13 +924,26 @@ bool TTextfile::write_xls(const TFilename& xls)
|
||||
|
||||
TToken_string riga(256, '\t');
|
||||
|
||||
TString8 ext = pr.get_form_name().ext(); ext.lower();
|
||||
const bool is_rep = ext == "frm" || ext == "rep";
|
||||
|
||||
ofstream out(xls);
|
||||
for (long j = 0; j < _lines; j++)
|
||||
{
|
||||
const int row = j % pagelen;
|
||||
// Esporto la testata solo nella prima pagina ed il footer solo nell'ultima
|
||||
if ((row < headerlen && j >= pagelen) || (row >= pagelen-footerlen && row < _lines-pagelen))
|
||||
continue;
|
||||
|
||||
if (is_rep)
|
||||
{
|
||||
// Esporto la testata solo nella prima pagina e lascio il footer perchè nei form è variabile in lunghezza
|
||||
if (row < headerlen && j >= pagelen)
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Esporto la testata solo nella prima pagina ed il footer solo nell'ultima
|
||||
if ((row < headerlen && j >= pagelen) || (row >= pagelen-footerlen && row < _lines-pagelen))
|
||||
continue;
|
||||
}
|
||||
|
||||
read_line(j);
|
||||
riga.cut(0);
|
||||
|
@ -638,7 +638,8 @@ void xvtil_statbar_set(
|
||||
{
|
||||
TToken_string t(80, '\t');
|
||||
t.add(text);
|
||||
if (prefix_valid() && main_app().get_firm() > 0)
|
||||
TApplication& a = main_app();
|
||||
if (prefix_valid() && a.is_running() && a.get_firm() > 0)
|
||||
{
|
||||
t.add(prefix().firm().get(NDT_RAGSOC));
|
||||
}
|
||||
@ -648,7 +649,7 @@ void xvtil_statbar_set(
|
||||
xvt_sys_get_profile_string(NULL, "Main", "Company", "", ragsoc.get_buffer(), ragsoc.size());
|
||||
t.add(ragsoc);
|
||||
}
|
||||
t.add(main_app().title());
|
||||
t.add(a.title());
|
||||
if (def)
|
||||
statbar_set_default_title(_statbar, t);
|
||||
statbar_set_title(_statbar, t);
|
||||
|
Loading…
x
Reference in New Issue
Block a user