Build fix.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34308 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -46,40 +46,48 @@ DiagramDocument::~DiagramDocument(void)
|
|||||||
|
|
||||||
bool DiagramDocument::OnCloseDocument(void)
|
bool DiagramDocument::OnCloseDocument(void)
|
||||||
{
|
{
|
||||||
diagram.DeleteAllShapes();
|
diagram.DeleteAllShapes();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if wxUSE_STD_IOSTREAM
|
#if wxUSE_STD_IOSTREAM
|
||||||
wxSTD ostream& DiagramDocument::SaveObject(wxSTD ostream& stream)
|
wxSTD ostream& DiagramDocument::SaveObject(wxSTD ostream& stream)
|
||||||
{
|
{
|
||||||
wxDocument::SaveObject(stream);
|
#if wxUSE_PROLOGIO
|
||||||
|
|
||||||
char buf[400];
|
wxDocument::SaveObject(stream);
|
||||||
(void) wxGetTempFileName("diag", buf);
|
|
||||||
|
|
||||||
diagram.SaveFile(buf);
|
char buf[400];
|
||||||
wxTransferFileToStream(buf, stream);
|
(void) wxGetTempFileName("diag", buf);
|
||||||
|
|
||||||
wxRemoveFile(buf);
|
diagram.SaveFile(buf);
|
||||||
|
wxTransferFileToStream(buf, stream);
|
||||||
|
|
||||||
return stream;
|
wxRemoveFile(buf);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return stream;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxSTD istream& DiagramDocument::LoadObject(wxSTD istream& stream)
|
wxSTD istream& DiagramDocument::LoadObject(wxSTD istream& stream)
|
||||||
{
|
{
|
||||||
wxDocument::LoadObject(stream);
|
#if wxUSE_PROLOGIO
|
||||||
|
|
||||||
char buf[400];
|
wxDocument::LoadObject(stream);
|
||||||
(void) wxGetTempFileName("diag", buf);
|
|
||||||
|
|
||||||
wxTransferStreamToFile(stream, buf);
|
char buf[400];
|
||||||
|
(void) wxGetTempFileName("diag", buf);
|
||||||
|
|
||||||
diagram.DeleteAllShapes();
|
wxTransferStreamToFile(stream, buf);
|
||||||
diagram.LoadFile(buf);
|
|
||||||
wxRemoveFile(buf);
|
|
||||||
|
|
||||||
return stream;
|
diagram.DeleteAllShapes();
|
||||||
|
diagram.LoadFile(buf);
|
||||||
|
wxRemoveFile(buf);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return stream;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
|
||||||
@@ -87,37 +95,37 @@ wxOutputStream& DiagramDocument::SaveObject(wxOutputStream& stream)
|
|||||||
{
|
{
|
||||||
#if wxUSE_PROLOGIO
|
#if wxUSE_PROLOGIO
|
||||||
|
|
||||||
wxDocument::SaveObject(stream);
|
wxDocument::SaveObject(stream);
|
||||||
wxChar buf[400];
|
wxChar buf[400];
|
||||||
(void) wxGetTempFileName(_T("diag"), buf);
|
(void) wxGetTempFileName(_T("diag"), buf);
|
||||||
|
|
||||||
diagram.SaveFile(buf);
|
diagram.SaveFile(buf);
|
||||||
|
|
||||||
wxTransferFileToStream(buf, stream);
|
wxTransferFileToStream(buf, stream);
|
||||||
|
|
||||||
wxRemoveFile(buf);
|
wxRemoveFile(buf);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return stream;
|
return stream;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxInputStream& DiagramDocument::LoadObject(wxInputStream& stream)
|
wxInputStream& DiagramDocument::LoadObject(wxInputStream& stream)
|
||||||
{
|
{
|
||||||
#if wxUSE_PROLOGIO
|
#if wxUSE_PROLOGIO
|
||||||
wxDocument::LoadObject(stream);
|
wxDocument::LoadObject(stream);
|
||||||
|
|
||||||
wxChar buf[400];
|
wxChar buf[400];
|
||||||
(void) wxGetTempFileName(_T("diag"), buf);
|
(void) wxGetTempFileName(_T("diag"), buf);
|
||||||
|
|
||||||
wxTransferStreamToFile(stream, buf);
|
wxTransferStreamToFile(stream, buf);
|
||||||
|
|
||||||
diagram.DeleteAllShapes();
|
diagram.DeleteAllShapes();
|
||||||
diagram.LoadFile(buf);
|
diagram.LoadFile(buf);
|
||||||
wxRemoveFile(buf);
|
wxRemoveFile(buf);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return stream;
|
return stream;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#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,
|
DiagramCommand::DiagramCommand(const wxString& name, int command, DiagramDocument *ddoc, wxClassInfo *info, double xx, double yy,
|
||||||
bool sel, wxShape *theShape, wxShape *fs, wxShape *ts):
|
bool sel, wxShape *theShape, wxShape *fs, wxShape *ts)
|
||||||
wxCommand(true, name)
|
:wxCommand(true, name)
|
||||||
{
|
{
|
||||||
doc = ddoc;
|
doc = ddoc;
|
||||||
cmd = command;
|
cmd = command;
|
||||||
shape = theShape;
|
shape = theShape;
|
||||||
fromShape = fs;
|
fromShape = fs;
|
||||||
toShape = ts;
|
toShape = ts;
|
||||||
shapeInfo = info;
|
shapeInfo = info;
|
||||||
shapeBrush = NULL;
|
shapeBrush = NULL;
|
||||||
shapePen = NULL;
|
shapePen = NULL;
|
||||||
x = xx;
|
x = xx;
|
||||||
y = yy;
|
y = yy;
|
||||||
selected = sel;
|
selected = sel;
|
||||||
deleteShape = false;
|
deleteShape = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
DiagramCommand::DiagramCommand(const wxString& name, int command, DiagramDocument *ddoc, wxBrush *backgroundColour, wxShape *theShape):
|
DiagramCommand::DiagramCommand(const wxString& name, int command, DiagramDocument *ddoc, wxBrush *backgroundColour, wxShape *theShape)
|
||||||
wxCommand(true, name)
|
:wxCommand(true, name)
|
||||||
{
|
{
|
||||||
doc = ddoc;
|
doc = ddoc;
|
||||||
cmd = command;
|
cmd = command;
|
||||||
shape = theShape;
|
shape = theShape;
|
||||||
fromShape = NULL;
|
fromShape = NULL;
|
||||||
toShape = NULL;
|
toShape = NULL;
|
||||||
shapeInfo = NULL;
|
shapeInfo = NULL;
|
||||||
x = 0.0;
|
x = 0.0;
|
||||||
y = 0.0;
|
y = 0.0;
|
||||||
selected = false;
|
selected = false;
|
||||||
deleteShape = false;
|
deleteShape = false;
|
||||||
shapeBrush = backgroundColour;
|
shapeBrush = backgroundColour;
|
||||||
shapePen = NULL;
|
shapePen = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
DiagramCommand::DiagramCommand(const wxString& name, int command, DiagramDocument *ddoc, const wxString& lab, wxShape *theShape):
|
DiagramCommand::DiagramCommand(const wxString& name, int command, DiagramDocument *ddoc, const wxString& lab, wxShape *theShape)
|
||||||
wxCommand(true, name)
|
:wxCommand(true, name)
|
||||||
{
|
{
|
||||||
doc = ddoc;
|
doc = ddoc;
|
||||||
cmd = command;
|
cmd = command;
|
||||||
shape = theShape;
|
shape = theShape;
|
||||||
fromShape = NULL;
|
fromShape = NULL;
|
||||||
toShape = NULL;
|
toShape = NULL;
|
||||||
shapeInfo = NULL;
|
shapeInfo = NULL;
|
||||||
x = 0.0;
|
x = 0.0;
|
||||||
y = 0.0;
|
y = 0.0;
|
||||||
selected = false;
|
selected = false;
|
||||||
deleteShape = false;
|
deleteShape = false;
|
||||||
shapeBrush = NULL;
|
shapeBrush = NULL;
|
||||||
shapePen = NULL;
|
shapePen = NULL;
|
||||||
shapeLabel = lab;
|
shapeLabel = lab;
|
||||||
}
|
}
|
||||||
|
|
||||||
DiagramCommand::~DiagramCommand(void)
|
DiagramCommand::~DiagramCommand(void)
|
||||||
|
Reference in New Issue
Block a user