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