lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] odd/multiarch 024af79 5/7: Merge remote-tracking bra


From: Greg Chicares
Subject: [lmi-commits] [lmi] odd/multiarch 024af79 5/7: Merge remote-tracking branch 'origin/master' into odd/multiarch
Date: Thu, 25 Apr 2019 17:54:22 -0400 (EDT)

branch: odd/multiarch
commit 024af795f3422750ce45d896b4a813be0eae8c4d
Merge: 768d4fc 1344708
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Merge remote-tracking branch 'origin/master' into odd/multiarch
---
 INSTALL            |  2 +-
 README.schroot     | 11 +++++-----
 gwc/develop1.txt   |  8 ++++++-
 install_cygwin.bat |  2 +-
 pdf_command_wx.cpp | 63 ++++++++++++++++++++++++++++++++++++++++++++++++------
 5 files changed, 71 insertions(+), 15 deletions(-)

diff --git a/INSTALL b/INSTALL
index 4d099b1..1c40f78 100644
--- a/INSTALL
+++ b/INSTALL
@@ -41,7 +41,7 @@ Copy and paste the following lines into the "Command Prompt" 
window:
 
 Save the following files into the 'C:\cache_for_lmi' directory:
 
-  https://cygwin.com/setup-x86.exe
+  https://cygwin.com/setup-x86_64.exe
   https://git.savannah.gnu.org/cgit/lmi.git/plain/install_cygwin.bat
 
 Copy and paste the following lines into the "Command prompt" window:
diff --git a/README.schroot b/README.schroot
index 17f49ff..bc5a8df 100644
--- a/README.schroot
+++ b/README.schroot
@@ -256,15 +256,16 @@ vim -c ':mkspell! ~/.vim/spell/en.utf-8.add' -c ':q'
 
 # Configure git. See:
 #   https://lists.nongnu.org/archive/html/lmi/2016-03/msg00006.html
-# Use your own name and email address.
-git config --global user.name "Gregory W. Chicares"
-git config --global user.email address@hidden
 git config --global color.ui auto
 git config --global core.pager "less -+F -+X"
-git config --global pull.ff only
-git config --global push.default simple
+git config --global diff.colormoved plain
 git config --global log.date iso8601-strict-local
 git config --global log.follow true
+git config --global pull.ff only
+git config --global push.default simple
+# Use your own name and email address.
+git config --global user.email address@hidden
+git config --global user.name "Gregory W. Chicares"
 
 # Initialize wine. See:
 #   https://lists.nongnu.org/archive/html/lmi/2016-10/msg00002.html
diff --git a/gwc/develop1.txt b/gwc/develop1.txt
index e368a86..e62d7a2 100644
--- a/gwc/develop1.txt
+++ b/gwc/develop1.txt
@@ -250,4 +250,10 @@ iconv -f ISO-8859-1 -t UTF-8 eraseme > product_data.cpp
 
   # Check spelling
 
-http://lists.nongnu.org/archive/html/lmi/2015-10/msg00076.html
+https://lists.nongnu.org/archive/html/lmi/2015-10/msg00076.html
+
+  # Test reinstallation; compare logs
+
+logfile=log-`date -u +'%Y%m%dT%H%MZ'`; echo "Log file is '$logfile.tar.bz2'."; 
./install_msw.sh >$logfile 2>&1; tar -cjf $logfile.tar.bz2 $logfile; mv 
${logfile}* ..
+
+git diff --no-index --color=always --color-moved=plain ../log-old ../log-new 
|sed -e's/^.\[3[12]m/&ZZZ/' |less -RS
diff --git a/install_cygwin.bat b/install_cygwin.bat
index ec6388a..cceb4da 100644
--- a/install_cygwin.bat
+++ b/install_cygwin.bat
@@ -28,7 +28,7 @@ IF EXIST C:\cygwin-lmi\NUL GOTO FoundOldInstallation
 
 C:
 cd C:\cache_for_lmi
-START "Installing Cygwin" /WAIT setup-x86 ^
+START "Installing Cygwin" /WAIT setup-x86_64 ^
   --wait --quiet-mode ^
   --site http://mirrors.kernel.org/sourceware/cygwin/ ^
   --root C:/cygwin-lmi --packages ^
diff --git a/pdf_command_wx.cpp b/pdf_command_wx.cpp
index d2de0f4..96bb26b 100644
--- a/pdf_command_wx.cpp
+++ b/pdf_command_wx.cpp
@@ -1004,8 +1004,9 @@ class pdf_illustration : protected html_interpolator, 
protected pdf_writer_wx
     std::vector<std::unique_ptr<logical_page>> pages_;
 };
 
-// Cover page used by several different illustration kinds.
-class cover_page : public logical_page
+// Cover page for finra only. PDF !! At the appropriate time, expunge
+// this class altogether, and use class cover_page instead.
+class unnumbered_cover_page : public logical_page
 {
   public:
     using logical_page::logical_page;
@@ -1314,8 +1315,6 @@ class numbered_page : public page_with_marginals
     }
 
   private:
-    // Derived classes may override this function if they may need more than 
one
-    // physical page to show their contents.
     virtual int get_extra_pages_needed() = 0;
 
     std::string get_page_number() const override
@@ -1331,6 +1330,56 @@ class numbered_page : public page_with_marginals
     int               extra_pages_      {0};
 };
 
+/// Generic cover page for most ledger types.
+///
+/// See discussion here:
+///   https://lists.nongnu.org/archive/html/lmi/2019-04/msg00024.html
+
+class cover_page : public numbered_page
+{
+  public:
+    using numbered_page::numbered_page;
+
+    void render() override
+    {
+        // Call base-class implementation to render the footer.
+        numbered_page::render();
+        int const height_contents = writer_.output_html
+            (writer_.get_horz_margin()
+            ,writer_.get_vert_margin()
+            ,writer_.get_page_width()
+            ,interpolator_.expand_template("cover")
+            );
+
+        // There is no way to draw a border around the page contents in wxHTML
+        // currently, so do it manually.
+        auto& pdf_dc = writer_.dc();
+
+        pdf_dc.SetPen(wxPen(illustration_rule_color, 2));
+        pdf_dc.SetBrush(*wxTRANSPARENT_BRUSH);
+
+        pdf_dc.DrawRectangle
+            (writer_.get_horz_margin()
+            ,writer_.get_vert_margin()
+            ,writer_.get_page_width()
+            ,height_contents
+            );
+    }
+
+  private:
+    int get_extra_pages_needed() override
+    {
+        return 0;
+    }
+
+    // Only the lower part of the footer is wanted here.
+    std::string get_upper_footer_template_name() const override
+    {
+        return std::string {};
+    }
+
+};
+
 // Simplest possible page which is entirely defined by its external template
 // whose name must be specified when constructing it.
 class standard_page : public numbered_page
@@ -2287,8 +2336,8 @@ class pdf_illustration_naic : public pdf_illustration
             );
 
         // Add all the pages.
-        add<cover_page>();
         numbered_page::start_numbering();
+        add<cover_page>();
         add<standard_page>("ill_reg_narr_summary");
         add<standard_page>("ill_reg_narr_summary2");
         add<standard_page>("ill_reg_column_headings");
@@ -2839,7 +2888,7 @@ class pdf_illustration_finra : public pdf_illustration
             );
 
         // Add all the pages.
-        add<cover_page>();
+        add<unnumbered_cover_page>();
         numbered_page::start_numbering();
         add<finra_basic>();
         add<finra_supplemental>();
@@ -2924,8 +2973,8 @@ class pdf_illustration_reg_d_group : public 
pdf_illustration
             );
 
         // Add all the pages.
-        add<cover_page>();
         numbered_page::start_numbering();
+        add<cover_page>();
         add<reg_d_group_basic>();
         add<standard_page>("reg_d_group_column_headings");
         add<standard_page>("reg_d_group_narr_summary");



reply via email to

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