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:
@@ -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());
|
||||
|
Reference in New Issue
Block a user