]> git.saurik.com Git - wxWidgets.git/commitdiff
Use wxFile for IO if wxFFile is not available.
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 5 Aug 2009 17:24:16 +0000 (17:24 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 5 Aug 2009 17:24:16 +0000 (17:24 +0000)
Closes #11067.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61608 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/docview.cpp

index 8936703547ed352023056a6bc10d4d5bdf29867d..5dae19b52bb071f1ee1d6f45c5d8f8d6e78d3863 100644 (file)
@@ -2235,7 +2235,11 @@ void wxFileHistory::AddFilesToMenu(wxMenu* menu)
 
 bool wxTransferFileToStream(const wxString& filename, wxSTD ostream& stream)
 {
+#if wxUSE_FFILE
     wxFFile file(filename, wxT("rb"));
+#elif wxUSE_FILE
+    wxFile file(filename, wxFile::read);
+#endif
     if ( !file.IsOpened() )
         return false;
 
@@ -2259,7 +2263,11 @@ bool wxTransferFileToStream(const wxString& filename, wxSTD ostream& stream)
 
 bool wxTransferStreamToFile(wxSTD istream& stream, const wxString& filename)
 {
+#if wxUSE_FFILE
     wxFFile file(filename, wxT("wb"));
+#elif wxUSE_FILE
+    wxFile file(filename, wxFile::write);
+#endif
     if ( !file.IsOpened() )
         return false;
 
@@ -2282,7 +2290,11 @@ bool wxTransferStreamToFile(wxSTD istream& stream, const wxString& filename)
 
 bool wxTransferFileToStream(const wxString& filename, wxOutputStream& stream)
 {
+#if wxUSE_FFILE
     wxFFile file(filename, wxT("rb"));
+#elif wxUSE_FILE
+    wxFile file(filename, wxFile::read);
+#endif
     if ( !file.IsOpened() )
         return false;
 
@@ -2306,7 +2318,11 @@ bool wxTransferFileToStream(const wxString& filename, wxOutputStream& stream)
 
 bool wxTransferStreamToFile(wxInputStream& stream, const wxString& filename)
 {
+#if wxUSE_FFILE
     wxFFile file(filename, wxT("wb"));
+#elif wxUSE_FILE
+    wxFile file(filename, wxFile::write);
+#endif
     if ( !file.IsOpened() )
         return false;