From 6d50343d87bec1ad537a74c43e2ed2a114574a5a Mon Sep 17 00:00:00 2001 From: =?utf8?q?W=C5=82odzimierz=20Skiba?= Date: Mon, 8 May 2006 22:34:12 +0000 Subject: [PATCH] Include wx/dcprint.h according to precompiled headers of wx/wx.h (with other minor cleaning). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39111 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/prntbase.cpp | 3 ++- src/generic/printps.cpp | 2 +- src/mac/carbon/dc.cpp | 2 +- src/mac/carbon/dccg.cpp | 2 +- src/mac/carbon/dcprint.cpp | 13 +++++++------ src/mac/carbon/printdlg.cpp | 2 +- src/mac/carbon/printmac.cpp | 2 +- src/mac/classic/dc.cpp | 2 +- src/mac/classic/dcprint.cpp | 13 ++++++------- src/mac/classic/printdlg.cpp | 2 +- src/mac/classic/printmac.cpp | 4 ++-- src/msw/dc.cpp | 2 +- src/msw/dcprint.cpp | 9 +++++---- src/msw/printdlg.cpp | 14 +++++++------- src/msw/printwin.cpp | 2 +- src/os2/dc.cpp | 4 ++-- src/os2/dcprint.cpp | 6 +++--- src/palmos/dc.cpp | 3 +-- src/palmos/dcprint.cpp | 7 ++++--- src/palmos/printdlg.cpp | 2 +- src/palmos/printpalm.cpp | 2 +- 21 files changed, 50 insertions(+), 48 deletions(-) diff --git a/src/common/prntbase.cpp b/src/common/prntbase.cpp index 3b977cc779..800ba84670 100644 --- a/src/common/prntbase.cpp +++ b/src/common/prntbase.cpp @@ -18,6 +18,8 @@ #if wxUSE_PRINTING_ARCHITECTURE +#include "wx/dcprint.h" + #ifndef WX_PRECOMP #include "wx/utils.h" #include "wx/dc.h" @@ -35,7 +37,6 @@ #endif // !WX_PRECOMP #include "wx/prntbase.h" -#include "wx/dcprint.h" #include "wx/printdlg.h" #include "wx/print.h" #include "wx/module.h" diff --git a/src/generic/printps.cpp b/src/generic/printps.cpp index 6b73aab674..18653aa45d 100644 --- a/src/generic/printps.cpp +++ b/src/generic/printps.cpp @@ -34,10 +34,10 @@ #include "wx/intl.h" #include "wx/progdlg.h" #include "wx/log.h" + #include "wx/dcprint.h" #endif #include "wx/generic/printps.h" -#include "wx/dcprint.h" #include "wx/printdlg.h" #include "wx/generic/prntdlgg.h" #include "wx/generic/progdlgg.h" diff --git a/src/mac/carbon/dc.cpp b/src/mac/carbon/dc.cpp index 719b77aecc..76717f4b4c 100644 --- a/src/mac/carbon/dc.cpp +++ b/src/mac/carbon/dc.cpp @@ -19,10 +19,10 @@ #include "wx/log.h" #include "wx/app.h" #include "wx/dcmemory.h" + #include "wx/dcprint.h" #endif #include "wx/mac/uma.h" -#include "wx/dcprint.h" #include "wx/region.h" #include "wx/image.h" diff --git a/src/mac/carbon/dccg.cpp b/src/mac/carbon/dccg.cpp index 0431b8eba7..fb97b10859 100755 --- a/src/mac/carbon/dccg.cpp +++ b/src/mac/carbon/dccg.cpp @@ -19,10 +19,10 @@ #include "wx/log.h" #include "wx/app.h" #include "wx/dcmemory.h" + #include "wx/dcprint.h" #endif #include "wx/mac/uma.h" -#include "wx/dcprint.h" #include "wx/region.h" #include "wx/image.h" diff --git a/src/mac/carbon/dcprint.cpp b/src/mac/carbon/dcprint.cpp index a7d3de26e9..27a2734309 100644 --- a/src/mac/carbon/dcprint.cpp +++ b/src/mac/carbon/dcprint.cpp @@ -1,12 +1,12 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: dcprint.cpp +// Name: src/mac/carbon/dcprint.cpp // Purpose: wxPrinterDC class // Author: Julian Smart // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ // Copyright: (c) Julian Smart -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// // For compilers that support precompilation, includes "wx.h". @@ -15,13 +15,14 @@ #if wxUSE_PRINTING_ARCHITECTURE #ifdef __BORLANDC__ -#pragma hdrstop + #pragma hdrstop #endif +#include "wx/dcprint.h" + #ifndef WX_PRECOMP #endif -#include "wx/dcprint.h" #include "wx/msgdlg.h" #include "wx/math.h" #include "wx/mac/uma.h" @@ -207,7 +208,7 @@ void wxMacCarbonPrinterDC::EndPage( wxPrinterDC* dc ) wxPrinterDC::wxPrinterDC(const wxPrintData& printdata) { - m_ok = FALSE ; + m_ok = false ; m_printData = printdata ; m_printData.ConvertToNative() ; m_nativePrinterDC = wxNativePrinterDC::Create( &m_printData ) ; @@ -238,7 +239,7 @@ wxPrinterDC::~wxPrinterDC(void) } #if wxMAC_USE_CORE_GRAPHICS -void wxPrinterDC::MacSetCGContext( void * cg ) +void wxPrinterDC::MacSetCGContext( void * cg ) { ((wxMacCGContext*)(m_graphicContext))->SetNativeContext( (CGContextRef) cg ) ; m_graphicContext->SetPen( m_pen ) ; diff --git a/src/mac/carbon/printdlg.cpp b/src/mac/carbon/printdlg.cpp index 9b1af6a6b7..1417d0e6f0 100644 --- a/src/mac/carbon/printdlg.cpp +++ b/src/mac/carbon/printdlg.cpp @@ -15,11 +15,11 @@ #ifndef WXPRECOMP #include "wx/object.h" + #include "wx/dcprint.h" #endif #include "wx/printdlg.h" #include "wx/mac/printdlg.h" -#include "wx/dcprint.h" #include "wx/msgdlg.h" #include "wx/mac/private/print.h" diff --git a/src/mac/carbon/printmac.cpp b/src/mac/carbon/printmac.cpp index 11df02ce13..9ce3354d46 100644 --- a/src/mac/carbon/printmac.cpp +++ b/src/mac/carbon/printmac.cpp @@ -23,6 +23,7 @@ #include "wx/dc.h" #include "wx/app.h" #include "wx/msgdlg.h" + #include "wx/dcprint.h" #endif #include "wx/math.h" @@ -31,7 +32,6 @@ #include "wx/mac/printmac.h" #include "wx/mac/private/print.h" -#include "wx/dcprint.h" #include "wx/printdlg.h" #include "wx/mac/printdlg.h" diff --git a/src/mac/classic/dc.cpp b/src/mac/classic/dc.cpp index a8c87e57be..b368d67128 100644 --- a/src/mac/classic/dc.cpp +++ b/src/mac/classic/dc.cpp @@ -17,10 +17,10 @@ #include "wx/log.h" #include "wx/app.h" #include "wx/dcmemory.h" + #include "wx/dcprint.h" #endif #include "wx/mac/uma.h" -#include "wx/dcprint.h" #include "wx/region.h" #include "wx/image.h" diff --git a/src/mac/classic/dcprint.cpp b/src/mac/classic/dcprint.cpp index 9631602190..8d21ba124b 100644 --- a/src/mac/classic/dcprint.cpp +++ b/src/mac/classic/dcprint.cpp @@ -1,25 +1,26 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: dcprint.cpp +// Name: src/mac/classic/dcprint.cpp // Purpose: wxPrinterDC class // Author: Julian Smart // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ // Copyright: (c) Julian Smart -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" #ifdef __BORLANDC__ -#pragma hdrstop + #pragma hdrstop #endif +#include "wx/dcprint.h" + #ifndef WX_PRECOMP #endif -#include "wx/dcprint.h" #include "wx/msgdlg.h" #include "wx/math.h" #include "wx/mac/uma.h" @@ -300,7 +301,7 @@ void wxMacClassicPrinterDC::EndPage( wxPrinterDC* dc ) wxPrinterDC::wxPrinterDC(const wxPrintData& printdata) { - m_ok = FALSE ; + m_ok = false ; m_printData = printdata ; m_printData.ConvertToNative() ; m_nativePrinterDC = wxNativePrinterDC::Create( &m_printData ) ; @@ -406,5 +407,3 @@ void wxPrinterDC::DoGetSize(int *width, int *height) const if ( height ) * height = m_nativePrinterDC->GetMaxY() ; } - - diff --git a/src/mac/classic/printdlg.cpp b/src/mac/classic/printdlg.cpp index 94f7469d8c..44d00b882c 100644 --- a/src/mac/classic/printdlg.cpp +++ b/src/mac/classic/printdlg.cpp @@ -14,10 +14,10 @@ #ifndef WX_PRECOMP #include "wx/object.h" + #include "wx/dcprint.h" #endif #include "wx/printdlg.h" -#include "wx/dcprint.h" #include "wx/msgdlg.h" #include "wx/mac/private/print.h" diff --git a/src/mac/classic/printmac.cpp b/src/mac/classic/printmac.cpp index f179f5e7f6..bb70bd50e8 100644 --- a/src/mac/classic/printmac.cpp +++ b/src/mac/classic/printmac.cpp @@ -21,6 +21,7 @@ #include "wx/dc.h" #include "wx/app.h" #include "wx/msgdlg.h" + #include "wx/dcprint.h" #endif #include "wx/mac/uma.h" @@ -31,7 +32,6 @@ #define mm2pt 2.83464566929 #define pt2mm 0.352777777778 -#include "wx/dcprint.h" #include "wx/printdlg.h" #include @@ -135,7 +135,7 @@ void wxMacCarbonPrintData::TransferFrom( wxPrintData* data ) kPMLandscape : kPMPortrait , false ) ; // collate cannot be set #if 0 // not yet tested - if ( m_printerName.Length() > 0 ) + if ( !m_printerName.empty() ) PMSessionSetCurrentPrinter( (PMPrintSession) m_macPrintSession , wxMacCFStringHolder( m_printerName , wxFont::GetDefaultEncoding() ) ) ; #endif PMColorMode color ; diff --git a/src/msw/dc.cpp b/src/msw/dc.cpp index ca841ef823..1015eaa58a 100644 --- a/src/msw/dc.cpp +++ b/src/msw/dc.cpp @@ -35,10 +35,10 @@ #include "wx/dcmemory.h" #include "wx/log.h" #include "wx/icon.h" + #include "wx/dcprint.h" #endif #include "wx/sysopt.h" -#include "wx/dcprint.h" #include "wx/module.h" #include "wx/dynlib.h" diff --git a/src/msw/dcprint.cpp b/src/msw/dcprint.cpp index 3fbe8b2085..1850d5e873 100644 --- a/src/msw/dcprint.cpp +++ b/src/msw/dcprint.cpp @@ -24,6 +24,10 @@ #pragma hdrstop #endif +#if wxUSE_PRINTING_ARCHITECTURE + +#include "wx/dcprint.h" + #ifndef WX_PRECOMP #include "wx/string.h" #include "wx/log.h" @@ -31,15 +35,12 @@ #include "wx/dcmemory.h" #endif -#if wxUSE_PRINTING_ARCHITECTURE - #include "wx/msw/private.h" #if wxUSE_WXDIB -#include "wx/msw/dib.h" + #include "wx/msw/dib.h" #endif -#include "wx/dcprint.h" #include "wx/printdlg.h" #include "wx/msw/printdlg.h" #include "wx/math.h" diff --git a/src/msw/printdlg.cpp b/src/msw/printdlg.cpp index 33e9028994..6a24fedea3 100644 --- a/src/msw/printdlg.cpp +++ b/src/msw/printdlg.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: printdlg.cpp +// Name: src/msw/printdlg.cpp // Purpose: wxPrintDialog, wxPageSetupDialog // Author: Julian Smart // Modified by: @@ -30,12 +30,12 @@ #ifndef WX_PRECOMP #include "wx/app.h" + #include "wx/dcprint.h" #endif #include "wx/cmndata.h" #include "wx/printdlg.h" #include "wx/msw/printdlg.h" -#include "wx/dcprint.h" #include "wx/paper.h" #include @@ -95,19 +95,19 @@ static HGLOBAL wxCreateDevNames(const wxString& driverName, const wxString& prin else { hDev = GlobalAlloc(GPTR, 4*sizeof(WORD)+ - ( driverName.Length() + 1 + - printerName.Length() + 1 + - portName.Length()+1 ) * sizeof(wxChar) ); + ( driverName.length() + 1 + + printerName.length() + 1 + + portName.length()+1 ) * sizeof(wxChar) ); LPDEVNAMES lpDev = (LPDEVNAMES)GlobalLock(hDev); lpDev->wDriverOffset = sizeof(WORD) * 4 / sizeof(wxChar); wxStrcpy((wxChar*)lpDev + lpDev->wDriverOffset, driverName); lpDev->wDeviceOffset = (WORD)( lpDev->wDriverOffset + - driverName.Length() + 1 ); + driverName.length() + 1 ); wxStrcpy((wxChar*)lpDev + lpDev->wDeviceOffset, printerName); lpDev->wOutputOffset = (WORD)( lpDev->wDeviceOffset + - printerName.Length() + 1 ); + printerName.length() + 1 ); wxStrcpy((wxChar*)lpDev + lpDev->wOutputOffset, portName); lpDev->wDefault = 0; diff --git a/src/msw/printwin.cpp b/src/msw/printwin.cpp index 82fcaf46d8..0f7103965a 100644 --- a/src/msw/printwin.cpp +++ b/src/msw/printwin.cpp @@ -37,10 +37,10 @@ #include "wx/msgdlg.h" #include "wx/intl.h" #include "wx/log.h" + #include "wx/dcprint.h" #endif #include "wx/msw/printwin.h" -#include "wx/dcprint.h" #include "wx/printdlg.h" #include "wx/msw/private.h" diff --git a/src/os2/dc.cpp b/src/os2/dc.cpp index ee3e233a89..86e618a0f4 100644 --- a/src/os2/dc.cpp +++ b/src/os2/dc.cpp @@ -23,19 +23,19 @@ #include "wx/log.h" #include "wx/icon.h" #include "wx/msgdlg.h" + #include "wx/dcprint.h" #if wxUSE_STATUSBAR #include "wx/statusbr.h" #endif #endif #include "wx/module.h" -#include "wx/dcprint.h" #include #include "wx/os2/private.h" - IMPLEMENT_ABSTRACT_CLASS(wxDC, wxObject) +IMPLEMENT_ABSTRACT_CLASS(wxDC, wxObject) // // wxWidgets uses the Microsoft convention that the origin is the UPPER left. diff --git a/src/os2/dcprint.cpp b/src/os2/dcprint.cpp index c6e79fdb52..e71b9dc084 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" @@ -278,7 +278,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 diff --git a/src/palmos/dc.cpp b/src/palmos/dc.cpp index 6a90635a73..fc359b5568 100644 --- a/src/palmos/dc.cpp +++ b/src/palmos/dc.cpp @@ -34,10 +34,10 @@ #include "wx/dcmemory.h" #include "wx/log.h" #include "wx/icon.h" + #include "wx/dcprint.h" #endif #include "wx/sysopt.h" -#include "wx/dcprint.h" #include "wx/module.h" #include "wx/dynload.h" @@ -497,4 +497,3 @@ private: IMPLEMENT_DYNAMIC_CLASS(wxDCModule, wxModule) #endif // wxUSE_DC_CACHEING - diff --git a/src/palmos/dcprint.cpp b/src/palmos/dcprint.cpp index 22fea0a51e..fae66da4eb 100644 --- a/src/palmos/dcprint.cpp +++ b/src/palmos/dcprint.cpp @@ -24,6 +24,10 @@ #pragma hdrstop #endif +#if wxUSE_PRINTING_ARCHITECTURE + +#include "wx/dcprint.h" + #ifndef WX_PRECOMP #include "wx/string.h" #include "wx/log.h" @@ -32,15 +36,12 @@ #include "wx/math.h" #endif -#if wxUSE_PRINTING_ARCHITECTURE - #include "wx/palmos/private.h" #if wxUSE_WXDIB #include "wx/palmos/dib.h" #endif -#include "wx/dcprint.h" // ---------------------------------------------------------------------------- // wxWin macros diff --git a/src/palmos/printdlg.cpp b/src/palmos/printdlg.cpp index 63d95d08af..842cf6a89a 100644 --- a/src/palmos/printdlg.cpp +++ b/src/palmos/printdlg.cpp @@ -30,10 +30,10 @@ #ifndef WX_PRECOMP #include "wx/app.h" + #include "wx/dcprint.h" #endif #include "wx/printdlg.h" -#include "wx/dcprint.h" #include "wx/palmos/private.h" diff --git a/src/palmos/printpalm.cpp b/src/palmos/printpalm.cpp index 747c6c16fb..fdd9f8691b 100644 --- a/src/palmos/printpalm.cpp +++ b/src/palmos/printpalm.cpp @@ -37,10 +37,10 @@ #include "wx/msgdlg.h" #include "wx/intl.h" #include "wx/log.h" + #include "wx/dcprint.h" #endif #include "wx/palmos/printpalm.h" -#include "wx/dcprint.h" #include "wx/printdlg.h" #include "wx/palmos/private.h" -- 2.47.2