- bool ExportXML(wxOutputStream& stream, wxMBConv* convMem, wxMBConv* convFile, wxRichTextObject& obj, int level);
- bool ExportStyleDefinition(wxOutputStream& stream, wxMBConv* convMem, wxMBConv* convFile, wxRichTextStyleDefinition* def, int level);
+ bool ExportXML(wxOutputStream& stream, wxRichTextObject& obj, int level);
+ bool ExportStyleDefinition(wxOutputStream& stream, wxRichTextStyleDefinition* def, int level);
+ wxString AddAttributes(const wxRichTextAttr& attr, bool isPara = false);
+ bool WriteProperties(wxOutputStream& stream, const wxRichTextProperties& properties, int level);
+ void OutputString(wxOutputStream& stream, const wxString& str);
+ void OutputStringEnt(wxOutputStream& stream, const wxString& str);
+ void OutputIndentation(wxOutputStream& stream, int indent);
+ static wxString AttributeToXML(const wxString& str);
+#endif
+
+#if wxRICHTEXT_HAVE_XMLDOCUMENT_OUTPUT
+ bool ExportXML(wxXmlNode* parent, wxRichTextObject& obj);
+ bool ExportStyleDefinition(wxXmlNode* parent, wxRichTextStyleDefinition* def);
+ bool AddAttributes(wxXmlNode* node, wxRichTextAttr& attr, bool isPara = false);
+ bool WriteProperties(wxXmlNode* node, const wxRichTextProperties& properties);
+#endif
+
+ /// Make a string from the given property. This can be overridden for custom variants.
+ virtual wxString MakeStringFromProperty(const wxVariant& var);
+
+ /// Create a proprty from the string read from the XML file.
+ virtual wxVariant MakePropertyFromString(const wxString& name, const wxString& value, const wxString& type);