]> git.saurik.com Git - wxWidgets.git/commitdiff
accept files in wxHtmlEasyPrinting::{Print,Preview}File, not only URLs
authorVáclav Slavík <vslavik@fastmail.fm>
Sun, 15 Aug 2004 21:38:26 +0000 (21:38 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Sun, 15 Aug 2004 21:38:26 +0000 (21:38 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28803 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/html/htmprint.cpp

index 800ca10d6632b7014a5e681228c0641786335c4a..4e91a6baaf5eb46590f5942d74e282948253210a 100644 (file)
@@ -303,7 +303,12 @@ void wxHtmlPrintout::SetHtmlText(const wxString& html, const wxString &basepath,
 void wxHtmlPrintout::SetHtmlFile(const wxString& htmlfile)
 {
     wxFileSystem fs;
 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)
     {
 
     if (ff == NULL)
     {