summaryrefslogtreecommitdiff
path: root/src/print.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2010-06-07 08:16:02 -0400
committerJohn Wiegley <johnw@newartisans.com>2010-06-07 08:32:13 -0400
commita4d4f9979486eb82c05bd032e1452c2fd400249f (patch)
tree7451a16c967f4dbe32122bd20f96dc5e6b4ad231 /src/print.cc
parent8bd362b5d17782cf8fa5317017a1c5d73d76f1b7 (diff)
downloadfork-ledger-a4d4f9979486eb82c05bd032e1452c2fd400249f.tar.gz
fork-ledger-a4d4f9979486eb82c05bd032e1452c2fd400249f.tar.bz2
fork-ledger-a4d4f9979486eb82c05bd032e1452c2fd400249f.zip
amount_t::print and value_t::print now use flags
Diffstat (limited to 'src/print.cc')
-rw-r--r--src/print.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/print.cc b/src/print.cc
index 703e885c..5a72b03e 100644
--- a/src/print.cc
+++ b/src/print.cc
@@ -172,13 +172,14 @@ namespace {
if (post->amount_expr) {
amt = post->amount_expr->text();
} else {
- std::size_t amount_width =
+ int amount_width =
(report.HANDLER(amount_width_).specified ?
- report.HANDLER(amount_width_).value.to_long() : 12);
+ report.HANDLER(amount_width_).value.to_int() : 12);
std::ostringstream amt_str;
report.scrub(post->amount)
- .print(amt_str, static_cast<int>(amount_width), -1, true);
+ .print(amt_str, amount_width, -1, AMOUNT_PRINT_RIGHT_JUSTIFY |
+ AMOUNT_PRINT_NO_COMPUTED_ANNOTATIONS);
amt = amt_str.str();
}