X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/08680429a25d66e284c75f69f14fe8ca6ab15f72..27c78e4552aaefac9a4db0d4453eff09cdfef2ad:/src/msw/dcprint.cpp diff --git a/src/msw/dcprint.cpp b/src/msw/dcprint.cpp index 91e48e9c5e..c1e1bbceca 100644 --- a/src/msw/dcprint.cpp +++ b/src/msw/dcprint.cpp @@ -17,10 +17,6 @@ // headers // ---------------------------------------------------------------------------- -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) - #pragma implementation "dcprint.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -46,12 +42,9 @@ #include "wx/dcprint.h" #include "wx/printdlg.h" #include "wx/msw/printdlg.h" -#include "math.h" - -#if wxUSE_COMMON_DIALOGS - #include -#endif +#include "wx/math.h" +#include "wx/msw/wrapcdlg.h" #ifndef __WIN32__ #include #endif @@ -182,7 +175,7 @@ bool wxPrinterDC::StartDoc(const wxString& message) wxString filename(m_printData.GetFilename()); - if (filename.IsEmpty()) + if (filename.empty()) docinfo.lpszOutput = NULL; else docinfo.lpszOutput = (const wxChar *) filename; @@ -278,7 +271,7 @@ static bool wxGetDefaultDeviceName(wxString& deviceName, wxString& portName) GlobalFree(pd.hDevMode); pd.hDevMode=NULL; } - return ( deviceName != wxEmptyString ); + return ( !deviceName.empty() ); } // Gets an HDC for the specified printer configuration @@ -404,7 +397,7 @@ void wxPrinterDC::DoDrawBitmap(const wxBitmap& bmp, if ( !(::GetDeviceCaps(GetHdc(), RASTERCAPS) & RC_STRETCHDIB) || !DrawBitmapUsingStretchDIBits(GetHdc(), bmp, x, y) ) { - // no support for StretchDIBits() or an error occured if we got here + // no support for StretchDIBits() or an error occurred if we got here wxMemoryDC memDC; memDC.SelectObject(bmp);