applicat.cpp Aggiunta possibilita di debuggare cambio ditta da MSVC
causali.h Aggiunto campo CAU_GRUPPO form.cpp Spostata gestione _memo nei TString_field form.h Aggiunta funzione has_memo() msksheet.cpp Corretto aggiornamento celle disabilitate nella mask2str() window.cpp Aggiunti due const caus.h Segato infamemente in quanto inutile, esiste causali.h! git-svn-id: svn://10.65.10.50/trunk@2406 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
99b99f1557
commit
68f398ca96
@ -676,6 +676,7 @@ bool TApplication::firm_change_enabled() const
|
|||||||
can = stricmp(te.szModule, "BA0") == 0 ||
|
can = stricmp(te.szModule, "BA0") == 0 ||
|
||||||
#ifdef DBG
|
#ifdef DBG
|
||||||
stricmp(te.szModule, "CVW4") == 0 ||
|
stricmp(te.szModule, "CVW4") == 0 ||
|
||||||
|
stricmp(te.szModule, "MSVC") == 0 ||
|
||||||
#endif
|
#endif
|
||||||
stricmp(te.szModule, "PROGMAN") == 0;
|
stricmp(te.szModule, "PROGMAN") == 0;
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
#define CAU_CODCAUS "CODCAUS"
|
#define CAU_CODCAUS "CODCAUS"
|
||||||
#define CAU_NRIGA "NRIGA"
|
#define CAU_NRIGA "NRIGA"
|
||||||
|
#define CAU_GRUPPO "GRUPPO"
|
||||||
#define CAU_DESCR "DESCR"
|
#define CAU_DESCR "DESCR"
|
||||||
#define CAU_TIPODOC "TIPODOC"
|
#define CAU_TIPODOC "TIPODOC"
|
||||||
#define CAU_MOVAP "MOVAP"
|
#define CAU_MOVAP "MOVAP"
|
||||||
|
@ -314,7 +314,7 @@ void TForm_flags::read_from(const TMask& m)
|
|||||||
|
|
||||||
TForm_item::TForm_item(TPrint_section* section)
|
TForm_item::TForm_item(TPrint_section* section)
|
||||||
: _section(section), _x(-1), _y(-1), _width(0), _height(0), _id(0), _ofs(0),
|
: _section(section), _x(-1), _y(-1), _width(0), _height(0), _id(0), _ofs(0),
|
||||||
_temp(FALSE), _memo("",'\n')
|
_temp(FALSE)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -513,8 +513,6 @@ bool TForm_item::read_from(const TRectype& prof)
|
|||||||
changed = TRUE;
|
changed = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_flag.memo)
|
|
||||||
_memo = prof.get("TESTO");
|
|
||||||
const bool s = prof.get_bool("ATTIVO");
|
const bool s = prof.get_bool("ATTIVO");
|
||||||
if (_flag.shown != s)
|
if (_flag.shown != s)
|
||||||
{
|
{
|
||||||
@ -565,8 +563,6 @@ void TForm_item::print_on(TRectype& prof)
|
|||||||
if (prompt().empty()) set_prompt("_");
|
if (prompt().empty()) set_prompt("_");
|
||||||
prof.put("PROMPT", prompt());
|
prof.put("PROMPT", prompt());
|
||||||
prof.put("ATTIVO", shown() ? "X" : " ");
|
prof.put("ATTIVO", shown() ? "X" : " ");
|
||||||
if (_flag.memo)
|
|
||||||
prof.put("TESTO", _memo);
|
|
||||||
|
|
||||||
// specials: se e' stato cambiato, la tokenstring del valore contiene
|
// specials: se e' stato cambiato, la tokenstring del valore contiene
|
||||||
// una X alla fine (campo 3)
|
// una X alla fine (campo 3)
|
||||||
@ -805,7 +801,6 @@ void TForm_item::print_on(TMask& m)
|
|||||||
else
|
else
|
||||||
m.set(F_WIDTH, _width);
|
m.set(F_WIDTH, _width);
|
||||||
m.set(F_HEIGHT, _height);
|
m.set(F_HEIGHT, _height);
|
||||||
m.set(F_MEMO, _memo);
|
|
||||||
m.set(F_SPACES, _ofs);
|
m.set(F_SPACES, _ofs);
|
||||||
|
|
||||||
_flag.print_on(m);
|
_flag.print_on(m);
|
||||||
@ -828,7 +823,6 @@ void TForm_item::read_from(const TMask& m)
|
|||||||
_height = atoi(m.get(F_HEIGHT));
|
_height = atoi(m.get(F_HEIGHT));
|
||||||
_id = atoi(m.get(F_ID));
|
_id = atoi(m.get(F_ID));
|
||||||
_ofs = atoi(m.get(F_SPACES));
|
_ofs = atoi(m.get(F_SPACES));
|
||||||
_memo = m.get(F_MEMO);
|
|
||||||
|
|
||||||
_flag.read_from(m);
|
_flag.read_from(m);
|
||||||
|
|
||||||
@ -916,6 +910,14 @@ void TForm_item::set_picture(const char*)
|
|||||||
CHECK(0, "Can't set the picture of a generic form item!");
|
CHECK(0, "Can't set the picture of a generic form item!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
<<<<<<< form.cpp
|
||||||
|
TToken_string& TForm_item::memo_info()
|
||||||
|
{
|
||||||
|
CHECK(0, "Can't get a memo of a generic form item!");
|
||||||
|
return TToken_string();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
short TForm_item::x()
|
short TForm_item::x()
|
||||||
{
|
{
|
||||||
if (_section == NULL || !_section->columnwise())
|
if (_section == NULL || !_section->columnwise())
|
||||||
@ -1105,6 +1107,7 @@ class TForm_string : public TForm_item
|
|||||||
{
|
{
|
||||||
TString _str, _picture;
|
TString _str, _picture;
|
||||||
TArray _field;
|
TArray _field;
|
||||||
|
TToken_string _memo;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual const char* class_name() const { return "STRINGA"; }
|
virtual const char* class_name() const { return "STRINGA"; }
|
||||||
@ -1124,6 +1127,8 @@ protected:
|
|||||||
virtual const char* example() const;
|
virtual const char* example() const;
|
||||||
virtual void apply_format(TString& s, const TString& p) const;
|
virtual void apply_format(TString& s, const TString& p) const;
|
||||||
|
|
||||||
|
virtual TToken_string& memo_info() { return _memo; }
|
||||||
|
|
||||||
virtual const char* get() const;
|
virtual const char* get() const;
|
||||||
bool set(const char*);
|
bool set(const char*);
|
||||||
|
|
||||||
@ -1136,10 +1141,14 @@ public:
|
|||||||
virtual void set_picture(const char* p) { _picture = p; }
|
virtual void set_picture(const char* p) { _picture = p; }
|
||||||
|
|
||||||
virtual bool edit(TMask& m);
|
virtual bool edit(TMask& m);
|
||||||
TForm_string(TPrint_section* section) : TForm_item(section) { }
|
TForm_string(TPrint_section* section);
|
||||||
virtual ~TForm_string() {}
|
virtual ~TForm_string() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
TForm_string::TForm_string(TPrint_section* section)
|
||||||
|
: TForm_item(section), _memo("",'\n')
|
||||||
|
{}
|
||||||
|
|
||||||
bool TForm_string::edit(TMask& m)
|
bool TForm_string::edit(TMask& m)
|
||||||
{
|
{
|
||||||
const bool godmode = form().edit_level() > 1;
|
const bool godmode = form().edit_level() > 1;
|
||||||
@ -1185,6 +1194,16 @@ bool TForm_string::read_from(const TRectype& prof)
|
|||||||
changed = TRUE;
|
changed = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (has_memo())
|
||||||
|
{
|
||||||
|
const TString& m = prof.get("TESTO");
|
||||||
|
if (_memo != m)
|
||||||
|
{
|
||||||
|
_memo = m;
|
||||||
|
changed = TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return changed;
|
return changed;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1199,6 +1218,10 @@ void TForm_string::print_on(TRectype& prof)
|
|||||||
{
|
{
|
||||||
TForm_item::print_on(prof);
|
TForm_item::print_on(prof);
|
||||||
prof.put("PICT", _picture);
|
prof.put("PICT", _picture);
|
||||||
|
if (has_memo())
|
||||||
|
{
|
||||||
|
prof.put("TESTO", _memo);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void TForm_string::print_on(TMask& m)
|
void TForm_string::print_on(TMask& m)
|
||||||
@ -1208,6 +1231,7 @@ void TForm_string::print_on(TMask& m)
|
|||||||
put_fieldref(field(i), m.field(i == 0 ? F_FIELDREF1 : F_FIELDREF2));
|
put_fieldref(field(i), m.field(i == 0 ? F_FIELDREF1 : F_FIELDREF2));
|
||||||
|
|
||||||
m.set(F_PICTURE, _picture);
|
m.set(F_PICTURE, _picture);
|
||||||
|
m.set(F_MEMO, _memo);
|
||||||
|
|
||||||
TSheet_field& s = (TSheet_field&)m.field(F_ITEMS);
|
TSheet_field& s = (TSheet_field&)m.field(F_ITEMS);
|
||||||
s.reset();
|
s.reset();
|
||||||
@ -1223,6 +1247,7 @@ void TForm_string::read_from(const TMask& m)
|
|||||||
{
|
{
|
||||||
TForm_item::read_from(m);
|
TForm_item::read_from(m);
|
||||||
_picture = m.get(F_PICTURE);
|
_picture = m.get(F_PICTURE);
|
||||||
|
_memo = m.get(F_MEMO);
|
||||||
|
|
||||||
for (int i = 0; i < 2; i++)
|
for (int i = 0; i < 2; i++)
|
||||||
{
|
{
|
||||||
@ -3016,9 +3041,9 @@ bool TForm::reread(char sec, pagetype p, bool force)
|
|||||||
return ok;
|
return ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================
|
///////////////////////////////////////////////////////////
|
||||||
// TForm
|
// TForm
|
||||||
// ===========================================
|
///////////////////////////////////////////////////////////
|
||||||
|
|
||||||
bool TForm::ps_change_date_format(TPrint_section& s, const char* f)
|
bool TForm::ps_change_date_format(TPrint_section& s, const char* f)
|
||||||
{
|
{
|
||||||
@ -3258,7 +3283,7 @@ long TForm::records() const
|
|||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TForm::genera_fincatura(pagetype p, int y1, int y2, int* rows)
|
bool TForm::genera_fincatura(pagetype p, int y1, int y2, const int* rows)
|
||||||
{
|
{
|
||||||
TPrint_section* body = exist('B', p);
|
TPrint_section* body = exist('B', p);
|
||||||
if (body == NULL) return FALSE;
|
if (body == NULL) return FALSE;
|
||||||
|
@ -131,7 +131,7 @@ public:
|
|||||||
// parametri: posizione pagina, prima e ultima Y per le righe
|
// parametri: posizione pagina, prima e ultima Y per le righe
|
||||||
// verticali, array di posizioni riga con 0 per finire
|
// verticali, array di posizioni riga con 0 per finire
|
||||||
// ritorna FALSE se non c'e' il body per quella pagina
|
// ritorna FALSE se non c'e' il body per quella pagina
|
||||||
bool genera_fincatura(pagetype p, int y1, int y2, int* rows);
|
bool genera_fincatura(pagetype p, int y1, int y2, const int* rows);
|
||||||
|
|
||||||
// Genera le righe di intestazione colonna alla riga indicata, vale per COLUMNWISE
|
// Genera le righe di intestazione colonna alla riga indicata, vale per COLUMNWISE
|
||||||
// I form_items di intestazione vengono aggiunti alla sezione header di tipo p con ID -1
|
// I form_items di intestazione vengono aggiunti alla sezione header di tipo p con ID -1
|
||||||
@ -312,7 +312,6 @@ class TForm_item : public TObject
|
|||||||
TForm_flags _flag;
|
TForm_flags _flag;
|
||||||
TBit_array _group;
|
TBit_array _group;
|
||||||
TAssoc_array _special;
|
TAssoc_array _special;
|
||||||
TToken_string _memo;
|
|
||||||
bool _temp;
|
bool _temp;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
@ -349,6 +348,7 @@ public:
|
|||||||
|
|
||||||
virtual bool& temp() { return _temp; };
|
virtual bool& temp() { return _temp; };
|
||||||
virtual bool temp() const { return _temp; };
|
virtual bool temp() const { return _temp; };
|
||||||
|
bool has_memo() const { return _flag.memo; }
|
||||||
|
|
||||||
// virtual short& x() { return _x; };
|
// virtual short& x() { return _x; };
|
||||||
virtual void set_x(short x) {_x=x;}
|
virtual void set_x(short x) {_x=x;}
|
||||||
@ -390,7 +390,7 @@ public:
|
|||||||
const TString& prompt() const { return _prompt; }
|
const TString& prompt() const { return _prompt; }
|
||||||
void set_prompt(const char* s) { _prompt = s; }
|
void set_prompt(const char* s) { _prompt = s; }
|
||||||
|
|
||||||
const TToken_string& memo_info() { return _memo;}
|
virtual TToken_string& memo_info(); // Da' CHECK
|
||||||
virtual const TString& picture() const; // Da' CHECK
|
virtual const TString& picture() const; // Da' CHECK
|
||||||
virtual void set_picture(const char*); // Da' CHECK
|
virtual void set_picture(const char*); // Da' CHECK
|
||||||
|
|
||||||
|
@ -1414,8 +1414,12 @@ void TSpreadsheet::mask2str(int rec)
|
|||||||
{
|
{
|
||||||
r.add(f.get());
|
r.add(f.get());
|
||||||
#if XVT_OS == XVT_OS_WIN
|
#if XVT_OS == XVT_OS_WIN
|
||||||
|
const int col = id-FIRST_FIELD;
|
||||||
|
if (!_column_disabled[col])
|
||||||
|
{
|
||||||
const bool on = f.enabled();
|
const bool on = f.enabled();
|
||||||
enable_cell(rec, id-FIRST_FIELD, on);
|
enable_cell(rec, col, on);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1107,8 +1107,8 @@ void TScroll_window::handler(WINDOW win, EVENT* ep)
|
|||||||
case E_VSCROLL:
|
case E_VSCROLL:
|
||||||
{
|
{
|
||||||
long& pos = (ep->type == E_HSCROLL) ? _origin.x : _origin.y;
|
long& pos = (ep->type == E_HSCROLL) ? _origin.x : _origin.y;
|
||||||
long& max = (ep->type == E_HSCROLL) ? _max.x : _max.y;
|
const long max = (ep->type == E_HSCROLL) ? _max.x : _max.y;
|
||||||
short pag = (ep->type == E_HSCROLL) ? columns()/2+1 : rows()/2+1;
|
const short pag = (ep->type == E_HSCROLL) ? columns()/2+1 : rows()/2+1;
|
||||||
switch(ep->v.scroll.what)
|
switch(ep->v.scroll.what)
|
||||||
{
|
{
|
||||||
case SC_PAGE_UP:
|
case SC_PAGE_UP:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user