Patch level : 10.0

Files correlati     : ve0.exe
Ricompilazione Demo : [ ]
Commento            :
0000988: esposizione file excell
Esportando la ricerca dei documenti di vendita l'intestazione va a capo e risulta intestata male.


git-svn-id: svn://10.65.10.50/trunk@17665 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2008-11-17 17:02:15 +00:00
parent 54e5178ec9
commit cee0637ed0
3 changed files with 15 additions and 22 deletions

View File

@ -4339,10 +4339,7 @@ TRecfield::operator int() const
if (_sub_field.empty())
{
if (_type == _intfld || _type == _intzerofld || _type == _longfld || _type == _longzerofld)
{
tmp.strncpy(_p, _len);
tmp.cut(_len);
}
else
__getfieldbuff( _len, _type, _p, tmp, __file_is_crypted(_rec->num()));
}
@ -4359,10 +4356,7 @@ TRecfield::operator long() const
if (_sub_field.empty())
{
if (_type == _longfld || _type == _longzerofld || _type == _intfld || _type == _intzerofld)
{
tmp.strncpy(_p, _len);
tmp.cut(_len);
}
else
__getfieldbuff( _len, _type, _p, tmp, __file_is_crypted(_rec->num()));
}
@ -4380,10 +4374,7 @@ TRecfield::operator const real() const
if (_sub_field.empty())
{
if (_type == _realfld)
{
tmp.strncpy(_p, _len);
tmp.cut(_len) = '\0';
}
else
__getfieldbuff( _len, _type, _p, tmp, __file_is_crypted(_rec->num()));
}
@ -4403,7 +4394,6 @@ TRecfield::operator TDate() const
if (_type == _datefld)
{
tmp.strncpy(_p, 8);
tmp[8] = '\0';
return TDate(atol(tmp));
}
__getfieldbuff(_len, _type, _p, tmp, __file_is_crypted(_rec->num()));
@ -4417,19 +4407,18 @@ TRecfield::operator TDate() const
TRecfield::operator const char*() const
{
TString& tmp = get_tmp_string(max(_len, 50));
if (_sub_field.empty())
{
if (_type == _memofld)
return _rec->get(_name);
else
__getfieldbuff(_len, _type, _p, tmp, __file_is_crypted(_rec->num()));
}
TString& tmp = get_tmp_string(max(_len, 50));
if (_sub_field.empty())
{
if (_type == _memofld)
return _rec->get(_name);
__getfieldbuff(_len, _type, _p, tmp, __file_is_crypted(_rec->num()));
}
else
get_subfield(tmp);
return tmp;
return tmp;
}

View File

@ -1359,7 +1359,11 @@ bool TSheet::export_handler(TMask_field& f, KEY k)
for (columns = 0; ; columns++)
{
if (s._sheet->head(columns, str))
{
if (str.replace('\n', ' ') > 0)
str.strip_double_spaces();
tab.add(str);
}
else
break;
}
@ -1542,7 +1546,7 @@ void TCursor_sheet::get_row(long row, TToken_string& l)
const int last = _fields.last();
for (int i = 0; i <= last; i++)
{
const TRecfield* rf = (TRecfield*)_fields.objptr(i);
const TRecfield* rf = (const TRecfield*)_fields.objptr(i);
const char* s = rf ? (const char*)*rf : "";
l.add(s);
}

View File

@ -860,7 +860,7 @@ TString& TString::picture(
int TString::strncpy(const char* s, int n)
{
int i = 0;
if (s && *s)
if (s && *s && n>0)
{
if (n > size())
resize(n, false);