]> git.saurik.com Git - wxWidgets.git/blobdiff - src/richtext/richtextxml.cpp
Always use UTF-8 for file names passed to GTK+ functions under MSW.
[wxWidgets.git] / src / richtext / richtextxml.cpp
index a8d3894417aa7f8c1875bdacdb069054f8a4152c..f78883c8be6709b807e5ec747ab0f964d447c215 100644 (file)
@@ -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("<properties"));
+        OutputString(stream, wxT("<properties>"));
 
         level ++;
 
@@ -1279,14 +1283,14 @@ bool wxRichTextXMLHandler::WriteProperties(wxOutputStream& stream, const wxRichT
                 OutputString(stream, wxT("<property name=\"") + name +
                     wxT("\" type=\"") + var.GetType() + wxT("\" value=\""));
                 OutputStringEnt(stream, value);
-                OutputString(stream, wxT("\"/>\n"));
+                OutputString(stream, wxT("\"/>"));
             }
         }
 
         level --;
 
         OutputIndentation(stream, level);
-        OutputString(stream, wxT("</properties>\n"));
+        OutputString(stream, wxT("</properties>"));
 
         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"))
             {