Modifiche memo; sistemata TPrintrow::put() per gestione @t tabulazione
git-svn-id: svn://10.65.10.50/trunk@1472 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
b878ca7341
commit
9871e8d6a4
@ -535,8 +535,23 @@ int TBaseisamfile::remove(TDate& atdate)
|
||||
{
|
||||
NOT_OPEN();
|
||||
|
||||
// TBI rimozione campi memo
|
||||
// rimozione campi memo
|
||||
TMemo_file* memo = NULL;
|
||||
|
||||
for (int i = 0; i < curr().items(); i++)
|
||||
{
|
||||
if (curr().type(curr().fieldname(i)) == _memofld)
|
||||
{
|
||||
long val = curr().get_long(curr().fieldname(i));
|
||||
if (val > 0l)
|
||||
{
|
||||
if (memo == NULL)
|
||||
memo = new TMemo_file(filename());
|
||||
memo->remove_field(val);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (memo != NULL) delete memo;
|
||||
|
||||
if ((!_historicfile) || (atdate == botime))
|
||||
cisdelete(_isamfile, curr().string(), &_lasterr);
|
||||
@ -1833,7 +1848,7 @@ void TRectype::put(const char* fieldname, long val)
|
||||
setempty(FALSE);
|
||||
}
|
||||
|
||||
void TRectype::put(const char* fieldname, const TTextfile& txt)
|
||||
void TRectype::put(const char* fieldname, TTextfile& txt)
|
||||
{
|
||||
long val = get_long(fieldname);
|
||||
bool isnew = val == 0;
|
||||
|
@ -115,7 +115,7 @@ public:
|
||||
void put(const char* fieldname, char val);
|
||||
void put(const char* fieldname, bool val);
|
||||
void put(const char* fieldname, const real& val);
|
||||
void put(const char* fieldname, const TTextfile& txt);
|
||||
void put(const char* fieldname, TTextfile& txt);
|
||||
#else
|
||||
#endif
|
||||
|
||||
@ -282,7 +282,7 @@ public:
|
||||
{ curr().put(fieldname, val);}
|
||||
void put(const char* fieldname, const real& val)
|
||||
{ curr().put(fieldname, val);}
|
||||
void put(const char* fieldname, const TTextfile& txt)
|
||||
void put(const char* fieldname, TTextfile& txt)
|
||||
{ curr().put(fieldname, txt); }
|
||||
#else
|
||||
const char* get_str(const char* fieldname) const
|
||||
|
@ -118,7 +118,7 @@ bool TMemo_file::get_field(TTextfile& t, long id)
|
||||
return ok;
|
||||
}
|
||||
|
||||
long TMemo_file::set_field(const TTextfile& t, long id)
|
||||
long TMemo_file::set_field(TTextfile& t, long id)
|
||||
{
|
||||
bool ok = TRUE;
|
||||
long ret = 0;
|
||||
|
@ -28,7 +28,7 @@ public:
|
||||
bool get_field(TTextfile& t, long id = -1l);
|
||||
// sets field to specified text; if not present
|
||||
// returns new ID; if error returns -1, otherwise 0
|
||||
long set_field(const TTextfile& t, long id = -1l);
|
||||
long set_field(TTextfile& t, long id = -1l);
|
||||
// removes field and pakkettates file
|
||||
bool remove_field(long id);
|
||||
// calls editor to edit text (specified as mem into config)
|
||||
|
@ -567,6 +567,9 @@ TPrintrow & TPrintrow::put(const char *str, int position, int len)
|
||||
_attr[position++] = _currentstyle;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'T':
|
||||
_tab.set(position);
|
||||
break;
|
||||
case 'B':
|
||||
_currentstyle = boldstyle;
|
||||
|
Loading…
x
Reference in New Issue
Block a user