lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] gwc-no-xslfo 6561307: Fix shared-object attributes


From: Greg Chicares
Subject: [lmi-commits] [lmi] gwc-no-xslfo 6561307: Fix shared-object attributes
Date: Sun, 28 Jan 2018 12:03:47 -0500 (EST)

branch: gwc-no-xslfo
commit 656130727a30ec081b9192e73d6ca4a2dfe36bf6
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Fix shared-object attributes
---
 html.hpp                    | 38 ++++++++++++++++++++------------------
 interpolate_string.hpp      |  4 +++-
 ledger_pdf_generator_wx.cpp | 12 ++++++------
 3 files changed, 29 insertions(+), 25 deletions(-)

diff --git a/html.hpp b/html.hpp
index 13f66ca..8ebb071 100644
--- a/html.hpp
+++ b/html.hpp
@@ -24,6 +24,8 @@
 
 #include "config.hpp"
 
+#include "so_attributes.hpp"
+
 #include <string>
 #include <utility>                      // std::move
 
@@ -157,7 +159,7 @@ class attribute
 namespace detail
 {
 
-class any_element
+class LMI_SO any_element
 {
   public:
     /// Ctor should only be used with literal strings as argument.
@@ -195,7 +197,7 @@ class any_element
 ///             )
 ///         ;
 
-class element : private detail::any_element
+class LMI_SO element : private detail::any_element
 {
   public:
     /// Ctor should only be used with literal strings as argument.
@@ -287,14 +289,14 @@ class void_element : private detail::any_element
 namespace attr
 {
 
-extern attribute const align;
-extern attribute const cellpadding;
-extern attribute const cellspacing;
-extern attribute const colspan;
-extern attribute const nowrap;
-extern attribute const size;
-extern attribute const valign;
-extern attribute const width;
+extern LMI_SO attribute const align;
+extern LMI_SO attribute const cellpadding;
+extern LMI_SO attribute const cellspacing;
+extern LMI_SO attribute const colspan;
+extern LMI_SO attribute const nowrap;
+extern LMI_SO attribute const size;
+extern LMI_SO attribute const valign;
+extern LMI_SO attribute const width;
 
 } // namespace attr
 
@@ -303,14 +305,14 @@ extern attribute const width;
 namespace tag
 {
 
-extern element      const b;
-extern void_element const br;
-extern element      const font;
-extern element      const i;
-extern element      const p;
-extern element      const table;
-extern element      const td;
-extern element      const tr;
+extern LMI_SO element      const b;
+extern LMI_SO void_element const br;
+extern LMI_SO element      const font;
+extern LMI_SO element      const i;
+extern LMI_SO element      const p;
+extern LMI_SO element      const table;
+extern LMI_SO element      const td;
+extern LMI_SO element      const tr;
 
 } // namespace tag
 
diff --git a/interpolate_string.hpp b/interpolate_string.hpp
index 2b457f0..7515553 100644
--- a/interpolate_string.hpp
+++ b/interpolate_string.hpp
@@ -24,6 +24,8 @@
 
 #include "config.hpp"
 
+#include "so_attributes.hpp"
+
 #include <functional>
 #include <string>
 
@@ -59,7 +61,7 @@ using lookup_function
 /// built-in way to escape them.
 ///
 /// Throw if the lookup function throws or if the string uses invalid syntax.
-std::string interpolate_string
+std::string LMI_SO interpolate_string
     (char const* s
     ,lookup_function const& lookup
     );
diff --git a/ledger_pdf_generator_wx.cpp b/ledger_pdf_generator_wx.cpp
index 8208861..cbaec4e 100644
--- a/ledger_pdf_generator_wx.cpp
+++ b/ledger_pdf_generator_wx.cpp
@@ -2013,15 +2013,15 @@ class pdf_illustration_regular : public pdf_illustration
             );
 
         // Variable representing the premium payment frequency with the
-        // appropriate indefinite article preceding it, e.g. "an annual" or "a
-        // monthly".
-        auto const er_mode = invar.ErMode[0].str();
-        if(!er_mode.empty())
+        // appropriate indefinite article preceding it, e.g. "an annual"
+        // or "a monthly".
+        auto const mode0 = invar.InitErMode;
+        if(!mode0.empty())
             {
-            auto const er_mode_first = lmi_tolower(er_mode[0]);
+            auto const mode0_first = lmi_tolower(mode0[0]);
             add_variable
                 ("ErModeLCWithArticle"
-                ,(strchr("aeiou", er_mode_first) ? "an" : "a") + 
er_mode.substr(1)
+                ,(strchr("aeiou", mode0_first) ? "an" : "a") + mode0.substr(1)
                 );
             }
 



reply via email to

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