Patch level : 12.0 400
Files correlati : ba8.exe Aggiunto un campo lughezza fissa per l'esportazione dei file di testo. Se non valorizzato il file non è a lughezza fissa. Questa funzione sarà presente nei programmi dalla patch 402. git-svn-id: svn://10.65.10.50/branches/R_10_00@23848 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
224e4f09a4
commit
1b909f2ae1
@ -1577,7 +1577,7 @@ bool TBook::print_page(TWindow& win, size_t page)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TBook::export_text(TFilename& fname, bool signature)
|
bool TBook::export_text(TFilename& fname, bool signature, int size)
|
||||||
{
|
{
|
||||||
TString ext = fname.ext(); ext.lower();
|
TString ext = fname.ext(); ext.lower();
|
||||||
if (ext == "pdf")
|
if (ext == "pdf")
|
||||||
@ -1667,8 +1667,17 @@ bool TBook::export_text(TFilename& fname, bool signature)
|
|||||||
for (int i = 0; i <= last_row; i++)
|
for (int i = 0; i <= last_row; i++)
|
||||||
{
|
{
|
||||||
const TString* line = (const TString*)page.objptr(i);
|
const TString* line = (const TString*)page.objptr(i);
|
||||||
|
int linelen = 0;
|
||||||
|
|
||||||
if (line != NULL)
|
if (line != NULL)
|
||||||
|
{
|
||||||
|
linelen = line->len();
|
||||||
ofs << *line;
|
ofs << *line;
|
||||||
|
}
|
||||||
|
if (size > 0)
|
||||||
|
while (linelen++ < size)
|
||||||
|
ofs << ' ';
|
||||||
|
|
||||||
ofs << endl;
|
ofs << endl;
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
@ -2249,7 +2258,7 @@ bool TBook::esporta()
|
|||||||
break;
|
break;
|
||||||
case 'E':
|
case 'E':
|
||||||
case 'e':
|
case 'e':
|
||||||
ok = export_text(fname, signature);
|
ok = export_text(fname, signature, size);
|
||||||
if (ok)
|
if (ok)
|
||||||
xvt_sys_goto_url(fname, "open");
|
xvt_sys_goto_url(fname, "open");
|
||||||
break;
|
break;
|
||||||
@ -2328,7 +2337,7 @@ bool TBook::print_or_preview()
|
|||||||
case exportprinter:
|
case exportprinter:
|
||||||
{
|
{
|
||||||
TFilename f = printer().get_export_file();
|
TFilename f = printer().get_export_file();
|
||||||
ok = export_text(f, false);
|
ok = export_text(f, false, 0);
|
||||||
if (ok)
|
if (ok)
|
||||||
xvt_sys_goto_url(f, "open");
|
xvt_sys_goto_url(f, "open");
|
||||||
}
|
}
|
||||||
|
@ -99,7 +99,7 @@ public:
|
|||||||
|
|
||||||
virtual bool export_excel(TFilename& fname, bool signature);
|
virtual bool export_excel(TFilename& fname, bool signature);
|
||||||
virtual bool export_pdf(TFilename& fname, bool signature);
|
virtual bool export_pdf(TFilename& fname, bool signature);
|
||||||
virtual bool export_text(TFilename& fname, bool signature);
|
virtual bool export_text(TFilename& fname, bool signature, int size);
|
||||||
virtual bool send_mail(TFilename& fname, bool signature);
|
virtual bool send_mail(TFilename& fname, bool signature);
|
||||||
virtual bool esporta();
|
virtual bool esporta();
|
||||||
bool print_or_preview(); // Calls one of the above
|
bool print_or_preview(); // Calls one of the above
|
||||||
|
Loading…
x
Reference in New Issue
Block a user