lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 5068359 3/5: Change group_quote_pdf_generator


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 5068359 3/5: Change group_quote_pdf_generator_wx::footer_ member type and name (VZ)
Date: Tue, 21 Feb 2017 11:44:27 -0500 (EST)

branch: master
commit 5068359f655d79c089f7298430c4eeeba8e83bd4
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Change group_quote_pdf_generator_wx::footer_ member type and name (VZ)
    
    This variable contains HTML and not plain text, and so should be of
    type wxString and not std::string according to the conventions used in
    this code.
    
    As it is declared in a class where all the other members are of type
    std::string, also rename it to make it even more clear that it is
    different from the other fields.
---
 group_quote_pdf_gen_wx.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/group_quote_pdf_gen_wx.cpp b/group_quote_pdf_gen_wx.cpp
index bd862a6..3964a90 100644
--- a/group_quote_pdf_gen_wx.cpp
+++ b/group_quote_pdf_gen_wx.cpp
@@ -545,7 +545,7 @@ class group_quote_pdf_generator_wx
         std::string premium_mode_;
         std::string contract_state_;
         std::string effective_date_;
-        std::string footer_;
+        wxString    footer_html_;
 
         // Dynamically-determined fields.
         std::string elected_riders_;
@@ -700,7 +700,7 @@ void 
group_quote_pdf_generator_wx::global_report_data::fill_global_report_data
     effective_date_   = ConvertDateToWx(eff_date).FormatDate().ToStdString();
     // Deliberately begin the footer with <br> tags, to separate it
     // from the logo right above it.
-    footer_ =
+    footer_html_ =
           brbr (invar.GroupQuoteIsNotAnOffer)
         + brbr (invar.GroupQuoteRidersFooter)
         + brbr (elected_riders_footnote_)
@@ -801,7 +801,7 @@ void group_quote_pdf_generator_wx::add_ledger(Ledger const& 
ledger)
                 {
                 rd.values[col] = ConvertDateToWx
                     (jdn_t(static_cast<int>(invar.DateOfBirthJdn))
-                    ).FormatDate();
+                    ).FormatDate().ToStdString(wxConvUTF8);
                 }
                 break;
             case e_col_basic_face_amount:
@@ -1424,7 +1424,7 @@ void group_quote_pdf_generator_wx::output_footer
         *pos_y += vert_skip;
         }
 
-    wxString const footer_html = "<p>" + report_data_.footer_ + "</p>";
+    wxString const footer_html = "<p>" + report_data_.footer_html_ + "</p>";
 
     *pos_y += output_html
         (html_parser



reply via email to

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