remove wxTextAttr::CreateFont(); return wxNullFont from GetFont() if we have no font attributes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52412 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2008-03-09 13:14:58 +00:00
parent 98a14ab488
commit 1fee6e2577
2 changed files with 5 additions and 5 deletions

View File

@ -278,9 +278,6 @@ public:
// Partial equality test taking flags into account
bool EqPartial(const wxTextAttr& attr, int flags) const;
// Create font from font attributes.
wxFont CreateFont() const;
// Get attributes from font.
bool GetFontAttributes(const wxFont& font, int flags = wxTEXT_ATTR_FONT);
@ -337,7 +334,7 @@ public:
const wxString& GetFontFaceName() const { return m_fontFaceName; }
wxFontEncoding GetFontEncoding() const { return m_fontEncoding; }
wxFont GetFont() const { return CreateFont(); }
wxFont GetFont() const;
const wxString& GetCharacterStyleName() const { return m_characterStyleName; }
const wxString& GetParagraphStyleName() const { return m_paragraphStyleName; }

View File

@ -297,8 +297,11 @@ bool wxTextAttr::EqPartial(const wxTextAttr& attr, int flags) const
}
// Create font from font attributes.
wxFont wxTextAttr::CreateFont() const
wxFont wxTextAttr::GetFont() const
{
if ( !HasFont() )
return wxNullFont;
int fontSize = 10;
if (HasFontSize())
fontSize = GetFontSize();