]> git.saurik.com Git - wxWidgets.git/blobdiff - src/richtext/richtextxml.cpp
Make wxRichTextCtrl again buildable on WinCE.
[wxWidgets.git] / src / richtext / richtextxml.cpp
index 1df105a3913ffa410d5deef555253e5bcc8939be..4184e2fa3cf265d2eccdfc3e07ceb605b35f0866 100644 (file)
@@ -361,7 +361,7 @@ static void OutputStringEnt(wxOutputStream& stream, const wxString& str,
             }
             last = i + 1;
         }
-        else if (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=\"");
@@ -847,16 +853,24 @@ bool wxRichTextXMLHandler::GetStyle(wxTextAttrEx& attr, wxXmlNode* node, bool is
 
         value = node->GetPropVal(wxT("bulletsymbol"), wxEmptyString);
         if (!value.empty())
-            attr.SetBulletSymbol(wxAtoi(value));
+            attr.SetBulletSymbol(wxChar(wxAtoi(value)));
 
         value = node->GetPropVal(wxT("bulletfont"), wxEmptyString);
         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())
         {