[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 76881d8 019/156: Refactor: extra add_body_par
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 76881d8 019/156: Refactor: extra add_body_paragraph() helper |
Date: |
Tue, 30 Jan 2018 17:21:53 -0500 (EST) |
branch: master
commit 76881d8120980e9b06a1d82972f4c581f542a8ba
Author: Vadim Zeitlin <address@hidden>
Commit: Vadim Zeitlin <address@hidden>
Refactor: extra add_body_paragraph() helper
Introduce a function for performing a common task.
No real changes.
---
ledger_pdf_generator_wx.cpp | 28 ++++++++++++----------------
1 file changed, 12 insertions(+), 16 deletions(-)
diff --git a/ledger_pdf_generator_wx.cpp b/ledger_pdf_generator_wx.cpp
index c3eb614..d27dfea 100644
--- a/ledger_pdf_generator_wx.cpp
+++ b/ledger_pdf_generator_wx.cpp
@@ -458,6 +458,12 @@ class narrative_summary_page : public page
)
;
+ // Just a helper performing a common operation.
+ auto const add_body_paragraph = [](text const& t) -> text
+ {
+ return tag::p(tag::font[attr::size("-1")](t));
+ };
+
std::string description;
if(!interpolate_html.test_variable("SinglePremium"))
{
@@ -494,21 +500,14 @@ adjustable benefits, and single premium.
)";
}
- summary_html +=
- tag::p
- (tag::font[attr::size("-1")]
- (interpolate_html(description.c_str())
- )
- )
- ;
+ summary_html += add_body_paragraph
+ (interpolate_html(description.c_str())
+ );
if(!invar.IsInforce)
{
- summary_html +=
- tag::p
- (tag::font[attr::size("-1")]
- (interpolate_html
- (R"(
+ summary_html += add_body_paragraph
+ (interpolate_html(R"(
Coverage may be available on a Guaranteed Standard Issue basis.
All proposals are based on case characteristics and must
be approved by the ${InsCoShortName}
@@ -516,10 +515,7 @@ Home Office. For details regarding underwriting
and coverage limitations refer to your offer letter
or contact your ${InsCoShortName} representative.
)"
- )
- )
- )
- ;
+ ));
}
writer.output_html
- [lmi-commits] [lmi] master 982c9f0 149/156: Remove consecutive blank lines from a Mustache template, (continued)
- [lmi-commits] [lmi] master 982c9f0 149/156: Remove consecutive blank lines from a Mustache template, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master ec73905 058/156: Add extra pair of braces to std::array<> initializer for clang, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 6a5cd32 079/156: Add "Table Rating" to the header if necessary, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master b01d478 029/156: Resurrect ledger XML IO code as new ledger_evaluator, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 89c676d 009/156: Add pdf_writer_wx::get_page_height() helper, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 8e26a76 004/156: Improve encapsulation by returning only wxDC from pdf_writer_wx, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master cb5cb7b 021/156: Add more contents to the narrative summary page, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 173cc28 022/156: Change interpolated strings syntax to be Mustache-like, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 2e4850c 023/156: Implement the rest of "Narrative Summary" page body text, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master c341dbb 108/156: Factor out compliance_tracking template from the footer one, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 76881d8 019/156: Refactor: extra add_body_paragraph() helper,
Greg Chicares <=
- [lmi-commits] [lmi] master 08127f1 028/156: Add symbolic constant for the "valign" HTML attribute, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 0d6c7f0 062/156: Get rid of separate wxDC parameter in the code, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master bbada54 084/156: Add image to the columns headings page too, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 3cf5a1c 056/156: Add wx_table_generator::output_super_header(), Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 95e616e 105/156: Add wx_table_generator::columns_count() accessor, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 3f1d437 088/156: Add add_abbreviated_variable() helper, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 118a249 097/156: Add "Column Definitions and Key Terms" page to NASD illustrations, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 1ab47c0 063/156: Fix definition of integer-valued variable in PDF illustrations, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master bb21f4d 077/156: Fix header for composite illustrations, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master d2b2cae 038/156: Change column_headings page to use external template, Greg Chicares, 2018/01/30