]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/docview.cpp
compilation fix
[wxWidgets.git] / src / common / docview.cpp
index 3834c2a2e7be2dbcd6e6e915c85f55e016ed44e6..465f22a2be88f4779803e442f21962722fbb538f 100644 (file)
@@ -285,7 +285,7 @@ bool wxDocument::OnSaveDocument(const wxString& file)
     if (store.fail() || store.bad())
 #else
     wxFileOutputStream store(file.fn_str());
-    if (store.LastError() == 0)
+    if (store.LastError() != 0)
 #endif
     {
         (void)wxMessageBox(_("Sorry, could not open this file for saving."), msgTitle, wxOK | wxICON_EXCLAMATION,
@@ -321,7 +321,7 @@ bool wxDocument::OnOpenDocument(const wxString& file)
     if (store.fail() || store.bad())
 #else
     wxFileInputStream store(file.fn_str());
-    if (store.LastError() == 0)
+    if (store.LastError() != 0)
 #endif
     {
         (void)wxMessageBox(_("Sorry, could not open this file."), msgTitle, wxOK|wxICON_EXCLAMATION,
@@ -1297,7 +1297,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 +1320,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;