From 72b1ad5c2e42a19e24460c196b47ea54e34d8c2c Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Sun, 15 Aug 2004 21:38:26 +0000 Subject: [PATCH] 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 --- src/html/htmprint.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/html/htmprint.cpp b/src/html/htmprint.cpp index 800ca10d66..4e91a6baaf 100644 --- a/src/html/htmprint.cpp +++ b/src/html/htmprint.cpp @@ -303,7 +303,12 @@ void wxHtmlPrintout::SetHtmlText(const wxString& html, const wxString &basepath, void wxHtmlPrintout::SetHtmlFile(const wxString& htmlfile) { 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) { -- 2.49.0