Everyfink is now working
git-svn-id: svn://10.65.10.50/trunk@2359 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
3d2f9a8ec4
commit
c6f7fdfff1
@ -841,12 +841,12 @@ void TForm_item::read_from(TToken_string& s)
|
|||||||
_x = _section->columnwise() ? s.get_int(col_id - 101) : s.get_int(xps_id - 101);
|
_x = _section->columnwise() ? s.get_int(col_id - 101) : s.get_int(xps_id - 101);
|
||||||
_y = _section->columnwise() ? s.get_int(len_id - 101) : s.get_int(yps_id - 101);
|
_y = _section->columnwise() ? s.get_int(len_id - 101) : s.get_int(yps_id - 101);
|
||||||
_ofs = s.get_int(spc_id - 101);
|
_ofs = s.get_int(spc_id - 101);
|
||||||
_flag.set_shown(s.get(prn_id - 101) != "X");
|
_flag.set_shown(s.get(prn_id - 101)[0] != 'X');
|
||||||
|
|
||||||
if (_section->columnwise())
|
if (_section->columnwise())
|
||||||
{
|
{
|
||||||
_flag.set_finkl(s.get(fnl_id - 101) != "X");
|
_flag.set_finkl(s.get(fnl_id - 101)[0] != 'X');
|
||||||
_flag.set_finkr(s.get(fnr_id - 101) != "X");
|
_flag.set_finkr(s.get(fnr_id - 101)[0] != 'X');
|
||||||
}
|
}
|
||||||
set_dirty();
|
set_dirty();
|
||||||
}
|
}
|
||||||
@ -1895,7 +1895,7 @@ TForm_item* TGraphic_section::parse_item(const TString& s)
|
|||||||
|
|
||||||
bool TGraphic_section::update()
|
bool TGraphic_section::update()
|
||||||
{
|
{
|
||||||
_back.cut(0);
|
_back = "";
|
||||||
const bool ok = TPrint_section::update();
|
const bool ok = TPrint_section::update();
|
||||||
printer().setbackground(_back);
|
printer().setbackground(_back);
|
||||||
return ok;
|
return ok;
|
||||||
@ -1951,8 +1951,11 @@ TMask* TPrint_section::_msk = NULL;
|
|||||||
|
|
||||||
TPrint_section::TPrint_section(TForm* f, char st, pagetype pt, bool sub)
|
TPrint_section::TPrint_section(TForm* f, char st, pagetype pt, bool sub)
|
||||||
: _height(0), _form(f), _sec_type(st), _page_type(pt), _dirty(FALSE),
|
: _height(0), _form(f), _sec_type(st), _page_type(pt), _dirty(FALSE),
|
||||||
_subsection(sub), _repeat_count(0), _ofspc(0), _nfld(0), _temp(0)
|
_subsection(sub), _repeat_count(0), _ofspc(0), _nfld(0), _temp(0),
|
||||||
{ _tab[0] = -1; }
|
_columnwise(FALSE)
|
||||||
|
{
|
||||||
|
reset_tabs();
|
||||||
|
}
|
||||||
|
|
||||||
TPrint_section::~TPrint_section()
|
TPrint_section::~TPrint_section()
|
||||||
{
|
{
|
||||||
@ -1995,6 +1998,12 @@ TPrintrow& TPrint_section::row(int num)
|
|||||||
}
|
}
|
||||||
return *pr;
|
return *pr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TPrint_section::reset_tabs()
|
||||||
|
{
|
||||||
|
for (int i = 0; i < MAXCOLUMNS; i++)
|
||||||
|
_tab[i] = -1;
|
||||||
|
}
|
||||||
|
|
||||||
int TPrint_section::tab(int col)
|
int TPrint_section::tab(int col)
|
||||||
{
|
{
|
||||||
@ -2018,7 +2027,10 @@ int TPrint_section::tab(int col)
|
|||||||
// cumulate offsets
|
// cumulate offsets
|
||||||
for (i = 1; i < _nfld; i++)
|
for (i = 1; i < _nfld; i++)
|
||||||
_tab[i] += _tab[i-1];
|
_tab[i] += _tab[i-1];
|
||||||
}
|
}
|
||||||
|
// se manca la colonna, vai a prendere quella immediatamente prima
|
||||||
|
while (_tab[col] == -1 && col > 0)
|
||||||
|
col--;
|
||||||
ret = _tab[col];
|
ret = _tab[col];
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
@ -2633,8 +2645,8 @@ bool TPrint_section::edit(const char* title)
|
|||||||
|
|
||||||
if (!_dirty)
|
if (!_dirty)
|
||||||
for (word j = 0; j < fields(); j++)
|
for (word j = 0; j < fields(); j++)
|
||||||
_dirty |= field(j).dirty();
|
_dirty |= field(j).dirty();
|
||||||
|
|
||||||
set_dirty(_dirty);
|
set_dirty(_dirty);
|
||||||
return (_dirty || des_dirty);
|
return (_dirty || des_dirty);
|
||||||
}
|
}
|
||||||
@ -3213,8 +3225,10 @@ long TForm::records() const
|
|||||||
|
|
||||||
bool TForm::genera_fincatura(pagetype p, int y1, int y2, int* rows)
|
bool TForm::genera_fincatura(pagetype p, int y1, int y2, int* rows)
|
||||||
{
|
{
|
||||||
const TPrint_section* body = exist('B', p);
|
TPrint_section* body = exist('B', p);
|
||||||
if (body == NULL) return FALSE;
|
if (body == NULL) return FALSE;
|
||||||
|
|
||||||
|
body->reset_tabs();
|
||||||
|
|
||||||
bool istemp = exist('G', p) == NULL;
|
bool istemp = exist('G', p) == NULL;
|
||||||
|
|
||||||
@ -3223,6 +3237,10 @@ bool TForm::genera_fincatura(pagetype p, int y1, int y2, int* rows)
|
|||||||
|
|
||||||
int j = 0, start = 999, end = 0, wlast = 0;
|
int j = 0, start = 999, end = 0, wlast = 0;
|
||||||
int cols[MAXCOLUMNS];
|
int cols[MAXCOLUMNS];
|
||||||
|
|
||||||
|
for (word k = grs->fields(); k > 0; k--)
|
||||||
|
if (grs->field(k-1).temp())
|
||||||
|
grs->destroy_field(k-1);
|
||||||
|
|
||||||
for (int i = 0; i < (int)body->fields(); i++)
|
for (int i = 0; i < (int)body->fields(); i++)
|
||||||
{
|
{
|
||||||
|
@ -251,6 +251,7 @@ public:
|
|||||||
TPrintrow& row(int num);
|
TPrintrow& row(int num);
|
||||||
TForm& form() const { return *_form; }
|
TForm& form() const { return *_form; }
|
||||||
|
|
||||||
|
TArray& field_array() { return _item; }
|
||||||
TForm_item& field(int n) const { return (TForm_item&)_item[n]; }
|
TForm_item& field(int n) const { return (TForm_item&)_item[n]; }
|
||||||
TForm_item& find_field(short id) const;
|
TForm_item& find_field(short id) const;
|
||||||
void destroy_field(int n) { _item.destroy(n, TRUE); }
|
void destroy_field(int n) { _item.destroy(n, TRUE); }
|
||||||
@ -286,7 +287,8 @@ public:
|
|||||||
void set_dirty(bool d = TRUE) { _dirty = d; }
|
void set_dirty(bool d = TRUE) { _dirty = d; }
|
||||||
bool columnwise() const { return _columnwise; }
|
bool columnwise() const { return _columnwise; }
|
||||||
// ritorna l'offset della colonna corrispondente se columnwise
|
// ritorna l'offset della colonna corrispondente se columnwise
|
||||||
int tab(int col);
|
int tab(int col);
|
||||||
|
void reset_tabs();
|
||||||
|
|
||||||
const TPrint_section& operator=(const TPrint_section& ps) { return copy(ps); }
|
const TPrint_section& operator=(const TPrint_section& ps) { return copy(ps); }
|
||||||
TPrint_section(TForm* parent, char st, pagetype pt, bool subsection = FALSE);
|
TPrint_section(TForm* parent, char st, pagetype pt, bool subsection = FALSE);
|
||||||
|
@ -165,9 +165,12 @@ void TPrint_intersector::v_line(int x1, int y1, int len)
|
|||||||
|
|
||||||
void TPrint_intersector::add(TGraphic_shape s, int x1, int y1, int x2, int y2)
|
void TPrint_intersector::add(TGraphic_shape s, int x1, int y1, int x2, int y2)
|
||||||
{
|
{
|
||||||
// rows/columns start at 0
|
// rows start at 0
|
||||||
x1 --; y1 --;
|
y1 --; y2 --;
|
||||||
x2 --; y2 --;
|
// columns pure, ma e' possibile che siano gia' 0 se la generazione
|
||||||
|
// e' stata automatica (colonna 1. campo - 1)
|
||||||
|
if (x1 > 0) x1 --;
|
||||||
|
if (x2 > 0) x2 --;
|
||||||
|
|
||||||
switch (s)
|
switch (s)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user