]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/cmndata.cpp
wxGetUserHome() returns "const wxMB2WXbuf" for Unix in Unicode build.
[wxWidgets.git] / src / common / cmndata.cpp
index fdb6f88075774d0f79282a413187ca15e6496c8a..3355392580cf32f0271e5d4abb8830b12d2bb3b4 100644 (file)
@@ -198,6 +198,10 @@ wxPrintData::wxPrintData()
 
 wxPrintData::wxPrintData(const wxPrintData& printData)
 {
+#ifdef __WXMSW__
+    m_devMode = NULL;
+#endif
+
     (*this) = printData;
 }
 
@@ -210,7 +214,7 @@ wxPrintData::~wxPrintData()
 #endif
 }
 
-#ifdef __WXMSW__
+#if defined(__WXMSW__) && defined(__WIN32__)
 
 static wxString wxGetPrintDlgError()
 {
@@ -282,7 +286,8 @@ void wxPrintData::ConvertToNative()
                 GlobalFree(pd->hDevNames);
             pd->hDevMode = NULL;
             pd->hDevNames = NULL;
-#ifdef __WXDEBUG__
+
+#if defined(__WXDEBUG__) && defined(__WIN32__)
             wxString str("Printing error: ");
             str += wxGetPrintDlgError();
             wxLogDebug(str);
@@ -1131,8 +1136,8 @@ void wxPageSetupDialogData::SetPaperSize(wxPaperSize id)
 void wxPageSetupDialogData::CalculateIdFromPaperSize()
 {
     wxASSERT_MSG( (wxThePrintPaperDatabase != (wxPrintPaperDatabase*) NULL),
-                  "wxThePrintPaperDatabase should not be NULL. "
-                  "Do not create global print dialog data objects." );
+                  _T("wxThePrintPaperDatabase should not be NULL. "
+                    "Do not create global print dialog data objects.") );
 
     wxSize sz = GetPaperSize();
 
@@ -1147,8 +1152,8 @@ void wxPageSetupDialogData::CalculateIdFromPaperSize()
 void wxPageSetupDialogData::CalculatePaperSizeFromId()
 {
     wxASSERT_MSG( (wxThePrintPaperDatabase != (wxPrintPaperDatabase*) NULL),
-                  "wxThePrintPaperDatabase should not be NULL. "
-                  "Do not create global print dialog data objects." );
+                  _T("wxThePrintPaperDatabase should not be NULL. "
+                    "Do not create global print dialog data objects.") );
 
     wxSize sz = wxThePrintPaperDatabase->GetSize(m_printData.GetPaperId());