hack: don't use wxCharTypeBuffer<char>::operator[]() as VC gives linking error for it for some reason

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50639 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2007-12-11 13:02:33 +00:00
parent 3d2085a422
commit f99b00fabb

View File

@ -1342,11 +1342,9 @@ void wxPostScriptDCImpl::DoDrawText( const wxString& text, wxCoord x, wxCoord y
PsPrint( buffer );
PsPrint( "(" );
size_t len = strlen(textbuf);
size_t i;
for (i = 0; i < len; i++)
for ( const char *p = textbuf; *p != '\0'; p++ )
{
int c = (unsigned char) textbuf[i];
int c = (unsigned char)*p;
if (c == ')' || c == '(' || c == '\\')
{
/* Cope with special characters */
@ -1450,26 +1448,27 @@ void wxPostScriptDCImpl::DoDrawRotatedText( const wxString& text, wxCoord x, wxC
PsPrint( "(" );
const wxWX2MBbuf textbuf = text.mb_str();
size_t len = strlen(textbuf);
size_t i;
for (i = 0; i < len; i++)
if ( textbuf )
{
int c = (unsigned char) textbuf[i];
if (c == ')' || c == '(' || c == '\\')
for ( const char *p = textbuf; *p != '\0'; p++ )
{
/* Cope with special characters */
PsPrint( "\\" );
PsPrint( (char) c );
}
else if ( c >= 128 )
{
/* Cope with character codes > 127 */
buffer.Printf( "\\%o", c);
PsPrint( buffer );
}
else
{
PsPrint( (char) c );
int c = (unsigned char)*p;
if (c == ')' || c == '(' || c == '\\')
{
/* Cope with special characters */
PsPrint( "\\" );
PsPrint( (char) c );
}
else if ( c >= 128 )
{
/* Cope with character codes > 127 */
buffer.Printf( "\\%o", c);
PsPrint( buffer );
}
else
{
PsPrint( (char) c );
}
}
}