[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 49cc809 072/156: Remove HTML construction hel
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 49cc809 072/156: Remove HTML construction helpers not needed any more |
Date: |
Tue, 30 Jan 2018 17:22:14 -0500 (EST) |
branch: master
commit 49cc809ced7957cb96ea733055d8c3ebb41b9b69
Author: Vadim Zeitlin <address@hidden>
Commit: Vadim Zeitlin <address@hidden>
Remove HTML construction helpers not needed any more
These functions are unnecessary now that external templates are used.
---
ledger_pdf_generator_wx.cpp | 209 --------------------------------------------
1 file changed, 209 deletions(-)
diff --git a/ledger_pdf_generator_wx.cpp b/ledger_pdf_generator_wx.cpp
index 10dc903..1a8974f 100644
--- a/ledger_pdf_generator_wx.cpp
+++ b/ledger_pdf_generator_wx.cpp
@@ -778,215 +778,6 @@ class numbered_page : public page_with_footer
int numbered_page::last_page_number_ = 0;
-// Wrap the given HTML in a paragraph tag using (smaller) body font size.
-text add_body_paragraph_html(text const& t)
-{
- return tag::p(tag::font[attr::size("-1")](t));
-}
-
-// Return HTML with the standard page header.
-text get_header_html
- (LedgerInvariant const& invar
- ,html_interpolator const& interpolate_html
- )
-{
- // Some convenient helpers for performing common operations.
- auto const add_line = [=](char const* s) -> text
- {
- return tag::br + interpolate_html(s);
- };
-
- text header_html = interpolate_html
- (R"(
-{{#IsInforce}}
-LIFE INSURANCE IN FORCE BASIC ILLUSTRATION
-{{/IsInforce}}
-{{^IsInforce}}
-LIFE INSURANCE BASIC ILLUSTRATION
-{{/IsInforce}}
-)"
- );
-
- header_html += add_line("{{InsCoName}}");
-
- if(invar.ProducerName != "0")
- {
- header_html += add_line("Presented by: {{ProducerName}}");
- }
-
- if(invar.ProducerStreet != "0")
- {
- header_html += add_line("{{ProducerStreet}}");
- }
-
- if(invar.ProducerCity != "0")
- {
- header_html += add_line("{{ProducerCity}}");
- }
-
- // Construct the left-hand side of the summary table.
- text lhs_html = text::from("Prepared for:");
-
- lhs_html += add_line("{{Space8}}Group Name:{{CorpNameAbbrev50}}");
-
- lhs_html += add_line
- (R"(
-{{#Composite}}
-Composite Illustration
-{{/Composite}}
-{{^Composite}}
-{{Space8}}Insured:{{Insured1Abbrev50}}
-{{/Composite}}
-)"
- );
-
- if(!interpolate_html.test_variable("Composite"))
- {
- lhs_html += add_line("{{Space8}}Age: {{Age}}");
- }
-
- lhs_html += add_line
- ("Product: {{PolicyForm}}{{Space1}}{{PolicyMktgName}}"
- );
-
- lhs_html += add_line
- (R"(
-{{#ModifiedSinglePremium}}
-Modified Single Premium Adjustable Life Insurance Policy
-{{/ModifiedSinglePremium}}
-{{^ModifiedSinglePremium}}
-{{PolicyLegalName}}
-{{/ModifiedSinglePremium}}
-)"
- );
-
- if(!interpolate_html.test_variable("IsInforce"))
- {
- lhs_html += add_line
- (R"(
-{{^SinglePremium}}
-Initial Premium:
-{{/SinglePremium}}
-{{#SinglePremium}}
-Single Premium:
-{{/SinglePremium}}
-{{Space1}}${{InitPrem}}
-)"
- );
- }
-
- if(!interpolate_html.test_variable("Composite"))
- {
- lhs_html += add_line
- ("Initial Death Benefit Option: {{InitDBOpt}}"
- );
- }
-
- // Now the right-hand side.
- auto rhs_html = interpolate_html
- (R"(
-Initial {{#HasTerm}}Total{{/HasTerm}}
-Selected Face Amount: ${{InitTotalSA}}
-)"
- );
-
- if(interpolate_html.test_variable("HasTerm"))
- {
- rhs_html += add_line
- ("Initial Base Face Amount: ${{InitBaseSpecAmt}}"
- );
-
- rhs_html += add_line
- ("Initial Term Face Amount: ${{InitTermSpecAmt}}"
- );
- }
-
- rhs_html += add_line
- ("Guaranteed Crediting Rate: {{InitAnnGenAcctInt_Guaranteed}}"
- );
-
- rhs_html += add_line
- (R"(
-Current Illustrated Crediting Rate:
-{{#InforceYear}}
-{{UltimateInterestRate}}
-{{/InforceYear}}
-{{^InforceYear}}
-{{InitAnnGenAcctInt_Current}}
-{{/InforceYear}}
-)"
- );
-
- if
- ( interpolate_html.test_variable("SinglePremium")
- && invar.InforceYear <= 4
- )
- {
- rhs_html += add_line
- (R"(
-Ultimate Illustrated Crediting Rate:
-{{#ModifiedSinglePremium0}}
-{{AnnGAIntRate_Current[11]}}
-{{/ModifiedSinglePremium0}}
-{{^ModifiedSinglePremium0}}
-{{AnnGAIntRate_Current[6]}}
-{{/ModifiedSinglePremium0}}
-)"
- );
- }
-
- if(!interpolate_html.test_variable("Composite"))
- {
- rhs_html += add_line
- (R"(
-Underwriting Type:
-{{#UWTypeIsMedical}}
-Fully underwritten
-{{/UWTypeIsMedical}}
-{{^UWTypeIsMedical}}
-{{UWType}}
-{{/UWTypeIsMedical}}
-)"
- );
-
- rhs_html += add_line
- (R"(
-Rate Classification: {{UWClass}}, {{Smoker}}, {{Gender}}
-)"
- );
-
- if(invar.UWClass == "Rated")
- {
- rhs_html += add_line
- ("{{Space2}}{{Space1}}Table Rating: {{SubstandardTable}}"
- );
- }
- }
-
- // Put everything together.
- return
- tag::font[attr::size("-1")]
- (tag::p[attr::align("center")]
- (header_html
- )
- )
- (tag::p
- (text::nbsp()
- )
- )
- (tag::table
- [attr::width("100%")]
- [attr::cellspacing("0")]
- [attr::cellpadding("0")]
- [attr::valign("top")]
- (tag::tr
- (tag::td[attr::width("60%")](lhs_html))
- (tag::td[attr::width("40%")](rhs_html))
- )
- )
- ;
-}
-
class narrative_summary_page : public numbered_page
{
public:
- [lmi-commits] [lmi] master c0d68e1 122/156: Add rate of return pages of the individual placement illustration, (continued)
- [lmi-commits] [lmi] master c0d68e1 122/156: Add rate of return pages of the individual placement illustration, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 875ca7d 039/156: Rename StateIsTX ledger variable to StateIsTexas, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 31048c8 047/156: Make wx_table_generator even more customizable, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 10dd0a9 051/156: Factor enum_output_mode into a separate header to allow its reuse, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 8fa972e 052/156: Add "Tabular Detail, continued" page to the PDF illustration, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master ca6e17c 031/156: Add function generating a standard header and use it, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master c378bc5 064/156: Remove unnecessary value_cast inclusion, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 41de2e2 140/156: Add helper expand_template() method, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 3e8e257 017/156: Add pdf_illustration_regular and narrative_summary_page, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 614fb47 135/156: Add supplemental reports pages to private placement illustrations, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 49cc809 072/156: Remove HTML construction helpers not needed any more,
Greg Chicares <=
- [lmi-commits] [lmi] master efc01fa 046/156: Allow disabling separator lines in wx_table_generator, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master e20544f 018/156: Add check for the ledger type, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master a0a167e 144/156: Rename "compliance_tracking_number" template to "imprimatur", Greg Chicares, 2018/01/30
- [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