X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2f987d8309bad8ec8f05bcb0910c0c34dd6d8986..abe0903cd4a16c6d8f50a3263d601fc718038c6d:/src/richtext/richtextxml.cpp diff --git a/src/richtext/richtextxml.cpp b/src/richtext/richtextxml.cpp index a8d3894417..f78883c8be 100644 --- a/src/richtext/richtextxml.cpp +++ b/src/richtext/richtextxml.cpp @@ -1193,6 +1193,10 @@ wxString wxRichTextXMLHandler::AddAttributes(const wxRichTextAttr& attr, bool is AddAttribute(str, wxT("outline"), attr.GetTextBoxAttr().GetOutline()); AddAttribute(str, wxT("width"), attr.GetTextBoxAttr().GetWidth()); AddAttribute(str, wxT("height"), attr.GetTextBoxAttr().GetHeight()); + AddAttribute(str, wxT("minwidth"), attr.GetTextBoxAttr().GetMinSize().GetWidth()); + AddAttribute(str, wxT("minheight"), attr.GetTextBoxAttr().GetMinSize().GetHeight()); + AddAttribute(str, wxT("maxwidth"), attr.GetTextBoxAttr().GetMaxSize().GetWidth()); + AddAttribute(str, wxT("maxheight"), attr.GetTextBoxAttr().GetMaxSize().GetHeight()); if (attr.GetTextBoxAttr().HasVerticalAlignment()) { @@ -1262,7 +1266,7 @@ bool wxRichTextXMLHandler::WriteProperties(wxOutputStream& stream, const wxRichT level ++; OutputIndentation(stream, level); - OutputString(stream, wxT("")); level ++; @@ -1279,14 +1283,14 @@ bool wxRichTextXMLHandler::WriteProperties(wxOutputStream& stream, const wxRichT OutputString(stream, wxT("\n")); + OutputString(stream, wxT("\"/>")); } } level --; OutputIndentation(stream, level); - OutputString(stream, wxT("\n")); + OutputString(stream, wxT("")); level --; } @@ -1484,6 +1488,10 @@ bool wxRichTextXMLHandler::AddAttributes(wxXmlNode* node, wxRichTextAttr& attr, AddAttribute(node, wxT("outline"), attr.GetTextBoxAttr().GetOutline()); AddAttribute(node, wxT("width"), attr.GetTextBoxAttr().GetWidth()); AddAttribute(node, wxT("height"), attr.GetTextBoxAttr().GetHeight()); + AddAttribute(node, wxT("minwidth"), attr.GetTextBoxAttr().GetMinSize().GetWidth()); + AddAttribute(node, wxT("minheight"), attr.GetTextBoxAttr().GetMinSize().GetHeight()); + AddAttribute(node, wxT("maxwidth"), attr.GetTextBoxAttr().GetMaxSize().GetWidth()); + AddAttribute(node, wxT("maxheight"), attr.GetTextBoxAttr().GetMaxSize().GetHeight()); if (attr.GetTextBoxAttr().HasVerticalAlignment()) { @@ -1863,6 +1871,22 @@ bool wxRichTextXMLHandler::ImportStyle(wxRichTextAttr& attr, wxXmlNode* node, bo { attr.GetTextBoxAttr().GetHeight().SetValue(wxRichTextParseDimension(value)); } + else if (name == wxT("minwidth")) + { + attr.GetTextBoxAttr().GetMinSize().GetWidth().SetValue(wxRichTextParseDimension(value)); + } + else if (name == wxT("minheight")) + { + attr.GetTextBoxAttr().GetMinSize().GetHeight().SetValue(wxRichTextParseDimension(value)); + } + else if (name == wxT("maxwidth")) + { + attr.GetTextBoxAttr().GetMaxSize().GetWidth().SetValue(wxRichTextParseDimension(value)); + } + else if (name == wxT("maxheight")) + { + attr.GetTextBoxAttr().GetMaxSize().GetHeight().SetValue(wxRichTextParseDimension(value)); + } else if (name == wxT("verticalalignment")) {