diff options
author | John Wiegley <johnw@newartisans.com> | 2010-05-22 19:17:13 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2010-05-22 21:35:03 -0400 |
commit | a7c28aa20057525a9247d0ae69eb063b53b21811 (patch) | |
tree | 8c2ca8592f7de44a4e8d785cedc869fa32f0bbf0 /src/output.h | |
parent | db5418c8386e4a1a1b72e0bcdba2eeb22f99b96f (diff) | |
download | fork-ledger-a7c28aa20057525a9247d0ae69eb063b53b21811.tar.gz fork-ledger-a7c28aa20057525a9247d0ae69eb063b53b21811.tar.bz2 fork-ledger-a7c28aa20057525a9247d0ae69eb063b53b21811.zip |
Added new option --prepend-width
This is useful for making sure that the column containing the results of
--prepend-format is a consistent width throughout the report (including
those lines where it is not applied).
Fixes 64F9D913-75E1-4830-A3D9-29B72442E68B
Diffstat (limited to 'src/output.h')
-rw-r--r-- | src/output.h | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/src/output.h b/src/output.h index 3a7b68df..00c664c1 100644 --- a/src/output.h +++ b/src/output.h @@ -56,17 +56,19 @@ class report_t; class format_posts : public item_handler<post_t> { protected: - report_t& report; - format_t first_line_format; - format_t next_lines_format; - format_t between_format; - format_t prepend_format; - xact_t * last_xact; - post_t * last_post; + report_t& report; + format_t first_line_format; + format_t next_lines_format; + format_t between_format; + format_t prepend_format; + std::size_t prepend_width; + xact_t * last_xact; + post_t * last_post; public: format_posts(report_t& _report, const string& format, - const optional<string>& _prepend_format = none); + const optional<string>& _prepend_format = none, + std::size_t _prepend_width = 0); virtual ~format_posts() { TRACE_DTOR(format_posts); } @@ -83,13 +85,15 @@ protected: format_t total_line_format; format_t separator_format; format_t prepend_format; + std::size_t prepend_width; predicate_t disp_pred; std::list<account_t *> posted_accounts; public: format_accounts(report_t& _report, const string& _format, - const optional<string>& _prepend_format = none); + const optional<string>& _prepend_format = none, + std::size_t _prepend_width = 0); virtual ~format_accounts() { TRACE_DTOR(format_accounts); } |