[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master d4dfaa9 075/156: Also use data directory for
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master d4dfaa9 075/156: Also use data directory for image files referenced from HTML |
Date: |
Tue, 30 Jan 2018 17:22:14 -0500 (EST) |
branch: master
commit d4dfaa986f6c41292b4fd868748c661a071fec21
Author: Vadim Zeitlin <address@hidden>
Commit: Vadim Zeitlin <address@hidden>
Also use data directory for image files referenced from HTML
Look for the images such as company logo in the data directory instead
of the current one too.
---
pdf_writer_wx.cpp | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/pdf_writer_wx.cpp b/pdf_writer_wx.cpp
index ebed4ed..9b9b193 100644
--- a/pdf_writer_wx.cpp
+++ b/pdf_writer_wx.cpp
@@ -24,6 +24,7 @@
#include "pdf_writer_wx.hpp"
#include "alert.hpp"
+#include "global_settings.hpp"
#include "html.hpp"
#include <wx/filesys.h>
@@ -103,7 +104,14 @@ pdf_writer_wx::pdf_writer_wx
,"Courier"
);
}
+
+ // Create the virtual file system object for loading images referenced from
+ // HTML and interpret relative paths from the data directory.
html_vfs_.reset(new wxFileSystem());
+ html_vfs_->ChangePathTo
+ (global_settings::instance().data_directory().string()
+ ,true /* argument is a directory, not file path */
+ );
html_parser_.SetFS(html_vfs_.get());
}
- [lmi-commits] [lmi] master b341a2a 061/156: Factor out using_illustration_table helper class, (continued)
- [lmi-commits] [lmi] master b341a2a 061/156: Factor out using_illustration_table helper class, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 1b46585 076/156: Use MarketingNameFootnote & StateMarketingImprimatur on cover page, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 234cd39 012/156: Use custom font sizes to be closer to the existing illustrations, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 956fcca 071/156: Change the second narrative summary page to use a template too, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master dbe5955 015/156: Factor out html_interpolator from pdf_illustration, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 9665573 070/156: Change narrative summary page to use an external template, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master a629602 083/156: Use custom <scaled_image> HTML tag for the embedded images, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master b425030 082/156: Factor out html_cell_for_pdf_output from numeric_summary_table_cell, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master d99576a 069/156: Change cover page to use an external template, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 416ab02 030/156: Add support for vector variables to PDF generating code, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master d4dfaa9 075/156: Also use data directory for image files referenced from HTML,
Greg Chicares <=
- [lmi-commits] [lmi] master 4f98db5 081/156: Don't show "Age 70" row in numeric summary for composites, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master f8853b9 090/156: Add "contract numbers" fragment to the header, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 61430d2 092/156: Move some variable definitions to the base illustration class, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 7ccd207 087/156: Rename "footer_contents" to more precise "page_number", Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 3a64b87 094/156: Correct misleading comment for page class dtor, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 4e76bba 098/156: Add support for comments to the string interpolation function, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master b5fe850 102/156: Add NASD basic illustration page, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 4250de9 104/156: Add first variant of NASD supplemental page, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 7a1e1e8 025/156: Include the missing <cstring> header, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 8bfb896 109/156: Add NASD illustration first explanatory notes page, Greg Chicares, 2018/01/30