]> git.saurik.com Git - wxWidgets.git/blobdiff - src/html/htmprint.cpp
Commit patch [ 1559950 ] fix mem leaks in wx{Dir|File}Dialog
[wxWidgets.git] / src / html / htmprint.cpp
index f62cbc0133ceb79799eb0e21be65763cab13c565..80fa77356431fa679e6ac7b32d953c5303a6cdb9 100644 (file)
@@ -23,6 +23,7 @@
     #include "wx/dc.h"
     #include "wx/settings.h"
     #include "wx/msgdlg.h"
+    #include "wx/module.h"
 #endif
 
 #include "wx/print.h"
@@ -30,7 +31,6 @@
 #include "wx/html/htmprint.h"
 #include "wx/wxhtml.h"
 #include "wx/wfstream.h"
-#include "wx/module.h"
 
 
 //--------------------------------------------------------------------------------
@@ -440,9 +440,15 @@ wxString wxHtmlPrintout::TranslateHeader(const wxString& instr, int page)
     num.Printf(wxT("%i"), page);
     r.Replace(wxT("@PAGENUM@"), num);
 
-    num.Printf(wxT("%lu"), m_PageBreaks.Count()-1);
+    num.Printf(wxT("%lu"), (unsigned long)(m_PageBreaks.Count() - 1));
     r.Replace(wxT("@PAGESCNT@"), num);
 
+    const wxDateTime now = wxDateTime::Now();
+    r.Replace(wxT("@DATE@"), now.FormatDate());
+    r.Replace(wxT("@TIME@"), now.FormatTime());
+
+    r.Replace(wxT("@TITLE@"), GetTitle());
+
     return r;
 }