]> git.saurik.com Git - wxWidgets.git/commitdiff
XML import corrections
authorJulian Smart <julian@anthemion.co.uk>
Sat, 15 Jan 2011 13:20:00 +0000 (13:20 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Sat, 15 Jan 2011 13:20:00 +0000 (13:20 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66687 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/richtext/richtextxml.cpp

index c5c91cfc07a617e000c511dd561f4805468a10fc..de049434c78a9e159d5dab10d5424bdb0ccc9d98 100644 (file)
@@ -169,9 +169,9 @@ wxRichTextObject* wxRichTextXMLHandler::CreateObjectForXMLName(wxRichTextObject*
     else if (name == wxT("textbox"))
         return new wxRichTextBox;
     else if (name == wxT("cell"))
     else if (name == wxT("textbox"))
         return new wxRichTextBox;
     else if (name == wxT("cell"))
-        return new wxRichTextBox;
+        return new wxRichTextCell;
     else if (name == wxT("table"))
     else if (name == wxT("table"))
-        return new wxRichTextBox;
+        return new wxRichTextTable;
     else
         return NULL;
 }
     else
         return NULL;
 }
@@ -411,6 +411,7 @@ wxXmlNode* wxRichTextXMLHandler::FindNode(wxXmlNode* node, const wxString& name)
     {
         if (child->GetName() == name)
             return child;
     {
         if (child->GetName() == name)
             return child;
+        child = child->GetNext();
     }
     return NULL;
 }
     }
     return NULL;
 }
@@ -1945,7 +1946,7 @@ bool wxRichTextObject::ImportFromXML(wxRichTextBuffer* WXUNUSED(buffer), wxXmlNo
     handler->ImportProperties(this, node);
     handler->ImportStyle(GetAttributes(), node, UsesParagraphAttributes());
     
     handler->ImportProperties(this, node);
     handler->ImportStyle(GetAttributes(), node, UsesParagraphAttributes());
     
-    *recurse = false;
+    *recurse = true;
 
     return true;
 }
 
     return true;
 }