doc view code inteprets wxSTREAM_EOF as correct,

Added wxMask( bitmap, colour ).


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4851 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
1999-12-07 09:35:42 +00:00
parent c61f4f6dbd
commit 1fb4de3138
3 changed files with 124 additions and 8 deletions

View File

@@ -293,7 +293,7 @@ bool wxDocument::OnSaveDocument(const wxString& file)
if (store.fail() || store.bad())
#else
wxFileOutputStream store(wxString(file.fn_str()));
if (store.LastError() != 0)
if (store.LastError() != wxSTREAM_NOERROR)
#endif
{
(void)wxMessageBox(_("Sorry, could not open this file for saving."), msgTitle, wxOK | wxICON_EXCLAMATION,
@@ -329,14 +329,20 @@ bool wxDocument::OnOpenDocument(const wxString& file)
if (store.fail() || store.bad())
#else
wxFileInputStream store(wxString(file.fn_str()));
if (store.LastError() != 0)
if (store.LastError() != wxSTREAM_NOERROR)
#endif
{
(void)wxMessageBox(_("Sorry, could not open this file."), msgTitle, wxOK|wxICON_EXCLAMATION,
GetDocumentWindow());
return FALSE;
}
#if wxUSE_STD_IOSTREAM
if (!LoadObject(store))
#else
int res = LoadObject(store).LastError();
if ((res != wxSTREAM_NOERROR) &&
(res != wxSTREAM_EOF))
#endif
{
(void)wxMessageBox(_("Sorry, could not open this file."), msgTitle, wxOK|wxICON_EXCLAMATION,
GetDocumentWindow());