[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 7ed2bbf 027/156: Simplify footer generation c
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 7ed2bbf 027/156: Simplify footer generation code by moving font tag outside |
Date: |
Tue, 30 Jan 2018 17:22:00 -0500 (EST) |
branch: master
commit 7ed2bbf5f8de274a788dc1b41322decf6742f5d1
Author: Vadim Zeitlin <address@hidden>
Commit: Vadim Zeitlin <address@hidden>
Simplify footer generation code by moving font tag outside
Put the entire table inside a <font size="-2"> tag instead of repeating
it for all the table cells, which all use font of the same size.
---
ledger_pdf_generator_wx.cpp | 78 ++++++++++++++++++++-------------------------
1 file changed, 35 insertions(+), 43 deletions(-)
diff --git a/ledger_pdf_generator_wx.cpp b/ledger_pdf_generator_wx.cpp
index 2223db0..d4b54c2 100644
--- a/ledger_pdf_generator_wx.cpp
+++ b/ledger_pdf_generator_wx.cpp
@@ -466,72 +466,64 @@ class page_with_footer : public page
) override
{
auto footer_html =
- tag::table[attr::width("100%")]
- [attr::cellspacing("0")]
- [attr::cellpadding("0")]
- (tag::tr
- (tag::td[attr::colspan("3")]
- (text::nbsp())
+ tag::font[attr::size("-2")]
+ (tag::table[attr::width("100%")]
+ [attr::cellspacing("0")]
+ [attr::cellpadding("0")]
+ (tag::tr
+ (tag::td[attr::colspan("3")]
+ (text::nbsp())
+ )
)
- )
- (tag::tr
- (tag::td
- (tag::font[attr::size("-2")]
+ (tag::tr
+ (tag::td
(interpolate_html
("Date Prepared: {{date_prepared}}"
)
)
)
- )
- (tag::td[attr::align("center")]
- (tag::font[attr::size("-2")]
+ (tag::td[attr::align("center")]
(text::from(get_footer_contents())
)
)
- )
- (tag::td[attr::align("right")]
- (tag::font[attr::size("-2")]
+ (tag::td[attr::align("right")]
(interpolate_html
("{{InsCoName}}"
)
)
)
)
- )
- (tag::tr
- (tag::td
- (tag::font[attr::size("-2")]
+ (tag::tr
+ (tag::td
(interpolate_html
("System Version: {{lmi_version}}"
)
)
)
- )
- (tag::td
- (text::nbsp()
+ (tag::td
+ (text::nbsp()
+ )
)
- )
- (tag::td[attr::align("right")]
- (tag::font[attr::size("-2")]
+ (tag::td[attr::align("right")]
(interpolate_html
(R"(
-{{#IsInforce}}
- {{#Composite}}
- {{ImprimaturInforceComposite}}
- {{/Composite}}
- {{^Composite}}
- {{ImprimaturInforce}}
- {{/Composite}}
-{{/IsInforce}}
-{{^IsInforce}}
- {{#Composite}}
- {{ImprimaturPresaleComposite}}
- {{/Composite}}
- {{^Composite}}
- {{ImprimaturPresale}}
- {{/Composite}}
-{{/IsInforce}}
-)"
+ {{#IsInforce}}
+ {{#Composite}}
+ {{ImprimaturInforceComposite}}
+ {{/Composite}}
+ {{^Composite}}
+ {{ImprimaturInforce}}
+ {{/Composite}}
+ {{/IsInforce}}
+ {{^IsInforce}}
+ {{#Composite}}
+ {{ImprimaturPresaleComposite}}
+ {{/Composite}}
+ {{^Composite}}
+ {{ImprimaturPresale}}
+ {{/Composite}}
+ {{/IsInforce}}
+ )"
)
)
)
- [lmi-commits] [lmi] master cfdf224 016/156: Use raw multiline string instead of concatenating several strings, (continued)
- [lmi-commits] [lmi] master cfdf224 016/156: Use raw multiline string instead of concatenating several strings, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 1d99e76 008/156: Make pdf_writer_wx::output_html() type safe by taking html::text, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master e43a485 005/156: Further improve wxPdfDocument API encapsulation and reuse, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 7d278ef 011/156: Add footer to the cover page, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master d5d8185 057/156: Add tabular_details page, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master bb64784 013/156: Add a helper allowing to interpolate variables in strings, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master b72ced6 014/156: Replace ad hoc illustration properties with HTML interpolator, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master e7d763d 066/156: Add company logo display to the PDF illustration header, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master f575c94 003/156: Refactor more group_quote_pdf_gen_wx code to allow its reuse, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 5e2fc70 007/156: Make HTML generation utilities more type-safe, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 7ed2bbf 027/156: Simplify footer generation code by moving font tag outside,
Greg Chicares <=
- [lmi-commits] [lmi] master d7244c1 043/156: Change the colour used for lines and borders, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 41ae40d 089/156: Fix wrong "<br>" tag in the header template, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master acb7aae 049/156: Add numbered_page::get_extra_pages_needed() hook, Greg Chicares, 2018/01/30
- [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