]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/docview.cpp
fix for HP-UX
[wxWidgets.git] / src / common / docview.cpp
index a6687e39a6eb591034f0fc768267e769e82c4712..e5dda96883e32e319eec87af0a5cab062e4be351 100644 (file)
@@ -42,6 +42,7 @@
     #include "wx/intl.h"
 #endif
 
+
 #ifdef __WXGTK__
     #include "wx/mdi.h"
 #endif
@@ -281,10 +282,10 @@ bool wxDocument::OnSaveDocument(const wxString& file)
         msgTitle = wxString(_("File error"));
 
 #if wxUSE_STD_IOSTREAM
-    ofstream store(file.fn_str());
+    ofstream store(FNSTRINGCAST file.fn_str());
     if (store.fail() || store.bad())
 #else
-    wxFileOutputStream store(file.fn_str());
+    wxFileOutputStream store(FNSTRINGCAST file.fn_str());
     if (store.LastError() != 0)
 #endif
     {
@@ -317,10 +318,10 @@ bool wxDocument::OnOpenDocument(const wxString& file)
         msgTitle = wxString(_("File error"));
 
 #if wxUSE_STD_IOSTREAM
-    ifstream store(file.fn_str());
+    ifstream store(FNSTRINGCAST file.fn_str());
     if (store.fail() || store.bad())
 #else
-    wxFileInputStream store(file.fn_str());
+    wxFileInputStream store(FNSTRINGCAST file.fn_str());
     if (store.LastError() != 0)
 #endif
     {
@@ -834,7 +835,7 @@ void wxDocManager::OnPrintSetup(wxCommandEvent& WXUNUSED(event))
 
     wxPrintDialogData data;
 
-    wxPrintDialog printerDialog(parentWin, & data);
+    wxPrintDialog printerDialog(parentWin, &data);
     printerDialog.GetPrintDialogData().SetSetupDialog(TRUE);
     printerDialog.ShowModal();
 #endif // wxUSE_PRINTING_ARCHITECTURE
@@ -1297,7 +1298,7 @@ wxDocTemplate *wxDocManager::SelectDocumentType(wxDocTemplate **templates,
     }
 
     wxDocTemplate *theTemplate = (wxDocTemplate *)wxGetSingleChoiceData(_("Select a document template"), _("Templates"), n,
-            strings, data);
+            strings, (char **)data);
     delete[] strings;
     delete[] data;
     return theTemplate;
@@ -1320,7 +1321,7 @@ wxDocTemplate *wxDocManager::SelectViewType(wxDocTemplate **templates,
         }
     }
     wxDocTemplate *theTemplate = (wxDocTemplate *)wxGetSingleChoiceData(_("Select a document view"), _("Views"), n,
-            strings, data);
+            strings, (char **)data);
     delete[] strings;
     delete[] data;
     return theTemplate;