X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/92a19c2e7757ba742846f83e56356de0a607bdc2..75633395579c4154980ed7cf3042ba0f35936120:/contrib/src/ogl/ogldiag.cpp diff --git a/contrib/src/ogl/ogldiag.cpp b/contrib/src/ogl/ogldiag.cpp index f6731b8400..a1b71884b0 100644 --- a/contrib/src/ogl/ogldiag.cpp +++ b/contrib/src/ogl/ogldiag.cpp @@ -30,17 +30,6 @@ #undef new #endif -#if wxUSE_IOSTREAMH -#include -#include -#else -#include -#include -#ifdef _MSC_VER -//using namespace std; -#endif -#endif - #include #include #include @@ -225,7 +214,7 @@ void wxDiagram::RecentreAll(wxDC& dc) } // Input/output -#ifdef PROLOGIO +#if wxUSE_PROLOGIO bool wxDiagram::SaveFile(const wxString& filename) { wxBeginBusyCursor(); @@ -257,9 +246,9 @@ bool wxDiagram::SaveFile(const wxString& filename) } OnDatabaseSave(*database); - char tempFile[400]; - wxGetTempFileName("diag", tempFile); - FILE* file = fopen(tempFile, "w"); + wxString tempFile; + wxGetTempFileName(wxT("diag"), tempFile); + FILE* file = fopen(tempFile.mb_str(wxConvFile), "w"); if (! file) { wxEndBusyCursor(); @@ -350,11 +339,11 @@ void wxDiagram::ReadNodes(wxExprDatabase& database) wxExpr *clause = database.FindClauseByFunctor("shape"); while (clause) { - char *type = NULL; + wxChar *type = NULL; long parentId = -1; - clause->AssignAttributeValue("type", &type); - clause->AssignAttributeValue("parent", &parentId); + clause->AssignAttributeValue(wxT("type"), &type); + clause->AssignAttributeValue(wxT("parent"), &parentId); wxClassInfo *classInfo = wxClassInfo::FindClass(type); if (classInfo) { @@ -394,12 +383,12 @@ void wxDiagram::ReadLines(wxExprDatabase& database) wxExpr *clause = database.FindClauseByFunctor("line"); while (clause) { - wxString type(""); + wxString type; long parentId = -1; clause->GetAttributeValue("type", type); clause->GetAttributeValue("parent", parentId); - wxClassInfo *classInfo = wxClassInfo::FindClass((char*) (const char*) type); + wxClassInfo *classInfo = wxClassInfo::FindClass(type); if (classInfo) { wxLineShape *shape = (wxLineShape *)classInfo->CreateObject();