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