#include "wx/intl.h"
#endif
+
#ifdef __WXGTK__
#include "wx/mdi.h"
#endif
msgTitle = wxString(_("File error"));
#if wxUSE_STD_IOSTREAM
- ofstream store(file.fn_str());
+ ofstream store(FNSTRINGCAST file.fn_str());
if (store.fail() || store.bad())
#else
- wxFileOutputStream store(file.fn_str());
+ wxFileOutputStream store(FNSTRINGCAST file.fn_str());
if (store.LastError() != 0)
#endif
{
// Saving error
return FALSE;
}
- if (SaveObject(store)==FALSE)
+ if (!SaveObject(store))
{
(void)wxMessageBox(_("Sorry, could not save this file."), msgTitle, wxOK | wxICON_EXCLAMATION,
GetDocumentWindow());
msgTitle = wxString(_("File error"));
#if wxUSE_STD_IOSTREAM
- ifstream store(file.fn_str());
+ ifstream store(FNSTRINGCAST file.fn_str());
if (store.fail() || store.bad())
#else
- wxFileInputStream store(file.fn_str());
+ wxFileInputStream store(FNSTRINGCAST file.fn_str());
if (store.LastError() != 0)
#endif
{
GetDocumentWindow());
return FALSE;
}
- if (LoadObject(store)==FALSE)
+ if (!LoadObject(store))
{
(void)wxMessageBox(_("Sorry, could not open this file."), msgTitle, wxOK|wxICON_EXCLAMATION,
GetDocumentWindow());
#if wxUSE_STD_IOSTREAM
istream& wxDocument::LoadObject(istream& stream)
+#else
+wxInputStream& wxDocument::LoadObject(wxInputStream& stream)
+#endif
{
return stream;
}
+#if wxUSE_STD_IOSTREAM
ostream& wxDocument::SaveObject(ostream& stream)
-{
- return stream;
-}
#else
-bool wxDocument::LoadObject(wxInputStream& stream)
-{
- return TRUE;
-}
-
-bool wxDocument::SaveObject(wxOutputStream& stream)
+wxOutputStream& wxDocument::SaveObject(wxOutputStream& stream)
+#endif
{
- return TRUE;
+ return stream;
}
-#endif
bool wxDocument::Revert()
{
wxPrintDialogData data;
- wxPrintDialog printerDialog(parentWin, & data);
+ wxPrintDialog printerDialog(parentWin, &data);
printerDialog.GetPrintDialogData().SetSetupDialog(TRUE);
printerDialog.ShowModal();
#endif // wxUSE_PRINTING_ARCHITECTURE
}
wxDocTemplate *theTemplate = (wxDocTemplate *)wxGetSingleChoiceData(_("Select a document template"), _("Templates"), n,
- strings, data);
+ strings, (char **)data);
delete[] strings;
delete[] data;
return theTemplate;
}
}
wxDocTemplate *theTemplate = (wxDocTemplate *)wxGetSingleChoiceData(_("Select a document view"), _("Views"), n,
- strings, data);
+ strings, (char **)data);
delete[] strings;
delete[] data;
return theTemplate;