From: Vadim Zeitlin Date: Wed, 5 Aug 2009 17:24:16 +0000 (+0000) Subject: Use wxFile for IO if wxFFile is not available. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/ce0822e1b9de6ce9cd9b828b807b7cf319cdfed0 Use wxFile for IO if wxFFile is not available. Closes #11067. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61608 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/docview.cpp b/src/common/docview.cpp index 8936703547..5dae19b52b 100644 --- a/src/common/docview.cpp +++ b/src/common/docview.cpp @@ -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;