Fixed URL saving/loading
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48558 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -929,6 +929,9 @@ wxString wxRichTextXMLHandler::CreateStyle(const wxTextAttrEx& attr, bool isPara
|
||||
if (!attr.GetCharacterStyleName().empty())
|
||||
str << wxT(" characterstyle=\"") << wxString(attr.GetCharacterStyleName()) << wxT("\"");
|
||||
|
||||
if (attr.HasURL())
|
||||
str << wxT(" url=\"") << attr.GetURL() << wxT("\"");
|
||||
|
||||
if (isPara)
|
||||
{
|
||||
if (attr.HasAlignment())
|
||||
@@ -973,9 +976,6 @@ wxString wxRichTextXMLHandler::CreateStyle(const wxTextAttrEx& attr, bool isPara
|
||||
if (attr.HasBulletName())
|
||||
str << wxT(" bulletname=\"") << attr.GetBulletName() << wxT("\"");
|
||||
|
||||
if (attr.HasURL())
|
||||
str << wxT(" url=\"") << attr.GetURL() << wxT("\"");
|
||||
|
||||
if (!attr.GetParagraphStyleName().empty())
|
||||
str << wxT(" parstyle=\"") << wxString(attr.GetParagraphStyleName()) << wxT("\"");
|
||||
|
||||
@@ -1099,6 +1099,10 @@ bool wxRichTextXMLHandler::GetStyle(wxTextAttrEx& attr, wxXmlNode* node, bool is
|
||||
attr.SetTextEffectFlags(wxAtoi(value));
|
||||
}
|
||||
|
||||
value = node->GetAttribute(wxT("url"), wxEmptyString);
|
||||
if (!value.empty())
|
||||
attr.SetURL(value);
|
||||
|
||||
// Set paragraph attributes
|
||||
if (isPara)
|
||||
{
|
||||
@@ -1172,10 +1176,6 @@ bool wxRichTextXMLHandler::GetStyle(wxTextAttrEx& attr, wxXmlNode* node, bool is
|
||||
if (!value.empty())
|
||||
attr.SetBulletName(value);
|
||||
|
||||
value = node->GetAttribute(wxT("url"), wxEmptyString);
|
||||
if (!value.empty())
|
||||
attr.SetURL(value);
|
||||
|
||||
value = node->GetAttribute(wxT("parstyle"), wxEmptyString);
|
||||
if (!value.empty())
|
||||
attr.SetParagraphStyleName(value);
|
||||
|
Reference in New Issue
Block a user