[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 7ccd207 087/156: Rename "footer_contents" to
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 7ccd207 087/156: Rename "footer_contents" to more precise "page_number" |
Date: |
Tue, 30 Jan 2018 17:22:18 -0500 (EST) |
branch: master
commit 7ccd207e0a865aaf9128e586f45b132ef24a1bc9
Author: Vadim Zeitlin <address@hidden>
Commit: Vadim Zeitlin <address@hidden>
Rename "footer_contents" to more precise "page_number"
This variable expands to a string containing just the page number (or
the equivalent), so name it accordingly instead of wrongly implying that
it might contain something else.
---
footer.mustache | 2 +-
ledger_pdf_generator_wx.cpp | 22 +++++++++++-----------
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/footer.mustache b/footer.mustache
index d675000..a4cebb4 100644
--- a/footer.mustache
+++ b/footer.mustache
@@ -6,7 +6,7 @@
</tr>
<tr>
<td>Date Prepared: {{date_prepared}}</td>
- <td align="center">{{footer_contents}}</td>
+ <td align="center">{{page_number}}</td>
<td align="right">{{InsCoName}}</td>
</tr>
<tr>
diff --git a/ledger_pdf_generator_wx.cpp b/ledger_pdf_generator_wx.cpp
index 8d0be52..aacd259 100644
--- a/ledger_pdf_generator_wx.cpp
+++ b/ledger_pdf_generator_wx.cpp
@@ -868,29 +868,29 @@ class page_with_footer : public page
private:
// Method to be overridden in the base class which should actually return
- // the contents of the (middle part of the) footer.
- virtual std::string get_footer_contents() const = 0;
+ // the page number or equivalent string (e.g. "Appendix").
+ virtual std::string get_page_number() const = 0;
- // This method uses get_footer_contents() and returns the HTML wrapping it
+ // This method uses get_page_number() and returns the HTML wrapping it
// and other fixed information appearing in the footer.
text get_footer_html(html_interpolator const& interpolate_html) const
{
- auto const contents = get_footer_contents();
+ auto const page_number_str = get_page_number();
// Use our own interpolation function to handle the special
- // "footer_contents" variable that is replaced with the actual
- // (possibly dynamic) footer contents.
+ // "page_number" variable that is replaced with the actual
+ // (possibly dynamic) page number.
return text::from_html
(interpolate_string
("{{>footer}}"
- ,[contents, interpolate_html]
+ ,[page_number_str, interpolate_html]
(std::string const& s
,interpolate_lookup_kind kind
) -> std::string
{
- if(s == "footer_contents")
+ if(s == "page_number")
{
- return contents;
+ return page_number_str;
}
return interpolate_html.interpolation_func(s, kind);
@@ -906,7 +906,7 @@ class page_with_footer : public page
class attachment_page : public page_with_footer
{
private:
- std::string get_footer_contents() const override
+ std::string get_page_number() const override
{
return "Attachment";
}
@@ -986,7 +986,7 @@ class numbered_page : public page_with_footer
return 0;
}
- std::string get_footer_contents() const override
+ std::string get_page_number() const override
{
std::ostringstream oss;
oss << "Page " << this_page_number_ << " of " << last_page_number_;
- [lmi-commits] [lmi] master dbe5955 015/156: Factor out html_interpolator from pdf_illustration, (continued)
- [lmi-commits] [lmi] master dbe5955 015/156: Factor out html_interpolator from pdf_illustration, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 9665573 070/156: Change narrative summary page to use an external template, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master a629602 083/156: Use custom <scaled_image> HTML tag for the embedded images, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master b425030 082/156: Factor out html_cell_for_pdf_output from numeric_summary_table_cell, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master d99576a 069/156: Change cover page to use an external template, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 416ab02 030/156: Add support for vector variables to PDF generating code, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master d4dfaa9 075/156: Also use data directory for image files referenced from HTML, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 4f98db5 081/156: Don't show "Age 70" row in numeric summary for composites, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master f8853b9 090/156: Add "contract numbers" fragment to the header, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 61430d2 092/156: Move some variable definitions to the base illustration class, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 7ccd207 087/156: Rename "footer_contents" to more precise "page_number",
Greg Chicares <=
- [lmi-commits] [lmi] master 3a64b87 094/156: Correct misleading comment for page class dtor, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 4e76bba 098/156: Add support for comments to the string interpolation function, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master b5fe850 102/156: Add NASD basic illustration page, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 4250de9 104/156: Add first variant of NASD supplemental page, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 7a1e1e8 025/156: Include the missing <cstring> header, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 8bfb896 109/156: Add NASD illustration first explanatory notes page, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master ea20a31 095/156: Make pdf_illustration dtor virtual, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 61fae89 091/156: Reimplement the contract numbers fragment as an external template, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 0c55621 085/156: Replace trivial PDF page classes with single standard_page one, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master ea2564b 099/156: Split the NASD header template in the upper and lower parts, Greg Chicares, 2018/01/30