applicat.cpp Cambiata una TString80 in TFilename
form.cpp Corretto il settabbgio del background alla printer printer.cpp Corretto il gettaggio del background dalla printer ATTENZIONE: Queste due correzioni implicano aggiornamenti al programma che ha dichiarato come unico background nel form SECTION GRAPHICS FIRST e non ODD come tutti. git-svn-id: svn://10.65.10.50/trunk@5501 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
6f04baa411
commit
e35d75f96e
@ -614,7 +614,7 @@ bool TApplication::set_firm(long newfirm)
|
|||||||
if (newfirm < 1)
|
if (newfirm < 1)
|
||||||
{
|
{
|
||||||
TMask mask("bagn002");
|
TMask mask("bagn002");
|
||||||
TString80 pp(__ptprf); pp.cut(pp.len()-1);
|
TFilename pp(__ptprf); pp.cut(pp.len()-1);
|
||||||
mask.set(F_PATHPREF, pp);
|
mask.set(F_PATHPREF, pp);
|
||||||
|
|
||||||
mask.show(-2, extended_firm());
|
mask.show(-2, extended_firm());
|
||||||
|
@ -2170,9 +2170,9 @@ bool TGraphic_section::update()
|
|||||||
int index;
|
int index;
|
||||||
switch(page_type())
|
switch(page_type())
|
||||||
{
|
{
|
||||||
case even_page: index = 1; break;
|
case even_page : index = 1; break;
|
||||||
case odd_page : index = 2; break;
|
case first_page: index = 2; break;
|
||||||
case last_page: index = 3; break;
|
case last_page : index = 3; break;
|
||||||
default : index = 0; break;
|
default : index = 0; break;
|
||||||
}
|
}
|
||||||
printer().setbackground(_back, index);
|
printer().setbackground(_back, index);
|
||||||
|
@ -575,11 +575,21 @@ void TPrinter::setbackground(const char* b, int index)
|
|||||||
|
|
||||||
TString_array& TPrinter::getbgdesc(word page) const
|
TString_array& TPrinter::getbgdesc(word page) const
|
||||||
{
|
{
|
||||||
if (_backgrounds.items() == 0)
|
int index = 0;
|
||||||
((TPrinter*)this)->_backgrounds.add(new TString_array(formlen()));
|
if (page == 0 && _backgrounds.objptr(3))
|
||||||
int index = (page > 0) ? ((page-1) % _backgrounds.items()) : 0;
|
index = 3;
|
||||||
|
if (page == 1 && _backgrounds.objptr(2))
|
||||||
|
index = 2;
|
||||||
|
if (index == 0 && (page & 0x1) == 0 && _backgrounds.objptr(1))
|
||||||
|
index = 1;
|
||||||
|
|
||||||
TString_array* bg = (TString_array*)_backgrounds.objptr(index);
|
TString_array* bg = (TString_array*)_backgrounds.objptr(index);
|
||||||
CHECK(bg, "Null printer background");
|
if (bg == NULL)
|
||||||
|
{
|
||||||
|
bg = new TString_array(formlen());
|
||||||
|
((TPrinter*)this)->_backgrounds.add(bg, index); // keep const
|
||||||
|
}
|
||||||
|
|
||||||
return *bg;
|
return *bg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user