#pragma hdrstop
#endif
+#if wxUSE_RICHTEXT && wxUSE_XML
+
+#include "wx/richtext/richtextxml.h"
+
#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif
-#include "wx/image.h"
-
-#if wxUSE_RICHTEXT
-
#include "wx/filename.h"
#include "wx/clipbrd.h"
#include "wx/wfstream.h"
#include "wx/txtstrm.h"
#include "wx/xml/xml.h"
-#include "wx/richtext/richtextxml.h"
-
IMPLEMENT_DYNAMIC_CLASS(wxRichTextXMLHandler, wxRichTextFileHandler)
#if wxUSE_STREAMS
{
if (str.empty()) return;
#if wxUSE_UNICODE
- const wxWX2MBbuf buf(str.mb_str(convFile ? *convFile : wxConvUTF8));
- stream.Write((const char*)buf, strlen((const char*)buf));
+ if (convFile)
+ {
+ const wxWX2MBbuf buf(str.mb_str(*convFile));
+ stream.Write((const char*)buf, strlen((const char*)buf));
+ }
+ else
+ {
+ const wxWX2MBbuf buf(str.mb_str(wxConvUTF8));
+ stream.Write((const char*)buf, strlen((const char*)buf));
+ }
#else
if ( convFile == NULL )
stream.Write(str.mb_str(), str.Len());
#endif
#endif
- // wxUSE_RICHTEXT
+ // wxUSE_RICHTEXT && wxUSE_XML