[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 9edce5a 5/8: Crudely paginate text output
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 9edce5a 5/8: Crudely paginate text output |
Date: |
Mon, 31 Jul 2017 17:24:18 -0400 (EDT) |
branch: master
commit 9edce5a9b4e56f9159295c3ab2f85cfaeebdfbc0
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Crudely paginate text output
A more refined implementation would split large blocks such as the
Tabular Detail across multiple pages as needed.
---
ledger_text_formats.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/ledger_text_formats.cpp b/ledger_text_formats.cpp
index f83e5aa..69ebdf1 100644
--- a/ledger_text_formats.cpp
+++ b/ledger_text_formats.cpp
@@ -865,8 +865,11 @@ class FlatTextLedgerPrinter final
LedgerVariant const& guar_() const;
LedgerVariant const& mdpt_() const;
+ // Required ctor arguments.
Ledger const& ledger_;
std::ostream& os_;
+
+ mutable int page_number_ {0};
};
void PrintLedgerFlatText
@@ -971,6 +974,7 @@ void FlatTextLedgerPrinter::PrintHeader() const
void FlatTextLedgerPrinter::PrintFooter() const
{
+ os_ << "Page " << ++page_number_ << " of 3";
os_ << "\f";
}
- [lmi-commits] [lmi] master updated (e13aa72 -> bd7e567), Greg Chicares, 2017/07/31
- [lmi-commits] [lmi] master 6ceeaf8 1/8: Say why headers are included if not obvious, Greg Chicares, 2017/07/31
- [lmi-commits] [lmi] master 8aea003 2/8: Fix defect introduced 20050114T1947Z: range error, Greg Chicares, 2017/07/31
- [lmi-commits] [lmi] master 5df1ad4 4/8: Resolve several marked defects [384], Greg Chicares, 2017/07/31
- [lmi-commits] [lmi] master 9051064 3/8: Improve label on age-70 row in Numeric Summary [388], Greg Chicares, 2017/07/31
- [lmi-commits] [lmi] master 9edce5a 5/8: Crudely paginate text output,
Greg Chicares <=
- [lmi-commits] [lmi] master 615758f 6/8: Improve const-correctness, Greg Chicares, 2017/07/31
- [lmi-commits] [lmi] master bd7e567 8/8: Show lapse years in Numeric Summary, Greg Chicares, 2017/07/31
- [lmi-commits] [lmi] master 1622e2f 7/8: Locally cache certain values, Greg Chicares, 2017/07/31