lmi-commits
[Top][All Lists]
Advanced

[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:



reply via email to

[Prev in Thread] Current Thread [Next in Thread]