]> git.saurik.com Git - wxWidgets.git/blobdiff - src/richtext/richtextxml.cpp
untangling dc and gc
[wxWidgets.git] / src / richtext / richtextxml.cpp
index cab26bf5da426030084e418d8855086553547701..93976ae167a6dc674bde1fcaf11730e97c7f7e7f 100644 (file)
@@ -361,7 +361,7 @@ static void OutputStringEnt(wxOutputStream& stream, const wxString& str,
             }
             last = i + 1;
         }
-        else if ((unsigned long)c > 127)
+        else if (wxUChar(c) > 127)
         {
             OutputString(stream, str.Mid(last, i - last), convMem, convFile);
 
@@ -657,7 +657,7 @@ wxString wxRichTextXMLHandler::CreateStyle(const wxTextAttrEx& attr, bool isPara
     }
 
     if (!attr.GetCharacterStyleName().empty())
-        str << wxT(" charactertyle=\"") << wxString(attr.GetCharacterStyleName()) << wxT("\"");
+        str << wxT(" characterstyle=\"") << wxString(attr.GetCharacterStyleName()) << wxT("\"");
 
     if (isPara)
     {
@@ -694,9 +694,15 @@ wxString wxRichTextXMLHandler::CreateStyle(const wxTextAttrEx& attr, bool isPara
             str << wxT(" bulletfont=\"") << attr.GetBulletFont() << wxT("\"");
         }
 
+        if (attr.HasBulletName())
+            str << wxT(" bulletname=\"") << attr.GetBulletName() << wxT("\"");
+
         if (!attr.GetParagraphStyleName().empty())
             str << wxT(" parstyle=\"") << wxString(attr.GetParagraphStyleName()) << wxT("\"");
         
+        if (!attr.GetListStyleName().empty())
+            str << wxT(" liststyle=\"") << wxString(attr.GetListStyleName()) << wxT("\"");
+        
         if (attr.HasTabs())
         {
             str << wxT(" tabs=\"");
@@ -853,10 +859,18 @@ bool wxRichTextXMLHandler::GetStyle(wxTextAttrEx& attr, wxXmlNode* node, bool is
         if (!value.empty())
             attr.SetBulletFont(value);
 
+        value = node->GetPropVal(wxT("bulletname"), wxEmptyString);
+        if (!value.empty())
+            attr.SetBulletName(value);
+
         value = node->GetPropVal(wxT("parstyle"), wxEmptyString);
         if (!value.empty())
             attr.SetParagraphStyleName(value);
         
+        value = node->GetPropVal(wxT("liststyle"), wxEmptyString);
+        if (!value.empty())
+            attr.SetListStyleName(value);
+        
         value = node->GetPropVal(wxT("tabs"), wxEmptyString);
         if (!value.empty())
         {