accept files in wxHtmlEasyPrinting::{Print,Preview}File, not only URLs
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28803 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -303,7 +303,12 @@ void wxHtmlPrintout::SetHtmlText(const wxString& html, const wxString &basepath,
|
|||||||
void wxHtmlPrintout::SetHtmlFile(const wxString& htmlfile)
|
void wxHtmlPrintout::SetHtmlFile(const wxString& htmlfile)
|
||||||
{
|
{
|
||||||
wxFileSystem fs;
|
wxFileSystem fs;
|
||||||
wxFSFile *ff = fs.OpenFile(htmlfile);
|
wxFSFile *ff;
|
||||||
|
|
||||||
|
if (wxFileExists(htmlfile))
|
||||||
|
ff = fs.OpenFile(wxFileSystem::FileNameToURL(htmlfile));
|
||||||
|
else
|
||||||
|
ff = fs.OpenFile(htmlfile);
|
||||||
|
|
||||||
if (ff == NULL)
|
if (ff == NULL)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user