From: Włodzimierz Skiba Date: Tue, 24 May 2005 07:54:43 +0000 (+0000) Subject: Build fix. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/9f13cedb5ee3de118c826ed4c52efb760f4d9e6d Build fix. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34308 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/contrib/samples/ogl/ogledit/doc.cpp b/contrib/samples/ogl/ogledit/doc.cpp index 410d150880..b613dc9344 100644 --- a/contrib/samples/ogl/ogledit/doc.cpp +++ b/contrib/samples/ogl/ogledit/doc.cpp @@ -46,40 +46,48 @@ DiagramDocument::~DiagramDocument(void) bool DiagramDocument::OnCloseDocument(void) { - diagram.DeleteAllShapes(); - return true; + diagram.DeleteAllShapes(); + return true; } #if wxUSE_STD_IOSTREAM wxSTD ostream& DiagramDocument::SaveObject(wxSTD ostream& stream) { - wxDocument::SaveObject(stream); +#if wxUSE_PROLOGIO + + wxDocument::SaveObject(stream); - char buf[400]; - (void) wxGetTempFileName("diag", buf); + char buf[400]; + (void) wxGetTempFileName("diag", buf); - diagram.SaveFile(buf); - wxTransferFileToStream(buf, stream); + diagram.SaveFile(buf); + wxTransferFileToStream(buf, stream); - wxRemoveFile(buf); + wxRemoveFile(buf); + +#endif - return stream; + return stream; } wxSTD istream& DiagramDocument::LoadObject(wxSTD istream& stream) { - wxDocument::LoadObject(stream); +#if wxUSE_PROLOGIO + + wxDocument::LoadObject(stream); - char buf[400]; - (void) wxGetTempFileName("diag", buf); + char buf[400]; + (void) wxGetTempFileName("diag", buf); - wxTransferStreamToFile(stream, buf); + wxTransferStreamToFile(stream, buf); - diagram.DeleteAllShapes(); - diagram.LoadFile(buf); - wxRemoveFile(buf); + diagram.DeleteAllShapes(); + diagram.LoadFile(buf); + wxRemoveFile(buf); + +#endif - return stream; + return stream; } #else @@ -87,37 +95,37 @@ wxOutputStream& DiagramDocument::SaveObject(wxOutputStream& stream) { #if wxUSE_PROLOGIO - wxDocument::SaveObject(stream); - wxChar buf[400]; - (void) wxGetTempFileName(_T("diag"), buf); + wxDocument::SaveObject(stream); + wxChar buf[400]; + (void) wxGetTempFileName(_T("diag"), buf); - diagram.SaveFile(buf); + diagram.SaveFile(buf); - wxTransferFileToStream(buf, stream); + wxTransferFileToStream(buf, stream); - wxRemoveFile(buf); + wxRemoveFile(buf); #endif - return stream; + return stream; } wxInputStream& DiagramDocument::LoadObject(wxInputStream& stream) { #if wxUSE_PROLOGIO - wxDocument::LoadObject(stream); + wxDocument::LoadObject(stream); - wxChar buf[400]; - (void) wxGetTempFileName(_T("diag"), buf); + wxChar buf[400]; + (void) wxGetTempFileName(_T("diag"), buf); - wxTransferStreamToFile(stream, buf); + wxTransferStreamToFile(stream, buf); - diagram.DeleteAllShapes(); - diagram.LoadFile(buf); - wxRemoveFile(buf); + diagram.DeleteAllShapes(); + diagram.LoadFile(buf); + wxRemoveFile(buf); #endif - return stream; + return stream; } #endif @@ -127,56 +135,56 @@ wxInputStream& DiagramDocument::LoadObject(wxInputStream& stream) */ DiagramCommand::DiagramCommand(const wxString& name, int command, DiagramDocument *ddoc, wxClassInfo *info, double xx, double yy, - bool sel, wxShape *theShape, wxShape *fs, wxShape *ts): - wxCommand(true, name) + bool sel, wxShape *theShape, wxShape *fs, wxShape *ts) + :wxCommand(true, name) { - doc = ddoc; - cmd = command; - shape = theShape; - fromShape = fs; - toShape = ts; - shapeInfo = info; - shapeBrush = NULL; - shapePen = NULL; - x = xx; - y = yy; - selected = sel; - deleteShape = false; + doc = ddoc; + cmd = command; + shape = theShape; + fromShape = fs; + toShape = ts; + shapeInfo = info; + shapeBrush = NULL; + shapePen = NULL; + x = xx; + y = yy; + selected = sel; + deleteShape = false; } -DiagramCommand::DiagramCommand(const wxString& name, int command, DiagramDocument *ddoc, wxBrush *backgroundColour, wxShape *theShape): - wxCommand(true, name) +DiagramCommand::DiagramCommand(const wxString& name, int command, DiagramDocument *ddoc, wxBrush *backgroundColour, wxShape *theShape) + :wxCommand(true, name) { - doc = ddoc; - cmd = command; - shape = theShape; - fromShape = NULL; - toShape = NULL; - shapeInfo = NULL; - x = 0.0; - y = 0.0; - selected = false; - deleteShape = false; - shapeBrush = backgroundColour; - shapePen = NULL; + doc = ddoc; + cmd = command; + shape = theShape; + fromShape = NULL; + toShape = NULL; + shapeInfo = NULL; + x = 0.0; + y = 0.0; + selected = false; + deleteShape = false; + shapeBrush = backgroundColour; + shapePen = NULL; } -DiagramCommand::DiagramCommand(const wxString& name, int command, DiagramDocument *ddoc, const wxString& lab, wxShape *theShape): - wxCommand(true, name) +DiagramCommand::DiagramCommand(const wxString& name, int command, DiagramDocument *ddoc, const wxString& lab, wxShape *theShape) + :wxCommand(true, name) { - doc = ddoc; - cmd = command; - shape = theShape; - fromShape = NULL; - toShape = NULL; - shapeInfo = NULL; - x = 0.0; - y = 0.0; - selected = false; - deleteShape = false; - shapeBrush = NULL; - shapePen = NULL; - shapeLabel = lab; + doc = ddoc; + cmd = command; + shape = theShape; + fromShape = NULL; + toShape = NULL; + shapeInfo = NULL; + x = 0.0; + y = 0.0; + selected = false; + deleteShape = false; + shapeBrush = NULL; + shapePen = NULL; + shapeLabel = lab; } DiagramCommand::~DiagramCommand(void)