Only write text colour if the colour is valid
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@48598 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -326,9 +326,10 @@ void wxRichTextHTMLHandler::OutputFont(const wxTextAttrEx& style, wxTextOutputSt
|
||||
{
|
||||
if (style.HasFont())
|
||||
{
|
||||
stream << wxString::Format(wxT("<font face=\"%s\" size=\"%ld\" color=\"%s\" >"),
|
||||
style.GetFont().GetFaceName().c_str(), PtToSize(style.GetFont().GetPointSize()),
|
||||
style.GetTextColour().GetAsString(wxC2S_HTML_SYNTAX).c_str());
|
||||
stream << wxString::Format(wxT("<font face=\"%s\" size=\"%ld\""), style.GetFont().GetFaceName().c_str(), PtToSize(style.GetFont().GetPointSize()));
|
||||
if (style.HasTextColour())
|
||||
stream << wxString::Format(wxT(" color=\"%s\""), style.GetTextColour().GetAsString(wxC2S_HTML_SYNTAX).c_str());
|
||||
stream << wxT(" >");
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user