added wxCSConv::IsOk() (patch 1637944)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44251 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-01-18 20:39:10 +00:00
parent 646c7e13ea
commit 0f0298b10c
5 changed files with 48 additions and 2 deletions

View File

@@ -3518,6 +3518,19 @@ void wxCSConv::CreateConvIfNeeded() const
}
}
bool wxCSConv::IsOk() const
{
CreateConvIfNeeded();
// special case: no convReal created for wxFONTENCODING_ISO8859_1
if ( m_encoding == wxFONTENCODING_ISO8859_1 )
return true; // always ok as we do it ourselves
// m_convReal->IsOk() is called at its own creation, so we know it must
// be ok if m_convReal is non-NULL
return m_convReal != NULL;
}
size_t wxCSConv::ToWChar(wchar_t *dst, size_t dstLen,
const char *src, size_t srcLen) const
{