Added the ability to use built-in bullet styles, currently standard/circle or standard/square.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42166 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2006-10-20 13:04:12 +00:00
parent 13bc5380f2
commit f089713f9e
8 changed files with 592 additions and 225 deletions

View File

@@ -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())
{