X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a3d3d3bf6cd84e44521a1617df5e38ed02c6fee2..a8f4cabe1ea3d5390f1353c0bf5649fa1476e08b:/src/mac/dcprint.cpp diff --git a/src/mac/dcprint.cpp b/src/mac/dcprint.cpp index d50e8b3933..6c32de8ad0 100644 --- a/src/mac/dcprint.cpp +++ b/src/mac/dcprint.cpp @@ -27,6 +27,9 @@ #include "wx/msgdlg.h" #include #include "wx/mac/uma.h" +#ifndef __DARWIN__ +#include "Printing.h" +#endif #if defined(TARGET_CARBON) && !defined(__DARWIN__) # if PM_USE_SESSION_APIS @@ -57,7 +60,7 @@ wxPrinterDC::wxPrinterDC(const wxPrintData& printdata) if ( err != noErr ) #endif { - message.Printf( "Print Error %d", err ) ; + message.Printf( "Print Error %ld", err ) ; wxMessageDialog dialog( NULL , message , "", wxICON_HAND | wxOK) ; dialog.ShowModal(); #if TARGET_CARBON && PM_USE_SESSION_APIS @@ -78,7 +81,7 @@ wxPrinterDC::wxPrinterDC(const wxPrintData& printdata) err = PrError() ; if ( err != noErr ) { - message.Printf( "Print Error %d", err ) ; + message.Printf( "Print Error %ld", err ) ; wxMessageDialog dialog( NULL , message , "", wxICON_HAND | wxOK) ; dialog.ShowModal(); UMAPrClose(NULL) ; @@ -90,7 +93,7 @@ wxPrinterDC::wxPrinterDC(const wxPrintData& printdata) err = PrError() ; if ( err ) { - message.Printf( "Print Error %d", err ) ; + message.Printf( "Print Error %ld", err ) ; wxMessageDialog dialog( NULL , message , "", wxICON_HAND | wxOK) ; dialog.ShowModal(); UMAPrClose(NULL) ; @@ -114,7 +117,7 @@ wxPrinterDC::wxPrinterDC(const wxPrintData& printdata) if ( err != noErr || m_macPrintSessionPort == kPMNoReference ) #endif { - message.Printf( "Print Error %d", err ) ; + message.Printf( "Print Error %ld", err ) ; wxMessageDialog dialog( NULL , message , "", wxICON_HAND | wxOK) ; dialog.ShowModal(); #if TARGET_CARBON && PM_USE_SESSION_APIS @@ -136,7 +139,7 @@ wxPrinterDC::wxPrinterDC(const wxPrintData& printdata) err = PMGetAdjustedPaperRect((PMPageFormat)m_printData.m_macPageFormat, &rPaper); if ( err != noErr ) { - message.Printf( "Print Error %d", err ) ; + message.Printf( "Print Error %ld", err ) ; wxMessageDialog dialog( NULL , message , "", wxICON_HAND | wxOK) ; dialog.ShowModal(); #if TARGET_CARBON && PM_USE_SESSION_APIS @@ -147,8 +150,8 @@ wxPrinterDC::wxPrinterDC(const wxPrintData& printdata) m_ok = FALSE; return; } - m_maxX = rPaper.right - rPaper.left ; - m_maxY = rPaper.bottom - rPaper.top ; + m_maxX = wxCoord(rPaper.right - rPaper.left) ; + m_maxY = wxCoord(rPaper.bottom - rPaper.top); #else m_maxX = (**(THPrint)m_printData.m_macPrintSettings).rPaper.right - (**(THPrint)m_printData.m_macPrintSettings).rPaper.left ; m_maxY = (**(THPrint)m_printData.m_macPrintSettings).rPaper.bottom - (**(THPrint)m_printData.m_macPrintSettings).rPaper.top ; @@ -175,7 +178,7 @@ wxPrinterDC::~wxPrinterDC(void) } else { - message.Printf( "Print Error %d", err ) ; + message.Printf( "Print Error %ld", err ) ; wxMessageDialog dialog( NULL , message , "", wxICON_HAND | wxOK) ; dialog.ShowModal(); } @@ -193,7 +196,7 @@ wxPrinterDC::~wxPrinterDC(void) #endif if ( err != noErr ) { - message.Printf( "Print Error %d", err ) ; + message.Printf( "Print Error %ld", err ) ; wxMessageDialog dialog( NULL , message , "", wxICON_HAND | wxOK) ; dialog.ShowModal(); } @@ -249,7 +252,7 @@ void wxPrinterDC::StartPage(void) err = PrError() ; if ( err != noErr ) { - message.Printf( "Print Error %d", err ) ; + message.Printf( "Print Error %ld", err ) ; wxMessageDialog dialog( NULL , message , "", wxICON_HAND | wxOK) ; dialog.ShowModal(); ::PrClosePage( (TPPrPort) m_macPrintSessionPort ) ; @@ -268,7 +271,7 @@ void wxPrinterDC::StartPage(void) #endif if ( err != noErr ) { - message.Printf( "Print Error %d", err ) ; + message.Printf( "Print Error %ld", err ) ; wxMessageDialog dialog( NULL , message , "", wxICON_HAND | wxOK) ; dialog.ShowModal(); #if PM_USE_SESSION_APIS @@ -299,7 +302,7 @@ void wxPrinterDC::EndPage(void) err = PrError() ; if ( err != noErr ) { - message.Printf( "Print Error %d", err ) ; + message.Printf( "Print Error %ld", err ) ; wxMessageDialog dialog( NULL , message , "", wxICON_HAND | wxOK) ; dialog.ShowModal(); ::PrCloseDoc( (TPPrPort) m_macPrintSessionPort ) ; @@ -315,7 +318,7 @@ void wxPrinterDC::EndPage(void) #endif if ( err != noErr ) { - message.Printf( "Print Error %d", err ) ; + message.Printf( "Print Error %ld", err ) ; wxMessageDialog dialog( NULL , message , "", wxICON_HAND | wxOK) ; dialog.ShowModal(); #if PM_USE_SESSION_APIS