X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cdccdfabb29bd51aded9aac141e1f7bbd6c85443..ee5aa9d44fa75e88bce9981d7d02dea9f6d5f3c4:/src/os2/dcprint.cpp?ds=sidebyside diff --git a/src/os2/dcprint.cpp b/src/os2/dcprint.cpp index c6e79fdb52..1c4a11c248 100644 --- a/src/os2/dcprint.cpp +++ b/src/os2/dcprint.cpp @@ -14,13 +14,13 @@ #if wxUSE_PRINTING_ARCHITECTURE +#include "wx/dcprint.h" + #define INCL_DEV #define INCL_GPI #define INCL_PM #include -#include "wx/dcprint.h" - #ifndef WX_PRECOMP #include "wx/app.h" #include "wx/math.h" @@ -41,8 +41,8 @@ wxPrinterDC::wxPrinterDC( const wxString& rsDriverName, bool bInteractive, int nOrientation ) { - DEVOPENSTRUC vDevOpen = { (char*)rsDeviceName.c_str() - ,(char*)rsDriverName.c_str() + DEVOPENSTRUC vDevOpen = { (char*)rsDeviceName.wx_str() + ,(char*)rsDriverName.wx_str() ,NULL ,NULL ,NULL @@ -223,6 +223,15 @@ void wxPrinterDC::EndPage() // if (m_hDC) // ::EndPage((HDC) m_hDC); } // end of wxPrinterDC::EndPage + +wxRect wxPrinterDC::GetPaperRect() +{ + // Use page rect if we can't get paper rect. + wxCoord w, h; + GetSize(&w, &h); + return wxRect(0, 0, w, h); +} + #if 0 // Returns default device and port names static bool wxGetDefaultDeviceName( wxString& rsDeviceName, wxString& rsPortName ) @@ -278,7 +287,7 @@ static bool wxGetDefaultDeviceName( wxString& rsDeviceName, wxString& rsPortName GlobalFree(pd.hDevMode); pd.hDevMode=NULL; } - return ( deviceName != wxT("") ); + return !deviceName.empty(); */ return true; } // end of wxGetDefaultDeviceName