The formatting code no longer justifies values
This is done in the value code, which knows -- based on the value's type -- how best to apply the justification.
This commit is contained in:
parent
a9061811ce
commit
326cbea4c7
3 changed files with 7 additions and 5 deletions
|
|
@ -245,11 +245,10 @@ void format_t::format(std::ostream& out_str, scope_t& scope)
|
|||
else
|
||||
out << std::right;
|
||||
|
||||
if (elem->min_width > 0)
|
||||
out.width(elem->min_width);
|
||||
|
||||
switch (elem->type) {
|
||||
case element_t::STRING:
|
||||
if (elem->min_width > 0)
|
||||
out.width(elem->min_width);
|
||||
out << elem->chars;
|
||||
break;
|
||||
|
||||
|
|
|
|||
|
|
@ -64,10 +64,10 @@ report_t::report_t(session_t& _session)
|
|||
"%(entry.cleared ? \" *\" : (entry.pending ? \" !\" : \"\"))"
|
||||
"%(code ? \" (\" + code + \")\" : \"\") %(payee)%(entry.comment | \"\")\n"
|
||||
" %(entry.uncleared ? (cleared ? \"* \" : (pending ? \"! \" : \"\")) : \"\")"
|
||||
"%-23(account)"
|
||||
"%-34(account)"
|
||||
" %12(calculated ? \"\" : amount)%(comment | \"\")\n%/"
|
||||
" %(entry.uncleared ? (cleared ? \"* \" : (pending ? \"! \" : \"\")) : \"\")"
|
||||
"%-23(account)"
|
||||
"%-34(account)"
|
||||
" %12(calculated ? \"\" : amount)%(comment | \"\")\n%/\n");
|
||||
|
||||
HANDLER(balance_format_).on(
|
||||
|
|
|
|||
|
|
@ -1263,6 +1263,9 @@ void value_t::print(std::ostream& out,
|
|||
const int latter_width,
|
||||
const optional<string>& date_format) const
|
||||
{
|
||||
if (first_width > 0 && ! is_amount() && ! is_balance())
|
||||
out.width(first_width);
|
||||
|
||||
switch (type()) {
|
||||
case VOID:
|
||||
out << "";
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue