Added outline level
Removed unnecessary wxRichTextAttr::CopyTo git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43277 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -996,6 +996,10 @@ wxString wxRichTextXMLHandler::CreateStyle(const wxTextAttrEx& attr, bool isPara
|
||||
{
|
||||
str << wxT(" pagebreak=\"1\"");
|
||||
}
|
||||
|
||||
if (attr.HasOutlineLevel())
|
||||
str << wxT(" outlinelevel=\"") << (int) attr.GetOutlineLevel() << wxT("\"");
|
||||
|
||||
}
|
||||
|
||||
return str;
|
||||
@@ -1195,6 +1199,12 @@ bool wxRichTextXMLHandler::GetStyle(wxTextAttrEx& attr, wxXmlNode* node, bool is
|
||||
{
|
||||
attr.SetPageBreak(wxAtoi(value) != 0);
|
||||
}
|
||||
|
||||
value = node->GetPropVal(wxT("outlinelevel"), wxEmptyString);
|
||||
if (!value.IsEmpty())
|
||||
{
|
||||
attr.SetOutlineLevel(wxAtoi(value) != 0);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user