X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/30f6914ba1d999b84c28fc84a3cf0fdbf9cc326f..11f87a381bd9d0fe195ff1a3802ae141413d7c2e:/src/xml/xml.cpp diff --git a/src/xml/xml.cpp b/src/xml/xml.cpp index 7e4fdd5a99..922332b1d6 100644 --- a/src/xml/xml.cpp +++ b/src/xml/xml.cpp @@ -30,6 +30,7 @@ #include "wx/zstream.h" #include "wx/strconv.h" #include "wx/scopedptr.h" +#include "wx/versioninfo.h" #include "expat.h" // from Expat @@ -798,14 +799,7 @@ bool OutputString(wxOutputStream& stream, wxUnusedVar(convMem); if ( !convFile ) convFile = &wxConvUTF8; -#if 1 - // JACS test - const wxWX2MBbuf buf(str.mb_str(*convFile)); - if (!buf.length()) - return false; - - stream.Write((const char*)buf, strlen((const char*)buf)); -#else + const wxScopedCharBuffer buf(str.mb_str(*convFile)); if ( !buf.length() ) { @@ -815,8 +809,6 @@ bool OutputString(wxOutputStream& stream, } stream.Write(buf, buf.length()); -#endif - #else // !wxUSE_UNICODE if ( convFile && convMem ) { @@ -1044,4 +1036,12 @@ bool wxXmlDocument::Save(wxOutputStream& stream, int indentstep) const OutputString(stream, wxS("\n"), convMem.get(), convFile.get()); } +/*static*/ wxVersionInfo wxXmlDocument::GetLibraryVersionInfo() +{ + return wxVersionInfo("expat", + XML_MAJOR_VERSION, + XML_MINOR_VERSION, + XML_MICRO_VERSION); +} + #endif // wxUSE_XML