Corretto azzeramento di numeri reali nulli
git-svn-id: svn://10.65.10.50/trunk@3955 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
42d50eeaeb
commit
6af9bc3cfd
@ -927,7 +927,7 @@ void TPrint_application::set_row (
|
|||||||
case 'r': // Real
|
case 'r': // Real
|
||||||
{
|
{
|
||||||
const real& rrr = * va_arg (params, real *);
|
const real& rrr = * va_arg (params, real *);
|
||||||
if (_picture[0] && (formato[2] == '\0' || formato == "%Lf"))
|
if (_picture[0] && (formato.len() == 2 || formato == "%Lf"))
|
||||||
{
|
{
|
||||||
// no format specifications
|
// no format specifications
|
||||||
// use default picture
|
// use default picture
|
||||||
@ -944,7 +944,7 @@ void TPrint_application::set_row (
|
|||||||
q = __tmp_string;
|
q = __tmp_string;
|
||||||
}
|
}
|
||||||
if (rrr.is_zero () && !_print_zero)
|
if (rrr.is_zero () && !_print_zero)
|
||||||
q.fill (' ');
|
q.fill (' ', q.len());
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -1180,7 +1180,7 @@ bool TPrint_application::print_one (
|
|||||||
{
|
{
|
||||||
// it's a _FieldTok
|
// it's a _FieldTok
|
||||||
_FieldTok *ft = (_FieldTok *) t;
|
_FieldTok *ft = (_FieldTok *) t;
|
||||||
TString toprint;
|
TString256 toprint;
|
||||||
from = to = -1;
|
from = to = -1;
|
||||||
|
|
||||||
if (ft->_flags & FONT_FLAG)
|
if (ft->_flags & FONT_FLAG)
|
||||||
@ -1274,7 +1274,7 @@ bool TPrint_application::print_one (
|
|||||||
}
|
}
|
||||||
else if (ft->_flags & NUMBER_FLAG)
|
else if (ft->_flags & NUMBER_FLAG)
|
||||||
{
|
{
|
||||||
TString pict (0);
|
TString80 pict;
|
||||||
real r(f.get (fn));
|
real r(f.get (fn));
|
||||||
|
|
||||||
bool isreal = f.curr ().type (fn) == _realfld;
|
bool isreal = f.curr ().type (fn) == _realfld;
|
||||||
@ -1292,7 +1292,7 @@ bool TPrint_application::print_one (
|
|||||||
toprint = r.string ();
|
toprint = r.string ();
|
||||||
|
|
||||||
if (r.is_zero () && !_print_zero)
|
if (r.is_zero () && !_print_zero)
|
||||||
toprint.fill (' ');
|
toprint.fill (' ', toprint.len());
|
||||||
}
|
}
|
||||||
else if (ft->_flags & STRING_FLAG)
|
else if (ft->_flags & STRING_FLAG)
|
||||||
{
|
{
|
||||||
@ -1415,7 +1415,7 @@ bool TPrint_application::print_one (
|
|||||||
}
|
}
|
||||||
ps = __tmp_string;
|
ps = __tmp_string;
|
||||||
if (rrr.is_zero () && !_print_zero)
|
if (rrr.is_zero () && !_print_zero)
|
||||||
ps.fill (' ');
|
ps.fill (' ', ps.len());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user