X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/134677bde90cc4132fd51af76736e41ca6acaf6c..b916f809336755620b010293637b12763f01455d:/src/generic/dcpsg.cpp?ds=sidebyside diff --git a/src/generic/dcpsg.cpp b/src/generic/dcpsg.cpp index 701c26e46f..7468a61881 100644 --- a/src/generic/dcpsg.cpp +++ b/src/generic/dcpsg.cpp @@ -37,7 +37,7 @@ #include "wx/image.h" #include "wx/log.h" #include "wx/generic/dcpsg.h" -#include "wx/generic/prntdlgg.h" +#include "wx/printdlg.h" #include "wx/button.h" #include "wx/stattext.h" #include "wx/radiobox.h" @@ -1228,8 +1228,8 @@ void wxPostScriptDC::DoDrawText( const wxString& text, wxCoord x, wxCoord y ) fprintf( m_pstream, "(" ); const wxWX2MBbuf textbuf = text.mb_str(); - int len = strlen(textbuf); - int i; + size_t len = strlen(textbuf); + size_t i; for (i = 0; i < len; i++) { int c = (unsigned char) textbuf[i]; @@ -1338,14 +1338,14 @@ void wxPostScriptDC::DoDrawRotatedText( const wxString& text, wxCoord x, wxCoord char buffer[100]; sprintf(buffer, "%.8f rotate\n", angle); - int i; + size_t i; for (i = 0; i < 100; i++) if (buffer[i] == ',') buffer[i] = '.'; fprintf(m_pstream, buffer); fprintf( m_pstream, "(" ); const wxWX2MBbuf textbuf = text.mb_str(); - int len = strlen(textbuf); + size_t len = strlen(textbuf); for (i = 0; i < len; i++) { int c = (unsigned char) textbuf[i]; @@ -1577,7 +1577,7 @@ bool wxPostScriptDC::StartDoc( const wxString& message ) m_printData.SetFilename(filename); } - m_pstream = fopen( m_printData.GetFilename().fn_str(), "w+" ); + m_pstream = wxFopen( m_printData.GetFilename().fn_str(), wxT("w+") ); if (!m_pstream) { @@ -2034,10 +2034,8 @@ void wxPostScriptDC::DoGetTextExtent(const wxString& string, - afmFile = fopen() may fail and in that case the next if branch MUST be executed - and it would not if there was "else" */ { - afmName = wxGetInstallPrefix(); + afmName = wxGetDataDir(); afmName << wxFILE_SEP_PATH - << wxT("share") << wxFILE_SEP_PATH - << wxT("wx") << wxFILE_SEP_PATH #if defined(__LINUX__) || defined(__FREEBSD__) << wxT("gs_afm") << wxFILE_SEP_PATH #else