Patch level :4.0

Files correlati     : ba8 ve1 e stampe report in genere
Ricompilazione Demo : [ ]
Commento            :
Corretti riporti e controriporti ricopiati a mano


git-svn-id: svn://10.65.10.50/trunk@15191 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2007-04-05 15:55:42 +00:00
parent a84858b3b5
commit d86991ae97

View File

@ -1406,9 +1406,9 @@ bool TBook::print_page(TWindow& win, size_t page)
xvt_dwin_draw_roundrect(w, &rct, rad, rad);
continue;
}
if (str.starts_with("<text"))
if (str.starts_with("<text>"))
{
TString stringona(512); // Testo completo di un campo
paragrafo.destroy();
while (!ifs.eof())
{
ifs.getline(buffer, str.size());
@ -1424,8 +1424,14 @@ bool TBook::print_page(TWindow& win, size_t page)
}
if (str.starts_with("<text_align "))
{
SAFE_SCAN(str, "<text_align horizontal=%c vertical=%c />",
&_horizontal_alignment, &_vertical_alignment);
#if _MSC_VER >= 1400
sscanf_s(str, "<text_align horizontal=%c vertical=%c />",
&_horizontal_alignment, sizeof(_horizontal_alignment),
&_vertical_alignment, sizeof(_vertical_alignment));
#else
sscanf(str, "<text_align horizontal=%c vertical=%c />",
&_horizontal_alignment, &_vertical_alignment);
#endif
continue;
}
if (str.starts_with("<text_color"))
@ -1591,9 +1597,14 @@ bool TBook::export_text(const TFilename& fname)
} else
if (str.starts_with("<text_align "))
{
SAFE_SCAN(str, "<text_align horizontal=%c vertical=%c />",
&_horizontal_alignment, &_vertical_alignment);
continue;
#if _MSC_VER >= 1400
sscanf_s(str, "<text_align horizontal=%c vertical=%c />",
&_horizontal_alignment, sizeof(_horizontal_alignment),
&_vertical_alignment, sizeof(_vertical_alignment));
#else
sscanf(str, "<text_align horizontal=%c vertical=%c />",
&_horizontal_alignment, &_vertical_alignment);
#endif
}
}
@ -1725,7 +1736,7 @@ void TBook::join_file(int pps)
if (str.starts_with("<page "))
{
sscanf(str, "<page number=%d", &in_page);
SAFE_SCAN(str, "<page number=%d", &in_page);
// const int sub = (in_page % pps) - 1;
const int sub = ((in_page - 1) % pps);
off_page = sub * logical_page_height() / pps;
@ -1744,7 +1755,7 @@ void TBook::join_file(int pps)
if (str.starts_with("<frame ") && off_page > 0)
{
long x, y, dx, dy;
sscanf(str, "<frame x=%ld y=%ld dx=%ld dy=%ld />", &x, &y, &dx, &dy);
SAFE_SCAN(str, "<frame x=%ld y=%ld dx=%ld dy=%ld />", &x, &y, &dx, &dy);
str.format("<frame x=%ld y=%ld dx=%ld dy=%ld />", x, y+off_page, dx, dy);
} else
if (str.starts_with("</page "))