X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cb7d73757f9e8771e7d8fc6b22f1acf27aac35bd..1722a3f626f7b29b42a22fc6329ce12fb5e8ed90:/src/os2/dcprint.cpp diff --git a/src/os2/dcprint.cpp b/src/os2/dcprint.cpp index 87c745f2e8..1c4a11c248 100644 --- a/src/os2/dcprint.cpp +++ b/src/os2/dcprint.cpp @@ -12,23 +12,24 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" +#if wxUSE_PRINTING_ARCHITECTURE + +#include "wx/dcprint.h" + #define INCL_DEV #define INCL_GPI #define INCL_PM #include #ifndef WX_PRECOMP -#include "wx/app.h" -#include "wx/math.h" + #include "wx/app.h" + #include "wx/math.h" + #include "wx/string.h" + #include "wx/log.h" + #include "wx/window.h" #endif -#include "wx/string.h" -#include "wx/log.h" -#include "wx/window.h" #include "wx/os2/private.h" -#include "wx/dcprint.h" - -#if wxUSE_PRINTING_ARCHITECTURE IMPLEMENT_CLASS(wxPrinterDC, wxDC) @@ -40,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 @@ -222,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 ) @@ -277,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