more GTK2+ANSI fixes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28286 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2004-07-17 20:50:46 +00:00
parent 89816e4f30
commit 7706daf38b
2 changed files with 12 additions and 0 deletions

View File

@@ -1473,6 +1473,8 @@ void wxWindowDC::DoDrawText( const wxString &text, wxCoord x, wxCoord y )
const wxCharBuffer data = wxConvUTF8.cWC2MB( text );
#else
const wxWCharBuffer wdata = wxConvLocal.cMB2WC( text );
if ( !wdata )
return;
const wxCharBuffer data = wxConvUTF8.cWC2MB( wdata );
#endif
size_t datalen = strlen((const char*)data);
@@ -1714,7 +1716,11 @@ void wxWindowDC::DoGetTextExtent(const wxString &string,
#else
const wxWCharBuffer wdata = wxConvLocal.cMB2WC( string );
if ( !wdata )
{
if (width) (*width) = 0;
if (height) (*height) = 0;
return;
}
const wxCharBuffer data = wxConvUTF8.cWC2MB( wdata );
const char *dataUTF8 = (const char *)data;
#endif