X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9c4cb6116779e9fc7bcb7009ef0aa6047d2f8874..7be740a3fdba6e7203bd82c1674f48207dc00eed:/src/richtext/richtextxml.cpp diff --git a/src/richtext/richtextxml.cpp b/src/richtext/richtextxml.cpp index 6c9aed9c6f..d967ae5d02 100644 --- a/src/richtext/richtextxml.cpp +++ b/src/richtext/richtextxml.cpp @@ -1131,9 +1131,9 @@ bool wxRichTextXMLHandler::GetStyle(wxTextAttr& attr, wxXmlNode* node, bool isPa { wxString fontFacename; int fontSize = 12; - int fontFamily = wxFONTFAMILY_DEFAULT; - int fontWeight = wxNORMAL; - int fontStyle = wxNORMAL; + wxFontFamily fontFamily = wxFONTFAMILY_DEFAULT; + wxFontWeight fontWeight = wxFONTWEIGHT_NORMAL; + wxFontStyle fontStyle = wxFONTSTYLE_NORMAL; bool fontUnderlined = false; // int fontFlags = 0; @@ -1150,14 +1150,14 @@ bool wxRichTextXMLHandler::GetStyle(wxTextAttr& attr, wxXmlNode* node, bool isPa value = node->GetAttribute(wxT("fontfamily"), wxEmptyString); if (!value.empty()) { - fontFamily = wxAtoi(value); + fontFamily = (wxFontFamily)wxAtoi(value); attr.SetFontFamily(fontFamily); } value = node->GetAttribute(wxT("fontstyle"), wxEmptyString); if (!value.empty()) { - fontStyle = wxAtoi(value); + fontStyle = (wxFontStyle)wxAtoi(value); attr.SetFontStyle(fontStyle); } @@ -1171,7 +1171,7 @@ bool wxRichTextXMLHandler::GetStyle(wxTextAttr& attr, wxXmlNode* node, bool isPa value = node->GetAttribute(wxT("fontweight"), wxEmptyString); if (!value.empty()) { - fontWeight = wxAtoi(value); + fontWeight = (wxFontWeight)wxAtoi(value); attr.SetFontWeight(fontWeight); }