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:
villa 1995-06-13 08:23:45 +00:00
parent b878ca7341
commit 9871e8d6a4
5 changed files with 24 additions and 6 deletions

View File

@ -535,8 +535,23 @@ int TBaseisamfile::remove(TDate& atdate)
{ {
NOT_OPEN(); 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)) if ((!_historicfile) || (atdate == botime))
cisdelete(_isamfile, curr().string(), &_lasterr); cisdelete(_isamfile, curr().string(), &_lasterr);
@ -1833,7 +1848,7 @@ void TRectype::put(const char* fieldname, long val)
setempty(FALSE); setempty(FALSE);
} }
void TRectype::put(const char* fieldname, const TTextfile& txt) void TRectype::put(const char* fieldname, TTextfile& txt)
{ {
long val = get_long(fieldname); long val = get_long(fieldname);
bool isnew = val == 0; bool isnew = val == 0;

View File

@ -115,7 +115,7 @@ public:
void put(const char* fieldname, char val); void put(const char* fieldname, char val);
void put(const char* fieldname, bool val); void put(const char* fieldname, bool val);
void put(const char* fieldname, const real& 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 #else
#endif #endif
@ -282,7 +282,7 @@ public:
{ curr().put(fieldname, val);} { curr().put(fieldname, val);}
void put(const char* fieldname, const real& val) void put(const char* fieldname, const real& val)
{ curr().put(fieldname, val);} { curr().put(fieldname, val);}
void put(const char* fieldname, const TTextfile& txt) void put(const char* fieldname, TTextfile& txt)
{ curr().put(fieldname, txt); } { curr().put(fieldname, txt); }
#else #else
const char* get_str(const char* fieldname) const const char* get_str(const char* fieldname) const

View File

@ -118,7 +118,7 @@ bool TMemo_file::get_field(TTextfile& t, long id)
return ok; return ok;
} }
long TMemo_file::set_field(const TTextfile& t, long id) long TMemo_file::set_field(TTextfile& t, long id)
{ {
bool ok = TRUE; bool ok = TRUE;
long ret = 0; long ret = 0;

View File

@ -28,7 +28,7 @@ public:
bool get_field(TTextfile& t, long id = -1l); bool get_field(TTextfile& t, long id = -1l);
// sets field to specified text; if not present // sets field to specified text; if not present
// returns new ID; if error returns -1, otherwise 0 // 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 // removes field and pakkettates file
bool remove_field(long id); bool remove_field(long id);
// calls editor to edit text (specified as mem into config) // calls editor to edit text (specified as mem into config)

View File

@ -567,6 +567,9 @@ TPrintrow & TPrintrow::put(const char *str, int position, int len)
_attr[position++] = _currentstyle; _attr[position++] = _currentstyle;
} }
} }
break;
case 'T':
_tab.set(position);
break; break;
case 'B': case 'B':
_currentstyle = boldstyle; _currentstyle = boldstyle;