From 009124642747a65f459ebc20b987c7ee67df9a5e Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Sun, 5 Apr 2015 09:50:38 +0200 Subject: [PATCH] Only use wxDateTime in wxHtmlPrintout::TranslateHeader() if available. Code using wxDateTime when preparing header should be active only if wxUSE_DATETIME==1. See #16939. --- src/html/htmprint.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/html/htmprint.cpp b/src/html/htmprint.cpp index f6fc985800..f8ca3b458a 100644 --- a/src/html/htmprint.cpp +++ b/src/html/htmprint.cpp @@ -568,9 +568,14 @@ wxString wxHtmlPrintout::TranslateHeader(const wxString& instr, int page) num.Printf(wxT("%lu"), (unsigned long)(m_PageBreaks.GetCount() - 1)); r.Replace(wxT("@PAGESCNT@"), num); +#if wxUSE_DATETIME const wxDateTime now = wxDateTime::Now(); r.Replace(wxT("@DATE@"), now.FormatDate()); r.Replace(wxT("@TIME@"), now.FormatTime()); +#else + r.Replace(wxT("@DATE@"), wxEmptyString); + r.Replace(wxT("@TIME@"), wxEmptyString); +#endif r.Replace(wxT("@TITLE@"), GetTitle());